OSCR

Population-scale analysis of frequency-dependent calcium dynamics in retinal ganglion cells under electric field stimulation.

Code ↔ Paper

5 matches between paragraphs of the paper and lines of its authors' code, computed by the harvester (lexical-v1). Click a colored paragraph or line to see its counterpart.

The 5 matches
  1. [1] § Methods › Neuron: retinal ganglion cell Ca model ↔ SingleCellRGCsCaModelNeuron/RGCModel.py, lines 88–127 · score 0.77 · low voltage activated, hyperpolarization activated, RGC model, Ca model, Fohlmeister, Ih
  2. [2] § Methods › Neuron: retinal ganglion cell Ca model ↔ SingleCellRGCsCaModelNeuron/RGCModel.py, lines 254–383 · score 0.66 · extracellular space, Reaction, buffering, bound, pump, concentration
  3. [3] § Methods › Neuron: retinal ganglion cell Ca model ↔ SingleCellRGCsCaModelNeuron/RGCModel.py, lines 88–127 · score 0.59 · Ca activated, voltage activated, calcium channel, pump, model, Neuron
  4. [4] § Methods › Electric field stimulation waveform design ↔ SingleCellRGCsCaModelNeuron/RGCModel.py, lines 485–632 · score 0.55 · intracellular Ca, GCaMP, probe, membrane, spiking, neurons
  5. [5] § Methods › Admittance method: constructing the experimental setup and electrodes ↔ SingleCellRGCsCaModelNeuron/RGCModel.py, lines 254–383 · score 0.53 · RGC model, volume, segment, space, compartments, membrane

Paper

Loaded from Europe PMC by your browser, not stored by OSCR: doi.org · Europe PMC

The paper is loaded when this pane is shown.

The authors' code

Python · 661 lines · 28 KB · MIT · 5 matches

  1. # Imports
  2. from neuron import h, rxd
  3. import numpy as np
  4. import json
  5. from matplotlib import pyplot
  6. from neuron.units import mM, mV, nM, uM
  7. from neuron.rxd import v
  8. from neuron.rxd.rxdmath import vtrap, exp, log, tanh, fabs
  9. import os
  10. from tqdm import tqdm
  11. import csv
  12. # Add necessary .hoc to Neuron h backbone
  13. h.load_file('stdrun.hoc')
  14. h.load_file('import3d.hoc')
  15. h.load_file('stdlib.hoc')
  16. h.load_file('makecells_A2i.hoc')
  17. class RGCModel:
  18. # This Class model RGCs and add RXD adds-on to take care of Ca ion concentration and changes
  19. def __init__(self, JSONFile, MorphologySWCName):
  20. self.loadMorph(MorphologySWCName)
  21. self.padding = 100
  22. self.have_ncx = False
  23. self.have_cicr = False
  24. self.have_gcamp = False
  25. # Load configuration from the passed Json file
  26. with open(JSONFile, 'r') as fileObj:
  27. self.rxdDict = json.load(fileObj)
  28. def loadMorph(self, MorphologySWCName):
  29. '''
  30. :param MorphologySWCName:
  31. :return: None
  32. Make the model of the cell based on the morphology of the swc file
  33. '''
  34. # Load the morphology of the RGC type
  35. self.c = h.mkcell(MorphologySWCName)
  36. # Make each group of the neuron sections instance
  37. self.axonal = list(self.c.axonal)
  38. self.somaList = list(self.c.somatic)
  39. self.basalList = list(self.c.basal)
  40. self.apicalList = list(self.c.apical)
  41. self.dendritic5 = list(self.c.dendritic_5)
  42. self.dendritic6 = list(self.c.dendritic_6)
  43. self.dendritic7 = list(self.c.dendritic_7)
  44. # 'all' contains all components of the neuron
  45. self.all = self.axonal + self.dendritic5 + self.dendritic6 + self.dendritic7 + \
  46. self.somaList + self.basalList + self.apicalList
  47. def findExtrema(self):
  48. '''
  49. Finds the extrema of the morphology, and stores them into variables xmin, ymin, zmin, xmax, ymax, and zmax.
  50. These coordinates will be used in defining the extracellular space in 3D using rxd.Extracellular()
  51. :return: NONE
  52. '''
  53. self.xmin = self.ymin = self.zmin = self.xmax = self.ymax = self.zmax = None
  54. for sec in self.all:
  55. n3d = sec.n3d()
  56. xList = [sec.x3d(i) for i in range(n3d)]
  57. yList = [sec.y3d(i) for i in range(n3d)]
  58. zList = [sec.z3d(i) for i in range(n3d)]
  59. xMinSec, yMinSec, zMinSec = min(xList), min(yList), min(zList)
  60. xMaxSec, yMaxSec, zMaxSec = max(xList), max(yList), max(zList)
  61. if self.xmin is None:
  62. self.xmin, self.ymin, self.zmin = xMinSec, yMinSec, zMinSec
  63. self.xmax, self.ymax, self.zmax = xMaxSec, yMaxSec, zMaxSec
  64. else:
  65. self.xmin, self.ymin, self.zmin = min(self.xmin, xMinSec), min(self.ymin, yMinSec), min(self.zmin, zMinSec)
  66. self.xmax, self.ymax, self.zmax = max(self.xmax, xMaxSec), max(self.ymax, yMaxSec), max(self.zmax, zMaxSec)
  67. print('Extrema of the morphology has been calculated')
  68. def concInit(self, cytc, exc, erc):
  69. return lambda nd: exc if nd.region == self.ecs else (cytc if nd.region == self.cyt else erc)
  70. def concInitTemp(self, cytc, erc):
  71. return lambda nd: cytc if nd.region == self.cyt else erc
  72. def insertChannels(self, GNabar_spike, GKbar_spike, GAbar_spike, GCabar_spike, GKCbar_spike, GH, GT, testDiam):
  73. '''
  74. Insert channels into the cell. It will add the following channels:
  75. - Spike.mod (HH Model by Fohlmeister)
  76. - Na
  77. - Ca
  78. - K (delayed rectifier)
  79. - KA (A-type K channel)
  80. - KCa (Ca activated K channel)
  81. + Ca pumps are modeled in the RXD part
  82. - IT.mod
  83. Low-voltage-activated (LVA) calcium channels
  84. - Ih.mod
  85. Hyperpolarized activated channel
  86. :param: It will load any needed value from the rxdDict.
  87. :return:
  88. '''
  89. for section in self.all:
  90. if section.name().find('dend[') != -1:
  91. section.insert('pas')
  92. section.e_pas = -60
  93. section.g_pas = .00005
  94. section.Ra = 110
  95. section.nseg = 1
  96. section.insert('spike')
  97. section.gnabar_spike = 0.08
  98. section.gkbar_spike = 0.08
  99. section.gabar_spike = 3 * section.gkbar_spike
  100. section.gcabar_spike = 0.01
  101. section.gkcbar_spike = 0.004 * section.gkbar_spike
  102. section.insert('Ih')
  103. section.ghbar_Ih = 3e-5
  104. section.insert('IT')
  105. section.gTbar_IT = 0.001
  106. print('Dend channel inserted...')
  107. # Axon hillock
  108. if section.name().find('dend_5') != -1:
  109. section.insert('pas')
  110. section.e_pas = -60
  111. section.g_pas = .00005
  112. section.Ra = 110
  113. section.nseg = 1
  114. section.insert('spike')
  115. section.gnabar_spike = 0.8
  116. section.gkbar_spike = 0.6
  117. section.gabar_spike = 3 * section.gkbar_spike
  118. section.gcabar_spike = 0
  119. section.gkcbar_spike = 0
  120. section.insert('Ih')
  121. section.ghbar_Ih = 0
  122. section.insert('IT')
  123. section.gTbar_IT = 0
  124. print('Axon hillock channel inserted...')
  125. # Sodium channel band
  126. if section.name().find('dend_6') != -1:
  127. section.insert('pas')
  128. section.e_pas = -60
  129. section.g_pas = .00005
  130. section.Ra = 110
  131. section.nseg = 1
  132. section.insert('spike')
  133. section.gnabar_spike = 2.4
  134. section.gkbar_spike = 0.8
  135. section.gabar_spike = 3 * section.gkbar_spike
  136. section.gcabar_spike = 0
  137. section.gkcbar_spike = 0
  138. section.insert('Ih')
  139. section.ghbar_Ih = 0
  140. section.insert('IT')
  141. section.gTbar_IT = 0
  142. print('SOCB channel inserted...')
  143. # Narrow segment
  144. if section.name().find('dend_7') != -1:
  145. section.insert('pas')
  146. section.e_pas = -60
  147. section.g_pas = .00005
  148. section.Ra = 110
  149. section.nseg = 1
  150. section.insert('spike')
  151. section.gnabar_spike = 0.9
  152. section.gkbar_spike = 0.7
  153. section.gabar_spike = 3 * section.gkbar_spike
  154. section.gcabar_spike = 0
  155. section.gkcbar_spike = 0
  156. section.insert('Ih')
  157. section.ghbar_Ih = 0
  158. section.insert('IT')
  159. section.gTbar_IT = 0
  160. print('Narrow segment channel inserted...')
  161. # Distal axon
  162. if section.name().find('axon') != -1:
  163. section.insert('pas')
  164. section.e_pas = -60
  165. section.g_pas = .00005
  166. section.Ra = 110
  167. section.nseg = 1
  168. section.insert('spike')
  169. section.gnabar_spike = 0.8
  170. section.gkbar_spike = 0.6
  171. section.gabar_spike = 3 * section.gkbar_spike
  172. section.gcabar_spike = 0
  173. section.gkcbar_spike = 0
  174. section.insert('Ih')
  175. section.ghbar_Ih = 0
  176. section.insert('IT')
  177. section.gTbar_IT = 0
  178. print('Distal axon channel inserted...')
  179. # Soma
  180. if section.name().find('soma') != -1:
  181. section.insert('pas')
  182. section.e_pas = -65
  183. section.g_pas = 0.0001
  184. section.Ra = 110
  185. section.nseg = 1
  186. section.diam = testDiam
  187. # print('Diam: ', section.diam)
  188. section.insert('spike')
  189. section.gnabar_spike = GNabar_spike
  190. section.gkbar_spike = GKbar_spike
  191. section.gabar_spike = GAbar_spike
  192. section.gcabar_spike = GCabar_spike
  193. section.gkcbar_spike = GKCbar_spike
  194. section.insert('Ih')
  195. section.ghbar_Ih = GH
  196. section.insert('IT')
  197. section.gTbar_IT = GT
  198. print('Soma channel inserted...')
  199. h.celsius = 36
  200. print('***** All channels inserted *****')
  201. def implement_RXD(self, CAT):
  202. #### Initial concentrations ####
  203. # Na
  204. naConcInitCyt = self.rxdDict["species"]["na"]["cyt"]
  205. naConcInitEcs = self.rxdDict["species"]["na"]["ecs"]
  206. # K
  207. kConcInitCyt = self.rxdDict["species"]["k"]["cyt"]
  208. kConcInitEcs = self.rxdDict["species"]["k"]["ecs"]
  209. # Ca
  210. caConcInitCyt = self.rxdDict["species"]["ca"]["cyt"]
  211. caConcInitEcs = self.rxdDict["species"]["ca"]["ecs"]
  212. caConcInitEr = self.rxdDict["species"]["ca"]["er"]
  213. caDepth = self.rxdDict["species"]["ca"]["depth"]
  214. caTau = self.rxdDict["species"]["ca"]["tca"]
  215. # NCX
  216. kNCXBindF = 93.827 # msec^-1 mM^-1
  217. kNCXBindR = 4.0 # msec^-1
  218. kNCXRel = 1000.0 # msec^-1 mM^-1
  219. # NCX
  220. if self.have_ncx:
  221. totalNCX = self.rxdDict["channelDensities"]["totalNCX"]
  222. ncx2CaInit = totalNCX * (caConcInitCyt ** 2) / ((kNCXBindR / kNCXBindF) + (caConcInitCyt ** 2))
  223. ncxInit = totalNCX - ncx2CaInit
  224. # Calcium-induced Ca release
  225. self.VCICR = 100000.0 # cm^-2 ms^-1
  226. self.KCICR = 0.0002 # mM
  227. tauCICR = 1.2 # ms
  228. KtCICR = 0.0002 # mM
  229. # ER fraction in the cells' Cyt
  230. self.erFraction = self.rxdDict["region"]["erFraction"]
  231. self.cytFraction = 1 - self.erFraction
  232. ########################################
  233. # RXD
  234. '''
  235. Code that uses RXD should define the following criteria: WHERE the reaction is happening, WHO (what species) are we interested
  236. in, and WHAT about those species of interest? With that being said, the following code
  237. answers, 'where?' The reaction is happening in: the cytoplasm, cell membrane, and extracellular fluid.
  238. '''
  239. ##########################################################################################
  240. ######################################### WHERE? #########################################
  241. ##########################################################################################
  242. self.cyt = rxd.Region(self.all, name='cyt', nrn_region='i',
  243. geometry=rxd.FractionalVolume(self.cytFraction, surface_fraction=1.0))
  244. self.er = rxd.Region(self.all, name='er',
  245. geometry=rxd.FractionalVolume(self.erFraction)) # Endoplasmic Reticulum
  246. self.erCytMem = rxd.Region(self.all, name='erCytMem', geometry=rxd.ScalableBorder(0.1,
  247. on_cell_surface=False)) # Membrane between Cytoplusm and ER
  248. self.mem = rxd.Region(self.all, name='mem', geometry=rxd.membrane())
  249. self.ecs = rxd.Extracellular(self.xmin - self.padding, self.ymin - self.padding, self.zmin - self.padding,
  250. self.xmax + self.padding, self.ymax + self.padding, self.zmax + self.padding,
  251. dx=50) # Extracellular Space
  252. print('RXD regions implemented')
  253. ##########################################################################################
  254. ######################################### WHAT? ##########################################
  255. ##########################################################################################
  256. # Ions
  257. # self.k = rxd.Species([self.cyt, self.ecs], name="k", d=1, charge=1,
  258. # initial=self.concInit(kConcInitCyt, kConcInitEcs,0))
  259. # self.na = rxd.Species([self.cyt, self.ecs], name="na", d=1, charge=1,
  260. # initial=self.concInit(naConcInitCyt, naConcInitEcs, 0))
  261. self.ca = rxd.Species([self.cyt, self.ecs, self.er], name='ca', d=1, charge=2,
  262. initial=self.concInit(caConcInitCyt, caConcInitEcs, caConcInitEr))
  263. self.cai = self.ca[self.cyt]
  264. self.cao = self.ca[self.ecs]
  265. self.caer = self.ca[self.er]
  266. # Na/Ca Exchange (NCX)
  267. if self.have_ncx:
  268. self.ncx = rxd.Species([self.cyt], name='ncx', initial=ncxInit) # Free NCX inside Cyt
  269. self.ncx2Ca = rxd.Species([self.cyt], name='ncx2Ca', initial=ncx2CaInit) # NCX bound to Ca inside Cyt
  270. # Ca-induced Ca release
  271. if self.have_cicr:
  272. CICRThresh = (1 + tanh(2 * 10000 * (self.cai - KtCICR))) / 2
  273. self.scale_cicr = rxd.Parameter([self.erCytMem],
  274. value=lambda nd: self.VCICR * nd.segment.diam / 4.0)
  275. CICRFluxInf = CICRThresh * self.cai / (self.KCICR + self.cai) * (self.caer - self.cai)
  276. self.CICRState = rxd.State([self.erCytMem], name='CICRstate', initial=1.749e-9)
  277. print('RXD species created')
  278. # GCaMP
  279. if self.have_gcamp:
  280. self.gcamp = rxd.Species([self.cyt], name='GCaMP', initial=0.05) # 0.05 mM = 50 μM
  281. self.cagcamp = rxd.Species([self.cyt], name='CaGCaMP', initial=0)
  282. ##########################################################################################
  283. ########################################## HOW? ##########################################
  284. ##########################################################################################
  285. # Ca Pump
  286. self.CaPump = rxd.MultiCompartmentReaction(self.cao, self.cai,
  287. 6.02 * 10 ** 8 * (caConcInitCyt - self.cai) / CAT,
  288. membrane=self.mem, scale_by_area=False, membrane_flux=True)
  289. # Na/Ca Exchange (NCX)
  290. if self.have_ncx:
  291. self.ncxBinding = rxd.Reaction(2*self.ca + self.ncx, self.ncx2Ca, kNCXBindF, kNCXBindR, region=[self.cyt])
  292. self.ncxRelease = rxd.MultiCompartmentReaction(self.ncx2Ca[self.cyt], self.ncx[self.cyt] + 2*self.cao, kNCXRel, membrane=self.mem, scale_by_area=False, membrane_flux=True)
  293. # CICR
  294. if self.have_cicr:
  295. self.dCICR = rxd.Rate(self.CICRState, (CICRFluxInf - self.CICRState) / tauCICR, regions=[self.erCytMem])
  296. # self.CICRFlux = rxd.MultiCompartmentReaction(self.caer, self.cai, self.scale_cicr * self.CICRState,
  297. # membrane=self.erCytMem)
  298. self.CICRFlux = rxd.MultiCompartmentReaction(self.caer, self.cai, self.CICRState,
  299. membrane=self.erCytMem)
  300. # GCaMP
  301. if self.have_gcamp:
  302. # Kinetic rates (per ms)
  303. kon = 1e8 / 1e3 # convert M⁻¹s⁻¹ to mM⁻¹ms⁻¹ (divide by 1e3)
  304. koff = 37.5 / 1e3 # convert s⁻¹ to ms⁻¹ (divide by 1e3)
  305. # Buffer reaction
  306. self.GCaMPBinding = rxd.Reaction(self.gcamp + self.cai, self.cagcamp, kon, koff, region=[self.cyt])
  307. print('RXD reactions specified - RXD setup complete')
  308. def stimulate(self, stimNeuron, measureNeuron, location, current_vector, time_vector, sim_dur, dt):
  309. '''
  310. :param stimNeuron:
  311. :param measureNeuron:
  312. :param location:
  313. :param current_vector:
  314. :param time_vector:
  315. :param sim_dur:
  316. :param dt:
  317. :return:
  318. '''
  319. # Following vectors are necessary in order to create graphs.
  320. ### Time and Membraine Potential ###
  321. self.tvec = h.Vector().record(h._ref_t)
  322. self.vvec = h.Vector().record(measureNeuron(location)._ref_v)
  323. ### K, Na, and Ca ###
  324. self.kivec = h.Vector().record(measureNeuron(location)._ref_ki)
  325. self.kovec = h.Vector().record(measureNeuron(location)._ref_ko)
  326. self.naovec = h.Vector().record(measureNeuron(location)._ref_nao)
  327. self.naivec = h.Vector().record(measureNeuron(location)._ref_nai)
  328. self.caovec = h.Vector().record(measureNeuron(location)._ref_cao)
  329. self.caivec = h.Vector().record(measureNeuron(location)._ref_cai)
  330. self.cairxdvec = h.Vector().record(self.cai.nodes(measureNeuron(location))._ref_concentration)
  331. self.ecavec = h.Vector().record(measureNeuron(location)._ref_eca)
  332. self.caervec = h.Vector().record(self.caer.nodes(measureNeuron(location))._ref_concentration)
  333. ### NCX ###
  334. if self.have_ncx:
  335. self.ncxvec = h.Vector().record(self.ncx.nodes(measureNeuron(location))._ref_value)
  336. self.ncx2cavec = h.Vector().record(self.ncx2Ca.nodes(measureNeuron(location))._ref_value)
  337. ### CICR ###
  338. if self.have_cicr:
  339. self.cicrvec = h.Vector().record(
  340. self.CICRState[self.erCytMem].nodes(measureNeuron(location))._ref_value)
  341. ### GCaMP ###
  342. if self.have_gcamp:
  343. self.gcampvec = h.Vector().record(self.gcamp.nodes(measureNeuron(location))._ref_value)
  344. self.cagcampvec = h.Vector().record(self.cagcamp.nodes(measureNeuron(location))._ref_value)
  345. ### Spike.mod ###
  346. self.spike_mvec = h.Vector().record(measureNeuron(location).spike._ref_m)
  347. self.spike_nvec = h.Vector().record(measureNeuron(location).spike._ref_n)
  348. self.spike_hvec = h.Vector().record(measureNeuron(location).spike._ref_h)
  349. self.spike_pvec = h.Vector().record(measureNeuron(location).spike._ref_p)
  350. self.spike_qvec = h.Vector().record(measureNeuron(location).spike._ref_q)
  351. self.spike_cvec = h.Vector().record(measureNeuron(location).spike._ref_c)
  352. self.inavec = h.Vector().record(measureNeuron(location)._ref_ina)
  353. self.ikvec = h.Vector().record(measureNeuron(location)._ref_ik)
  354. self.icavec = h.Vector().record(measureNeuron(location)._ref_ica)
  355. print('Recording vectors created')
  356. # Create a current clamp
  357. iclamp = h.IClamp(stimNeuron(location))
  358. iclamp.dur = sim_dur
  359. # Vector to play the waveform
  360. stim_vec = h.Vector(current_vector)
  361. time_vec = h.Vector(time_vector)
  362. stim_vec.play(iclamp._ref_amp, time_vec, 1)
  363. # Run simulation
  364. h.dt = dt
  365. h.finitialize(-75)
  366. for i in tqdm(range(len(time_vec))):
  367. h.fadvance()
  368. print('Simulation complete')
  369. def calculateAIC(self, log_dir, stimulation_config, stim_start, stim_end):
  370. caVec = 1000 * self.caivec.as_numpy()
  371. tVec = self.tvec.as_numpy()
  372. mask = (tVec >= stim_start) & (tVec <= stim_end)
  373. maskbaseline = (stim_start/2 < tVec) & (tVec < stim_start)
  374. AIC = np.mean(caVec[mask])
  375. F0 = np.mean(np.power(caVec[maskbaseline], 2.5) / (0.375**2.5 + np.power(caVec[maskbaseline], 2.5)))
  376. F = np.mean(np.power(caVec[mask], 2.5) / (0.375**2.5 + np.power(caVec[mask], 2.5)))
  377. AICG = ((F/F0) - 1)
  378. print('AIC = ', AIC)
  379. print('AICG = ', AICG)
  380. if self.have_gcamp:
  381. cagcampVec = 1000 * self.cagcampvec.as_numpy()
  382. AIG = np.mean(cagcampVec[mask])
  383. print('AIG = ', AIG)
  384. with open(log_dir, 'a', newline='') as f:
  385. writer = csv.writer(f)
  386. writer.writerow([stimulation_config['waveform'], stimulation_config['frequency'],
  387. stimulation_config['amplitude'], AICG])
  388. if self.have_gcamp:
  389. writer.writerow([stimulation_config['waveform'], stimulation_config['frequency'],
  390. stimulation_config['amplitude'], AIG])
  391. def plot_results(self, save_dir):
  392. # Prepare the saving directory
  393. if not os.path.exists(save_dir):
  394. os.makedirs(save_dir)
  395. # Figures
  396. ### Membrane Potential ###
  397. fig = pyplot.figure(figsize=(16, 6))
  398. pyplot.plot(self.tvec.as_numpy(), self.vvec.as_numpy(), '-b', label='k')
  399. pyplot.title("Membrane Potential")
  400. pyplot.xlabel('t (ms)')
  401. pyplot.ylabel('Voltage (mV)')
  402. pyplot.savefig(save_dir + 'MemPotTest.svg', format="svg")
  403. ## Ca ###
  404. # # Ca outside the cell
  405. # fig = pyplot.figure(figsize=(16, 6))
  406. # pyplot.plot(self.tvec.as_numpy(), 1000 * self.caovec.as_numpy(), '-g', label='ca')
  407. # pyplot.xlabel('time (ms)')
  408. # pyplot.ylabel('Concentration (uM)')
  409. # pyplot.title('Extracellular Ca')
  410. # pyplot.savefig(save_dir+'ExtraCaTest.svg', format="svg")
  411. # Ca inside Cyt
  412. fig = pyplot.figure(figsize=(16, 6))
  413. pyplot.plot(self.tvec.as_numpy(), 1000 * self.caivec.as_numpy(), '-g', label='ca')
  414. pyplot.xlabel('time (ms)')
  415. pyplot.ylabel('Concentration (uM)')
  416. pyplot.title('Intracellular Ca')
  417. pyplot.savefig(save_dir+'IntraCaTest.svg', format="svg")
  418. # # F(t)
  419. # fig = pyplot.figure(figsize=(16, 6))
  420. # pyplot.plot(self.tvec.as_numpy(),
  421. # np.power(self.caivec.as_numpy(), 2.5) /
  422. # (0.375 ** 2.5 + np.power(self.caivec.as_numpy(), 2.5)), '-g', label='F(t)')
  423. # pyplot.xlabel('time (ms)')
  424. # pyplot.ylabel('F(t)')
  425. # pyplot.title('Fluorescence (f(t))')
  426. # pyplot.savefig(save_dir+'Ft.svg', format="svg")
  427. ### NCX ###
  428. if self.have_ncx:
  429. fig = pyplot.figure(figsize=(16, 6))
  430. pyplot.plot(self.tvec.as_numpy(), 1000*self.ncxvec.as_numpy(), '-b', label='NCX')
  431. pyplot.plot(self.tvec.as_numpy(), 1000*self.ncx2cavec.as_numpy(), '-r', label='NCX2Ca')
  432. pyplot.xlabel('time (ms)')
  433. pyplot.ylabel('Concentration (uM)')
  434. pyplot.title('Free NCX and bound NCX inside Cyt')
  435. pyplot.legend()
  436. pyplot.savefig(save_dir+'NCXTest.svg', format="svg")
  437. ### CICR ###
  438. if self.have_cicr:
  439. fig = pyplot.figure(figsize=(16, 6))
  440. pyplot.plot(self.tvec.as_numpy(), 1000*self.cicrvec.as_numpy(), '-b', label='CICR')
  441. # pyplot.plot(rgc1.tvec.as_numpy(), 1000*rgc1.cicrfvec.as_numpy(), '-b', label='CICRFlux')
  442. pyplot.xlabel('t (ms)')
  443. pyplot.ylabel('State Value')
  444. pyplot.title('CICR state inside erCytMem')
  445. pyplot.legend()
  446. pyplot.savefig(save_dir+'CICRTest.svg', format="svg")
  447. ### GCaMP ###
  448. if self.have_gcamp:
  449. fig = pyplot.figure(figsize=(16, 6))
  450. pyplot.plot(self.tvec.as_numpy(), 1000*self.gcampvec.as_numpy(), '-b', label='Free GCaMP')
  451. pyplot.plot(self.tvec.as_numpy(), 1000*self.cagcampvec.as_numpy(), '-r', label='Ca + GCaMP')
  452. pyplot.xlabel('time (ms)')
  453. pyplot.ylabel('Concentration (uM)')
  454. pyplot.title('Free GCaMP and bound GCaMP inside Cyt')
  455. pyplot.legend()
  456. pyplot.savefig(save_dir+'GCaMPTest.svg', format="svg")
  457. # # Ca inside ER
  458. # fig = pyplot.figure(figsize=(16, 6))
  459. # pyplot.plot(self.tvec.as_numpy(), 1000 * self.caervec.as_numpy(), '-g', label='k')
  460. # pyplot.xlabel('time (ms)')
  461. # pyplot.ylabel('Concentration (uM)')
  462. # pyplot.title('ER Ca')
  463. # pyplot.savefig(save_dir+'ERCaTest.svg', format="svg")
  464. # # Ca inside Cyt Recorded by RXD
  465. # fig = pyplot.figure(figsize=(16, 6))
  466. # pyplot.plot(self.tvec.as_numpy(), 1000 * self.cairxdvec.as_numpy(), '-g', label='ca')
  467. # pyplot.xlabel('time (ms)')
  468. # pyplot.ylabel('Concentration (uM)')
  469. # pyplot.title('Intracellular Ca (Recorded by RXD)')
  470. # # pyplot.savefig(os.path.join('IntraCaTest.svg'), format="svg")
  471. #
  472. # # Ca Nerst voltage
  473. # fig = pyplot.figure(figsize=(16, 6))
  474. # pyplot.plot(self.tvec.as_numpy(), self.ecavec.as_numpy(), '-g', label='ca')
  475. # pyplot.xlabel('time (ms)')
  476. # pyplot.ylabel('V')
  477. # pyplot.title('Ca Nerst voltage')
  478. # # pyplot.savefig(os.path.join('IntraCaTest.svg'), format="svg")
  479. #
  480. #
  481. # ### Na ###
  482. # # Na outside the cell
  483. # fig = pyplot.figure(figsize=(16, 6))
  484. # pyplot.plot(self.tvec.as_numpy(), 1000 * self.naovec.as_numpy(), '-g', label='na')
  485. # pyplot.xlabel('time (ms)')
  486. # pyplot.ylabel('Concentration (uM)')
  487. # pyplot.title('Extracellular Na')
  488. # # pyplot.savefig(os.path.join('ExtraCaTest.svg'), format="svg")
  489. #
  490. # # Na inside Cyt
  491. # fig = pyplot.figure(figsize=(16, 6))
  492. # pyplot.plot(self.tvec.as_numpy(), 1000 * self.naivec.as_numpy(), '-g', label='na')
  493. # pyplot.xlabel('time (ms)')
  494. # pyplot.ylabel('Concentration (uM)')
  495. # pyplot.title('Intracellular Na')
  496. # # pyplot.savefig(os.path.join('IntraCaTest.svg'), format="svg")
  497. #
  498. # ### K ###
  499. # # K outside the cell
  500. # fig = pyplot.figure(figsize=(16, 6))
  501. # pyplot.plot(self.tvec.as_numpy(), 1000 * self.kovec.as_numpy(), '-g', label='k')
  502. # pyplot.xlabel('time (ms)')
  503. # pyplot.ylabel('Concentration (uM)')
  504. # pyplot.title('Extracellular K')
  505. # # pyplot.savefig(os.path.join('ExtraCaTest.svg'), format="svg")
  506. #
  507. # # K inside Cyt
  508. # fig = pyplot.figure(figsize=(16, 6))
  509. # pyplot.plot(self.tvec.as_numpy(), 1000 * self.kivec.as_numpy(), '-g', label='k')
  510. # pyplot.xlabel('time (ms)')
  511. # pyplot.ylabel('Concentration (uM)')
  512. # pyplot.title('Intracellular K')
  513. # # pyplot.savefig(os.path.join('IntraCaTest.svg'), format="svg")
  514. #
  515. ### Spike ###
  516. fig = pyplot.figure(figsize=(16, 6))
  517. pyplot.plot(self.tvec.as_numpy(), self.spike_pvec.as_numpy(), label='p-gate')
  518. pyplot.plot(self.tvec.as_numpy(), self.spike_qvec.as_numpy(), label='q-gate')
  519. pyplot.plot(self.tvec.as_numpy(), self.spike_cvec.as_numpy(), label='c-gate')
  520. pyplot.plot(self.tvec.as_numpy(), self.spike_mvec.as_numpy(), label='m-gate')
  521. pyplot.plot(self.tvec.as_numpy(), self.spike_hvec.as_numpy(), label='h-gate')
  522. pyplot.plot(self.tvec.as_numpy(), self.spike_nvec.as_numpy(), label='n-gate')
  523. pyplot.xlabel('time (ms)')
  524. pyplot.ylabel('Open Probability')
  525. pyplot.title('Spike model parameters')
  526. pyplot.legend()
  527. pyplot.savefig(save_dir+'SpikeOpenProbTest.svg', format="svg")
  528. # fig = pyplot.figure()
  529. # pyplot.plot(self.tvec.as_numpy(), self.spike_ina.as_numpy(), '-b', label='ina')
  530. # pyplot.plot(self.tvec.as_numpy(), self.spike_ik.as_numpy(), '-r', label='ik')
  531. # pyplot.plot(self.tvec.as_numpy(), self.spike_ica.as_numpy(), '-g', label='ica')
  532. # pyplot.xlabel('time (ms)')
  533. # pyplot.ylabel('Ions Currents')
  534. # pyplot.title('Spike model ion currents')
  535. # pyplot.legend()
  536. # # pyplot.savefig(os.path.join('SpikeCurrentTest.svg'), format="svg")
  537. # ### IT ###
  538. # fig = pyplot.figure()
  539. # pyplot.plot(self.tvec.as_numpy(), self.it_ica.as_numpy(), '-b', label='ica')
  540. # pyplot.xlabel('time (ms)')
  541. # pyplot.ylabel('Ca ion Currents (mA/cm2)')
  542. # pyplot.title('IT model ion current')
  543. # pyplot.legend()
  544. # # pyplot.savefig(os.path.join('ItcurrentTest.svg'), format="svg")
  545. # fig = pyplot.figure(figsize=(16, 6))
  546. # pyplot.plot(self.tvec.as_numpy(), self.inavec.as_numpy(), '-b', label='ina')
  547. # pyplot.plot(self.tvec.as_numpy(), self.ikvec.as_numpy(), '-r', label='ik')
  548. # pyplot.plot(self.tvec.as_numpy(), self.icavec.as_numpy(), '-g', label='ica')
  549. # pyplot.xlabel('time (ms)')
  550. # pyplot.ylabel('Ions Currents')
  551. # pyplot.title('Membrane currents (mA/cm2)')
  552. # pyplot.legend()
  553. # # pyplot.savefig(os.path.join('CurrentTest.svg'), format="svg")

RGCModel.py at commit 7108c21, under MIT · at the source

Overview

Authors: Omid Sharafi1,2, Timothy Silliman1,3, Hadi Mokhtari Dowlatabad1,2, Gengle Niu4, Steven T. Walston1,4, Jean-Marie C. Bouteiller1,3, Kimberly K. Gokoffski1,4,5, Gianluca Lazzi1,2,3,4
ORCID iDs: Gengle Niu
  1. Institute for Technology and Medical Systems (ITEMS), Keck School of Medicine, University of Southern California,Los Angeles, USA
  2. Department of Electrical and Computer Engineering, University of Southern California,Los Angeles, USA
  3. Alfred E. Mann Department of Biomedical Engineering, University of Southern California,Los Angeles, USA
  4. Department of Ophthalmology, USC Roski Eye Institute, Keck School of Medicine, University of Southern California,Los Angeles, USA
  5. Department of Ophthalmology and Vision Science, Gavin Herbert Eye Institute, University of California, Irvine,Irvine, USA
Institutions: University of Southern California (United States); University of California, Irvine (United States)
Journal: Scientific reports, volume 16, issue 1, article 18948
Dates: received 28 January 2026; accepted 15 April 2026; published online 24 April 2026
Type: Research article · Language: English
License: CC BY-NC-ND
Identifiers: DOI 10.1038/s41598-026-49531-x · PMID 42031950 · PMCID PMC13276083 · OpenAlex W7155569662
Open access: gold, a free copy (OpenAlex)
Status: code verified
Categories: optical imaging (calcium, voltage, 2-photon) (modality), mouse (organism), cellular / molecular (subfield)
Methods: Statistics, Machine learning
Keywords: Biological techniques, Biophysics, Neuroscience, Physiology
MeSH: Calcium*, Calcium Signaling*, Electric Stimulation*, Retinal Ganglion Cells*, Animals, Mice (* major topic)
Topic: Neuroscience and Neural Engineering (Cellular and Molecular Neuroscience, Neuroscience), according to OpenAlex
Funding: NSF (2121164); NEI/NIH (R01EY035375); Research to Prevent Blindness Foundation Disney Award for Amblyopia; unrestricted grant to the Department of Ophthalmology from Research to Prevent Blindness; NEI (P30EY029220)
Citations: not cited yet (Europe PMC); 63 references in the paper

Abstract

The abstract is not reproduced here: the paper's license (CC BY-NC-ND) does not allow it. Read it in the paper, at the publisher or on Europe PMC.

Repository

Its files are read in the Code ↔ Paper reader above, with 5 matches between paragraphs and lines of code.

Omid-SH/RGCaEFS

License: MIT
State: the link answers, verified on 30 September 2026
Evidence: files inventoried
Commit: 7108c21b04a5bc0fdbe3eec9396b7b493d019813, 9 February 2026
Languages: Python (8), NEURON (4), Shell (1), Jupyter (1)
Size: 189 files, 14 scripts
Software Heritage: not archived
Found in: “Data availability”
Holds: README, license file, 1 notebook
Not found: CITATION.cff, environment file, tests, continuous integration, documentation
Tools: NumPy (7 files), NEURON (5 files), Matplotlib (3 files), OpenCV (3 files), tifffile (3 files), pandas (2 files), PyTorch (1 file), scikit-learn (1 file), seaborn (1 file)
Availability: 1 check, the latest on 30 September 2026: the link answers
  • 30 September 2026: the link answers
16 files

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:

  • 1 repository of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
  • 14 scripts, each with its path and the digest of its content;
  • 5 matches between paragraphs of the paper and lines of the code (method lexical-v1);
  • 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

No dataset and no data link were found in the paper.

Code and data availability statement

The paper has a code and data availability statement. Its license (CC BY-NC-ND) does not allow reproducing it here; in short, from what the harvester recognized in it:

  • it points to the authors' code: Omid-SH/RGCaEFS
  • it says that the data are available on request

Read it in the paper: doi.org/10.1038/s41598-026-49531-x.

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, 30 September 2026: the first record

Recorded: type, language, journal, volume, issue, pages, dates, 8 authors, 4 keywords, 6 MeSH terms, 5 funders, 59 references.

Cite

This paper

Sharafi, O., Silliman, T., Mokhtari Dowlatabad, H., Niu, G., Walston, S. T., Bouteiller, J.-M. C., Gokoffski, K. K., & Lazzi, G. (2026). Population-scale analysis of frequency-dependent calcium dynamics in retinal ganglion cells under electric field stimulation. Scientific reports, 16(1), 18948. https://doi.org/10.1038/s41598-026-49531-x

BibTeX

@article{sharafi2026population,
author = {Sharafi, Omid and Silliman, Timothy and Mokhtari Dowlatabad, Hadi and Niu, Gengle and Walston, Steven T. and Bouteiller, Jean-Marie C. and Gokoffski, Kimberly K. and Lazzi, Gianluca},
title = {{Population-scale analysis of frequency-dependent calcium dynamics in retinal ganglion cells under electric field stimulation}},
journal = {Scientific reports},
year = {2026},
month = apr,
volume = {16},
number = {1},
pages = {18948},
publisher = {Nature Publishing Group},
issn = {2045-2322},
doi = {10.1038/s41598-026-49531-x},
url = {https://doi.org/10.1038/s41598-026-49531-x},
pmid = {42031950},
pmcid = {PMC13276083}
}

RIS

TY - JOUR
AU - Sharafi, Omid
AU - Silliman, Timothy
AU - Mokhtari Dowlatabad, Hadi
AU - Niu, Gengle
AU - Walston, Steven T.
AU - Bouteiller, Jean-Marie C.
AU - Gokoffski, Kimberly K.
AU - Lazzi, Gianluca
TI - Population-scale analysis of frequency-dependent calcium dynamics in retinal ganglion cells under electric field stimulation
T2 - Scientific reports
J2 - Sci Rep
PY - 2026
DA - 2026/04/24
VL - 16
IS - 1
SP - 18948
SN - 2045-2322
PB - Nature Publishing Group
DO - 10.1038/s41598-026-49531-x
UR - https://doi.org/10.1038/s41598-026-49531-x
LA - en
ER -

CSL-JSON

{
"id": "10.1038/s41598-026-49531-x",
"type": "article-journal",
"title": "Population-scale analysis of frequency-dependent calcium dynamics in retinal ganglion cells under electric field stimulation",
"container-title": "Scientific reports",
"author": [
{
"family": "Sharafi",
"given": "Omid"
},
{
"family": "Silliman",
"given": "Timothy"
},
{
"family": "Mokhtari Dowlatabad",
"given": "Hadi"
},
{
"family": "Niu",
"given": "Gengle"
},
{
"family": "Walston",
"given": "Steven T."
},
{
"family": "Bouteiller",
"given": "Jean-Marie C."
},
{
"family": "Gokoffski",
"given": "Kimberly K."
},
{
"family": "Lazzi",
"given": "Gianluca"
}
],
"container-title-short": "Sci Rep",
"volume": "16",
"issue": "1",
"page": "18948",
"DOI": "10.1038/s41598-026-49531-x",
"PMID": "42031950",
"PMCID": "PMC13276083",
"ISSN": "2045-2322",
"publisher": "Nature Publishing Group",
"URL": "https://doi.org/10.1038/s41598-026-49531-x",
"language": "en",
"issued": {
"date-parts": [
[
2026,
4,
24
]
]
}
}

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.1364/boe.600665 [code]
NeuroSeg-MF: robust neuron segmentation in two-photon Ca&lt;sup&gt;2+&lt;/sup&gt; imaging using multi-feature fusion and detection-guided SAM.
Journal: Biomedical optics express
In common: tifffile, OpenCV, PyTorch, 4 other tools, optical imaging (calcium, voltage, 2-photon), 1 reference
[2] doi:10.1016/j.isci.2026.117010 [code]
Deep learning-assisted mapping of dendritic spines using sequential 2D two-photon calcium imaging.
Journal: iScience
In common: tifffile, OpenCV, PyTorch, 5 other tools, optical imaging (calcium, voltage, 2-photon), cellular / molecular
[3] doi:10.7554/elife.100880 [code]
An applicable and efficient retrograde monosynaptic circuit mapping tool for larval zebrafish.
Journal: eLife
In common: NEURON, tifffile, OpenCV, 5 other tools
[4] doi:10.1016/j.isci.2026.116206 [code]
Gut distension evokes rapid neural dynamics in vagal and hindbrain populations of larval zebrafish.
Journal: iScience
In common: tifffile, OpenCV, PyTorch, 5 other tools, optical imaging (calcium, voltage, 2-photon)
[5] doi:10.3389/fnsys.2026.1822122 [code]
Convergence-divergence circuits for multimodal integration of innate and learned opponent valences.
Journal: Frontiers in systems neuroscience
In common: NEURON, tifffile, PyTorch, 5 other tools
[6] doi:10.1016/j.isci.2026.115488 [code]
An integrated &lt;i&gt;i&lt;/i&gt; &lt;i&gt;n vitro&lt;/i&gt; platform and biophysical modeling approach for studying synaptic transmission in isolated neuronal pairs.
Journal: iScience
In common: NEURON, OpenCV, PyTorch, 5 other tools, cellular / molecular
[7] doi:10.7554/elife.105081 [code]
Movie reconstruction from mouse visual cortex activity.
Journal: eLife
In common: tifffile, OpenCV, PyTorch, 3 other tools, optical imaging (calcium, voltage, 2-photon), mouse, 1 reference
[8] doi:10.1364/boe.605322 [code]
Generalized plaque digitization framework for multi-dimensional mesoscopic images.
Journal: Biomedical optics express
In common: tifffile, OpenCV, PyTorch, 5 other tools, mouse
[9] doi:10.1016/j.xpro.2026.104659 [code]
Protocol for simultaneous in vivo two-photon imaging and locomotion quantification during olfactory stimulation and pharmacology in walking Drosophila.
Journal: STAR protocols
In common: tifffile, OpenCV, seaborn, 3 other tools, optical imaging (calcium, voltage, 2-photon), 1 reference
[10] doi: [code]
Real-time closed-loop feedback system for mouse mesoscale cortical signal and movement control
Journal: eLife
In common: tifffile, OpenCV, seaborn, 4 other tools, optical imaging (calcium, voltage, 2-photon), mouse

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.

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: questions and error reports about this paper and its code, from signed-in readers and its authors. It opens with sign-in.

Reproductions: reports from readers who ran the authors' code: what they reproduced, with which environment, commit and data. It opens with sign-in.

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