OSCR

How to train your neuron: developing a detailed, up-to-date, multipurpose model of hippocampal CA1 pyramidal cells

Code ↔ Paper

10 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 10 matches · 1 of them tie a paragraph to a whole file without given lines: a weak match, whose lines are not tinted
  1. [1] § Methods › Tools › Model testing ↔ CA1_pyramidal_cell_codes_and_scripts.zip/model_comparison_SOMA_optimizer_multirun_AbsFeatures_subplots_new_style.py, lines 160 to 248 · score 0.81 · AP width, AP rise, voltage deflection, sag amplitude, AP amplitude, spiking · Report a mismatch
  2. [2] § Methods › Tools › Model testing ↔ CA1_pyramidal_cell_codes_and_scripts.zip/model_comparison_SOMA_optimizer_multirun_AbsFeatures_subplots_new_style_2_sets.py, lines 199 to 271 · score 0.81 · AP width, AP rise, voltage deflection, sag amplitude, AP amplitude, spiking · Report a mismatch
  3. [3] § Results › Model validation › Finding the correct voltage dependence of the NMDA receptor model using the oblique integration test ↔ CA1_pyramidal_cell_codes_and_scripts.zip/model_comparison_oblique_integration.py, lines 406 to 489 · score 0.65 · NMDA receptor, voltage dependence, Oblique Integration, Gao, Grunditz, Larkum · Report a mismatch
  4. [4] § Results › Model validation › Finding the correct voltage dependence of the NMDA receptor model using the oblique integration test ↔ CA1_pyramidal_cell_codes_and_scripts.zip/model_comparison_oblique_integration.py, lines 406 to 489 · score 0.62 · Jahr Stevens, NMDA receptor, voltage dependence, Oblique Integration, CA1 · Report a mismatch
  5. [5] § Methods › Model building › Morphology ↔ CA1_pyramidal_cell_model/we_want_spines_fully_active_ghk_50_Ra_split_head.hoc, lines 1 to 60 · score 0.61 · spine density, basal dendrites, neck, diameter, head, um · Report a mismatch
  6. [6] § Results › Overview of the model-building process ↔ CA1_pyramidal_cell_codes_and_scripts.zip/plot_parameters3.py, lines 395 to 465 · score 0.56 · SK density, Kdr density, KD density, permeability, Ih, soma · Report a mismatch
  7. [7] § Methods › Tools › Model testing ↔ hippounit/capabilities/cap_ReceivesEPSCstim.py, the whole file · a weak match · score 0.54 · excitatory post synaptic, EPSC, stimuli, locations, soma, dendritic · Report a mismatch
  8. [8] § Results › Models of voltage-gated ion channels ↔ CA1_pyramidal_cell_codes_and_scripts.zip/plotting_model_traces_blocking.py, lines 122 to 181 · score 0.53 · voltage gated potassium, delayed rectifier, potassium channels, calcium dependent · Report a mismatch
  9. [9] § Methods › Model building › Channel models › Potassium channels › Slow Afterhyperpolarization potassium (K-AHP) current ↔ CA1_pyramidal_cell_codes_and_scripts.zip/plotting_model_traces_blocking.py, lines 122 to 181 · score 0.53 · calcium dependent potassium, conductance calcium dependent, CA1 pyramidal cells, potassium channels, calcium channels, SK · Report a mismatch
  10. [10] § Methods › Model building › Channel models › Potassium channels › A-type potassium channels ↔ CA1_pyramidal_cell_codes_and_scripts.zip/shaft_spine_compare_statistics_for_paper_plot.py, lines 49 to 97 · score 0.51 · proximal dendritic, distal dendritic, shifted, soma, cell · Report a mismatch

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

Python · 489 lines · 19 KB · CC-BY-4.0 · 2 matches

  1. import numpy
  2. import matplotlib
  3. import matplotlib.pyplot as plt
  4. try:
  5. import cPickle as pickle
  6. except:
  7. import pickle
  8. import gzip
  9. import math
  10. import os
  11. import json
  12. import collections
  13. import quantities
  14. data_dict=collections.OrderedDict()
  15. base_dir= '/mnt/csoport31-2/Modellezo_csapat/CA1_pyramidal/Spine_project_validation_results60/Basic_set_newopt/Active_spine_F_factor_with_R/For_NMDA_compare/'
  16. save_dir = '/mnt/csoport31-2/Modellezo_csapat/CA1_pyramidal/Spine_project_validation_results60/Basic_set_newopt/Active_spine_F_factor_with_R/For_NMDA_compare/'
  17. if not os.path.exists(save_dir):
  18. os.makedirs(save_dir)
  19. for method in os.listdir(base_dir):
  20. data_dict[method]={}
  21. for models in os.listdir(base_dir + method + '/results/oblique_integration/'):
  22. print(models)
  23. data_dict[method][models]={}
  24. data_dict[method][models]['sync_EPSP_amps']=pickle.load(gzip.GzipFile(base_dir + method + '/results/oblique_integration/'+models+'/oblique_model_epsp_amps_sync.p', "rb"))
  25. data_dict[method][models]['async_EPSP_amps']=pickle.load(gzip.GzipFile(base_dir + method + '/results/oblique_integration/'+models+'/oblique_model_epsp_amps_async.p', "rb"))
  26. data_dict[method][models]['sync_peak_derivs']=pickle.load(gzip.GzipFile(base_dir + method + '/results/oblique_integration/'+models+'/oblique_model_mean_peak_derivs_sync.p', "rb"))
  27. data_dict[method][models]['async_peak_derivs']=pickle.load(gzip.GzipFile(base_dir + method + '/results/oblique_integration/'+models+'/oblique_model_mean_peak_derivs_async.p', "rb"))
  28. with open(base_dir + method + '/results/oblique_integration/'+models+'/p_values.json') as f:
  29. data_dict[method][models]['p_values']=json.load(f, object_pairs_hook=collections.OrderedDict)
  30. with open(base_dir + method + '/results/oblique_integration/'+models+'/oblique_model_features.json') as f:
  31. data_dict[method][models]['features']=json.load(f, object_pairs_hook=collections.OrderedDict)
  32. with open(base_dir + method + '/results/oblique_integration/'+models+'/oblique_model_errors.json') as f:
  33. data_dict[method][models]['errors']=json.load(f, object_pairs_hook=collections.OrderedDict)
  34. # break
  35. #print(data_dict)
  36. #Loading observation - this contains the SD values not the SEM
  37. data=pickle.load(gzip.GzipFile(base_dir + method + '/results/oblique_integration/'+models+'/oblique_features.p', "rb"))
  38. observation = data[0]
  39. #names = ['All spines modeled explicitly', 'Input recieving spines modeled explicitly', 'Spines modeled with F-factor']
  40. for key, val in observation.items():
  41. try:
  42. observation[key] = float(val)
  43. except ValueError:
  44. quantity_parts = val.split(" ")
  45. number = float(quantity_parts[0])
  46. units = " ".join(quantity_parts[1:])
  47. observation[key] = quantities.Quantity(number, units)
  48. try:
  49. colormap = plt.cm.spectral #http://matplotlib.org/1.2.1/examples/pylab_examples/show_colormaps.html
  50. except:
  51. colormap = plt.cm.nipy_spectral
  52. colors = colormap(numpy.linspace(0.1, 0.9, len(data_dict.keys())))
  53. #input - output curves
  54. #fig, axs = plt.subplots(3, len(data_dict.keys())//2)
  55. fig, axs = plt.subplots(3, 3)
  56. axs=axs.flatten()
  57. for i, method in enumerate(data_dict.keys()):
  58. for j, models in enumerate(data_dict[method].keys()):
  59. axs[i].errorbar(data_dict[method][models]['sync_EPSP_amps']['all_expected_mean'],data_dict[method][models]['sync_EPSP_amps']['all_measured_mean'], yerr=data_dict[method][models]['sync_EPSP_amps']['all_sd'], marker='o', color=colors[i], elinewidth = 0.2)
  60. axs[i].plot([0,8],[0, 8], linestyle="--")
  61. axs[i].set_xlabel('expected EPSP (mV)', fontsize = 14)
  62. axs[i].set_ylabel('measured EPSP (mV)', fontsize = 14)
  63. #axs[i].set_ylim(-0,10)
  64. #axs[i].set_xlim(-0,10)
  65. axs[i].set_title(method, fontsize = 14)
  66. fig.suptitle('Summary plot of mean input-output curves for synchronous inputs', fontsize = 20)
  67. print(fig.get_size_inches())
  68. fig.set_size_inches(10,9)
  69. plt.tight_layout()
  70. plt.savefig(save_dir + 'oblique_sync_input-output_all.svg', bbox_inches='tight')
  71. # peak derivative plots
  72. #fig2, axs2 = plt.subplots(3, len(data_dict.keys())//2)
  73. fig2, axs2 = plt.subplots(3, 3)
  74. axs2=axs2.flatten()
  75. for i, method in enumerate(data_dict.keys()):
  76. for j, models in enumerate(data_dict[method].keys()):
  77. axs2[i].errorbar(range(len(data_dict[method][models]['sync_peak_derivs']['mean_peak_deriv'])),data_dict[method][models]['sync_peak_derivs']['mean_peak_deriv'], yerr=data_dict[method][models]['sync_peak_derivs']['sd_peak_deriv'], marker='o', color=colors[i], elinewidth = 0.2)
  78. axs2[i].set_xlabel('number of inputs', fontsize = 14)
  79. axs2[i].set_ylabel('dV/dt (V/s)', fontsize = 14)
  80. #axs2[i].set_ylim(-0,10)
  81. #axs2[i].set_xlim(-0,10)
  82. axs2[i].set_title(method, fontsize = 14)
  83. fig2.suptitle('Summary plot of mean peak dV/dt amplitude for synchronous inputs', fontsize = 20)
  84. print(fig2.get_size_inches())
  85. fig2.set_size_inches(10,9)
  86. plt.tight_layout()
  87. plt.savefig(save_dir + 'oblique_sync_peak_derivatives.svg', bbox_inches='tight')
  88. # error plots - averaged over the 20 models
  89. plt.figure()
  90. methods = list(data_dict.keys())
  91. models = list(data_dict[method].keys())
  92. feat_errors_names = list(data_dict[methods[0]][models[0]]['errors'].keys())
  93. y = range(len(feat_errors_names))
  94. shift=0.1
  95. for k, error in enumerate(feat_errors_names):
  96. for i, method in enumerate(data_dict.keys()):
  97. error_values = []
  98. for j, models in enumerate(data_dict[method]):
  99. error_values.append(data_dict[method][models]['errors'][error])
  100. if k == 0:
  101. plt.errorbar(numpy.mean(error_values), k+i*shift, xerr = numpy.std(error_values), marker='o', color=colors[i], label = method)
  102. else:
  103. plt.errorbar(numpy.mean(error_values), k+i*shift, xerr = numpy.std(error_values), marker='o', color=colors[i])
  104. plt.tight_layout()
  105. plt.yticks(y, feat_errors_names)
  106. # plt.xlim(0,4)
  107. plt.title('Feature errors')
  108. plt.xlabel("# sd")
  109. lgd = plt.legend(bbox_to_anchor=(1.0, 1.0), loc = 'upper left')
  110. plt.savefig(save_dir + 'oblique_mean_errors_avg_of_models.svg', bbox_extra_artists=(lgd,), bbox_inches='tight')
  111. # error plots
  112. plt.figure()
  113. methods = list(data_dict.keys())
  114. models = list(data_dict[method].keys())
  115. feat_errors_names = list(data_dict[methods[0]][models[0]]['errors'].keys())
  116. y = range(len(feat_errors_names))
  117. shift=0.1
  118. for k, error in enumerate(feat_errors_names):
  119. for i, method in enumerate(data_dict.keys()):
  120. for j, models in enumerate(data_dict[method]):
  121. if k == 0 and j==0:
  122. plt.plot(data_dict[method][models]['errors'][error], k+i*shift, marker='o', color=colors[i], label = method)
  123. else:
  124. plt.plot(data_dict[method][models]['errors'][error], k+i*shift, marker='o', color=colors[i])
  125. plt.yticks(y, feat_errors_names)
  126. # plt.xlim(0,4)
  127. plt.tight_layout()
  128. plt.title('Feature errors')
  129. plt.xlabel("# sd")
  130. lgd = plt.legend(bbox_to_anchor=(1.0, 1.0), loc = 'upper left')
  131. plt.savefig(save_dir + 'oblique_mean_errors', bbox_extra_artists=(lgd,), bbox_inches='tight')
  132. # plot p_values - averaged over the 20 models
  133. plt.figure()
  134. methods = list(data_dict.keys())
  135. models = list(data_dict[method].keys())
  136. feat_p_values_names = list(data_dict[methods[0]][models[0]]['p_values'].keys())
  137. y = range(len(feat_errors_names))
  138. shift=0.1
  139. for k, feat_p_value in enumerate(feat_p_values_names):
  140. for i, method in enumerate(data_dict.keys()):
  141. p_values = []
  142. for j, models in enumerate(data_dict[method]):
  143. p_values.append(data_dict[method][models]['p_values'][feat_p_value])
  144. if k == 0:
  145. plt.errorbar(numpy.mean(p_values), k+i*shift, xerr = numpy.std(p_values), marker='o', color=colors[i], label = method)
  146. else:
  147. plt.errorbar(numpy.mean(p_values), k+i*shift, xerr = numpy.std(p_values), marker='o', color=colors[i])
  148. #plt.semilogx(p_values, y, linestyle='None', marker='o', label = models)
  149. plt.yticks(y, feat_p_values_names)
  150. # plt.xlim(0,4)
  151. plt.tight_layout()
  152. plt.axvline(x=0.05, label='0.05', color='red')
  153. plt.xlabel("p values")
  154. lgd = plt.legend(bbox_to_anchor=(1.0, 1.0), loc = 'upper left')
  155. plt.savefig(save_dir + 'oblique_p_values_avg_of_models.svg', bbox_extra_artists=(lgd,), bbox_inches='tight')
  156. # plot p_values - log scale
  157. plt.figure()
  158. methods = list(data_dict.keys())
  159. models = list(data_dict[method].keys())
  160. feat_p_values_names = list(data_dict[methods[0]][models[0]]['p_values'].keys())
  161. y = range(len(feat_errors_names))
  162. shift=0.1
  163. for k, feat_p_value in enumerate(feat_p_values_names):
  164. for i, method in enumerate(data_dict.keys()):
  165. for j, models in enumerate(data_dict[method]):
  166. if k == 0 and j == 0:
  167. plt.semilogx(data_dict[method][models]['p_values'][feat_p_value], k+i*shift, marker='o', color=colors[i], label = method)
  168. else:
  169. plt.semilogx(data_dict[method][models]['p_values'][feat_p_value], k+i*shift, marker='o', color=colors[i])
  170. #plt.semilogx(p_values, y, linestyle='None', marker='o', label = models)
  171. plt.yticks(y, feat_p_values_names)
  172. # plt.xlim(0,4)
  173. plt.tight_layout()
  174. plt.axvline(x=0.05, label='0.05', color='red')
  175. plt.xlabel("p values")
  176. lgd = plt.legend(bbox_to_anchor=(1.0, 1.0), loc = 'upper left')
  177. plt.savefig(save_dir + 'oblique_p_values.svg', bbox_extra_artists=(lgd,), bbox_inches='tight')
  178. # plot features
  179. for method in data_dict:
  180. for models in data_dict[method]:
  181. for feature in data_dict[method][models]['features'].keys():
  182. if feature != 'num_of_locations':
  183. for key, val in data_dict[method][models]['features'][feature].items():
  184. try:
  185. data_dict[method][models]['features'][feature][key] = float(val)
  186. except ValueError:
  187. quantity_parts = val.split(" ")
  188. number = float(quantity_parts[0])
  189. units = " ".join(quantity_parts[1:])
  190. data_dict[method][models]['features'][feature][key] = quantities.Quantity(number, units)
  191. try:
  192. colormap = plt.cm.spectral #http://matplotlib.org/1.2.1/examples/pylab_examples/show_colormaps.html
  193. except:
  194. colormap = plt.cm.nipy_spectral
  195. colors = colormap(numpy.linspace(0.1, 0.9, len(data_dict.keys())))
  196. import matplotlib.gridspec as gridspec
  197. #gs = gridspec.GridSpec(2, 2,width_ratios=[4,1])
  198. gs = gridspec.GridSpec(2, 5)
  199. #fig, axes = plt.subplots(nrows=2, ncols=2)
  200. fig = plt.figure(tight_layout=False)
  201. fig.tight_layout()
  202. stitle=fig.suptitle('Features', fontsize = 20)
  203. plt.subplots_adjust(left = 0.1, top = 0.9, right = 0.9, bottom = 0.1, hspace = 0.5, wspace = 0.5)
  204. #plt.subplot(1,4,1)
  205. #plt.subplot(gs[0])
  206. fig.add_subplot(gs[0, 0])
  207. shift = -0.5
  208. x = 2
  209. for i, method in enumerate(data_dict.keys()):
  210. for models in data_dict[method]:
  211. feat=data_dict[method][models]['features']['threshold']['mean']
  212. SD=data_dict[method][models]['features']['threshold']['sd']
  213. plt.errorbar(x+shift, feat, yerr = SD, marker='o', color=colors[i], linestyle ='None')
  214. shift += 0.3
  215. x= 0.5
  216. plt.errorbar(x, observation['mean_threshold'], yerr = observation['threshold_std'], marker='x',markersize=10, color = 'black', linestyle ='None', label = 'experiment')
  217. plt.ylabel('Threshold (mV)', fontsize=14)
  218. plt.tick_params(bottom=False, labelbottom=False)
  219. #lgd = plt.legend(bbox_to_anchor=(0.01, 1.03), loc = 'lower left', fontsize = 12)
  220. fig.add_subplot(gs[0, 1])
  221. shift = -0.5
  222. x = 2
  223. for i, method in enumerate(data_dict.keys()):
  224. for models in data_dict[method]:
  225. feat=data_dict[method][models]['features']['proximal_threshold']['mean']
  226. SD=data_dict[method][models]['features']['proximal_threshold']['sd']
  227. #plt.errorbar(3, feature, yerr = SD, marker='o')
  228. plt.errorbar(x+shift, feat, yerr = SD, marker='o', color=colors[i], linestyle ='None')
  229. shift += 0.3
  230. x= 0.5
  231. plt.errorbar(x, observation['mean_prox_threshold'], yerr = observation['prox_threshold_std'], marker='x',markersize=10, color = 'black', linestyle ='None', label = 'experiment')
  232. plt.ylabel('Proximal threshold (mV)', fontsize=14)
  233. plt.tick_params(bottom=False, labelbottom=False)
  234. #lgd = plt.legend(bbox_to_anchor=(0.01, 1.03), loc = 'lower left', fontsize = 12)
  235. fig.add_subplot(gs[0, 2])
  236. shift = -0.5
  237. x = 2
  238. for i, method in enumerate(data_dict.keys()):
  239. for models in data_dict[method]:
  240. feat=data_dict[method][models]['features']['distal_threshold']['mean']
  241. SD=data_dict[method][models]['features']['distal_threshold']['sd']
  242. plt.errorbar(x+shift, feat, yerr = SD, marker='o', color=colors[i], linestyle ='None')
  243. shift += 0.3
  244. x= 0.5
  245. plt.errorbar(x, observation['mean_dist_threshold'], yerr = observation['dist_threshold_std'], marker='x',markersize=10, color = 'black', linestyle ='None', label = 'experiment')
  246. plt.ylabel('Distal threshold (mV)', fontsize=14)
  247. plt.tick_params(bottom=False, labelbottom=False)
  248. #lgd = plt.legend(bbox_to_anchor=(0.01, 1.03), loc = 'lower left', fontsize = 12)
  249. fig.add_subplot(gs[0, 3])
  250. shift = -0.5
  251. x = 2
  252. for i, method in enumerate(data_dict.keys()):
  253. for models in data_dict[method]:
  254. feat=data_dict[method][models]['features']['amplitude_at_th']['mean']
  255. SDs=data_dict[method][models]['features']['amplitude_at_th']['sd']
  256. #plt.errorbar(7, feature, yerr = SD, marker='o')
  257. plt.errorbar(x+shift, feat, yerr = SD, marker='o', color=colors[i], linestyle ='None')
  258. shift += 0.3
  259. x= 0.5
  260. plt.errorbar(x, observation['mean_amp_at_th'], yerr = observation['amp_at_th_std'], marker='x',markersize=10, color = 'black', linestyle ='None', label = 'experiment')
  261. plt.ylabel('Amplitude at threshold (mV)', fontsize=14)
  262. plt.tick_params(bottom=False, labelbottom=False)
  263. #lgd = plt.legend(bbox_to_anchor=(0.01, 1.03), loc = 'lower left', fontsize = 12)
  264. #plt.subplot(gs[1])
  265. fig.add_subplot(gs[0, 4])
  266. shift = -0.5
  267. x = 2
  268. for i, method in enumerate(data_dict.keys()):
  269. for models in data_dict[method]:
  270. feat=data_dict[method][models]['features']['peak_dV/dt_at_th']['mean']
  271. SD=data_dict[method][models]['features']['peak_dV/dt_at_th']['sd']
  272. plt.errorbar(x + shift, feat, yerr = SD, marker='o', color=colors[i], linestyle ='None')
  273. shift += 0.3
  274. x= 0.5
  275. obs_feat = observation['mean_peak_deriv']
  276. obs_sd = observation['peak_deriv_std']
  277. plt.errorbar(x, obs_feat, yerr = obs_sd, marker='x',markersize=10, color = 'black', linestyle ='None', label='experiment')
  278. plt.ylabel('peak dV/dt at threshold (V/s)',fontsize=14)
  279. plt.tick_params(bottom=False, labelbottom=False)
  280. plt.subplot(gs[1,0])
  281. shift = -0.5
  282. x = numpy.array([2])
  283. for i, method in enumerate(data_dict.keys()):
  284. for models in data_dict[method]:
  285. feat=data_dict[method][models]['features']['degree_of_nonlinearity_at_th']['mean']
  286. SD=data_dict[method][models]['features']['degree_of_nonlinearity_at_th']['sd']
  287. plt.errorbar(x + shift, feat, yerr = SD, marker='o', color=colors[i], linestyle ='None')
  288. shift += 0.3
  289. x= 0.5
  290. obs_feat = observation['mean_nonlin_at_th']
  291. obs_sd = observation['nonlin_at_th_std']
  292. plt.errorbar(x, obs_feat, yerr = obs_sd, marker='x',markersize=10, color = 'black', linestyle ='None')
  293. plt.ylabel('Degree of nonlinearity at threshold (%)', fontsize = 14)
  294. plt.tick_params(bottom=False, labelbottom=False)
  295. plt.subplot(gs[1,1])
  296. shift = -0.5
  297. x = numpy.array([2])
  298. for i, method in enumerate(data_dict.keys()):
  299. for models in data_dict[method]:
  300. feat=data_dict[method][models]['features']['suprath_degree_of_nonlinearity']['mean']
  301. SD=data_dict[method][models]['features']['suprath_degree_of_nonlinearity']['sd']
  302. plt.errorbar(x + shift, feat, yerr = SD, marker='o', color=colors[i], linestyle ='None')
  303. shift += 0.3
  304. x= 0.5
  305. obs_feat = observation['mean_nonlin_suprath']
  306. obs_sd = observation['nonlin_suprath_std']
  307. plt.errorbar(x, obs_feat, yerr = obs_sd, marker='x',markersize=10, color = 'black', linestyle ='None')
  308. plt.ylabel('Suprathreshold degree of nonlinearity (%)', fontsize = 14)
  309. plt.tick_params(bottom=False, labelbottom=False)
  310. plt.subplot(gs[1,2])
  311. shift = -0.5
  312. x = numpy.array([2])
  313. for i, method in enumerate(data_dict.keys()):
  314. for models in data_dict[method]:
  315. feat=data_dict[method][models]['features']['asynch_degree_of_nonlin_at_th']['mean']
  316. SD=data_dict[method][models]['features']['asynch_degree_of_nonlin_at_th']['sd']
  317. plt.errorbar(x + shift, feat, yerr = SD, marker='o', color=colors[i], linestyle ='None')
  318. shift += 0.3
  319. x= 0.5
  320. obs_feat = observation['mean_async_nonlin']
  321. obs_sd = observation['async_nonlin_std']
  322. plt.errorbar(x, obs_feat, yerr = obs_sd, marker='x',markersize=10, color = 'black', linestyle ='None')
  323. plt.ylabel('Degree of nonlinearity asynchron. (%)', fontsize = 14)
  324. plt.tick_params(bottom=False, labelbottom=False)
  325. plt.subplot(gs[1,3])
  326. shift = -0.5
  327. x = numpy.array([2])
  328. for i, method in enumerate(data_dict.keys()):
  329. print(i)
  330. for j, models in enumerate(data_dict[method].keys()):
  331. feat=data_dict[method][models]['features']['time_to_peak_at_th']['mean']
  332. SD=data_dict[method][models]['features']['time_to_peak_at_th']['sd']
  333. if j==0:
  334. plt.errorbar(x+shift, feat, yerr = SD, marker='o', color=colors[i], linestyle ='None', label = method)
  335. else:
  336. plt.errorbar(x+shift, feat, yerr = SD, marker='o', color=colors[i], linestyle ='None')
  337. shift += 0.3
  338. x= 0.5
  339. obs_feat = observation['mean_time_to_peak']
  340. obs_sd = observation['time_to_peak_std']
  341. plt.errorbar(x, obs_feat, yerr = obs_sd, marker='x',markersize=10, color = 'black', linestyle ='None', label='experiment')
  342. plt.ylabel('time to peak at threshold (ms)', fontsize = 14)
  343. plt.tick_params(bottom=False, labelbottom=False)
  344. #plt.ylim(0.0,16)
  345. lgd = plt.legend(bbox_to_anchor=(1.0, 1.0), loc = 'upper left', ncol=1, fontsize = 12)
  346. #lgd = plt.legend(bbox_to_anchor=(1.0, 1.0), loc = 'upper left')
  347. fig.set_size_inches(16, 8)
  348. #print(fig.get_size_inches())
  349. #plt.savefig(save_dir + 'oblique_mean_absolute_features_v2', bbox_extra_artists=(lgd, fig,), bbox_inches='tight')
  350. plt.savefig(save_dir + 'oblique_mean_absolute_features_Final.svg', bbox_inches='tight')
  351. '''NMDA voltage dependance traces'''
  352. v = numpy.arange(-120, 60, 1)
  353. plt.figure()
  354. for i, method in enumerate(data_dict.keys()):
  355. if method == 'Gao':
  356. mgblock = 1 / (1 + numpy.exp(0.072 * (-v)) * (1 / 3.57))
  357. elif method == 'Grunditz':
  358. mgblock = 1 / (1 + numpy.exp(0.08 * (-v)) * (1 / 0.69))
  359. elif method == 'Jahr_Stevens':
  360. mgblock = 1 / (1 + numpy.exp(0.062 * (-v)) * (1 / 3.57 ))
  361. elif method == 'Larkum':
  362. mgblock = 1 / (1 + numpy.exp(0.08 * (-v)) * (1 * 0.3))
  363. elif method == 'Magee':
  364. mgblock = 1 / (1 + numpy.exp(0.062 * (-v)) * (1 / 3.57 )) #same as Jahr-Stevens in this case
  365. elif method == 'Major':
  366. mgblock = 1 / (1 + numpy.exp(0.08 * (-v)) * (1 / 5 ))
  367. elif method == 'Otmakhova':
  368. mgblock = 1 / (1 + numpy.exp(0.1 * (-v)) * (1 / 15 ))
  369. elif method == 'Tar':
  370. mgblock = 1 / (1 + numpy.exp(((-v)-6)/18))
  371. else:
  372. mgblock = 1 / (1 + numpy.exp(0.071 * (-v)) * (1 / 4.3))
  373. plt.plot(v, mgblock, color=colors[i])
  374. plt.tight_layout()
  375. plt.xlabel('Voltage (mV)', fontsize = 14)
  376. plt.ylabel('Mg block', fontsize = 14)
  377. plt.title('Voltage dependence of different NMDA receptors', fontsize = 20)
  378. plt.savefig(save_dir + 'NMDA_voltage_dependencies.svg', bbox_inches='tight')
  379. plt.show()

model_comparison_oblique_integration.py, under CC-BY-4.0 · at the source

Overview

Authors: Luca Tar1,2, Sára Sáray2, Máté Mohácsi1,2, Tamás F. Freund1,2, Szabolcs Káli1,2
  1. HUN-REN Institute of Experimental Medicine, Budapest, Hungary
  2. Faculty of Information Technology and Bionics, Pázmány Péter Catholic University, Budapest, Hungary
Journal: Frontiers in computational neuroscience, volume 20, article 1897214
Dates: received 1 June 2026; accepted 19 August 2026; published online 22 September 2026
Type: Research article · Language: English
License: CC BY
Identifiers: DOI · PMCID PMC13638379
Status: code verified (how the code is found and verified)
Categories: histology / microscopy (modality), none (in silico) (organism)
Methods: Smoothing, state filtering, decompositions, Preprocessing, Evoked potentials, Single-unit activity, calcium imaging
Keywords: compartmental modeling, computer simulations, dendritic spines, hippocampus, model validation, parameter optimization
Citations: not cited yet (Europe PMC); 127 references in the paper

Abstract

Anatomically and biophysically detailed models of neurons have been widely used to study information processing in these cells. Most studies focused on understanding specific phenomena, while more general models that aim to capture various cellular processes simultaneously remain rare even though such models are required to predict neuronal behavior under more complex, natural conditions. In this study, we aimed to develop a detailed, data-driven, general-purpose biophysical model of hippocampal CA1 pyramidal neurons. We leveraged extensive morphological, biophysical and physiological data available for this cell type, and established a systematic workflow for model construction and validation that relies on our recently developed software tools. The model is based on a high-quality morphological reconstruction and includes a diverse curated set of ion channel models. After incorporating the available constraints on the distribution of ion channels, the remaining free parameters were optimized using the Neuroptimus tool to fit a variety of electrophysiological features extracted from somatic whole-cell recordings. Validation using HippoUnit confirmed the model’s ability to replicate key electrophysiological features, including somatic voltage responses to current input, the attenuation of synaptic potentials and backpropagating action potentials, and nonlinear synaptic integration in oblique dendrites. Our model also included active dendritic spines, modeled either explicitly or by merging their biophysical mechanisms into those of the parent dendrite. We found that many aspects of neuronal behavior were unaffected by the level of detail in modeling spines, but modeling nonlinear synaptic integration accurately required the explicit modeling of spines. Our data-driven model of CA1 pyramidal cells matching diverse experimental constraints is a general tool for the investigation of the activity and plasticity of these cells and can also be a reliable component of detailed models of the hippocampal network. Our systematic approach to building and validating multi-purpose models should apply to other cell types as well.

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

Repositories

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

lucatar/hippounit

License: BSD-3-Clause
State: the link answers, verified on 7 October 2026
Evidence: files inventoried
Commit: 539a384e4666d83ce49b1c117fd949c84a09b460, 25 February 2026
Languages: Python (36), Jupyter (1), NEURON (1)
Size: 84 files, 38 scripts
Software Heritage: not archived
Found in: the text, “Model testing”
Holds: README, license file, environment (setup.py, docs/requirements.txt), tests, documentation, 1 notebook
Not found: CITATION.cff, continuous integration
Tools: NumPy (17 files), Matplotlib (8 files), SciPy (7 files), NEURON (3 files)
Availability: 1 check, the latest on 7 October 2026: the link answers
  • 7 October 2026: the link answers
40 files

lucatar/hippounit_CA1_demo

License: none: the authors keep all their rights
State: the link answers, verified on 7 October 2026
Evidence: files inventoried
Commit: 5c63b5aa970e6a6ed068d24c19d146ee919cce7a, 13 August 2026
Languages: Python (34), NEURON (30), Jupyter (18)
Size: 102 files, 82 scripts
Software Heritage: not archived
Found in: the text, “Model testing”
Holds: README, 18 notebooks
Not found: license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: NEURON (37 files), NumPy (7 files), Matplotlib (1 file), pandas (1 file), SciPy (1 file)
Availability: 1 check, the latest on 7 October 2026: the link answers
  • 7 October 2026: the link answers
38 files

Zenodo 21907403

License: CC-BY-4.0
State: the link answers, verified on 7 October 2026
Evidence: files inventoried
Size: 5 files
Software Heritage: not checked
Found in: the text, “Overview of the model-building process”
Holds: README
Not found: license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: Matplotlib (30 files), NumPy (30 files), pandas (14 files), NEURON (9 files), SciPy (8 files), seaborn (3 files)
Availability: 1 check, the latest on 7 October 2026: the link answers (HTTP 200)
  • 7 October 2026: the link answers (HTTP 200)
32 files

modeldb:2031080

License: none: the authors keep all their rights
State: the link answers, verified on 7 October 2026
Evidence: the link answers
Software Heritage: not checked
Found in: the text, “Overview of the model-building process”
Not found: README, license file, CITATION.cff, environment file, tests, continuous integration, documentation
Availability: 1 check, the latest on 7 October 2026: the link answers (HTTP 200)
  • 7 October 2026: the link answers (HTTP 200)

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:

  • 4 repositories of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
  • 106 scripts, each with its path and the digest of its content;
  • 10 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.

Data availability statement

The original contributions presented in the study are included in the article/Supplementary material, further inquiries can be directed to the corresponding author/s.

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

Recorded: type, language, journal, volume, pages, dates, 5 authors, 6 keywords, 123 references.

Cite

This paper

Tar, L., Sáray, S., Mohácsi, M., Freund, T. F., & Káli, S. (2026). How to train your neuron: developing a detailed, up-to-date, multipurpose model of hippocampal CA1 pyramidal cells. Frontiers in computational neuroscience, 20, 1897214.

BibTeX

@article{tar2026how,
author = {Tar, Luca and Sáray, Sára and Mohácsi, Máté and Freund, Tamás F. and Káli, Szabolcs},
title = {{How to train your neuron: developing a detailed, up-to-date, multipurpose model of hippocampal CA1 pyramidal cells}},
journal = {Frontiers in computational neuroscience},
year = {2026},
month = oct,
volume = {20},
pages = {1897214},
publisher = {Frontiers Media SA},
issn = {1662-5188},
pmcid = {PMC13638379}
}

RIS

TY - JOUR
AU - Tar, Luca
AU - Sáray, Sára
AU - Mohácsi, Máté
AU - Freund, Tamás F.
AU - Káli, Szabolcs
TI - How to train your neuron: developing a detailed, up-to-date, multipurpose model of hippocampal CA1 pyramidal cells
T2 - Frontiers in computational neuroscience
J2 - Front Comput Neurosci
PY - 2026
DA - 2026/10/07
VL - 20
SP - 1897214
SN - 1662-5188
PB - Frontiers Media SA
LA - en
ER -

CSL-JSON

{
"id": "pmcid:PMC13638379",
"type": "article-journal",
"title": "How to train your neuron: developing a detailed, up-to-date, multipurpose model of hippocampal CA1 pyramidal cells",
"container-title": "Frontiers in computational neuroscience",
"author": [
{
"family": "Tar",
"given": "Luca"
},
{
"family": "Sáray",
"given": "Sára"
},
{
"family": "Mohácsi",
"given": "Máté"
},
{
"family": "Freund",
"given": "Tamás F."
},
{
"family": "Káli",
"given": "Szabolcs"
}
],
"container-title-short": "Front Comput Neurosci",
"volume": "20",
"page": "1897214",
"PMCID": "PMC13638379",
"ISSN": "1662-5188",
"publisher": "Frontiers Media SA",
"language": "en",
"issued": {
"date-parts": [
[
2026,
10,
7
]
]
}
}

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.7554/elife.103324 [code]
DendroTweaks, an interactive approach for unraveling dendritic dynamics.
Journal: eLife
In common: NEURON, pandas, SciPy, 2 other tools, 15 references
[2] doi:10.7554/elife.79535 [code]
Ultrafast simulation of large-scale neocortical microcircuitry with biophysically realistic neurons.
Journal: eLife
In common: NEURON, seaborn, pandas, 3 other tools, none (in silico), 11 references
[3] doi:10.1371/journal.pcbi.1012039 [code]
Evaluation and comparison of methods for neuronal parameter optimization using the Neuroptimus software framework.
Journal: PLoS computational biology
In common: NEURON, SciPy, Matplotlib, 1 other tool, 12 references
[4] doi:10.1038/s41467-022-35747-8 [code]
Introducing the Dendrify framework for incorporating dendrites to spiking neural networks.
Journal: Nature communications
In common: seaborn, SciPy, Matplotlib, 1 other tool, none (in silico), 11 references
[5] doi:10.7554/elife.108352 [code]
Analysis of dendritic input currents during place field dynamics.
Journal: eLife
In common: NEURON, pandas, Matplotlib, 1 other tool, 11 references
[6] doi:10.1038/s41467-023-41553-7 [code]
A GPU-based computational framework that bridges neuron simulation and artificial intelligence.
Journal: Nature communications
In common: NEURON, pandas, SciPy, 2 other tools, 10 references
[7] doi:10.1016/j.celrep.2026.117793 [code]
Clustered inputs engage dendritic nonlinearities and calcium signaling to support efficient place-field formation in CA1 pyramidal neurons.
Journal: Cell reports
In common: NEURON, seaborn, pandas, 3 other tools, none (in silico), 8 references
[8] doi:10.1038/s41467-025-55819-9
Dendritic excitations govern back-propagation via a spike-rate accelerometer.
Journal: Nature communications
In common: 11 references
[9] doi:10.1371/journal.pbio.3002861 [code]
Community-based reconstruction and simulation of a full-scale model of the rat hippocampus CA1 region.
Journal: PLoS biology
In common: 12 references
[10] doi:10.1093/bioinformatics/btag328 [code]
eFEL: electrophysiology feature extraction library.
Journal: Bioinformatics (Oxford, England)
In common: NEURON, seaborn, pandas, 3 other tools, none (in silico), 7 references

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/repo/github.com/lucatar/hippounit.svg)](https://openscicode.org/badge/repo/github.com/lucatar/hippounit)
<!-- oscr-badge:end -->
reStructuredText
.. oscr-badge:start

.. image:: https://openscicode.org/badge/repo/github.com/lucatar/hippounit.svg
   :target: https://openscicode.org/badge/repo/github.com/lucatar/hippounit
   :alt: OSCR

.. oscr-badge:end
HTML
<!-- oscr-badge:start -->
<a href="https://openscicode.org/badge/repo/github.com/lucatar/hippounit"><img src="https://openscicode.org/badge/repo/github.com/lucatar/hippounit.svg" alt="OSCR"></a>
<!-- oscr-badge:end -->

On GitHub, open the README, choose Edit (the pencil), paste the snippet under the title, then "Commit changes".

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)

Versions of its code: the releases of its code tied to a version of this paper (the preprint, the accepted manuscript, the version of record…), each with the tracing map versioned with it.

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