OSCR

One model to rule them all: Unification of voltage-gated potassium channel models via deep non-linear mixed effects modelling.

Code ↔ Paper

6 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 6 matches
  1. [1] § Methods › Raw data ↔ training_analysis.jl, lines 1–63 · score 1.00 · Kv2.2, Kv4.1, Kv1.4, Kv1.6, Kv10.2, Kv12.1
  2. [2] § Methods › Raw data ↔ process_data.jl, lines 1–72 · score 1.00 · Kv2.2, Kv4.1, Kv1.4, Kv1.6, Kv10.2, Kv12.1
  3. [3] § Results › Unified SciML Hodgkin-Huxley model gating function behaviour ↔ training_analysis.jl, lines 1–63 · score 0.95 · Kv10.2, Kv12.1, Kv1.3, Kv10.1, Kv1.5, Kv3.1
  4. [4] § Results › Unified SciML Hodgkin-Huxley model gating function behaviour ↔ src/plotting/aog_recipes.jl, lines 65–124 · score 0.95 · Kv10.2, Kv12.1, Kv1.3, Kv10.1, Kv1.5, Kv3.1
  5. [5] § Results ↔ src/plotting/aog_recipes.jl, lines 65–124 · score 0.90 · Kv3.2, Kv1.4, Kv1.6, Kv2.1, Kv10.1, Kv12.3
  6. [6] § Results ↔ src/plotting/aog_recipes.jl, lines 127–191 · score 0.57 · classical HH model, model predictions, SciML, box, RMSE, protocol

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

Julia · 1,498 lines · 45 KB · no license · 3 matches

  1. prot_renamer = renamer(
  2. :act_m90 => "",
  3. :act_m80 => "",
  4. :act_m70 => "",
  5. :act_m60 => "",
  6. :act_m50 => "",
  7. :act_m40 => "",
  8. :act_m30 => "",
  9. :act_m20 => "",
  10. :act_m10 => "",
  11. :act_0 => "",
  12. :act_p10 => "",
  13. :act_p20 => "",
  14. :act_p30 => "",
  15. :act_p40 => "",
  16. :act_p50 => "",
  17. :act_p60 => "",
  18. :act_p70 => "",
  19. :act_p80 => "",
  20. ##
  21. :dea_m80 => "",
  22. :dea_m70 => "",
  23. :dea_m60 => "",
  24. :dea_m50 => "",
  25. :dea_m40 => "",
  26. :dea_m30 => "",
  27. :dea_m20 => "",
  28. :dea_m10 => "",
  29. :dea_0 => "",
  30. :dea_p10 => "",
  31. :dea_p20 => "",
  32. :dea_p30 => "",
  33. ##
  34. :ina_m40 => "",
  35. :ina_m30 => "",
  36. :ina_m20 => "",
  37. :ina_m10 => "",
  38. :ina_0 => "",
  39. :ina_p10 => "",
  40. :ina_p20 => "",
  41. :ina_p30 => "",
  42. :ina_p40 => "",
  43. :ina_p50 => "",
  44. :ina_p60 => "",
  45. :ina_p70 => "",
  46. ##
  47. :rec_50 => "",
  48. :rec_200 => "",
  49. :rec_350 => "",
  50. :rec_500 => "",
  51. :rec_650 => "",
  52. :rec_800 => "",
  53. :rec_950 => "",
  54. :rec_1100 => "",
  55. :rec_1250 => "",
  56. :rec_1400 => "",
  57. :rec_1550 => "",
  58. :rec_1700 => "",
  59. :rec_1850 => "",
  60. :rec_2000 => "",
  61. :rec_2150 => "",
  62. :rec_2300 => "",
  63. )
  64. base_renamer = renamer(
  65. :kv11 => "Kᵥ1.1",
  66. :kv12 => "Kᵥ1.2",
  67. :kv13 => "Kᵥ1.3",
  68. :kv14 => "Kᵥ1.4",
  69. :kv15 => "Kᵥ1.5",
  70. :kv16 => "Kᵥ1.6",
  71. :kv18 => "Kᵥ1.8",
  72. :kv21 => "Kᵥ2.1",
  73. :kv22 => "Kᵥ2.2",
  74. :kv31 => "Kᵥ3.1",
  75. :kv32 => "Kᵥ3.2",
  76. :kv33 => "Kᵥ3.3",
  77. :kv34 => "Kᵥ3.4",
  78. :kv41 => "Kᵥ4.1",
  79. :kv42 => "Kᵥ4.2",
  80. :kv43 => "Kᵥ4.3",
  81. :kv71 => "Kᵥ7.1",
  82. :kv73 => "Kᵥ7.3",
  83. :kv101 => "Kᵥ10.1",
  84. :kv102 => "Kᵥ10.2",
  85. :kv121 => "Kᵥ12.1",
  86. :kv123 => "Kᵥ12.3",
  87. )
  88. cname_renamer = renamer(
  89. :kv11 => "Kᵥ1.1 (n=51)",
  90. :kv12 => "Kᵥ1.2 (n=38)",
  91. :kv13 => "Kᵥ1.3 (n=67)",
  92. :kv14 => "Kᵥ1.4 (n=42)",
  93. :kv15 => "Kᵥ1.5 (n=47)",
  94. :kv16 => "Kᵥ1.6 (n=26)",
  95. :kv18 => "Kᵥ1.8 (n=9)",
  96. :kv21 => "Kᵥ2.1 (n=18)",
  97. :kv22 => "Kᵥ2.2 (n=21)",
  98. :kv31 => "Kᵥ3.1 (n=22)",
  99. :kv32 => "Kᵥ3.2 (n=28)",
  100. :kv33 => "Kᵥ3.3 (n=45)",
  101. :kv34 => "Kᵥ3.4 (n=26)",
  102. :kv41 => "Kᵥ4.1 (n=16)",
  103. :kv42 => "Kᵥ4.2 (n=12)",
  104. :kv43 => "Kᵥ4.3 (n=20)",
  105. :kv71 => "Kᵥ7.1 (n=11)",
  106. :kv73 => "Kᵥ7.3 (n=2)",
  107. :kv101 => "Kᵥ10.1 (n=20)",
  108. :kv102 => "Kᵥ10.2 (n=10)",
  109. :kv121 => "Kᵥ12.1 (n=24)",
  110. :kv123 => "Kᵥ12.3 (n=10)",
  111. :pooled => "Pooled (n=565)",
  112. )
  113. f_renamer = renamer(
  114. :im1_∞ => L"m_{1,\infty}(V)",
  115. :im2_∞ => L"m_{2,\infty}(V)",
  116. :im1_τ => L"\tau_1(V)",
  117. :im2_τ => L"\tau_2(V)",
  118. )
  119. function rows_cells_cols_prots(df, prot, types; nrows=5, w=100, h=100, data_color=:red, pred_color=:black, alpha=0.3)
  120. df_ch = filter(r -> (in(r.ctype, types) && r.protocol == prot), df)
  121. df_ch[:, :row_id] = repeat([missing], size(df_ch)[1])
  122. @rtransform!(df_ch, :i = string(findfirst(unique(filter(r -> r.ctype == :ctype, df_ch).id) .== :id)))
  123. df_flat = DataFrames.flatten(df_ch, [:t, :data])
  124. df_rec, df_pred = groupby(df_flat, :data_type)
  125. if df_rec[1, :data_type] == :prediction
  126. df_rec, df_pred = df_pred, df_rec
  127. end
  128. plt = data(df_rec) * visual(Lines, alpha=alpha) *
  129. mapping(
  130. :t => "Time (ms)",
  131. :data => "Normalized current (a.u.)",
  132. row=:i => renamer([string(i) => "" for i in 1:1000]),
  133. col=:ctype => base_renamer,
  134. color=:temp => renamer(("15" => "15°C", "25" => "25°C", "35" => "35°C")) => "Data recorded at"
  135. ) +
  136. data(df_pred) * visual(Lines, alpha=alpha, label="uSciML HH Model prediction", color=pred_color) *
  137. mapping(
  138. :t => "Time (ms)",
  139. :data => "Normalized current (a.u.)",
  140. row=:i => renamer([string(i) => "" for i in 1:1000]),
  141. col=:ctype => base_renamer,
  142. )
  143. axis = (width=w, height=h)
  144. pg = paginate(plt, row=nrows)
  145. fg = draw(
  146. pg,
  147. legend=(; framevisible=false, position=:top),
  148. facet=(; linkxaxes=:minimal),
  149. axis=axis,
  150. )
  151. return fg
  152. end
  153. function df_to_boxplot(df; w=100, h=100)
  154. df_flat = DataFrames.flatten(df, [:t, :data])
  155. df1, df2 = groupby(df_flat, :data_type)
  156. dfoi = if df1[1, :data_type] == :prediction
  157. df1
  158. else
  159. df2
  160. end
  161. model_renamer = renamer(
  162. (:SciML_pooled => "Unified SciML",
  163. :SciML_split => "Individual SciML",
  164. :classical_no_ref => "Classical HH, no rand. eff.",
  165. :classical_with_ref => "Classical with rand. eff."
  166. )
  167. )
  168. plt = data(dfoi) * visual(BoxPlot, show_outliers=false) *
  169. mapping(
  170. :model_type => model_renamer => "HH Model Type",
  171. :rmse => "RMSE (protocol traces level)",
  172. color=:model_type => model_renamer => "HH Model Type",
  173. layout=:ctype => cname_renamer
  174. )
  175. axis = (width=w, height=h, xticklabelrotation=pi / 4, xticklabelsvisible=false, limits=(nothing, nothing, -0.005, nothing))
  176. fg = draw(plt,
  177. legend=(; framevisible=false, position=:top),
  178. facet=(; linkxaxes=:none, linkyaxes=:none),
  179. axis=axis,)
  180. fg.figure.content[6].backgroundcolor = (:red, 0.3)
  181. fg.figure.content[19].backgroundcolor = (:red, 0.3)
  182. fg.figure.content[20].backgroundcolor = (:red, 0.3)
  183. return fg
  184. end
  185. function inf_tau_grid(df, flatten_syms, labels, fig_inds, transformer; w=100, h=100, alpha=1.0)
  186. df_flat = DataFrames.flatten(df, flatten_syms)
  187. fig = Figure(; size=(w, h))
  188. yscales = [
  189. identity,
  190. identity,
  191. log10,
  192. log10,
  193. ]
  194. grid_i = nothing
  195. for (sym, label, (i, j), tr) in zip(flatten_syms[1:end-1], labels, fig_inds, transformer)
  196. sub_i = fig[i, j]
  197. plt_i = data(df_flat) * visual(Lines, alpha=alpha) * (
  198. mapping(
  199. :v => (x -> 80 * x) => "Voltage (mV)",
  200. sym => (x -> tr(x)),
  201. color=:temp => (x -> string(x) * " °C") => "Temperature",
  202. row=:ctype => cname_renamer
  203. )
  204. )
  205. if j == 1
  206. grid_i = draw!(sub_i, plt_i, axis=(; ylabel=label, titlevisible=false, yscale=yscales[j]))
  207. elseif j == 4
  208. grid_i = draw!(sub_i, plt_i, axis=(; ylabel=label, yscale=yscales[j]))
  209. else
  210. grid_i = draw!(sub_i, plt_i, axis=(; ylabel=label, titlevisible=false, yscale=yscales[j]))
  211. end
  212. end
  213. legend!(fig[0, :], grid_i; nbanks=3, framevisible=false)
  214. rowsize!(fig.layout, 1, Relative(0.99))
  215. for k in 1:3
  216. colgap!(fig.layout, k, -5)
  217. end
  218. return fig
  219. end
  220. function plot_early_stopping_bands(df; w=100, h=100)
  221. df_unique_its = combine(groupby(df, [:channel, :iteration]),
  222. :rmse_low => (x -> x[1]) => :low,
  223. :rmse_high => (x -> x[1]) => :high,
  224. :rmse_median => (x -> x[1]) => :median)
  225. sort!(df_unique_its, :iteration)
  226. df_unique_mins = vcat([filter(r -> r.median == minimum(g[!, :median]), g) for g in groupby(df_unique_its, :channel)]...)
  227. plt1 = data(df_unique_its) * mapping(:iteration, :low, :high, layout=:channel => cname_renamer) * visual(Band, color=(:black, 0.3), label="95% CI")
  228. plt2 = data(df_unique_its) * mapping(:iteration, :median, layout=:channel => cname_renamer) * visual(Lines, color=(:black, 0.8), label="Median")
  229. plt4 = data(df_unique_mins) * mapping(:iteration, layout=:channel => cname_renamer) * visual(VLines, color=(:red, 0.8), label="Minimal Validation RMSE")
  230. axis = (width=w,
  231. height=h,
  232. ylabel="Validation RMSE",
  233. xticks=0:30:300,
  234. xticklabelrotation=pi / 2
  235. )
  236. fg = draw(plt1 + plt2 + plt4,
  237. legend=(; framevisible=false, position=:top),
  238. axis=axis,
  239. facet=(; linkxaxes=:none)
  240. )
  241. end
  242. function make_big_grid_bands(df, fb, sb, syms, labels, idx1, idx2, tr; w=100, h=100, alpha=1.0)
  243. fig = Figure(; size=(w, h))
  244. _, grid_i = inf_tau_grid_bands!(
  245. fig,
  246. filter(:ctype => (x -> in(x, fb)), df),
  247. syms,
  248. labels,
  249. idx1,
  250. tr,
  251. alpha=0.2)
  252. _, grid_i = inf_tau_grid_bands!(
  253. fig,
  254. filter(:ctype => (x -> in(x, sb)), df),
  255. syms,
  256. labels,
  257. idx2,
  258. tr,
  259. alpha=0.2)
  260. legend!(fig[0, :], grid_i; nbanks=3, framevisible=false)
  261. Label(fig[1, 1], labels[1], padding=(0, 0, -20, 0))
  262. Label(fig[1, 2], labels[2], padding=(0, 0, -20, 0))
  263. Label(fig[1, 3], labels[3], padding=(0, 0, -20, 0))
  264. Label(fig[1, 4], labels[4], padding=(0, 0, -20, 0))
  265. Label(fig[1, 5], labels[1], padding=(0, 0, -20, 0))
  266. Label(fig[1, 6], labels[2], padding=(0, 0, -20, 0))
  267. Label(fig[1, 7], labels[3], padding=(0, 0, -20, 0))
  268. Label(fig[1, 8], labels[4], padding=(0, 0, -20, 0))
  269. rowsize!(fig.layout, 1, Relative(0.03))
  270. rowsize!(fig.layout, 2, Relative(0.93))
  271. for i in 1:8
  272. colsize!(fig.layout, i, Relative(0.125))
  273. end
  274. for k in 1:3
  275. colgap!(fig.layout, k, -5)
  276. end
  277. for k in 5:7
  278. colgap!(fig.layout, k, -5)
  279. end
  280. return fig
  281. end
  282. function inf_tau_grid_bands!(fig, df, syms, labels, fig_inds, transformer; w=100, h=100, alpha=1.0)
  283. tr = NamedTuple{Tuple(syms[1:end-1])}(transformer)
  284. dfs = map(syms[1:end-1]) do sym
  285. v = []
  286. temp = []
  287. q025 = []
  288. q975 = []
  289. meds = []
  290. ctype = []
  291. for g in groupby(df, [:ctype, :temp])
  292. mat_sym = cat(g[!, sym]..., dims=2)
  293. q025_i = tr[sym].(quantile.(eachrow(mat_sym), 0.025))
  294. q975_i = tr[sym].(quantile.(eachrow(mat_sym), 0.975))
  295. med_i = tr[sym].(median.(eachrow(mat_sym)))
  296. push!(v, g[1, :v])
  297. push!(temp, g[1, :temp])
  298. push!(ctype, g[1, :ctype])
  299. push!(q025, q025_i)
  300. push!(q975, q975_i)
  301. push!(meds, med_i)
  302. end
  303. t = (v=v, low=q025, high=q975, median=meds, temp=temp, channel=ctype)
  304. DataFrame(t)
  305. end
  306. yscales = [
  307. identity,
  308. identity,
  309. log10,
  310. log10,
  311. identity,
  312. identity,
  313. log10,
  314. log10,
  315. ]
  316. grid_i = nothing
  317. for (sym, label, (i, j), df_i) in zip(syms[1:end-1], labels, fig_inds, dfs)
  318. df_flat = DataFrames.flatten(df_i, [:v, :low, :high, :median])
  319. sub_i = fig[i, j]
  320. plt_i_1 = data(df_flat) *
  321. mapping(:v => (x -> 80 * x) => "V (mV)", :low, :high, row=:channel => cname_renamer, color=:temp => (x -> string(x) * " °C") => "Temperature") *
  322. visual(Band, alpha=alpha)
  323. plt_i_2 = data(df_flat) *
  324. mapping(:v => (x -> 80 * x) => "V (mV)", :median, row=:channel => cname_renamer, color=:temp => (x -> string(x) * " °C") => "Temperature") *
  325. visual(Lines)
  326. plt_i = plt_i_1 + plt_i_2
  327. if j in [1; 5]
  328. grid_i = draw!(sub_i, plt_i,
  329. axis=(;
  330. limits=(nothing, nothing, -0.1, 1.1),
  331. titlevisible=false,
  332. ylabelvisible=false,
  333. yscale=yscales[j],
  334. xticklabelrotation=pi / 2,
  335. xticks=-90:45:90))
  336. elseif j in [2; 6]
  337. grid_i = draw!(sub_i, plt_i,
  338. axis=(;
  339. limits=(nothing, nothing, -0.1, 1.1),
  340. titlevisible=false,
  341. ylabelvisible=false,
  342. yticklabelsvisible=false,
  343. yscale=yscales[j],
  344. xticklabelrotation=pi / 2,
  345. xticks=-90:45:90))
  346. elseif j in [3; 7]
  347. grid_i = draw!(sub_i, plt_i,
  348. axis=(;
  349. limits=(nothing, nothing, 10^-2.5, 10^4.5),
  350. titlevisible=false,
  351. ylabelvisible=false,
  352. yscale=yscales[j],
  353. yticks=[10^-2; 10^1; 10^4],
  354. ytickformat=values -> ["10⁻²"; "10¹"; "10⁴"],
  355. xticklabelrotation=pi / 2,
  356. xticks=-90:45:90))
  357. elseif j in [4; 8]
  358. grid_i = draw!(sub_i, plt_i,
  359. axis=(;
  360. limits=(nothing, nothing, 10^-2.5, 10^4.5),
  361. ylabelvisible=false,
  362. yscale=yscales[j],
  363. yticklabelsvisible=false,
  364. yticks=[10^-2; 10^1; 10^4],
  365. ytickformat=values -> ["10⁻²"; "10¹"; "10⁴"],
  366. xticklabelrotation=pi / 2,
  367. xticks=-90:45:90))
  368. end
  369. end
  370. rowlabels = filter(fig.content) do x
  371. x isa Label && x.layoutobservables.gridcontent[].side === Right()
  372. end
  373. for label in rowlabels
  374. label.fontsize = 12
  375. end
  376. return fig, grid_i
  377. end
  378. function df_to_pairplot(df, names;
  379. w=100,
  380. h=100,
  381. cgap=10,
  382. rgap=10,
  383. labelfontsize=10,
  384. ticklabelsize=10,
  385. contour_lims=(nothing, nothing, nothing, nothing),
  386. hist_lims=(nothing, nothing, nothing, nothing),
  387. cmap=:bluesreds,
  388. alpha=0.5,
  389. nbins=20
  390. )
  391. fig = Figure(size=(w, h))
  392. gs = GridLayout(fig[1, 1])
  393. pairplot(
  394. gs,
  395. df[!, names] => (
  396. PairPlots.Scatter(color=df[!, :rmse], markersize=6, colormap=cmap, alpha=alpha),
  397. PairPlots.MarginHist(color=(:grey, 0.3)),
  398. PairPlots.MarginDensity(),
  399. ),
  400. bins=Dict(
  401. :η₁ => nbins,
  402. :η₂ => nbins,
  403. :η₃ => nbins,
  404. :η₄ => nbins,
  405. :η₅ => nbins,
  406. :η₆ => nbins,
  407. :η₇ => nbins,
  408. :η₈ => nbins,
  409. ),
  410. topright=true,
  411. bottomleft=false,
  412. labels=Dict(
  413. :η₁ => "",
  414. :η₂ => "",
  415. :η₃ => "",
  416. :η₄ => "",
  417. :η₅ => "",
  418. :η₆ => "",
  419. :η₇ => "",
  420. :η₈ => "",
  421. :η₉ => "",
  422. )
  423. )
  424. pairplot(
  425. gs,
  426. df[!, names] => (
  427. PairPlots.Contour(),
  428. PairPlots.MarginHist(color=(:grey, 0.3)),
  429. PairPlots.MarginDensity(),
  430. ),
  431. bins=Dict(
  432. :η₁ => nbins,
  433. :η₂ => nbins,
  434. :η₃ => nbins,
  435. :η₄ => nbins,
  436. :η₅ => nbins,
  437. :η₆ => nbins,
  438. :η₇ => nbins,
  439. :η₈ => nbins,
  440. ),
  441. )
  442. ###### this is hacky but didn't find other options
  443. for ax in fig.content
  444. ax.xticklabelrotation = pi / 3
  445. ax.yticklabelrotation = 0
  446. ax.ylabelsize = labelfontsize
  447. ax.xlabelsize = labelfontsize
  448. ax.yticklabelsize = ticklabelsize
  449. ax.xticklabelsize = ticklabelsize
  450. ax.ylabelpadding = -10
  451. ax.xlabelpadding = -10
  452. if ax.limits[][2] === nothing
  453. ax.limits = contour_lims
  454. else
  455. ax.limits = hist_lims
  456. end
  457. end
  458. Colorbar(fig[1, 2], limits=(minimum(df[!, :rmse]), maximum(df[!, :rmse])), colormap=cmap, label="RMSE")
  459. rowgap!(gs, rgap)
  460. colgap!(gs, cgap)
  461. return fig
  462. end
  463. function df_to_stuff_v_temp(df, fb, sb, f_syms; w=100, h=100)
  464. fig = Figure(size=(w, h))
  465. batches = [fb, sb]
  466. for i in 1:2
  467. batch = batches[i]
  468. df_flat = DataFrames.flatten(filter(:ctype => (x -> in(x, batch)), df), f_syms)
  469. sub_i = fig[1, i]
  470. plt = data(df_flat) * mapping(:v => "V (mV)",
  471. [:m1_∞ => "" :m2_∞ => "" :m1_τ => "" :m2_τ => ""],
  472. col=dims(2) => renamer([L"m_{1,\infty}(V)" L"m_{2,\infty}(V)" L"\tau_1(V)" L"\tau_2(V)"]),
  473. row=:ctype => base_renamer,
  474. color=:temp => "Temperature °C",
  475. group=:temp => nonnumeric
  476. ) *
  477. visual(Lines, linewidth=4) +
  478. data((x=[-80; 80], y=[-1.1; 1.1])) * mapping(:x, :y) * visual(Lines, alpha=0.0)
  479. axis = (;
  480. limits=(-88, 88, -0.1, nothing),
  481. xticks=-80:40:80,
  482. xticklabelrotation=pi / 2,
  483. ylabel=""
  484. )
  485. draw!(
  486. sub_i,
  487. plt,
  488. axis=axis,
  489. facet=(; linkyaxes=:none))
  490. end
  491. Colorbar(fig[1, 3],
  492. limits=(minimum(df[!, :temp]), maximum(df[!, :temp])),
  493. label="Temperature °C",
  494. colormap=cgrad(:viridis, 5, categorical=true)
  495. )
  496. return fig
  497. end
  498. function protocol_vpcs(df, model, subs)
  499. gdf = groupby(df, :protocol)
  500. vpc_objs = []
  501. vpc_keys = []
  502. for g in gdf[subs]
  503. println(g[1, :protocol])
  504. pop = [collect(g[!, :subject])...]
  505. p = g[1, :params]
  506. ebes = [collect(g[!, :ebe])...]
  507. fpm = fit(
  508. model,
  509. pop,
  510. p,
  511. MAP(FOCE()),
  512. optim_options=(;
  513. iterations=0,
  514. show_trace=false,
  515. ),
  516. init_randeffs=ebes,
  517. constantcoef=filter(i -> i !== :σ, keys(p)),
  518. )
  519. _vpc = vpc(fpm)
  520. push!(vpc_objs, _vpc)
  521. push!(vpc_keys, g[1, :protocol])
  522. end
  523. return NamedTuple{Tuple(vpc_keys)}(vpc_objs)
  524. end
  525. function vpcs_nt_to_plot(vpc_nt; w=100, h=100, prot="act")
  526. all_df = DataFrame(repeat([[],], 10),
  527. [:data_τ, :data_time, :I_obs, :sim_τ, :sim_time, :lower, :upper, :lower_error, :upper_error, :protocol]
  528. )
  529. ks_prot = [i for i in keys(vpc_nt) if string(i)[1:3] == prot]
  530. map(ks_prot) do k
  531. vpc_i = vpc_nt[k]
  532. data_i = vpc_i.popvpc.data_quantiles
  533. sim_i = vpc_i.simulated_quantiles
  534. df_i = DataFrame(
  535. [data_i[!, :τ], data_i[!, :time], data_i[!, :I_obs], sim_i[!, :τ], sim_i[!, :time], sim_i[!, :lower], sim_i[!, :upper]],
  536. [:data_τ, :data_time, :I_obs, :sim_τ, :sim_time, :lower, :upper]
  537. )
  538. @rtransform!(df_i, :lower_error = :I_obs < :lower ? :I_obs : :lower)
  539. @rtransform!(df_i, :upper_error = :I_obs > :upper ? :I_obs : :upper)
  540. @rtransform!(df_i, :protocol = k)
  541. append!(all_df, df_i)
  542. end
  543. plt = data(all_df) * mapping(:sim_time, :I_obs, group=:data_τ => nonnumeric, layout=:protocol => prot_renamer) * visual(Lines) +
  544. data(all_df) * mapping(:sim_time, :lower, :upper, group=:sim_τ => nonnumeric, layout=:protocol => prot_renamer) * visual(Band, alpha=0.5, color=:lightblue) +
  545. data(all_df) * mapping(:sim_time, :lower_error, :lower, group=:sim_τ => nonnumeric, layout=:protocol => prot_renamer) * visual(Band, alpha=0.5, color=:red, overdraw=false) +
  546. data(all_df) * mapping(:sim_time, :upper, :upper_error, group=:sim_τ => nonnumeric, layout=:protocol => prot_renamer) * visual(Band, alpha=0.5, color=:red)
  547. axis = (width=w, height=h, xlabel="Time (ms)", ylabel=L"\frac{I}{I_{max}}")
  548. draw(plt, axis=axis)
  549. end
  550. function cust_gof(insp; cmap=:binary, hbins=100, cbins=1000, w=600, h=600,
  551. xy_lw=nothing,
  552. loess_lw=nothing,
  553. ols_lw=nothing,
  554. xy_col=nothing,
  555. loess_col=nothing,
  556. ols_col=nothing,
  557. )
  558. data = [i.observations.I_obs for i in insp.o.data]
  559. data = vcat(data...)
  560. m_id = .!ismissing.(data)
  561. data = Vector{Float64}(data[m_id])
  562. pred = [i.pred.I_obs for i in insp.pred]
  563. pred = vcat(pred...)
  564. pred = pred[m_id]
  565. ipred = [i.ipred.I_obs for i in insp.pred]
  566. ipred = vcat(ipred...)
  567. ipred = ipred[m_id]
  568. time = [i.subject.time for i in insp.wres]
  569. time = vcat(time...)
  570. time = time[m_id]
  571. wres = [i.wres.I_obs for i in insp.wres]
  572. wres = vcat(wres...)
  573. wres = Vector{Float64}(wres[m_id])
  574. iwres = [i.iwres.I_obs for i in insp.wres]
  575. iwres = vcat(iwres...)
  576. iwres = Vector{Float64}(iwres[m_id])
  577. loess_elem = [LineElement(color=loess_col, linewidth=loess_lw),]
  578. ols_elem = [LineElement(color=ols_col, linewidth=ols_lw),]
  579. xy_elem = [LineElement(color=xy_col, linewidth=xy_lw),]
  580. h1 = fit(Histogram, (pred, data), nbins=hbins)
  581. h2 = fit(Histogram, (ipred, data), nbins=hbins)
  582. h3 = fit(Histogram, (time, wres), nbins=hbins)
  583. h4 = fit(Histogram, (ipred, iwres), nbins=hbins)
  584. crange_min = 1
  585. crange_max = log10(1 + maximum([
  586. maximum(h1.weights);
  587. maximum(h2.weights);
  588. maximum(h3.weights);
  589. maximum(h4.weights)
  590. ]))
  591. f = Figure(; size=(w, h))
  592. ax1 = Axis(
  593. f[1, 1],
  594. limits=(-0.05, 1.05, -0.05, 1.05),
  595. xlabel="Population Predictions",
  596. ylabel="Observations",
  597. xticklabelrotation=pi / 4
  598. )
  599. contour!(
  600. ax1,
  601. collect(h1.edges[1][1:end-1]),
  602. collect(h1.edges[2])[1:end-1],
  603. log10.(Float64.(h1.weights) .+ 1),
  604. colormap=cmap,
  605. colorrange=(crange_min, crange_max),
  606. levels=cbins)
  607. observations_vs_predictions!(
  608. ax1,
  609. insp,
  610. markersize=0,
  611. ols_color=ols_col,
  612. ols_linewidth=ols_lw,
  613. loess_color=loess_col,
  614. loess_linewidth=loess_lw,
  615. )
  616. ax2 = Axis(
  617. f[1, 2],
  618. limits=(-0.05, 1.05, -0.05, 1.05),
  619. xlabel="Individual Predictions",
  620. ylabel="Observations",
  621. xticklabelrotation=pi / 4
  622. )
  623. contour!(
  624. ax2,
  625. collect(h2.edges[1][1:end-1]),
  626. collect(h2.edges[2])[1:end-1],
  627. log10.(Float64.(h2.weights) .+ 1),
  628. colormap=cmap,
  629. colorrange=(crange_min, crange_max),
  630. levels=cbins)
  631. observations_vs_ipredictions!(
  632. ax2,
  633. insp,
  634. markersize=0,
  635. ols_color=ols_col,
  636. ols_linewidth=ols_lw,
  637. loess_color=loess_col,
  638. loess_linewidth=loess_lw,
  639. )
  640. ax3 = Axis(
  641. f[2, 1],
  642. limits=(nothing, nothing, -10, 10),
  643. ylabel="Weighted population residuals",
  644. xlabel="Time (ms)",
  645. xticklabelrotation=pi / 4
  646. )
  647. contour!(
  648. ax3,
  649. collect(h3.edges[1][1:end-1]),
  650. collect(h3.edges[2])[1:end-1],
  651. log10.(Float64.(h3.weights) .+ 1),
  652. colormap=cmap,
  653. colorrange=(crange_min, crange_max),
  654. levels=cbins)
  655. wresiduals_vs_time!(
  656. ax3,
  657. insp,
  658. markersize=0,
  659. ols_color=ols_col,
  660. ols_linewidth=ols_lw,
  661. loess_color=loess_col,
  662. loess_linewidth=loess_lw,
  663. )
  664. ax4 = Axis(
  665. f[2, 2],
  666. limits=(nothing, nothing, -10, 10),
  667. ylabel="Weighted individual residuals",
  668. xlabel="Individual predictions",
  669. xticklabelrotation=pi / 4
  670. )
  671. contour!(
  672. ax4,
  673. collect(h4.edges[1][1:end-1]),
  674. collect(h4.edges[2])[1:end-1],
  675. log10.(Float64.(h4.weights) .+ 1),
  676. colormap=cmap,
  677. colorrange=(crange_min, crange_max),
  678. levels=cbins)
  679. iwresiduals_vs_ipredictions!(
  680. ax4,
  681. insp,
  682. markersize=0,
  683. ols_color=ols_col,
  684. ols_linewidth=ols_lw,
  685. loess_color=loess_col,
  686. loess_linewidth=loess_lw,
  687. )
  688. Legend(f[0, :],
  689. [loess_elem, ols_elem, xy_elem],
  690. ["LOESS", "OLS", L"y=x"],
  691. framevisible=false,
  692. nbanks=3,
  693. )
  694. Colorbar(f[1:2, 3], limits=(crange_min, crange_max), colormap=cmap, label="log₁₀(# of points + 1)")
  695. rowsize!(f.layout, 0, Relative(0.05))
  696. return f
  697. end
  698. function plot_all_vpcs(vpc_nt; w=100, h=100, text=repeat([[100; 0.5; "asd"]], 58))
  699. all_df = DataFrame(repeat([[],], 10),
  700. [:data_τ, :data_time, :I_obs, :sim_τ, :sim_time, :lower, :upper, :lower_error, :upper_error, :protocol]
  701. )
  702. map(keys(vpc_nt)) do k
  703. vpc_i = vpc_nt[k]
  704. data_i = vpc_i.popvpc.data_quantiles
  705. sim_i = vpc_i.simulated_quantiles
  706. df_i = DataFrame(
  707. [data_i[!, :τ], data_i[!, :time], data_i[!, :I_obs], sim_i[!, :τ], sim_i[!, :time], sim_i[!, :lower], sim_i[!, :upper]],
  708. [:data_τ, :data_time, :I_obs, :sim_τ, :sim_time, :lower, :upper]
  709. )
  710. @rtransform!(df_i, :lower_error = :I_obs < :lower ? :I_obs : :lower)
  711. @rtransform!(df_i, :upper_error = :I_obs > :upper ? :I_obs : :upper)
  712. @rtransform!(df_i, :protocol = k)
  713. append!(all_df, df_i)
  714. end
  715. f = Figure(size=(w, h))
  716. for (i, pro) in zip(1:4, ["act", "dea", "ina", "rec"])
  717. df_prot = filter(r -> occursin(pro, string(r.protocol)), all_df)
  718. plt = data(df_prot) * mapping(:sim_time => "", :I_obs, group=:data_τ => nonnumeric, layout=:protocol => prot_renamer) * visual(Lines) +
  719. data(df_prot) * mapping(:sim_time => "", :lower, :upper, group=:sim_τ => nonnumeric, layout=:protocol => prot_renamer) * visual(Band, alpha=0.75, color=:lightblue) +
  720. data(df_prot) * mapping(:sim_time => "", :lower_error, :lower, group=:sim_τ => nonnumeric, layout=:protocol => prot_renamer) * visual(Band, alpha=0.5, color=:red) +
  721. data(df_prot) * mapping(:sim_time => "", :upper, :upper_error, group=:sim_τ => nonnumeric, layout=:protocol => prot_renamer) * visual(Band, alpha=0.5, color=:red)
  722. with_theme(Theme(colgap=1, rowgap=-3)) do
  723. draw!(
  724. f[i, 1],
  725. plt,
  726. axis=(;
  727. yticklabelsize=12,
  728. xticklabelsize=12,
  729. yticks=[0.1, 0.5, 0.9]
  730. )
  731. )
  732. end
  733. end
  734. Label(f[1, 2], "Activation", rotation=-pi / 2)
  735. Label(f[2, 2], "Deactivation", rotation=-pi / 2)
  736. Label(f[3, 2], "Inactivation", rotation=-pi / 2)
  737. Label(f[4, 2], "Recovery", rotation=-pi / 2)
  738. Label(f[:, 0], L"\frac{I}{I_{max}}", rotation=pi / 2, fontsize=14)
  739. Label(f[5, :], "Time (ms)", fontsize=14)
  740. data_elem = LineElement(color=:black, linewidth=2)
  741. quant_elem = PolyElement(color=(:lightblue, 0.75))
  742. outlier_elem = PolyElement(color=(:red, 0.5))
  743. Legend(f[0, :],
  744. [data_elem, quant_elem, outlier_elem],
  745. [
  746. "Observed quantiles",
  747. "Simulated 95% CI, τ = [0.1, 0.5, 0.9]",
  748. "Outliers"
  749. ],
  750. framevisible=false,
  751. nbanks=3,
  752. )
  753. for i in 1:4
  754. rowsize!(f.layout, i, Relative(0.25))
  755. end
  756. colsize!(f.layout, 0, Relative(0.005))
  757. colsize!(f.layout, 1, Relative(0.99))
  758. colsize!(f.layout, 2, Relative(0.005))
  759. rowgap!(f.layout, 1)
  760. rowgap!(f.layout, 1, 10)
  761. colgap!(f.layout, 2, 7.5)
  762. all_axes = [i for i in f.content if i isa Axis]
  763. for (ax_i, text_i) in zip(all_axes, text)
  764. text!(ax_i, text_i[1], text_i[2], text=text_i[3], fontsize=12, rotation=-pi / 2)
  765. end
  766. return f
  767. end
  768. function example_boxplot_with_traces(df, df_unst; w=100, h=100)
  769. df_flat = DataFrames.flatten(df, [:t, :data])
  770. df1, df2 = groupby(df_flat, :data_type)
  771. dfoi = if df1[1, :data_type] == :prediction
  772. df1
  773. else
  774. df2
  775. end
  776. ddata = if df1[1, :data_type] == :prediction
  777. df2
  778. else
  779. df1
  780. end
  781. model_renamer = renamer(
  782. (:SciML_pooled => "Unified SciML",
  783. :SciML_split => "Individual SciML",
  784. :classical_no_ref => "Classical HH, no rand. eff.",
  785. :classical_with_ref => "Classical with rand. eff."
  786. )
  787. )
  788. null_renamer = renamer(
  789. (:SciML_pooled => "",
  790. :SciML_split => "",
  791. :classical_no_ref => "",
  792. :classical_with_ref => ""
  793. )
  794. )
  795. f = Figure(size=(w, h))
  796. p1 = data(filter(r -> r.ctype == :kv11, dfoi)) * visual(BoxPlot, show_outliers=false) *
  797. mapping(
  798. :model_type => model_renamer => "HH Model Type",
  799. :rmse => "RMSE",
  800. color=:model_type => model_renamer => "HH Model Type",
  801. layout=:ctype => cname_renamer
  802. )
  803. p2 = data(filter(r -> !ismissing(r.I_obs), df_unst)) * visual(Lines, alpha=0.5, linewidth=2) *
  804. mapping(
  805. :time => "Time (ms)",
  806. :I_obs_ipred => L"\frac{I}{I_{max}}",
  807. color=:model_type,
  808. col=:model_type => null_renamer,
  809. group=:id => nonnumeric
  810. )
  811. p3 = data(filter(r -> !ismissing(r.I_obs), df_unst)) * visual(Lines, color=(:black, 0.5), linewidth=2) *
  812. mapping(
  813. :time => "Time (ms)",
  814. :I_obs => L"\frac{I}{I_{max}}",
  815. col=:model_type => null_renamer,
  816. group=:id => nonnumeric
  817. )
  818. gr1 = draw!(
  819. f[1, 5],
  820. p1,
  821. axis=(
  822. xticklabelsvisible=false,
  823. ),
  824. )
  825. gr2 = draw!(
  826. f[1, 1:4],
  827. p2 + p3,
  828. )
  829. legend!(
  830. f[0, :],
  831. gr1;
  832. framevisible=false, position=:top, nbanks=4
  833. )
  834. rowsize!(f.layout, 1, Relative(0.92))
  835. return f
  836. end
  837. function df_temp_to_plot(df, fb, sb; w=100, h=100)
  838. fig = Figure(size=(w, h))
  839. gr_i = nothing
  840. for (i, b) in zip(1:2, [fb, sb])
  841. plt =
  842. data(filter(r -> r.ctype in b, df)) * mapping(
  843. :v => "",
  844. [:τ1_Q10 => "" :τ2_Q10 => ""],
  845. col=dims(2) => renamer([L"\tau_1(V)" L"\tau_2(V)"]),
  846. row=:ctype => base_renamer,
  847. color=:T_ref => renamer((15 => L"\frac{f_{T=15}}{f_{T=25}}", 25 => L"\frac{f_{T=25}}{f_{T=35}}")) => "Ref. Temp.",
  848. group=:T_ref => nonnumeric
  849. ) *
  850. visual(Lines, linewidth=2)
  851. gr_i = draw!(
  852. fig[1, i],
  853. plt,
  854. axis=(
  855. limits=(-20, 80, nothing, nothing),
  856. xticks=-80:40:80,
  857. xticklabelrotation=pi / 2,
  858. ),
  859. facet=(; linkyaxes=:none)
  860. )
  861. end
  862. Label(fig[2, :], "Voltage (mV)")
  863. Label(fig[:, 0], L"Q_{10}(V)", rotation=pi / 2)
  864. legend!(fig[0, :], gr_i; title="asd", framevisible=false, nbanks=2)
  865. rowsize!(fig.layout, 1, Relative(0.95))
  866. return fig
  867. end
  868. function df_temp_to_plot_ipreds(df, fb, sb; w=100, h=100)
  869. fig = Figure(size=(w, h))
  870. gr_i = nothing
  871. for (i, b) in zip(1:2, [fb, sb])
  872. plt =
  873. data(filter(r -> r.ctype in b, df)) * mapping(
  874. :v => "",
  875. [:m1_Q10 => "" :m2_Q10 => "" :τ1_Q10 => "" :τ2_Q10 => ""],
  876. col=dims(2) => renamer([L"m_{1,\infty}(V)" L"m_{2,\infty}(V)" L"\tau_1(V)" L"\tau_2(V)"]),
  877. row=:ctype => base_renamer,
  878. color=:T_ref => renamer((15 => L"\frac{f_{T=15}}{f_{T=25}}", 25 => L"\frac{f_{T=25}}{f_{T=35}}")) => "Ref. Temp.",
  879. group=:T_ref => nonnumeric
  880. ) *
  881. visual(Lines, linewidth=2, alpha=0.5)
  882. gr_i = draw!(
  883. fig[1, i],
  884. plt,
  885. axis=(
  886. limits=(-80, 80, nothing, nothing),
  887. xticks=-80:40:80,
  888. xticklabelrotation=pi / 2,
  889. ),
  890. )
  891. end
  892. Label(fig[2, :], "Voltage (mV)")
  893. Label(fig[:, 0], L"Q_{10}(V)", rotation=pi / 2)
  894. legend!(fig[0, :], gr_i; title="asd", framevisible=false, nbanks=2)
  895. rowsize!(fig.layout, 1, Relative(0.95))
  896. return fig
  897. end
  898. function plot_data_processing(hd; w=100, h=100)
  899. ###cols
  900. ### 1 raw 2 MAPE 3 smoothing 4 baseline 5 normalize 6 rescale 7 artefacts 8 downsample
  901. ###
  902. downsampler(t, s, nbins) = M4downsample(t, s, nbins)
  903. denoiser(x) = denoise(x, factor=1.0)[1]
  904. MAPE(x, y) = mean(abs.((x - y) ./ x))
  905. fig = Figure(size=(w, h))
  906. act_50 = hd["acquisition"]["timeseries"]["Activation"]["repetitions"]["repetition2"]["data"][end-3, :]
  907. act_70 = hd["acquisition"]["timeseries"]["Activation"]["repetitions"]["repetition2"]["data"][end-1, :]
  908. act_80 = hd["acquisition"]["timeseries"]["Activation"]["repetitions"]["repetition2"]["data"][end, :]
  909. act_t = LinRange(0, 700, length(act_50))
  910. dea = hd["acquisition"]["timeseries"]["Deactivation"]["repetitions"]["repetition1"]["data"][1, :]
  911. dea_t = LinRange(0, 700, length(dea))
  912. ina = hd["acquisition"]["timeseries"]["Inactivation"]["repetitions"]["repetition1"]["data"][end, :]
  913. ina_t = LinRange(0, 1750, length(ina))
  914. rec_k = keys(hd["acquisition"]["timeseries"]["Recovery"]["repetitions"]["repetition1"]["data"])
  915. rec = [hd["acquisition"]["timeseries"]["Recovery"]["repetitions"]["repetition1"]["data"][k]["data"][:] for k in rec_k]
  916. rec_idx = sortperm(length.(rec))
  917. rec = rec[rec_idx]
  918. rec_t = [LinRange(0, 100 + 1500 + 50 + 150 * (i - 1) + 200 + 100, length(rec[i])) for i in 1:16]
  919. ### =====================
  920. ax11 = Axis(fig[1, 1], title="Raw data", limits=(-35, 800, -0.1, 1.1), ygridvisible=false)
  921. ax21 = Axis(fig[2, 1], limits=(-35, 800, -0.1, 1.1), ygridvisible=false)
  922. ax31 = Axis(fig[3, 1], limits=(-85, 1800, -0.1, 1.1), ygridvisible=false)
  923. ax41 = Axis(fig[4, 1], limits=(-210, 4300, -0.1, 1.1), ygridvisible=false)
  924. lines!(ax11, act_t, act_50, color=:blue)
  925. lines!(ax11, act_t, act_70, color=:red)
  926. lines!(ax11, act_t, act_80, color=:black)
  927. lines!(ax21, dea_t, dea, color=:black)
  928. lines!(ax31, ina_t, ina, color=:black)
  929. map(zip(rec_t, rec)) do (t, r)
  930. lines!(ax41, t, r, color=(:black, 0.3))
  931. end
  932. hidedecorations!(ax11)
  933. hidedecorations!(ax21)
  934. hidedecorations!(ax31)
  935. hidedecorations!(ax41)
  936. ### =====================
  937. ax12 = Axis(fig[1, 2], title="Set baseline", limits=(-35, 800, -0.1, 1.1))
  938. ax22 = Axis(fig[2, 2], limits=(-35, 800, -0.1, 1.1))
  939. ax32 = Axis(fig[3, 2], limits=(-85, 1800, -0.1, 1.1))
  940. ax42 = Axis(fig[4, 2], limits=(-210, 4300, -0.1, 1.1))
  941. act_50 .-= mean(act_50[act_t.<40])
  942. act_70 .-= mean(act_70[act_t.<40])
  943. act_80 .-= mean(act_80[act_t.<40])
  944. lines!(ax12, act_t, act_50, color=:blue)
  945. lines!(ax12, act_t, act_70, color=:red)
  946. lines!(ax12, act_t, act_80, color=:black)
  947. dea .-= mean(dea[dea_t.<40])
  948. lines!(ax22, dea_t, dea, color=:black)
  949. ina .-= mean(ina[ina_t.<40])
  950. lines!(ax32, ina_t, ina, color=:black)
  951. map(zip(rec_t, rec)) do (t, r)
  952. r .-= mean(r[t.<40])
  953. lines!(ax42, t, r, color=(:black, 0.3))
  954. end
  955. hidedecorations!(ax12)
  956. hidedecorations!(ax22)
  957. hidedecorations!(ax32)
  958. hidedecorations!(ax42)
  959. ### =====================
  960. ax13 = Axis(fig[1, 3], title="Smoothing", limits=(-35, 800, -0.1, 1.1))
  961. ax23 = Axis(fig[2, 3], limits=(-35, 800, -0.1, 1.1))
  962. ax33 = Axis(fig[3, 3], limits=(-85, 1800, -0.1, 1.1))
  963. ax43 = Axis(fig[4, 3], limits=(-210, 4300, -0.1, 1.1))
  964. act_50[1000:5991] .= denoise(act_50[1000:5991])[1]
  965. act_70[1000:5991] .= denoise(act_70[1000:5991])[1]
  966. act_80[1000:5991] .= denoise(act_80[1000:5991])[1]
  967. lines!(ax13, act_t, act_50, color=:blue)
  968. lines!(ax13, act_t, act_70, color=:red)
  969. lines!(ax13, act_t, act_80, color=:black)
  970. dea[1000:3991] .= denoise(dea[1000:3991])[1]
  971. dea[4100:5991] .= denoise(dea[4100:5991])[1]
  972. lines!(ax23, dea_t, dea, color=:black)
  973. ina[1000:15990] .= denoise(ina[1000:15990])[1]
  974. ina[16100:16981] .= denoise(ina[16100:16981])[1]
  975. lines!(ax33, ina_t, ina, color=:black)
  976. map(zip(rec_t, rec)) do (t, r)
  977. r[1000:15990] .= denoise(r[1000:15990])[1]
  978. lines!(ax43, t, r, color=(:black, 0.3))
  979. end
  980. hidedecorations!(ax13)
  981. hidedecorations!(ax23)
  982. hidedecorations!(ax33)
  983. hidedecorations!(ax43)
  984. ### =====================
  985. ax14 = Axis(fig[1, 4], title="Normalization + Rescaling", limits=(-35, 800, -0.1, 1.1))
  986. ax24 = Axis(fig[2, 4], limits=(-35, 800, -0.1, 1.1))
  987. ax34 = Axis(fig[3, 4], limits=(-85, 1800, -0.1, 1.1))
  988. ax44 = Axis(fig[4, 4], limits=(-210, 4300, -0.1, 1.1))
  989. act_80_max = maximum(act_80[1000:5991])
  990. act_70_max = maximum(act_70[1000:5991])
  991. act_50_max = maximum(act_50[1000:5991])
  992. act_50 ./= act_80_max
  993. act_70 ./= act_80_max
  994. act_80 ./= act_80_max
  995. lines!(ax14, act_t, act_50, color=:blue)
  996. lines!(ax14, act_t, act_70, color=:red)
  997. lines!(ax14, act_t, act_80, color=:black)
  998. dea_max = maximum(dea[1000:3991])
  999. dea = dea * (act_70_max / dea_max) / act_80_max
  1000. lines!(ax24, dea_t, dea, color=:black, label="Deactivation")
  1001. lines!(ax24, act_t, act_70, color=:red, label="Activation +70mV")
  1002. ina_max = maximum(ina[1000:15990])
  1003. ina = ina * (act_70_max / ina_max) / act_80_max
  1004. lines!(ax34, ina_t, ina, color=:black, label="Inactivation +70mV")
  1005. lines!(ax34, act_t, act_70, color=:red, label="Activation +70mV")
  1006. rec = map(rec) do r
  1007. r_max = maximum(r[1000:15990])
  1008. r = r * (act_50_max / r_max) / act_80_max
  1009. end
  1010. map(zip(rec_t, rec)) do (t, r)
  1011. lines!(ax44, t, r, color=(:black, 0.3), label="Recovery")
  1012. end
  1013. lines!(ax44, act_t, act_50, color=:blue, label="Activation +50mV")
  1014. hidedecorations!(ax14)
  1015. hidedecorations!(ax24)
  1016. hidedecorations!(ax34)
  1017. hidedecorations!(ax44)
  1018. ### =====================
  1019. ax15 = Axis(fig[1, 5], title="Exclude artifacts", limits=(-35, 800, -0.1, 1.1))
  1020. ax25 = Axis(fig[2, 5], limits=(-35, 800, -0.1, 1.1))
  1021. ax35 = Axis(fig[3, 5], limits=(-85, 1800, -0.1, 1.1))
  1022. ax45 = Axis(fig[4, 5], limits=(-210, 4300, -0.1, 1.1))
  1023. act_t = Vector{Union{Float64,Missing}}(act_t)
  1024. act_50 = Vector{Union{Float64,Missing}}(act_50)
  1025. act_70 = Vector{Union{Float64,Missing}}(act_70)
  1026. act_80 = Vector{Union{Float64,Missing}}(act_80)
  1027. act_50[386:399] .= missing
  1028. act_50[491:499] .= missing
  1029. act_50[981:999] .= missing
  1030. act_50[5992:6099] .= missing
  1031. act_70[386:399] .= missing
  1032. act_70[491:499] .= missing
  1033. act_70[981:999] .= missing
  1034. act_70[5992:6099] .= missing
  1035. act_80[386:399] .= missing
  1036. act_80[491:499] .= missing
  1037. act_80[981:999] .= missing
  1038. act_80[5992:6099] .= missing
  1039. act_t[386:399] .= missing
  1040. act_t[491:499] .= missing
  1041. act_t[981:999] .= missing
  1042. act_t[5992:6099] .= missing
  1043. lines!(ax15, collect(skipmissing(act_t)), collect(skipmissing(act_50)), color=:blue)
  1044. lines!(ax15, collect(skipmissing(act_t)), collect(skipmissing(act_70)), color=:red)
  1045. lines!(ax15, collect(skipmissing(act_t)), collect(skipmissing(act_80)), color=:black)
  1046. dea_t = Vector{Union{Float64,Missing}}(dea_t)
  1047. dea = Vector{Union{Float64,Missing}}(dea)
  1048. dea_t[386:399] .= missing
  1049. dea_t[491:499] .= missing
  1050. dea_t[981:999] .= missing
  1051. dea_t[3992:4099] .= missing
  1052. dea_t[5992:6099] .= missing
  1053. dea[386:399] .= missing
  1054. dea[491:499] .= missing
  1055. dea[981:999] .= missing
  1056. dea[3992:4099] .= missing
  1057. dea[5992:6099] .= missing
  1058. lines!(ax25, collect(skipmissing(dea_t)), collect(skipmissing(dea)), color=:black)
  1059. ina_t = Vector{Union{Float64,Missing}}(ina_t)
  1060. ina = Vector{Union{Float64,Missing}}(ina)
  1061. ina_t[386:399] .= missing
  1062. ina_t[491:499] .= missing
  1063. ina_t[981:999] .= missing
  1064. ina_t[15991:16099] .= missing
  1065. ina_t[16982:17099] .= missing
  1066. ina[386:399] .= missing
  1067. ina[491:499] .= missing
  1068. ina[981:999] .= missing
  1069. ina[15991:16099] .= missing
  1070. ina[16982:17099] .= missing
  1071. lines!(ax35, collect(skipmissing(ina_t)), collect(skipmissing(ina)), color=:black)
  1072. rec_t = map(rec_t) do t
  1073. li = length(t)
  1074. t = Vector{Union{Float64,Missing}}(t)
  1075. t[386:399] .= missing
  1076. t[491:499] .= missing
  1077. t[981:999] .= missing
  1078. t[15991:16099] .= missing
  1079. t[(li-3019):(li-2996)] .= missing
  1080. t[(li-999):(li-901)] .= missing
  1081. t
  1082. end
  1083. rec = map(rec) do r
  1084. li = length(r)
  1085. r = Vector{Union{Float64,Missing}}(r)
  1086. r[386:399] .= missing
  1087. r[491:499] .= missing
  1088. r[981:999] .= missing
  1089. r[15991:16099] .= missing
  1090. r[(li-3019):(li-2996)] .= missing
  1091. r[(li-999):(li-901)] .= missing
  1092. r
  1093. end
  1094. map(zip(rec_t, rec)) do (t, r)
  1095. lines!(ax45, collect(skipmissing(t)), collect(skipmissing(r)), color=(:black, 0.3))
  1096. end
  1097. hidedecorations!(ax15)
  1098. hidedecorations!(ax25)
  1099. hidedecorations!(ax35)
  1100. hidedecorations!(ax45)
  1101. ### =====================
  1102. ax16 = Axis(fig[1, 6], title="MAPE exclusion", limits=(-35, 800, -0.1, 1.1))
  1103. ax26 = Axis(fig[2, 6], limits=(-35, 800, -0.1, 1.1))
  1104. ax36 = Axis(fig[3, 6], limits=(-85, 1800, -0.1, 1.1))
  1105. ax46 = Axis(fig[4, 6], limits=(-210, 4300, -0.1, 1.1))
  1106. dea_i = (collect(skipmissing(dea_t)) .> 100) .&& (collect(skipmissing(dea_t)) .< 300)
  1107. act_i = (collect(skipmissing(act_t)) .> 100) .&& (collect(skipmissing(act_t)) .< 300)
  1108. dea_MAPE = MAPE(collect(skipmissing(act_70))[act_i], collect(skipmissing(dea))[dea_i])
  1109. text!(ax26, 100, 0.0, text="MAPE=" * string(dea_MAPE)[1:5])
  1110. lines!(ax26, collect(skipmissing(dea_t))[dea_i], collect(skipmissing(dea))[dea_i], color=:black)
  1111. lines!(ax26, collect(skipmissing(act_t))[act_i], collect(skipmissing(act_70))[act_i], color=:red)
  1112. ina_i = (collect(skipmissing(ina_t)) .> 100) .&& (collect(skipmissing(ina_t)) .< 500)
  1113. act_i = (collect(skipmissing(act_t)) .> 100) .&& (collect(skipmissing(act_t)) .< 500)
  1114. ina_MAPE = MAPE(act_70[1000:5990], ina[1000:5990])
  1115. text!(ax36, 100, 0.0, text="MAPE=" * string(ina_MAPE)[1:5])
  1116. lines!(ax36, collect(skipmissing(ina_t))[ina_i], collect(skipmissing(ina))[ina_i], color=:black)
  1117. lines!(ax36, collect(skipmissing(act_t))[act_i], collect(skipmissing(act_70))[act_i], color=:red)
  1118. map(zip(rec_t, rec)) do (t, r)
  1119. r_i = (collect(skipmissing(t)) .> 100) .&& (collect(skipmissing(t)) .< 500)
  1120. lines!(ax46, collect(skipmissing(t))[r_i], collect(skipmissing(r))[r_i], color=(:black, 0.3))
  1121. end
  1122. lines!(ax46, collect(skipmissing(act_t))[act_i], collect(skipmissing(act_50))[act_i], color=:blue)
  1123. r_MAPEs = [MAPE(act_50[1000:5991], i[1000:5991]) < 0.05 for i in rec]
  1124. last_vals = [i[15990] for i in rec]
  1125. med = median(last_vals)
  1126. sd = std(last_vals)
  1127. last_vals = [(abs(i - med) / sd) < 1 for i in last_vals]
  1128. r_incl = [i for i in 1:length(r_MAPEs) if r_MAPEs[i] && last_vals[i]]
  1129. rec_t = rec_t[r_incl]
  1130. rec = rec[r_incl]
  1131. hidedecorations!(ax16)
  1132. hidespines!(ax16)
  1133. hidedecorations!(ax26)
  1134. hidedecorations!(ax36)
  1135. hidedecorations!(ax46)
  1136. ### =====================
  1137. ax17 = Axis(fig[1, 7], title="Down-sampling", limits=(-35, 800, -0.1, 1.1))
  1138. ax27 = Axis(fig[2, 7], limits=(-35, 800, -0.1, 1.1))
  1139. ax37 = Axis(fig[3, 7], limits=(-85, 1800, -0.1, 1.1))
  1140. ax47 = Axis(fig[4, 7], limits=(-210, 4300, -0.1, 1.1))
  1141. act_t_d = [
  1142. act_t[icr(1, 385, 3)];
  1143. act_t[icr(400, 490, 3)];
  1144. act_t[icr(500, 980, 3)];
  1145. downsampler(act_t[1000:5991], act_50[1000:5991], 30)[1];
  1146. act_t[icr(6100, 6990, 3)]
  1147. ]
  1148. act_50_d = [
  1149. act_50[icr(1, 385, 3)];
  1150. act_50[icr(400, 490, 3)];
  1151. act_50[icr(500, 980, 3)];
  1152. downsampler(act_t[1000:5991], act_50[1000:5991], 30)[2];
  1153. act_50[icr(6100, 6990, 3)]
  1154. ]
  1155. act_70_d = [
  1156. act_70[icr(1, 385, 3)];
  1157. act_70[icr(400, 490, 3)];
  1158. act_70[icr(500, 980, 3)];
  1159. downsampler(act_t[1000:5991], act_70[1000:5991], 30)[2];
  1160. act_70[icr(6100, 6990, 3)]
  1161. ]
  1162. act_80_d = [
  1163. act_80[icr(1, 385, 3)];
  1164. act_80[icr(400, 490, 3)];
  1165. act_80[icr(500, 980, 3)];
  1166. downsampler(act_t[1000:5991], act_80[1000:5991], 30)[2];
  1167. act_80[icr(6100, 6990, 3)]
  1168. ]
  1169. lines!(ax17, collect(skipmissing(act_t_d)), collect(skipmissing(act_50_d)), color=:blue, label="Activation +50mV")
  1170. lines!(ax17, collect(skipmissing(act_t_d)), collect(skipmissing(act_70_d)), color=:red, label="Activation +70mV")
  1171. lines!(ax17, collect(skipmissing(act_t_d)), collect(skipmissing(act_80_d)), color=:black, label="Activation +80mV")
  1172. ina_t_d = [
  1173. ina_t[icr(1, 385, 3)];
  1174. ina_t[icr(400, 490, 3)];
  1175. ina_t[icr(500, 980, 3)];
  1176. downsampler(ina_t[1000:15990], ina[1000:15990], 90)[1];
  1177. downsampler(ina_t[16100:16981], ina[16100:16981], 6)[1];
  1178. ina_t[icr(17100, 17490, 3)]
  1179. ]
  1180. ina_d = [
  1181. ina[icr(1, 385, 3)];
  1182. ina[icr(400, 490, 3)];
  1183. ina[icr(500, 980, 3)];
  1184. downsampler(ina[1000:15990], ina[1000:15990], 90)[1];
  1185. downsampler(ina[16100:16981], ina[16100:16981], 6)[1];
  1186. ina[icr(17100, 17490, 3)]
  1187. ]
  1188. lines!(ax37, collect(skipmissing(ina_t_d)), collect(skipmissing(ina_d)), color=:black)
  1189. map(zip(rec_t, rec)) do (t, r)
  1190. li = length(r)
  1191. t_d = [
  1192. t[icr(1, 385, 3)];
  1193. t[icr(400, 490, 3)];
  1194. t[icr(500, 980, 3)];
  1195. downsampler(t[1000:15990], r[1000:15990], 90)[1];
  1196. t[icr(16100, li - 3020, 3)];
  1197. downsampler(
  1198. t[(li-2995):(li-1000)],
  1199. r[(li-2995):(li-1000)],
  1200. 12)[1]
  1201. t[icr(li - 900, li, 3)]
  1202. ]
  1203. r_d = [
  1204. r[icr(1, 385, 3)];
  1205. r[icr(400, 490, 3)];
  1206. r[icr(500, 980, 3)];
  1207. downsampler(t[1000:15990], r[1000:15990], 90)[2];
  1208. r[icr(16100, li - 3020, 3)];
  1209. downsampler(
  1210. r[(li-2995):(li-1000)],
  1211. r[(li-2995):(li-1000)],
  1212. 12)[2]
  1213. r[icr(li - 900, li, 3)]
  1214. ]
  1215. lines!(ax47, collect(skipmissing(t_d)), collect(skipmissing(r_d)), color=(:black, 0.3))
  1216. end
  1217. hidedecorations!(ax17)
  1218. hidedecorations!(ax27)
  1219. hidespines!(ax27)
  1220. hidedecorations!(ax37)
  1221. hidedecorations!(ax47)
  1222. Legend(fig[1, 8], ax17, framevisible=false)
  1223. Legend(fig[2, 8], ax24, framevisible=false)
  1224. Legend(fig[3, 8], ax34, framevisible=false)
  1225. Legend(fig[4, 8], ax44, framevisible=false, unique=true)
  1226. for i in 1:4
  1227. rowsize!(fig.layout, i, Relative(0.25))
  1228. end
  1229. return fig
  1230. end

aog_recipes.jl at commit 26dc63b, no license · at the source

Overview

Authors: Domas Linkevicius1,2, Angus Chadwick1, Melanie I. Stefan3, David C. Sterratt1
  1. Institute for Machine Learning, School of Informatics, University of Edinburgh, Edinburgh, United Kingdom
  2. Computational Neuroscience Unit, Okinawa Institute of Science and Technology, Okinawa, Japan
  3. Faculty of Medicine, Medical School Berlin, Berlin, Germany
Institutions: University of Edinburgh (United Kingdom); MSB Medical School Berlin (Germany)
Journal: PLoS computational biology, volume 22, issue 4, article e1013078
Dates: received 24 April 2025; accepted 2 April 2026; published online 27 April 2026
Type: Research article · Language: English
License: CC BY
Identifiers: DOI 10.1371/journal.pcbi.1013078 · PMID 42044162 · PMCID PMC13143182 · OpenAlex W4409841817
Open access: gold, a free copy (OpenAlex)
Status: code verified
Categories: human (organism), cellular / molecular (subfield)
Methods: Connectivity, Statistics
MeSH: Models, Biological*, Potassium Channels, Voltage-Gated*, Animals, Computational Biology, Humans, Ion Channel Gating, Kinetics, Machine Learning, Models, Neurological, Neurons, Nonlinear Dynamics (* major topic)
Journal subjects: Biology and Life Sciences, Biophysics, Ion Channels, Ion Channel Gating, Physical Sciences, Physics, Physiology, Electrophysiology, Neurophysiology, Neuroscience, Biochemistry, Proteins, Computer and Information Sciences, Neural Networks, Voltage-Gated Ion Channels, Potassium Channels, Mathematics, Optimization, Artificial Intelligence, Machine Learning, Data Management, Data Processing
Topic: Semiconductor materials and devices (Electrical and Electronic Engineering, Engineering), according to OpenAlex
Funding: UK Research and Innovation (EP/S02431X/1)
Citations: cited by 1 paper (Europe PMC); 52 references in the paper

Abstract

Ion channels are essential for signal processing and propagation in neural cells. Voltage-gated ion channels permeable to potassium (Kv) form one of the most prominent channel families. Techniques used to model the voltage-dependent gating of Kv channels date back to Hodgkin and Huxley (1952). Different Kv types can display radically different kinetic properties, requiring different mathematical models. However, the construction of Hodgkin-Huxley-like (HH-like) models is generally complex and time consuming due to the number of parameters, their tuning and having to choose functional forms to model gating. In addition to the between-Kv type heterogeneity, there can be significant within-Kv type kinetic heterogeneity between different cells with genetically identical channels. Since HH-like models do not account for such variability, extensions to it are necessary. We use scientific machine learning (SciML), the integration of machine learning methodologies with existing scientific models, and non-linear mixed effects (NLME) modelling to bypass the limitations of HH-like modelling. NLME is a modelling methodology that takes into account both within- and between-subject variability. These tools allowed us to complement the HH-like modelling and construct a unified SciML HH-like model that fits the recordings from 20 different Kv types. The unified SciML HH-like model produced closer fits to the data compared to a set of seven previous HH-like models and was able to represent the highly heterogeneous data from different cells. Our model may be the first step in producing a SciML foundation model for ion channels that would be capable of modelling the gating kinetics of any ion channel type.

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 6 matches between paragraphs and lines of code.

dom-linkevicius/SciMLHHModels.jl

License: none: the authors keep all their rights
State: the link answers, verified on 30 September 2026
Evidence: files inventoried
Commit: 26dc63b6cd5de79536731f072cf6c4d28328bb00, 23 February 2026
Languages: Julia (15)
Size: 1,368 files, 15 scripts
Software Heritage: not archived
Found in: “Data Availability”
Holds: README, environment (Project.toml)
Not found: license file, CITATION.cff, tests, continuous integration, documentation
Tools: Makie (3 files), DataFrames.jl (1 file), Distributions.jl (1 file)
Availability: 1 check, the latest on 30 September 2026: the link answers
  • 30 September 2026: the link answers
16 files

modeldb:229585

License: none: the authors keep all their rights
State: the link answers, verified on 30 September 2026
Evidence: the link answers
Software Heritage: not checked
Found in: the text, “Introduction”
Not found: README, license file, CITATION.cff, environment file, tests, continuous integration, documentation
Availability: 1 check, the latest on 30 September 2026: the link answers (HTTP 200)
  • 30 September 2026: the link answers (HTTP 200)
At the source: modeldb.science/229585

francescoalemanno/KissSmoothing.jl

License: MIT
State: the link answers, verified on 30 September 2026
Evidence: files inventoried
Commit: 4f2110c57e5d0868d4f35ca4dd487f73a296ae68, 5 June 2023
Languages: Julia (2)
Size: 15 files, 2 scripts
Software Heritage: not archived
Found in: the text, “Smoothing.”
Holds: README, license file, environment (Project.toml), tests, continuous integration
Not found: CITATION.cff, documentation
Availability: 1 check, the latest on 30 September 2026: the link answers
  • 30 September 2026: the link answers
4 files

njohner/Kv-kinetic-models

License: none: the authors keep all their rights
State: the link answers, verified on 30 September 2026
Evidence: files inventoried
Commit: 18e0352b9f4d1778c4fe71c5a1d3f29d20714c11, 2 April 2018
Languages: NEURON (188), Python (1)
Size: 506 files, 189 scripts
Software Heritage: not archived
Found in: the text, “Discussion”
Holds: README
Not found: license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: NEURON (188 files)
Availability: 1 check, the latest on 30 September 2026: the link answers
  • 30 September 2026: the link answers
190 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:

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

All of the data is freely publicly available at https://channelpedia.epfl.ch/. The specific raw data used in this study is available at https://doi.org/10.7488/ds/8052 and the code is available at https://github.com/dom-linkevicius/SciMLHHModels.jl.

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

Recorded: type, language, journal, volume, issue, pages, dates, 4 authors, 11 MeSH terms, 1 funder, 49 references.

Cite

This paper

Linkevicius, D., Chadwick, A., Stefan, M. I., & Sterratt, D. C. (2026). One model to rule them all: Unification of voltage-gated potassium channel models via deep non-linear mixed effects modelling. PLoS computational biology, 22(4), e1013078. https://doi.org/10.1371/journal.pcbi.1013078

BibTeX

@article{linkevicius2026one,
author = {Linkevicius, Domas and Chadwick, Angus and Stefan, Melanie I. and Sterratt, David C.},
title = {{One model to rule them all: Unification of voltage-gated potassium channel models via deep non-linear mixed effects modelling}},
journal = {PLoS computational biology},
year = {2026},
month = apr,
volume = {22},
number = {4},
pages = {e1013078},
publisher = {PLOS},
issn = {1553-734X},
doi = {10.1371/journal.pcbi.1013078},
url = {https://doi.org/10.1371/journal.pcbi.1013078},
pmid = {42044162},
pmcid = {PMC13143182}
}

RIS

TY - JOUR
AU - Linkevicius, Domas
AU - Chadwick, Angus
AU - Stefan, Melanie I.
AU - Sterratt, David C.
TI - One model to rule them all: Unification of voltage-gated potassium channel models via deep non-linear mixed effects modelling
T2 - PLoS computational biology
J2 - PLoS Comput Biol
PY - 2026
DA - 2026/04/27
VL - 22
IS - 4
SP - e1013078
SN - 1553-734X
PB - PLOS
DO - 10.1371/journal.pcbi.1013078
UR - https://doi.org/10.1371/journal.pcbi.1013078
LA - en
ER -

CSL-JSON

{
"id": "10.1371/journal.pcbi.1013078",
"type": "article-journal",
"title": "One model to rule them all: Unification of voltage-gated potassium channel models via deep non-linear mixed effects modelling",
"container-title": "PLoS computational biology",
"author": [
{
"family": "Linkevicius",
"given": "Domas"
},
{
"family": "Chadwick",
"given": "Angus"
},
{
"family": "Stefan",
"given": "Melanie I."
},
{
"family": "Sterratt",
"given": "David C."
}
],
"container-title-short": "PLoS Comput Biol",
"volume": "22",
"issue": "4",
"page": "e1013078",
"DOI": "10.1371/journal.pcbi.1013078",
"PMID": "42044162",
"PMCID": "PMC13143182",
"ISSN": "1553-734X",
"publisher": "PLOS",
"URL": "https://doi.org/10.1371/journal.pcbi.1013078",
"language": "en",
"issued": {
"date-parts": [
[
2026,
4,
27
]
]
}
}

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.1038/s41540-026-00749-5 [code]
A novel approach to quantify out-of-distribution uncertainty in Neural and Universal Differential Equations.
Journal: NPJ systems biology and applications
In common: Makie, DataFrames.jl, Distributions.jl, 1 reference
[2] doi:10.1038/s41593-026-02342-9 [code]
Interpretable abstractions of artificial neural networks predict behavior and neural activity during human information gathering.
Journal: Nature neuroscience
In common: Makie, DataFrames.jl, Distributions.jl
[3] doi:10.1371/journal.ppat.1014263 [code]
PrP turnover in vivo and the time to effect of prion disease therapeutics.
Journal: PLoS pathogens
In common: Makie, DataFrames.jl, Distributions.jl
[4] doi:10.1371/journal.pcbi.1014156 [code]
Art's hidden topology: A window into human perception.
Journal: PLoS computational biology
In common: Makie, DataFrames.jl, Distributions.jl
[5] doi:10.7554/elife.89629 [code]
Active dendrites enable robust spiking computations despite timing jitter.
Journal: eLife
In common: Makie, Distributions.jl, NEURON
[6] doi:10.1371/journal.pcbi.1014222 [code]
Neural population models for EEG: From Canonical models to alternative model structures.
Journal: PLoS computational biology
In common: DataFrames.jl, Distributions.jl, 1 reference
[7] doi:10.1093/pnasnexus/pgag213 [code]
Two-factor synaptic plasticity enables memory consolidation during neuronal burst firing.
Journal: PNAS nexus
In common: DataFrames.jl, Distributions.jl, cellular / molecular, 1 reference
[8] doi:10.1038/s42003-026-10957-8 [code]
Brain defence by the extracellular matrix protein Cochlin.
Journal: Communications biology
In common: DataFrames.jl, Distributions.jl, cellular / molecular
[9] doi:10.1038/s41586-026-10629-x [code]
Whole-genome duplication shaped cell-type evolution in the vertebrate brain.
Journal: Nature
In common: DataFrames.jl, Distributions.jl, cellular / molecular
[10] doi:10.1093/bioinformatics/btag328 [code]
eFEL: electrophysiology feature extraction library.
Journal: Bioinformatics (Oxford, England)
In common: NEURON, 2 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.

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.