OSCR

Astrocytes mediate the dopaminergic modulation of tonic GABAergic signaling in substantia nigra.

Code ↔ Paper

The paper beside its authors' code: matches between them have not been computed for this paper yet.

Paper

Loaded from Europe PMC by your browser; OSCR does not store it: doi.org · Europe PMC

The paper is loaded when this pane is shown.

The authors' code

Mathematica · 802 lines · 33 KB · CC-BY-4.0

  1. (* Content-type: application/vnd.wolfram.mathematica *)
  2. (*** Wolfram Notebook File ***)
  3. (* http://www.wolfram.com/nb *)
  4. (* CreatedBy='Mathematica 13.3' *)
  5. (*CacheID: 234*)
  6. (* Internal cache information:
  7. NotebookFileLineBreakTest
  8. NotebookFileLineBreakTest
  9. NotebookDataPosition[ 158, 7]
  10. NotebookDataLength[ 33442, 794]
  11. NotebookOptionsPosition[ 31454, 758]
  12. NotebookOutlinePosition[ 31848, 774]
  13. CellTagsIndexPosition[ 31805, 771]
  14. WindowFrame->Normal*)
  15. (* Beginning of Notebook Content *)
  16. Notebook[{
  17. Cell[CellGroupData[{
  18. Cell["Detect Mean Spike rate per trial/episode", "Subsection",
  19. CellChangeTimes->{{3.8087544359276977`*^9, 3.8087544585196257`*^9}, {
  20. 3.847470176578113*^9, 3.847470187110531*^9}, {3.920047365334494*^9,
  21. 3.920047382756695*^9}},ExpressionUUID->"aab53684-04ba-40fd-ac9a-\
  22. 77de9012f534"],
  23. Cell[BoxData[
  24. RowBox[{
  25. RowBox[{"(*", " ",
  26. RowBox[{
  27. RowBox[{
  28. "Pull", " ", "in", " ", "Axon", " ", "text", " ", "file", " ", "records",
  29. " ", "of", " ", "detected", " ", "spikes", " ", "exported", " ", "from",
  30. " ", "ClampFit"}], ",", " ",
  31. RowBox[{"trim", " ", "the", " ", "Header"}]}], " ", "*)"}],
  32. "\[IndentingNewLine]",
  33. RowBox[{
  34. RowBox[{
  35. RowBox[{"base", "=",
  36. RowBox[{"Import", "[",
  37. RowBox[{"\"\<FILENAME.atf\>\"", ",", "\"\<Table\>\""}], "]"}]}], ";"}],
  38. "\[IndentingNewLine]",
  39. RowBox[{
  40. RowBox[{"baseTrim", "=",
  41. RowBox[{"base", "[",
  42. RowBox[{"[",
  43. RowBox[{"4", ";;",
  44. RowBox[{"-", "1"}]}], "]"}], "]"}]}], ";"}], "\n",
  45. RowBox[{
  46. RowBox[{"eps", "=",
  47. RowBox[{"Range", "[",
  48. RowBox[{"First", "[",
  49. RowBox[{"baseTrim", "[",
  50. RowBox[{"[",
  51. RowBox[{"-", "1"}], "]"}], "]"}], "]"}], "]"}]}], ";"}]}]}]], "Input",\
  52. CellChangeTimes->{{3.808747959870371*^9, 3.8087481035498753`*^9}, {
  53. 3.8087490818269396`*^9, 3.808749083197881*^9}, {3.808837399807329*^9,
  54. 3.808837402883051*^9}, {3.8088380944038*^9, 3.808838212476153*^9},
  55. 3.808839040431368*^9, {3.8092888321225443`*^9, 3.8092888366449785`*^9},
  56. 3.809697365286765*^9, 3.81004529943439*^9, 3.812325649791421*^9,
  57. 3.8123258135160365`*^9, 3.813608742957777*^9, 3.813609009997369*^9, {
  58. 3.815180179476551*^9, 3.8151801799055057`*^9}, 3.815181603519091*^9,
  59. 3.815181868147044*^9, 3.8151822268436484`*^9, 3.815182640030088*^9, {
  60. 3.8151831177615623`*^9, 3.815183118273658*^9}, 3.817275409787628*^9,
  61. 3.817275748833499*^9, 3.8182878423928432`*^9, 3.819103981269557*^9,
  62. 3.82095134842631*^9, 3.820952078193177*^9, 3.821380197100977*^9,
  63. 3.821573981762419*^9, 3.8215741973157873`*^9, {3.8324089679586906`*^9,
  64. 3.832408971385417*^9}, 3.8402385046938267`*^9, 3.840240761756859*^9,
  65. 3.8402449226831036`*^9, 3.8402472396948214`*^9, 3.840247893172185*^9,
  66. 3.840247928583259*^9, {3.840247975894354*^9, 3.8402480057219105`*^9},
  67. 3.8408113918912687`*^9, 3.840812456369617*^9, {3.840814282947945*^9,
  68. 3.840814283667959*^9}, 3.843746923626226*^9, 3.843748322417116*^9,
  69. 3.843748387439739*^9, {3.843749000196321*^9, 3.843749000988888*^9},
  70. 3.843749257730599*^9, {3.846341567407941*^9, 3.846341568201756*^9},
  71. 3.8463452008453093`*^9, 3.847467036076908*^9, 3.8474681133360443`*^9,
  72. 3.8474702715919113`*^9, 3.85291558485254*^9, 3.856978302690339*^9,
  73. 3.856983708552462*^9, 3.8574975404089203`*^9, 3.857498308099327*^9,
  74. 3.8608488464702587`*^9, 3.8608554175260963`*^9, 3.861369293160433*^9,
  75. 3.861370558523303*^9, {3.861371226151167*^9, 3.861371234506369*^9}, {
  76. 3.862065105359165*^9, 3.862065110288988*^9}, 3.862066003332034*^9,
  77. 3.8624962155484047`*^9, 3.862496270488926*^9, 3.8624971695393248`*^9,
  78. 3.8624976747944593`*^9, 3.872609982405445*^9, 3.872610996336348*^9,
  79. 3.872611439575967*^9, 3.874150727361102*^9, 3.8741515282807827`*^9,
  80. 3.87434112407845*^9, 3.8743412058737297`*^9, 3.874685885127529*^9,
  81. 3.8746859427448874`*^9, 3.874686443108099*^9, 3.874687088797855*^9,
  82. 3.874687218793067*^9, 3.874687598415547*^9, 3.875719559897904*^9,
  83. 3.875720487540348*^9, 3.876842693515933*^9, 3.876843829556304*^9,
  84. 3.876844308919889*^9, 3.8777163583763742`*^9, 3.87771695913455*^9,
  85. 3.8824562018840303`*^9, 3.882456850677409*^9, 3.882457431222684*^9,
  86. 3.8824580139803658`*^9, 3.8824594583259783`*^9, 3.8831503534217033`*^9, {
  87. 3.920047163291602*^9, 3.9200471676336527`*^9}, {3.920047230826447*^9,
  88. 3.920047232197494*^9}, {3.9200476477272263`*^9, 3.920047657506768*^9}, {
  89. 3.920056556197495*^9,
  90. 3.920056564129567*^9}},ExpressionUUID->"089b1f86-9328-4f80-a91c-\
  91. 0d0f2274eae8"],
  92. Cell[BoxData[
  93. RowBox[{
  94. RowBox[{"(*",
  95. RowBox[{
  96. RowBox[{"Count", " ", "detected", " ", "events", " ", "per", " ",
  97. RowBox[{"episode", "/", "trial"}]}], ",", " ",
  98. RowBox[{
  99. "divide", " ", "event", " ", "#", " ", "by", " ", "EPISODE_LENGTH"}]}],
  100. "*)"}], "\[IndentingNewLine]",
  101. RowBox[{"(*",
  102. RowBox[{
  103. RowBox[{"Ignores", " ", "Structure", " ", "inside", " ", "trial"}], ",",
  104. " ",
  105. RowBox[{
  106. "but", " ", "avoides", " ", "weird", " ", "elements", " ", "in", " ",
  107. "imported", " ", "lists"}]}], "*)"}], "\[IndentingNewLine]",
  108. RowBox[{
  109. RowBox[{
  110. RowBox[{"traceEvents", "=",
  111. RowBox[{"Table", "[",
  112. RowBox[{
  113. RowBox[{"baseTrim", "[",
  114. RowBox[{"[",
  115. RowBox[{"i", ",", "1"}], "]"}], "]"}], ",",
  116. RowBox[{"{",
  117. RowBox[{"i", ",",
  118. RowBox[{"Length", "[", "baseTrim", "]"}]}], "}"}]}], "]"}]}], ";"}],
  119. "\n",
  120. RowBox[{
  121. RowBox[{"traceCounts", "=",
  122. RowBox[{"Table", "[",
  123. RowBox[{
  124. RowBox[{"Count", "[",
  125. RowBox[{"traceEvents", ",", "i"}], "]"}], ",",
  126. RowBox[{"{",
  127. RowBox[{"i", ",", "eps"}], "}"}]}], "]"}]}], ";"}], "\n",
  128. RowBox[{
  129. RowBox[{"traceWindow", "=", "EPISODE_LENGTH"}], ";"}],
  130. "\[IndentingNewLine]",
  131. RowBox[{
  132. RowBox[{"rates", "=",
  133. RowBox[{"traceCounts", "/", "traceWindow"}]}], ";"}],
  134. "\[IndentingNewLine]",
  135. RowBox[{
  136. RowBox[{"Max", "[", "rates", "]"}], ";"}]}]}]], "Input",
  137. CellChangeTimes->{{3.856979687202194*^9, 3.8569796926384907`*^9},
  138. 3.856979732257959*^9, 3.8569804016681967`*^9, {3.856980436393612*^9,
  139. 3.85698047224727*^9}, {3.856980538314816*^9, 3.856980588678719*^9}, {
  140. 3.920047270486957*^9, 3.920047298813768*^9}, {3.920047504579689*^9,
  141. 3.920047508378433*^9}, {3.920056591013484*^9, 3.92005663597143*^9}, {
  142. 3.92005671065374*^9,
  143. 3.9200567206182613`*^9}},ExpressionUUID->"d342880c-4f8d-483a-a9ac-\
  144. 0d82c6a6cd14"],
  145. Cell[BoxData[
  146. RowBox[{
  147. RowBox[{"(*",
  148. RowBox[{
  149. "Visualize", " ", "spike", " ", "rate", " ", "over", " ", "time", " ",
  150. "to", " ", "identify", " ", "stable", " ", "baselines", " ", "from", " ",
  151. "START", " ", "to", " ", "END", " ", "for", " ", "measurement"}], "*)"}],
  152. "\[IndentingNewLine]",
  153. RowBox[{
  154. RowBox[{
  155. RowBox[{"epsOK", "=", "eps"}], ";"}], "\n",
  156. RowBox[{"ListPlot", "[",
  157. RowBox[{
  158. RowBox[{"Transpose", "[",
  159. RowBox[{"{",
  160. RowBox[{"epsOK", ",",
  161. RowBox[{"rates", "[",
  162. RowBox[{"[", "epsOK", "]"}], "]"}]}], "}"}], "]"}], ",",
  163. RowBox[{"PlotRange", "\[Rule]",
  164. RowBox[{"{",
  165. RowBox[{"0", ",",
  166. RowBox[{"Ceiling", "[",
  167. RowBox[{
  168. RowBox[{"Max", "[", "rates", "]"}], ",", "10"}], "]"}]}], "}"}]}],
  169. ",",
  170. RowBox[{"PlotStyle", "\[Rule]",
  171. RowBox[{"PointSize", "[", "0.02", "]"}]}], ",",
  172. RowBox[{"GridLines", "\[Rule]", "Automatic"}]}], "]"}]}]}]], "Input",
  173. CellChangeTimes->{{3.810486097403755*^9, 3.810486112786275*^9}, {
  174. 3.92004753390779*^9, 3.920047608613244*^9}, {3.920056775614951*^9,
  175. 3.9200568170097933`*^9}},ExpressionUUID->"4ba88244-7682-4a7c-adf2-\
  176. f0cb3abdbf39"],
  177. Cell[BoxData[
  178. RowBox[{
  179. RowBox[{"(*",
  180. RowBox[{
  181. "Measure", " ", "the", " ", "Median", " ", "spike", " ", "rate", " ", "of",
  182. " ", "the", " ", "stable", " ", "baseline"}], "*)"}],
  183. "\[IndentingNewLine]",
  184. RowBox[{
  185. RowBox[{
  186. RowBox[{"epsOK", "=",
  187. RowBox[{"Range", "[",
  188. RowBox[{"START", ",", "END"}], "]"}]}], ";"}], "\n",
  189. RowBox[{"Median", "[",
  190. RowBox[{"rates", "[",
  191. RowBox[{"[", "epsOK", "]"}], "]"}], "]"}]}]}]], "Input",
  192. CellChangeTimes->{{3.8474671493212757`*^9, 3.8474671974049788`*^9}, {
  193. 3.8474681903688507`*^9, 3.847468242114259*^9}, {3.847470368304103*^9,
  194. 3.847470374450967*^9}, {3.852915664711651*^9, 3.8529156699560547`*^9}, {
  195. 3.856981452231744*^9, 3.8569814612154417`*^9}, {3.856982716419392*^9,
  196. 3.856982722980858*^9}, {3.856984106137689*^9, 3.8569841125633793`*^9}, {
  197. 3.857230157399315*^9, 3.8572301668918247`*^9}, 3.8574978505685873`*^9, {
  198. 3.8574985303410673`*^9, 3.85749853741217*^9}, {3.860854194037385*^9,
  199. 3.860854209017362*^9}, {3.860854327611724*^9, 3.860854333982234*^9}, {
  200. 3.86085525866218*^9, 3.860855269081197*^9}, {3.860855725568754*^9,
  201. 3.860855735802189*^9}, {3.861369789014331*^9, 3.86136979344879*^9}, {
  202. 3.861370755546565*^9, 3.86137076109053*^9}, {3.861371367223819*^9,
  203. 3.861371367367073*^9}, {3.862065519469392*^9, 3.862065521152713*^9}, {
  204. 3.862066176199753*^9, 3.862066182828207*^9}, 3.8624967453614063`*^9, {
  205. 3.8624967976740828`*^9, 3.862496806744417*^9}, {3.862497374064684*^9,
  206. 3.8624973919900312`*^9}, {3.8624980821753807`*^9, 3.862498086525486*^9}, {
  207. 3.872610303343171*^9, 3.872610309952496*^9}, 3.872610844172215*^9,
  208. 3.8726116110355997`*^9, 3.874151257976509*^9, {3.874152617209668*^9,
  209. 3.874152639641408*^9}, 3.874341452498784*^9, {3.8746861194126787`*^9,
  210. 3.8746861198334827`*^9}, {3.8746873681386557`*^9,
  211. 3.8746873744523706`*^9}, {3.874687786935801*^9, 3.8746877973640757`*^9}, {
  212. 3.875720018441556*^9, 3.875720023529544*^9}, {3.875720686171666*^9,
  213. 3.8757206865692463`*^9}, {3.876843030158511*^9, 3.8768430352505713`*^9}, {
  214. 3.8768441167034197`*^9, 3.876844117678646*^9}, {3.8768444944461527`*^9,
  215. 3.876844499104293*^9}, {3.877716676735963*^9, 3.877716683111684*^9}, {
  216. 3.877717327172679*^9, 3.8777173348808403`*^9}, 3.882456551489213*^9, {
  217. 3.882457166630921*^9, 3.8824571735545473`*^9}, {3.882458413206772*^9,
  218. 3.882458417624426*^9}, {3.8824599094947042`*^9, 3.8824599103911858`*^9}, {
  219. 3.883150707045505*^9, 3.883150728705675*^9}, {3.920047752927678*^9,
  220. 3.920047814001081*^9}, {3.920056648067153*^9, 3.920056658192128*^9}, {
  221. 3.920056754617035*^9,
  222. 3.920056759631544*^9}},ExpressionUUID->"dbc69ac2-c268-418c-ae53-\
  223. 950f4a8bcb9d"]
  224. }, Closed]],
  225. Cell[CellGroupData[{
  226. Cell["Collect Spiketimes across episodes into Histogram", "Subsection",
  227. CellChangeTimes->{{3.8087544359276977`*^9, 3.8087544585196257`*^9}, {
  228. 3.9201169446994534`*^9,
  229. 3.920116959357451*^9}},ExpressionUUID->"d781e84a-6f22-4d16-8120-\
  230. f108d2557547"],
  231. Cell[BoxData[
  232. RowBox[{
  233. RowBox[{"(*",
  234. RowBox[{
  235. "Execute", " ", "First", " ", "to", " ", "run", " ", "code", " ",
  236. "below"}], "*)"}], "\[IndentingNewLine]",
  237. RowBox[{
  238. RowBox[{
  239. RowBox[{"findPSTHMini", "[",
  240. RowBox[{
  241. "spikeTimes_", ",", "triggerTime_", ",", "tRelMin_", ",", "tRelMax_",
  242. ",", "binWidth_"}], "]"}], ":=",
  243. RowBox[{"Module", "[", "\[IndentingNewLine]",
  244. RowBox[{
  245. RowBox[{"{", "\[IndentingNewLine]",
  246. RowBox[{
  247. RowBox[{"nEpisodes", "=",
  248. RowBox[{"Length", "[", "spikeTimes", "]"}]}], ",",
  249. "\[IndentingNewLine]", "ep", ",", "\[IndentingNewLine]",
  250. "spikeTimesRel", ",", "\[IndentingNewLine]", "spikeCounts", ",",
  251. "\[IndentingNewLine]", "spikeCountsTotal", ",", "\[IndentingNewLine]",
  252. "pSTH", ",", "\[IndentingNewLine]", "i", ",", "\[IndentingNewLine]",
  253. "tRels"}], "\[IndentingNewLine]", "}"}], ",", "\[IndentingNewLine]",
  254. RowBox[{
  255. RowBox[{"For", "[", " ",
  256. RowBox[{
  257. RowBox[{"ep", "=", "1"}], ",",
  258. RowBox[{"ep", "\[LessEqual]", "nEpisodes"}], ",",
  259. RowBox[{"ep", "++"}], ",", "\[IndentingNewLine]",
  260. RowBox[{
  261. RowBox[{"spikeTimesRel", "=",
  262. RowBox[{
  263. RowBox[{"spikeTimes", "[",
  264. RowBox[{"[", "ep", "]"}], "]"}], "-", "triggerTime"}]}], ";",
  265. "\[IndentingNewLine]",
  266. RowBox[{"spikeCounts", "=",
  267. RowBox[{"BinCounts", "[",
  268. RowBox[{"spikeTimesRel", ",",
  269. RowBox[{"{",
  270. RowBox[{"tRelMin", ",", "tRelMax", ",", "binWidth"}], "}"}]}],
  271. "]"}]}], ";", "\[IndentingNewLine]",
  272. RowBox[{"If", "[", " ",
  273. RowBox[{
  274. RowBox[{"(",
  275. RowBox[{"ep", "\[Equal]", "1"}], ")"}], ",",
  276. "\[IndentingNewLine]",
  277. RowBox[{
  278. RowBox[{"spikeCountsTotal", "=", "spikeCounts"}], ";"}],
  279. "\[IndentingNewLine]", ",", "\[IndentingNewLine]",
  280. RowBox[{
  281. RowBox[{"spikeCountsTotal", "+=", "spikeCounts"}], ";"}]}],
  282. "\[IndentingNewLine]", "]"}], ";"}]}], "\[IndentingNewLine]",
  283. "]"}], ";", "\[IndentingNewLine]",
  284. RowBox[{"pSTH", "=",
  285. RowBox[{"spikeCountsTotal", "/",
  286. RowBox[{"(",
  287. RowBox[{"binWidth", "*", "nEpisodes"}], ")"}]}]}], ";",
  288. RowBox[{"tRels", "=",
  289. RowBox[{"Range", "[",
  290. RowBox[{"tRelMin", ",",
  291. RowBox[{"tRelMax", "-", "binWidth"}], ",", "binWidth"}], "]"}]}],
  292. ";", "\[IndentingNewLine]", "\[IndentingNewLine]",
  293. RowBox[{"Transpose", "[",
  294. RowBox[{"{",
  295. RowBox[{"tRels", ",", "pSTH"}], "}"}], "]"}]}]}],
  296. "\[IndentingNewLine]", "]"}]}], "\[IndentingNewLine]"}]}]], "Input",
  297. CellChangeTimes->{{3.697464439573537*^9, 3.697464455458571*^9}, {
  298. 3.697464520814871*^9, 3.697464563232708*^9}, {3.697464594424708*^9,
  299. 3.697464602481532*^9}, {3.697464658363433*^9, 3.697464748831113*^9}, {
  300. 3.6974647812691307`*^9, 3.6974648246843224`*^9}, {3.69746486058331*^9,
  301. 3.697464862029777*^9}, {3.69746490476884*^9, 3.697464940359602*^9}, {
  302. 3.697464984052598*^9, 3.697464990147511*^9}, {3.697465025453909*^9,
  303. 3.697465096110531*^9}, {3.697465130209572*^9, 3.697465313151677*^9}, {
  304. 3.697472293877153*^9, 3.697472328982333*^9}, {3.697472363471038*^9,
  305. 3.697472418896434*^9}, {3.697472486908235*^9, 3.697472534294613*^9}, {
  306. 3.697473183680832*^9, 3.697473229769854*^9}, {3.6974834776731462`*^9,
  307. 3.69748347910601*^9}, {3.6974835280942717`*^9, 3.6974835352127953`*^9},
  308. 3.6974836315365458`*^9, {3.704647563921829*^9, 3.704647567752892*^9}, {
  309. 3.7046476081225643`*^9, 3.7046476376675873`*^9}, {3.704647668700801*^9,
  310. 3.704647673437687*^9}, {3.7046477357125187`*^9, 3.704647743824246*^9},
  311. 3.704647803441424*^9, 3.704647894245043*^9, {3.704648233177208*^9,
  312. 3.704648289562693*^9}, 3.704648513172133*^9, 3.704650185364417*^9, {
  313. 3.704719569802041*^9, 3.704719572720867*^9}, {3.920118602546977*^9,
  314. 3.920118651457766*^9}},ExpressionUUID->"adbe21ed-bccb-4db3-815d-\
  315. d4fe13a0e208"],
  316. Cell[BoxData[
  317. RowBox[{
  318. RowBox[{"(*", " ",
  319. RowBox[{
  320. RowBox[{
  321. "Pull", " ", "in", " ", "Axon", " ", "text", " ", "file", " ", "records",
  322. " ", "of", " ", "detected", " ", "spikes"}], ",", " ",
  323. RowBox[{"trim", " ", "the", " ", "Header"}]}], " ", "*)"}],
  324. "\[IndentingNewLine]",
  325. RowBox[{
  326. RowBox[{
  327. RowBox[{"base", "=",
  328. RowBox[{"Import", "[",
  329. RowBox[{"\"\<FILENAME.atf\>\"", ",", "\"\<Table\>\""}], "]"}]}], ";"}],
  330. "\[IndentingNewLine]",
  331. RowBox[{
  332. RowBox[{"baseTrim", "=",
  333. RowBox[{"base", "[",
  334. RowBox[{"[",
  335. RowBox[{"4", ";;",
  336. RowBox[{"-", "1"}]}], "]"}], "]"}]}], ";"}], "\n",
  337. RowBox[{
  338. RowBox[{"eps", "=",
  339. RowBox[{"Range", "[",
  340. RowBox[{"First", "[",
  341. RowBox[{"baseTrim", "[",
  342. RowBox[{"[",
  343. RowBox[{"-", "1"}], "]"}], "]"}], "]"}], "]"}]}], ";"}]}]}]], "Input",\
  344. CellChangeTimes->{{3.808747959870371*^9, 3.8087481035498753`*^9}, {
  345. 3.8087490818269396`*^9, 3.808749083197881*^9}, {3.808837399807329*^9,
  346. 3.808837402883051*^9}, {3.8088380944038*^9, 3.808838212476153*^9},
  347. 3.808839040431368*^9, {3.8092888321225443`*^9, 3.8092888366449785`*^9}, {
  348. 3.9201169939786797`*^9,
  349. 3.920117013283895*^9}},ExpressionUUID->"a6858171-f209-4611-a0bd-\
  350. d980fdb6c832"],
  351. Cell[BoxData[
  352. RowBox[{
  353. RowBox[{"(*", " ",
  354. RowBox[{
  355. RowBox[{"Pull", " ", "out", " ", "spike", " ", "times"}], ",", " ",
  356. RowBox[{
  357. "convert", " ", "to", " ", "list", " ", "of", " ", "lists", " ", "for",
  358. " ",
  359. RowBox[{"each", " ", "'"}],
  360. RowBox[{"trial", "'"}]}]}], " ", "*)"}], "\[IndentingNewLine]",
  361. RowBox[{
  362. RowBox[{
  363. RowBox[{"baseTimes", "=",
  364. RowBox[{"Table", "[",
  365. RowBox[{
  366. RowBox[{"baseTrim", "[",
  367. RowBox[{"[",
  368. RowBox[{"i", ",", "10"}], "]"}], "]"}], ",",
  369. RowBox[{"{",
  370. RowBox[{"i", ",",
  371. RowBox[{"Length", "[", "baseTrim", "]"}]}], "}"}]}], "]"}]}], ";"}],
  372. "\[IndentingNewLine]",
  373. RowBox[{
  374. RowBox[{"trace", "=",
  375. RowBox[{"Table", "[",
  376. RowBox[{
  377. RowBox[{"baseTrim", "[",
  378. RowBox[{"[",
  379. RowBox[{"i", ",", "1"}], "]"}], "]"}], ",",
  380. RowBox[{"{",
  381. RowBox[{"i", ",",
  382. RowBox[{"Length", "[", "baseTrim", "]"}]}], "}"}]}], "]"}]}], ";"}],
  383. "\[IndentingNewLine]",
  384. RowBox[{
  385. RowBox[{"baseTimesTrace", "=",
  386. RowBox[{"Transpose", "[",
  387. RowBox[{"{",
  388. RowBox[{"trace", ",", "baseTimes"}], "}"}], "]"}]}], ";"}],
  389. "\[IndentingNewLine]",
  390. RowBox[{
  391. RowBox[{"baseEps", "=",
  392. RowBox[{"Table", "[",
  393. RowBox[{
  394. RowBox[{"Select", "[",
  395. RowBox[{"baseTimesTrace", ",",
  396. RowBox[{
  397. RowBox[{
  398. RowBox[{"#", "[",
  399. RowBox[{"[", "1", "]"}], "]"}], "==", "i"}], "&"}]}], "]"}], ",",
  400. RowBox[{"{",
  401. RowBox[{"i", ",", "1", ",",
  402. RowBox[{"Max", "[", "eps", "]"}]}], "}"}]}], "]"}]}], ";"}],
  403. "\[IndentingNewLine]",
  404. RowBox[{
  405. RowBox[{"baseSpikes", "=",
  406. RowBox[{"Table", "[",
  407. RowBox[{
  408. RowBox[{
  409. RowBox[{"Map", "[",
  410. RowBox[{"Last", ",",
  411. RowBox[{"baseEps", "[",
  412. RowBox[{"[", "i", "]"}], "]"}]}], "]"}], "/", "1000"}], ",",
  413. RowBox[{"{",
  414. RowBox[{"i", ",",
  415. RowBox[{"Length", "[", "baseEps", "]"}]}], "}"}]}], "]"}]}],
  416. ";"}]}]}]], "Input",
  417. CellChangeTimes->{{3.808750405494322*^9, 3.808750438302837*^9}, {
  418. 3.8087505374578524`*^9, 3.808750546647708*^9}, {3.808750945498708*^9,
  419. 3.808750981265622*^9}, 3.8087511270604563`*^9, {3.808754640741763*^9,
  420. 3.808754642274313*^9}, {3.808771589873125*^9, 3.80877161390499*^9}, {
  421. 3.80877594112424*^9, 3.808775953692954*^9}, {3.8088377589245653`*^9,
  422. 3.8088377603607187`*^9}, {3.808838015625661*^9, 3.80883808662562*^9}, {
  423. 3.809036737147092*^9, 3.809036738423802*^9}, {3.8092889424254675`*^9,
  424. 3.8092889460360775`*^9}},ExpressionUUID->"40db68eb-7737-40c2-82fe-\
  425. 4442ce004a0f"],
  426. Cell[BoxData[{
  427. RowBox[{
  428. RowBox[{"hz", "=",
  429. RowBox[{"Table", "[",
  430. RowBox[{
  431. RowBox[{"baseTrim", "[",
  432. RowBox[{"[",
  433. RowBox[{"i", ",",
  434. RowBox[{"-", "4"}]}], "]"}], "]"}], ",",
  435. RowBox[{"{",
  436. RowBox[{"i", ",",
  437. RowBox[{"Length", "[", "baseTrim", "]"}]}], "}"}]}], "]"}]}],
  438. ";"}], "\[IndentingNewLine]",
  439. RowBox[{
  440. RowBox[{"trace", "=",
  441. RowBox[{"Table", "[",
  442. RowBox[{
  443. RowBox[{"baseTrim", "[",
  444. RowBox[{"[",
  445. RowBox[{"i", ",", "1"}], "]"}], "]"}], ",",
  446. RowBox[{"{",
  447. RowBox[{"i", ",",
  448. RowBox[{"Length", "[", "baseTrim", "]"}]}], "}"}]}], "]"}]}],
  449. ";"}], "\[IndentingNewLine]",
  450. RowBox[{
  451. RowBox[{"hzTrace", "=",
  452. RowBox[{"Transpose", "[",
  453. RowBox[{"{",
  454. RowBox[{"trace", ",", "hz"}], "}"}], "]"}]}], ";"}], "\n",
  455. RowBox[{
  456. RowBox[{"hzEps", "=",
  457. RowBox[{"Table", "[",
  458. RowBox[{
  459. RowBox[{"Select", "[",
  460. RowBox[{"hzTrace", ",",
  461. RowBox[{
  462. RowBox[{
  463. RowBox[{"#", "[",
  464. RowBox[{"[", "1", "]"}], "]"}], "==", "i"}], "&"}]}], "]"}], ",",
  465. RowBox[{"{",
  466. RowBox[{"i", ",", "eps"}], "}"}]}], "]"}]}], ";"}], "\n",
  467. RowBox[{
  468. RowBox[{"hzEpsBase", "=",
  469. RowBox[{"Table", "[",
  470. RowBox[{
  471. RowBox[{"Rest", "[",
  472. RowBox[{"Map", "[",
  473. RowBox[{"Last", ",",
  474. RowBox[{"hzEps", "[",
  475. RowBox[{"[", "i", "]"}], "]"}]}], "]"}], "]"}], ",",
  476. RowBox[{"{",
  477. RowBox[{"i", ",",
  478. RowBox[{"Length", "[", "hzEps", "]"}]}], "}"}]}], "]"}]}],
  479. ";"}]}], "Input",
  480. CellChangeTimes->{{3.8092798380322437`*^9, 3.8092799349408913`*^9}, {
  481. 3.80928512716881*^9, 3.809285154108388*^9}, {3.809286216306396*^9,
  482. 3.809286245512603*^9}, {3.8092888640408335`*^9, 3.8092888980996847`*^9}, {
  483. 3.809288974893981*^9,
  484. 3.8092890109991665`*^9}},ExpressionUUID->"ad0504c5-b402-4929-99ab-\
  485. 0a9bfb54cd24"],
  486. Cell[BoxData[
  487. RowBox[{
  488. RowBox[{"(*",
  489. RowBox[{
  490. "Remove", " ", "Glitched", " ", "Episodes", " ", "from", " ", "analysis"}],
  491. "*)"}], "\[IndentingNewLine]",
  492. RowBox[{
  493. RowBox[{
  494. RowBox[{"epsOK", "=",
  495. RowBox[{"Drop", "[",
  496. RowBox[{"eps", ",",
  497. RowBox[{"{",
  498. RowBox[{"BADEP1", ",", "BADEP2"}], "}"}]}], "]"}]}], ";"}], "\n",
  499. RowBox[{"ListPlot", "[",
  500. RowBox[{
  501. RowBox[{"Table", "[",
  502. RowBox[{
  503. RowBox[{"Mean", "[",
  504. RowBox[{"hzEpsBase", "[",
  505. RowBox[{"[", "i", "]"}], "]"}], "]"}], ",",
  506. RowBox[{"{",
  507. RowBox[{"i", ",", "epsOK"}], "}"}]}], "]"}], ",",
  508. RowBox[{"PlotRange", "\[Rule]", "100"}], ",",
  509. RowBox[{"PlotStyle", "\[Rule]",
  510. RowBox[{"PointSize", "[", "0.02", "]"}]}]}], "]"}]}]}]], "Input",
  511. CellChangeTimes->{
  512. 3.811509198204545*^9, {3.920117530463464*^9, 3.920117553799212*^9},
  513. 3.9201178351854267`*^9, {3.920118235170285*^9,
  514. 3.920118248384561*^9}},ExpressionUUID->"c91bc87e-a44f-41ca-a3f9-\
  515. b981b661b9be"],
  516. Cell[BoxData[
  517. RowBox[{
  518. RowBox[{"(*",
  519. RowBox[{
  520. RowBox[{"Make", " ", "and", " ", "Plot", " ", "the", " ",
  521. RowBox[{"Histogram", ".", " ", "Time"}], " ", "Zero", " ", "is", " ",
  522. "the", " ", "episode", " ", "start"}], ",", " ",
  523. RowBox[{
  524. "Start", " ", "and", " ", "End", " ", "time", " ", "can", " ", "be", " ",
  525. "the", " ", "whole", " ", "or", " ", "a", " ", "part", " ", "of", " ",
  526. "the", " ", "episode", " ",
  527. RowBox[{"duration", "."}]}]}], " ", "*)"}], "\[IndentingNewLine]",
  528. RowBox[{
  529. RowBox[{
  530. RowBox[{"baseH", "=",
  531. RowBox[{"findPSTHMini", "[",
  532. RowBox[{
  533. RowBox[{"baseSpikes", "[",
  534. RowBox[{"[", "epsOK", "]"}], "]"}], ",", "TIMEZERO", ",", "STARTTIME",
  535. ",", "ENDTIME", ",", "BINWIDTH"}], "]"}]}], ";"}], "\n",
  536. RowBox[{"ListStepPlot", "[",
  537. RowBox[{"baseH", ",",
  538. RowBox[{"PlotRange", "\[Rule]",
  539. RowBox[{"{",
  540. RowBox[{"0", ",", "100"}], "}"}]}], ",",
  541. RowBox[{"PlotStyle", "\[Rule]", "Black"}]}], "]"}]}]}]], "Input",
  542. CellChangeTimes->{{3.8090357066937556`*^9, 3.8090357430983205`*^9}, {
  543. 3.809035778180543*^9, 3.809035780407446*^9}, {3.8090358279690228`*^9,
  544. 3.8090358598747034`*^9}, {3.809035960346019*^9, 3.8090359717947226`*^9}, {
  545. 3.8090360659340844`*^9, 3.8090360827975526`*^9}, {3.8090363306502*^9,
  546. 3.8090363908380437`*^9}, {3.809036921812908*^9, 3.809036922888583*^9}, {
  547. 3.8090419605562706`*^9, 3.809042009434108*^9}, {3.809042119430087*^9,
  548. 3.809042174088044*^9}, {3.8090423084784575`*^9, 3.809042390315403*^9}, {
  549. 3.80928924508088*^9, 3.8092892843926334`*^9}, {3.8097038645181003`*^9,
  550. 3.809703867589734*^9}, {3.8115092440649977`*^9, 3.8115092917016907`*^9}, {
  551. 3.920117234331471*^9, 3.920117235354414*^9}, 3.920117845163581*^9, {
  552. 3.920118120709621*^9, 3.920118153940692*^9}, {3.920118211144906*^9,
  553. 3.920118223352621*^9}, {3.92011827462178*^9, 3.9201182754025393`*^9}, {
  554. 3.920118311795721*^9, 3.920118318592122*^9}, {3.920118475885186*^9,
  555. 3.9201185531208773`*^9}},ExpressionUUID->"3f2f454b-3340-4374-8a95-\
  556. 45a5c719de88"],
  557. Cell[BoxData[
  558. RowBox[{
  559. RowBox[{"(*",
  560. RowBox[{"Export", " ", "PSTH", " ", "to", " ", "Save"}], "*)"}],
  561. "\[IndentingNewLine]",
  562. RowBox[{
  563. RowBox[{"filename", "=", "\"\<FILENAME_PSTH.txt\>\""}],
  564. "\[IndentingNewLine]",
  565. RowBox[{
  566. RowBox[{"Export", "[",
  567. RowBox[{"filename", ",", "baseH", ",", "\"\<Table\>\""}], "]"}],
  568. ";"}]}]}]], "Input",
  569. CellChangeTimes->{{3.8097352369660287`*^9, 3.8097353286561794`*^9}, {
  570. 3.8097361306963563`*^9, 3.809736159147895*^9}, {3.809736565301849*^9,
  571. 3.8097365717286687`*^9}, {3.809736620506836*^9, 3.8097366327236347`*^9}, {
  572. 3.8097367522492585`*^9, 3.809736779360304*^9}, {3.809736840848477*^9,
  573. 3.8097368412677813`*^9}, {3.8097369093620253`*^9,
  574. 3.8097369148069086`*^9}, {3.809737005459791*^9, 3.8097370120902586`*^9},
  575. 3.809737911026042*^9, 3.809738814416506*^9, {3.809739686999792*^9,
  576. 3.809739687162377*^9}, {3.9201172174010468`*^9, 3.920117224035946*^9}, {
  577. 3.9201172793577213`*^9, 3.920117295406392*^9}, {3.920118825277154*^9,
  578. 3.92011883475803*^9}},ExpressionUUID->"97c6d1a9-5332-4bad-bfe8-\
  579. 5630095b78be"],
  580. Cell[BoxData[
  581. RowBox[{
  582. RowBox[{"(*",
  583. RowBox[{
  584. "Import", " ", "PSTH", " ", "for", " ", "further", " ", "analysis"}],
  585. "*)"}], "\[IndentingNewLine]",
  586. RowBox[{
  587. RowBox[{"baseH", "=",
  588. RowBox[{"Import", "[",
  589. RowBox[{"\"\<FILENAME_PSTH.txt\>\"", ",", "\"\<Table\>\""}], "]"}]}],
  590. ";"}]}]], "Input",
  591. CellChangeTimes->{{3.8097363350041733`*^9, 3.8097363768576283`*^9}, {
  592. 3.809736578966568*^9, 3.8097365853515215`*^9}, {3.809736642216004*^9,
  593. 3.809736647113216*^9}, {3.8097367820664854`*^9, 3.809736810730899*^9}, {
  594. 3.80973692151819*^9, 3.8097369320743957`*^9}, {3.8097370157735276`*^9,
  595. 3.8097370193900213`*^9}, 3.809737931288081*^9, 3.8097388478833084`*^9, {
  596. 3.8097396934751873`*^9, 3.8097396935845194`*^9}, {3.920117264776762*^9,
  597. 3.920117267289023*^9}, {3.92011733125534*^9,
  598. 3.920117393428256*^9}},ExpressionUUID->"fc757136-72db-4cbd-8576-\
  599. bec1e0106088"]
  600. }, Closed]],
  601. Cell[CellGroupData[{
  602. Cell["Down Sample and Segment XY Data to make Figures ", "Subsection",
  603. CellChangeTimes->{{3.811533499298023*^9, 3.811533503207882*^9}, {
  604. 3.9201194419527893`*^9, 3.92011945355132*^9}, {3.92011957038767*^9,
  605. 3.920119572953871*^9}},ExpressionUUID->"11c0a66f-27f1-4222-86fb-\
  606. 6b2d915f1e58"],
  607. Cell[BoxData[
  608. RowBox[{
  609. RowBox[{"(*", " ",
  610. RowBox[{
  611. "Reduce", " ", "the", " ", "points", " ", "of", " ", "XY", " ", "Trace",
  612. " ", "data", " ", "exported", " ", "from", " ", "ClampFit", " ", "while",
  613. " ", "preserving", " ", "peak", " ",
  614. RowBox[{"heights", ".", " ", "Makes"}], " ", "current", " ", "and", " ",
  615. "voltage", " ", "traces", " ", "smaller", " ", "and", " ", "easier", " ",
  616. "to", " ", "manipulate", " ", "into", " ",
  617. RowBox[{"figures", "."}]}], " ", "*)"}], "\[IndentingNewLine]",
  618. RowBox[{
  619. RowBox[{"downSample", "[",
  620. RowBox[{"xyData_", ",", "target_"}], "]"}], ":=",
  621. RowBox[{"Module", "[", "\[IndentingNewLine]",
  622. RowBox[{
  623. RowBox[{"{", "\[IndentingNewLine]",
  624. RowBox[{
  625. RowBox[{"totalPoints", "=",
  626. RowBox[{"Length", "[", "xyData", "]"}]}], ",", "\[IndentingNewLine]",
  627. RowBox[{"factor", "=",
  628. RowBox[{"target", "*", "2"}]}], ",", "\[IndentingNewLine]",
  629. "sampleNum", ",", "\[IndentingNewLine]", "starts", ",", "ends", ",",
  630. "\[IndentingNewLine]", "dwnSmple", ",", "\[IndentingNewLine]", "k",
  631. ",", "sample", ",", "\[IndentingNewLine]", "orderY", ",", "minMax",
  632. ",", "orderX"}], "\[IndentingNewLine]", "\[IndentingNewLine]", "}"}],
  633. ",", "\[IndentingNewLine]", "\[IndentingNewLine]",
  634. RowBox[{
  635. RowBox[{"sampleNum", "=",
  636. RowBox[{"Round", "[",
  637. RowBox[{"totalPoints", "/", "factor"}], "]"}]}], ";",
  638. "\[IndentingNewLine]",
  639. RowBox[{"starts", "=",
  640. RowBox[{"Table", "[",
  641. RowBox[{
  642. RowBox[{"1", "+",
  643. RowBox[{"i", "*", "factor"}]}], ",",
  644. RowBox[{"{",
  645. RowBox[{"i", ",", "0", ",",
  646. RowBox[{"sampleNum", "-", "1"}]}], "}"}]}], "]"}]}], ";",
  647. "\[IndentingNewLine]",
  648. RowBox[{"ends", "=",
  649. RowBox[{"Table", "[",
  650. RowBox[{
  651. RowBox[{"factor", "+",
  652. RowBox[{"i", "*", "factor"}]}], ",",
  653. RowBox[{"{",
  654. RowBox[{"i", ",", "0", ",",
  655. RowBox[{"sampleNum", "-", "1"}]}], "}"}]}], "]"}]}], ";",
  656. "\[IndentingNewLine]", "\[IndentingNewLine]",
  657. RowBox[{"dwnSmple", "=",
  658. RowBox[{"{", "}"}]}], ";", "\[IndentingNewLine]",
  659. RowBox[{"For", "[",
  660. RowBox[{
  661. RowBox[{"k", "=", "1"}], ",",
  662. RowBox[{"k", "\[LessEqual]", "sampleNum"}], ",",
  663. RowBox[{"k", "++"}], ",", "\[IndentingNewLine]",
  664. "\[IndentingNewLine]",
  665. RowBox[{
  666. RowBox[{"sample", "=",
  667. RowBox[{"xyData", "[",
  668. RowBox[{"[",
  669. RowBox[{
  670. RowBox[{"starts", "[",
  671. RowBox[{"[", "k", "]"}], "]"}], ";;",
  672. RowBox[{"ends", "[",
  673. RowBox[{"[", "k", "]"}], "]"}]}], "]"}], "]"}]}], ";",
  674. "\[IndentingNewLine]",
  675. RowBox[{"orderY", "=",
  676. RowBox[{"SortBy", "[",
  677. RowBox[{"sample", ",", "Last"}], "]"}]}], ";",
  678. "\[IndentingNewLine]",
  679. RowBox[{"minMax", "=",
  680. RowBox[{"{",
  681. RowBox[{
  682. RowBox[{"First", "[", "orderY", "]"}], ",",
  683. RowBox[{"Last", "[", "orderY", "]"}]}], "}"}]}], ";",
  684. "\[IndentingNewLine]",
  685. RowBox[{"orderX", "=",
  686. RowBox[{"SortBy", "[",
  687. RowBox[{"minMax", ",", "First"}], "]"}]}], ";",
  688. "\[IndentingNewLine]",
  689. RowBox[{"AppendTo", "[",
  690. RowBox[{"dwnSmple", ",", "orderX"}], "]"}], ";"}]}],
  691. "\[IndentingNewLine]", "\[IndentingNewLine]", "]"}], ";",
  692. "\[IndentingNewLine]",
  693. RowBox[{"Flatten", "[",
  694. RowBox[{"dwnSmple", ",", "1"}], "]"}]}]}], "\[IndentingNewLine]",
  695. "]"}]}]}]], "Input",
  696. CellChangeTimes->{{3.8115321056958*^9, 3.811532169779603*^9}, {
  697. 3.811532226797206*^9, 3.8115323913385572`*^9}, {3.811532421968277*^9,
  698. 3.811532699603397*^9}, {3.8115331587758293`*^9, 3.811533165866197*^9}, {
  699. 3.920119175221651*^9, 3.920119180738302*^9}, {3.920119224102107*^9,
  700. 3.9201192679615517`*^9}, {3.920119298690988*^9,
  701. 3.9201193483933268`*^9}},ExpressionUUID->"bb3898c5-fe0d-400e-aa84-\
  702. 8774806d6be8"],
  703. Cell[BoxData[
  704. RowBox[{
  705. RowBox[{"(*", " ",
  706. RowBox[{
  707. RowBox[{
  708. "Cut", " ", "out", " ", "a", " ", "segment", " ", "of", " ", "a", " ",
  709. "trace", " ", "using", " ", "the", " ", "start", " ", "time"}], ",", " ",
  710. RowBox[{
  711. "end", " ", "time", " ", "and", " ", "the", " ", "time", " ", "step", " ",
  712. RowBox[{"(",
  713. RowBox[{
  714. RowBox[{"1", "/", "sampling"}], " ", "rate"}], ")"}]}]}], " ", "*)"}],
  715. "\[IndentingNewLine]",
  716. RowBox[{
  717. RowBox[{"segment", "[",
  718. RowBox[{"data_", ",", "dx_", ",", "xMin_", ",", "xMax_"}], "]"}], ":=",
  719. RowBox[{"data", "[",
  720. RowBox[{"[", " ",
  721. RowBox[{
  722. RowBox[{"Round", "[",
  723. RowBox[{"1", "+",
  724. RowBox[{"xMin", "/", "dx"}]}], "]"}], ";;",
  725. RowBox[{"Round", "[",
  726. RowBox[{"xMax", "/", "dx"}], "]"}]}], " ", "]"}], "]"}]}]}]], "Input",
  727. CellChangeTimes->{{3.920119784151701*^9,
  728. 3.920119876038706*^9}},ExpressionUUID->"37bba0b2-ac1d-4ebe-b2a8-\
  729. d16d4befbfc0"]
  730. }, Open ]]
  731. },
  732. WindowSize->{808, 877},
  733. WindowMargins->{{Automatic, 188}, {-11, Automatic}},
  734. FrontEndVersion->"13.3 for Mac OS X ARM (64-bit) (June 3, 2023)",
  735. StyleDefinitions->"Default.nb",
  736. ExpressionUUID->"83e29b3e-cb5e-4b39-89a3-ed8e9a29e97b"
  737. ]
  738. (* End of Notebook Content *)
  739. (* Internal cache information *)
  740. (*CellTagsOutline
  741. CellTagsIndex->{}
  742. *)
  743. (*CellTagsIndex
  744. CellTagsIndex->{}
  745. *)
  746. (*NotebookFileOutline
  747. Notebook[{
  748. Cell[CellGroupData[{
  749. Cell[580, 22, 287, 4, 54, "Subsection",ExpressionUUID->"aab53684-04ba-40fd-ac9a-77de9012f534"],
  750. Cell[870, 28, 3737, 69, 115, "Input",ExpressionUUID->"089b1f86-9328-4f80-a91c-0d0f2274eae8"],
  751. Cell[4610, 99, 1948, 52, 157, "Input",ExpressionUUID->"d342880c-4f8d-483a-a9ac-0d82c6a6cd14"],
  752. Cell[6561, 153, 1219, 31, 115, "Input",ExpressionUUID->"4ba88244-7682-4a7c-adf2-f0cb3abdbf39"],
  753. Cell[7783, 186, 2712, 46, 73, "Input",ExpressionUUID->"dbc69ac2-c268-418c-ae53-950f4a8bcb9d"]
  754. }, Closed]],
  755. Cell[CellGroupData[{
  756. Cell[10532, 237, 252, 4, 38, "Subsection",ExpressionUUID->"d781e84a-6f22-4d16-8120-f108d2557547"],
  757. Cell[10787, 243, 4137, 84, 577, "Input",ExpressionUUID->"adbe21ed-bccb-4db3-815d-d4fe13a0e208"],
  758. Cell[14927, 329, 1295, 35, 94, "Input",ExpressionUUID->"a6858171-f209-4611-a0bd-d980fdb6c832"],
  759. Cell[16225, 366, 2712, 75, 136, "Input",ExpressionUUID->"40db68eb-7737-40c2-82fe-4442ce004a0f"],
  760. Cell[18940, 443, 1903, 59, 115, "Input",ExpressionUUID->"ad0504c5-b402-4929-99ab-0a9bfb54cd24"],
  761. Cell[20846, 504, 1038, 29, 94, "Input",ExpressionUUID->"c91bc87e-a44f-41ca-a3f9-b981b661b9be"],
  762. Cell[21887, 535, 2093, 40, 94, "Input",ExpressionUUID->"3f2f454b-3340-4374-8a95-45a5c719de88"],
  763. Cell[23983, 577, 1101, 22, 73, "Input",ExpressionUUID->"97c6d1a9-5332-4bad-bfe8-5630095b78be"],
  764. Cell[25087, 601, 905, 19, 52, "Input",ExpressionUUID->"fc757136-72db-4cbd-8576-bec1e0106088"]
  765. }, Closed]],
  766. Cell[CellGroupData[{
  767. Cell[26029, 625, 291, 4, 38, "Subsection",ExpressionUUID->"11c0a66f-27f1-4222-86fb-6b2d915f1e58"],
  768. Cell[26323, 631, 4135, 96, 661, "Input",ExpressionUUID->"bb3898c5-fe0d-400e-aa84-8774806d6be8"],
  769. Cell[30461, 729, 977, 26, 73, "Input",ExpressionUUID->"37bba0b2-ac1d-4ebe-b2a8-d16d4befbfc0"]
  770. }, Open ]]
  771. }
  772. ]
  773. *)

Code Sample.nb, under CC-BY-4.0 · at the source

Overview

  1. Department of Neuroscience, Feinberg School of Medicine, Northwestern University, Chicago, IL 60611, USA
  2. Aligning Science Across Parkinson’s (ASAP) Collaborative Research Network, Chevy Chase, MD 20815, USA
  3. Department of Neurology, Feinberg School of Medicine, Northwestern University, Chicago, IL 60611, USA
  4. Department of Neurosurgery, Stanford University School of Medicine, Stanford, CA 94305, USA
  5. Department of Neuroscience, Developmental and Regenerative Biology, University of Texas at San Antonio, San Antonio, TX 78249, USA
Institutions: Northwestern University (United States); Aligning Science Across Parkinson's (United States); Stanford Medicine (United States); Stanford University (United States); The University of Texas at San Antonio (United States)
Journal: Science advances, volume 12, issue 37, article eadq8840
Dates: received 4 June 2024; accepted 31 July 2026; published online 9 September 2026; in print September 2026
Type: Research article · Language: English
License: CC BY
Identifiers: DOI 10.1126/sciadv.adq8840 · PMID 42715320 · PMCID PMC13557058 · OpenAlex W7162036903
Open access: gold, a free copy (OpenAlex)
Status: code verified (how the code is found and verified)
Categories: mouse (organism), cellular / molecular (subfield)
Methods: Spectral & time-frequency
MeSH: Astrocytes*, Dopamine*, Dopaminergic Neurons*, gamma-Aminobutyric Acid*, Signal Transduction*, Substantia Nigra*, Aldehyde Dehydrogenase 1 Family, Animals, GABA Plasma Membrane Transport Proteins, Mice, Receptors, Dopamine D2, Receptors, GABA-A, Retinal Dehydrogenase, Synaptic Transmission (* major topic)
Journal subjects: Neuroscience, Neurophysiology
Topic: Neuroscience and Neuropharmacology Research (Cellular and Molecular Neuroscience, Neuroscience), according to OpenAlex
Citations: not cited yet (Europe PMC); 73 references in the paper
Research resources: AAV9-hSyn-DIO-hM4Di-mCherry RRID:Addgene_44362, AAV9-hSyn-hM4Di-mCherry RRID:Addgene_50475, AAV2/5-GfAABC1D-hM3Dg-mCherry RRID:Addgene_50478, RRID:SCR_002285, RRID:SCR_017142

Abstract

Recent studies have implicated dopaminergic signaling within the substantia nigra pars reticulata (SNr) in the emergence of Parkinsonian motor deficits. To better understand the mechanisms underlying this dependence, the ability of dopamine to modulate SNr neuron activity was studied in ex vivo mouse brain slices. In addition to presynaptically inhibiting phasic GABA release, D2 dopamine receptor (D2R) signaling unexpectedly suppressed a tonic, GABAA receptor–mediated inhibition of SNr neuron spiking. Our studies demonstrated that this tonic modulation was largely mediated by GAT-1–dependent GABA release from ALDH1A1-expressing dopaminergic neurons. In contrast, the ability of D2R agonists to disinhibit SNr neurons depended on D2R-expressing astrocytes and stimulation of GAT-3 uptake of GABA from the extracellular space. In addition to underscoring the importance of dendritically released dopamine in modulating synaptic transmission, our studies demonstrate that dopaminergic modulation of astrocytes plays a key role in modulating SNr circuits and motor behavior.

Reproduced under the paper's license (CC BY), from the paper cited above.

Repositories

Its files are read in the Code ↔ Paper reader above.

Zenodo 10855006

License: CC-BY-4.0
State: the link answers, verified on 26 September 2026
Evidence: files inventoried
Languages: Mathematica (1)
Size: 1 file, 1 script
Software Heritage: not checked
Found in: “Data, code, and materials availability:”
Holds: 1 notebook
Not found: README, license file, CITATION.cff, environment file, tests, continuous integration, documentation
Availability: 1 check, the latest on 26 September 2026: the link answers (HTTP 200)
  • 26 September 2026: the link answers (HTTP 200)
1 file

Zenodo 17296457

License: CC-BY-4.0
State: the link answers, verified on 26 September 2026
Evidence: files inventoried
Size: 1 file, 0 scripts
Software Heritage: not checked
Found in: “Data, code, and materials availability:”
Not found: README, license file, CITATION.cff, environment file, tests, continuous integration, documentation
Availability: 1 check, the latest on 26 September 2026: the link answers (HTTP 200)
  • 26 September 2026: the link answers (HTTP 200)

The paper's code and data availability statement is in the Data section.

Tracing map

Proposed by the machine: these links were found in the paper and verified at the source, without human review. The map will receive a Zenodo DOI once one of the paper's authors has validated it with their ORCID.

What the map holds:

  • 2 repositories of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
  • 1 script, each with its path and the digest of its content;
  • no match between paragraphs and code yet;
  • neither the text of the paper nor the code itself.

Its JSON (tracing-map.json) is deposited on Zenodo with its DOI once the map is validated.

Data

Datasets cited

Data, code, and materials availability

All datasets (https://doi.org/10.5281/zenodo.10850896), protocols, key lab materials used, and code generated (https://doi.org/10.5281/zenodo.10855006) in this study are listed in a key resource table (https://doi.org/10.5281/zenodo.17296457) alongside their public persistent identifiers. This study did not generate new materials.

Reproduced under the paper's license (CC BY), from the paper cited above.

Versions

The history of this record: each version stored by the harvester or made by a correction of its authors or of the maintainers of its code, and what changed in its facts. The texts of the paper (its abstract, its availability statements) are not part of it; versions that changed only those are not listed.

Version 1, 27 September 2026: the first record

Recorded: type, language, journal, volume, issue, pages, dates, 14 authors, 14 MeSH terms, 5 funders, 73 references, 5 RRIDs.

Cite

This paper

Simmons, D. V., Moreno-Ramos, O. A., Raj, D. D. A., Kaganovsky, K., Pamukcu, A., Vrieler, N., Tkatch, T., Xie, Z., de Sousa, A. I. S., Zampese, E., Ding, J., Awatramani, R., Wilson, C. J., & Surmeier, D. J. (2026). Astrocytes mediate the dopaminergic modulation of tonic GABAergic signaling in substantia nigra. Science advances, 12(37), eadq8840. https://doi.org/10.1126/sciadv.adq8840

BibTeX

@article{simmons2026astrocytes,
author = {Simmons, DeNard V. and Moreno-Ramos, Oscar Andrés and Raj, Divya D. A. and Kaganovsky, Konstantin and Pamukcu, Arin and Vrieler, Nora and Tkatch, Tatiana and Xie, Zhong and de Sousa, Ana Isabel Silva and Zampese, Enrico and Ding, Jun and Awatramani, Rajeshwar and Wilson, Charles J. and Surmeier, D. James},
title = {{Astrocytes mediate the dopaminergic modulation of tonic GABAergic signaling in substantia nigra}},
journal = {Science advances},
year = {2026},
month = sep,
volume = {12},
number = {37},
pages = {eadq8840},
publisher = {American Association for the Advancement of Science},
issn = {2375-2548},
doi = {10.1126/sciadv.adq8840},
url = {https://doi.org/10.1126/sciadv.adq8840},
pmid = {42715320},
pmcid = {PMC13557058}
}

RIS

TY - JOUR
AU - Simmons, DeNard V.
AU - Moreno-Ramos, Oscar Andrés
AU - Raj, Divya D. A.
AU - Kaganovsky, Konstantin
AU - Pamukcu, Arin
AU - Vrieler, Nora
AU - Tkatch, Tatiana
AU - Xie, Zhong
AU - de Sousa, Ana Isabel Silva
AU - Zampese, Enrico
AU - Ding, Jun
AU - Awatramani, Rajeshwar
AU - Wilson, Charles J.
AU - Surmeier, D. James
TI - Astrocytes mediate the dopaminergic modulation of tonic GABAergic signaling in substantia nigra
T2 - Science advances
J2 - Sci Adv
PY - 2026
DA - 2026/09/09
VL - 12
IS - 37
SP - eadq8840
SN - 2375-2548
PB - American Association for the Advancement of Science
DO - 10.1126/sciadv.adq8840
UR - https://doi.org/10.1126/sciadv.adq8840
LA - en
ER -

CSL-JSON

{
"id": "10.1126/sciadv.adq8840",
"type": "article-journal",
"title": "Astrocytes mediate the dopaminergic modulation of tonic GABAergic signaling in substantia nigra",
"container-title": "Science advances",
"author": [
{
"family": "Simmons",
"given": "DeNard V."
},
{
"family": "Moreno-Ramos",
"given": "Oscar Andrés"
},
{
"family": "Raj",
"given": "Divya D. A."
},
{
"family": "Kaganovsky",
"given": "Konstantin"
},
{
"family": "Pamukcu",
"given": "Arin"
},
{
"family": "Vrieler",
"given": "Nora"
},
{
"family": "Tkatch",
"given": "Tatiana"
},
{
"family": "Xie",
"given": "Zhong"
},
{
"family": "de Sousa",
"given": "Ana Isabel Silva"
},
{
"family": "Zampese",
"given": "Enrico"
},
{
"family": "Ding",
"given": "Jun"
},
{
"family": "Awatramani",
"given": "Rajeshwar"
},
{
"family": "Wilson",
"given": "Charles J."
},
{
"family": "Surmeier",
"given": "D. James"
}
],
"container-title-short": "Sci Adv",
"volume": "12",
"issue": "37",
"page": "eadq8840",
"DOI": "10.1126/sciadv.adq8840",
"PMID": "42715320",
"PMCID": "PMC13557058",
"ISSN": "2375-2548",
"publisher": "American Association for the Advancement of Science",
"URL": "https://doi.org/10.1126/sciadv.adq8840",
"language": "en",
"issued": {
"date-parts": [
[
2026,
9,
9
]
]
}
}

The tracing map gets a citation of its own once an author has validated it and it has a DOI.

Similar papers

The papers with a page that share the most with this one: the tools found in their code, their categories, datasets, cited references and authors, the rarest counting most.

[1] doi:10.1126/sciadv.abp8701 [code]
Ca<sup>2+</sup> channels couple spiking to mitochondrial metabolism in substantia nigra dopaminergic neurons.
Journal: Science advances
In common: cellular / molecular, 5 references, 3 authors
[2] doi:10.1186/s13024-024-00756-2
α-Synuclein pathology disrupts mitochondrial function in dopaminergic and cholinergic neurons at-risk in Parkinson's disease.
Journal: Molecular neurodegeneration
In common: mouse, cellular / molecular, 4 references, 2 authors
[3] doi:10.1038/s41467-026-75194-3 [code]
Leucine-rich repeat kinase 2 impairs the release sites of Parkinson's disease vulnerable dopamine axons.
Journal: Nature communications
In common: mouse, cellular / molecular, 3 references, 2 authors
[4] doi:10.1126/sciadv.adv8224
State-dependent modulation of spiny projection neurons controls levodopa-induced dyskinesia in a mouse model of Parkinson's disease.
Journal: Science advances
In common: mouse, 3 references, 2 authors
[5] doi:10.1126/sciadv.adx4577 [code]
Dopamine and serotonin cotransmission filters striatonigral synaptic activity via 5-HT1B receptor activation.
Journal: Science advances
In common: mouse, cellular / molecular, 8 references
[6] doi:10.1016/j.nbd.2024.106512 [code]
Dopamine depletion weakens direct pathway modulation of SNr neurons.
Journal: Neurobiology of disease
In common: mouse, cellular / molecular, 8 references
[7] doi:10.1016/j.nbd.2023.106328
Feed-forward metabotropic signaling by Cav1 Ca&lt;sup&gt;2+&lt;/sup&gt; channels supports pacemaking in pedunculopontine cholinergic neurons.
Journal: Neurobiology of disease
In common: cellular / molecular, 5 references, author Tatiana Tkatch
[8] doi:10.1073/pnas.2613593123 [code]
Calbindin stratifies midbrain dopaminergic neurons governing distinct aspects of locomotion.
Journal: Proceedings of the National Academy of Sciences of the United States of America
In common: mouse, 4 references, author Rajeshwar Awatramani
[9] doi:10.7554/elife.78773 [code]
Visualizing synaptic dopamine efflux with a 2D composite nanofilm.
Journal: eLife
In common: cellular / molecular, 8 references
[10] doi:10.1038/s41593-023-01401-9 [code]
Unique functional responses differentially map onto genetic subtypes of dopamine neurons.
Journal: Nature neuroscience
In common: 4 references, author Rajeshwar Awatramani

Contribute

The authors of this paper can claim it, correct its record and validate its tracing map, and the maintainers of its code (its owner, or a public member of its organization) correct what it says of their repository; anyone signed in can ask for its removal. Every request goes to OSCR's own machine, which answers it; your account page follows them.

Sign in with ORCID to claim this paper as one of its authors, correct its record or validate its tracing map: when the paper's metadata lists your ORCID iD, you are recognized at once. Maintainers of its code: sign in with GitHub, then claim the repository on your account page.

Add the badge to the code's README

OSCR: the badge of this paper

If you are an author or a maintainer of this paper's code, you can add this badge. It says what OSCR knows of the paper (its code, its validated tracing map) and links the code to this page. Paste one of these snippets under the README's title. Keep the two marks around it, so that the badge can be replaced in place and is never added twice. OSCR changes nothing in your repository.

Markdown
<!-- oscr-badge:start -->
[![OSCR](https://openscicode.org/badge/doi/10.1126/sciadv.adq8840.svg)](https://openscicode.org/badge/doi/10.1126/sciadv.adq8840)
<!-- oscr-badge:end -->
reStructuredText
.. oscr-badge:start

.. image:: https://openscicode.org/badge/doi/10.1126/sciadv.adq8840.svg
   :target: https://openscicode.org/badge/doi/10.1126/sciadv.adq8840
   :alt: OSCR

.. oscr-badge:end
HTML
<!-- oscr-badge:start -->
<a href="https://openscicode.org/badge/doi/10.1126/sciadv.adq8840"><img src="https://openscicode.org/badge/doi/10.1126/sciadv.adq8840.svg" alt="OSCR"></a>
<!-- oscr-badge:end -->

If you choose to, you can have the badge kept up to date for you, with oscr badge --write from the command line or with the GitHub Action in your repository's workflows. Every other form and option (a card, AsciiDoc, LaTeX, shields.io) is on the badge page.

Request its removal

To ask OSCR to remove this record, the copies of its authors' scripts or its tracing map, use the removal request page: signed in, you say who you are, what to remove and why, then review and confirm the request. Published rules decide every request (how).

Discussion, reproductions, activity

Discussion: code errors and mismatches between the code and the paper about this paper and its code, from readers and its authors, beside the paper and its tracing map.

Report a mismatch between the code and the paper · Report a code error (signed in)

Reproductions: reports from readers who ran the authors' code and did not get the paper's result, what they ran, with which environment, commit and data.

Report a reproduction failure (signed in)

Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.