Reproducing Lee et al. (2014) from CRCNS hc-10¶
Paper. Lee S-H, Marchionni I, Bezaire M, Varga C, Danielson N, Lovett-Barron M, Losonczy A, Soltesz I (2014). Parvalbumin-positive basket cells differentiate among hippocampal pyramidal cells. Neuron 82:1129-1144. doi:10.1016/j.neuron.2014.03.034
Dataset. CRCNS hc-10, Lee, Krook-Magnuson, Bezaire & Soltesz (2016), Intracellular, in
vitro somatic membrane potential recordings from whole cell patch clamped rodent hippocampal CA1
neurons, doi:10.6080/K00P0WXQ, streamed from
https://crcnsarchive.s3-us-west-2.amazonaws.com/hc-10/live/Soltesz_data.zip.
Version. CRCNS data sets are not versioned, and the paper cites no version (it predates
the data set). There is one published copy, under hc-10/live/; hc-10/old/ holds only an
older description (CRCNSAxoFiles.pdf). The entry pins crcns:hc-10/unversioned and
identifies the files by the MD5 sums of the data set's checksums.md5: Soltesz_data.zip
99bc6c87c503c724a1e692f520e25162 (checked below while streaming), described by
docs/crcns_hc-10_data_description.pdf 75bb0f47568161037e46965f77f952c0 (version 0.7,
2 December 2016).
Claims. claims/crcns-hc-10/10.1016-j.neuron.2014.03.034.yaml, written from the version of
record with its Supplemental Information. The data set holds, for this paper, the current-step
sweeps of 8 superficial and 9 deep CA1 pyramidal cells (PCs) and 6 PV+ basket cells (PVBCs);
its other cells belong to other papers. Only the six claims on these recordings can be tested.
| Claim | Tested here |
|---|---|
| figs1e-if-curves | tested |
| figs1f-input-resistance | tested |
| figs1g-resting-potential | blocked, data missing (the sweeps are at the holding level); values shown |
| figs1h-sag | tested |
| tables1-rheobase | tested |
| figs3f-pvbc-firing | tested |
| fig1e to fig1n, fig2 to fig6, figs1-pc-morphology (26 claims) | blocked, data missing |
| fig4d-model-feedforward, fig4ef-model-pvbc-rates | blocked, too large (network model simulations); a short run is timed |
import time
import warnings
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import pingouin as pg
from scipy import stats
from statsmodels.formula.api import ols
from statsmodels.stats.anova import anova_lm
import hc10
pd.set_option("display.width", 200)
pd.set_option("display.max_columns", 30)
t_start = time.time()
Data check¶
The zip is streamed once through MD5 and compared with the data set's checksums.md5, then
opened in place. Each check of the description against the values is stated under its output.
z = hc10.open_zip(check_md5=True)
print(f"zip MD5 matches checksums.md5: {hc10.ZIP_MD5}")
names = [n for n in z.namelist() if n.endswith(".atf")]
print(f"{len(names)} ATF files in the zip")
for info in z.infolist():
if info.filename.endswith(".atf"):
print(f" {info.filename.split('/')[-1]:45s} {info.file_size:>10d} bytes")
zip MD5 matches checksums.md5: 99bc6c87c503c724a1e692f520e25162 37 ATF files in the zip Axoaxocell_CA203LF57.atf 2821985 bytes Axoaxocell_CA204LF59.atf 2114169 bytes Bistratifiedcell_PV16IM.atf 2826074 bytes Bistratifiedcell_PV74.atf 2645015 bytes CA204RF59_axoaxonic_cell_mouse.atf 2464897 bytes D1_25abf_intrinsic_properties.atf 3707952 bytes D1_45abf_intrinsic_properties.atf 3713171 bytes D2_06abf_intrinsic_properties.atf 3713315 bytes D2_49abf_intrinsic_properties.atf 3713590 bytes D3_55abf_intrinsic_properties.atf 3705751 bytes D4_11abf_intrinsic_properties.atf 3715323 bytes D5_15abf_intrinsic_properties.atf 3717013 bytes D6_19abf_intrinsic_properties.atf 3712092 bytes D7_intrinsic_properties.atf 3711519 bytes ivy_10422005.atf 22036614 bytes ivy_10428004.atf 9407952 bytes ngf_09o21004.atf 9948317 bytes ngf_09o27007.atf 24906993 bytes PV27IM_bistratified_cell_mouse.atf 3005578 bytes PV34_PVBC_mouse.atf 3168894 bytes PVBC_PV34.atf 3168894 bytes PVBC_PV36.atf 4248016 bytes PVBC_PV37.atf 3180342 bytes PVBC_PV38.atf 2463145 bytes PVBC_PV72.atf 2822686 bytes PVBC_PV80.atf 3003253 bytes S1_04abf_intrinsic_properties.atf 3716732 bytes S1_47abf_intrinsic_properties.atf 3713245 bytes S2_08abf_intrinsic_properties.atf 3716808 bytes S2_31abf_intrinsic_properties.atf 3724122 bytes S2_51abf_intrinsic_properties.atf 3715672 bytes S3_13abf_intrinsic_properties.atf 3705370 bytes S4_intrinsic_propeties.atf 3715103 bytes S5_21abf_intrinsic_propeties.atf 3714656 bytes sh108_BC.atf 1930530 bytes sh114_SCA.atf 1757410 bytes sh153_SCA.atf 1759187 bytes
# Deposited more than once: identical bytes under two names.
import hashlib
digests = {}
for n in names:
digests.setdefault(hashlib.md5(z.read(n)).hexdigest(), []).append(n.split("/")[-1])
dups = [v for v in digests.values() if len(v) > 1]
print(f"{len(digests)} distinct files among {len(names)}; duplicated: {dups}")
36 distinct files among 37; duplicated: [['PV34_PVBC_mouse.atf', 'PVBC_PV34.atf']]
The descriptor's table lists 36 cells; the zip holds 37 files, because PV34 is deposited twice
(PVBC_PV34.atf and PV34_PVBC_mouse.atf, identical bytes). It is counted once.
cells = {}
for group, members in [("dPC", hc10.PCS["dPC"]), ("sPC", hc10.PCS["sPC"]), ("PVBC", list(hc10.PVBCS))]:
for c in members:
d = hc10.load_cell(z, c)
d["group"] = group
d["on"], d["off"] = hc10.step_window(d["v"], d["steps"])
cells[c] = d
rows = []
for c, d in cells.items():
t, v = d["t"], d["v"]
rows.append({
"cell": c, "group": d["group"], "sweeps": v.shape[1],
"steps_pA": f"{d['steps'][0]}:{d['steps'][1]-d['steps'][0]}:{d['steps'][-1]}",
"samples": v.shape[0], "dt_ms": round(1000 * np.median(np.diff(t)), 4),
"duration_s": round(t[-1] - t[0], 4),
"signal": d["header"][-2].strip('"').split("=")[1],
"step_on_s": round(t[d["on"]], 4), "step_len_s": round((d["off"] - d["on"]) / hc10.FS, 4),
"v_min": round(v.min(), 1), "v_max": round(v.max(), 1),
})
info = pd.DataFrame(rows)
print(info.to_string(index=False))
print()
print(info.groupby("group").size().rename("cells").to_string())
print("units of every voltage column:", sorted({t.split("(")[-1] for d in cells.values() for t in d["titles"][1:]}))
print("time column:", sorted({d["titles"][0] for d in cells.values()}))
print("ATF header keys in every file:", sorted({h.strip('"').split("=")[0] for d in cells.values() for h in d["header"]}))
print("header of D1_25abf:")
for h in cells["D1_25abf"]["header"]:
print(" ", h[:110])
gaps = {float(g) for d in cells.values() for h in d["header"] if h.startswith('"SweepStartTimesMS')
for g in np.diff([float(x) for x in h.strip('"').split("=")[1].split(",")])}
print("spacing of SweepStartTimesMS in all cells (ms):", sorted(gaps))
cell group sweeps steps_pA samples dt_ms duration_s signal step_on_s step_len_s v_min v_max
D1_25abf dPC 20 -400:50:550 20000 0.1 1.9999 IN 1 0.5315 1.0000 -114.8 37.0
D1_45abf dPC 20 -400:50:550 20000 0.1 1.9999 IN 1 0.5315 1.0000 -103.1 43.1
D2_06abf dPC 20 -400:50:550 19999 0.1 1.9998 IN 1 0.5315 1.0000 -98.1 51.1
D2_49abf dPC 20 -400:50:550 20000 0.1 1.9999 IN 1 0.5316 1.0000 -96.9 53.7
D3_55abf dPC 20 -400:50:550 20000 0.1 1.9999 IN 1 0.5315 1.0000 -101.7 49.0
D4_11abf dPC 20 -400:50:550 20000 0.1 1.9999 IN 1 0.5315 1.0000 -110.3 42.1
D5_15abf dPC 20 -400:50:550 19999 0.1 1.9998 IN 1 0.5315 1.0000 -107.8 46.1
D6_19abf dPC 20 -400:50:550 19999 0.1 1.9998 IN 1 0.5315 1.0000 -105.6 42.0
D7 dPC 20 -400:50:550 19999 0.1 1.9998 IN 1 0.5315 1.0000 -114.7 34.8
S1_04abf sPC 20 -400:50:550 19999 0.1 1.9998 IN 1 0.5315 1.0001 -106.8 51.1
S1_47abf sPC 20 -400:50:550 20000 0.1 1.9999 IN 1 0.5315 1.0000 -140.2 29.3
S2_08abf sPC 20 -400:50:550 19999 0.1 1.9998 IN 1 0.5315 1.0000 -117.7 37.6
S2_31abf sPC 20 -400:50:550 20000 0.1 1.9999 IN 1 0.5315 1.0000 -121.7 40.3
S2_51abf sPC 20 -400:50:550 20000 0.1 1.9999 IN 1 0.5315 1.0000 -108.6 46.1
S3_13abf sPC 20 -400:50:550 20000 0.1 1.9999 IN 1 0.5315 1.0000 -116.3 39.2
S4 sPC 20 -400:50:550 19999 0.1 1.9998 IN 1 0.5315 1.0000 -125.1 40.0
S5_21abf sPC 20 -400:50:550 19999 0.1 1.9998 IN 1 0.5315 1.0000 -111.9 42.6
PV34 PVBC 17 -300:50:500 20000 0.1 1.9999 IN 0 0.5316 0.9999 -75.3 23.7
PV36 PVBC 23 -300:50:800 20000 0.1 1.9999 IN 0 0.5316 0.9999 -74.4 19.0
PV37 PVBC 17 -300:50:500 20000 0.1 1.9999 IN 0 0.5315 1.0001 -77.7 16.6
PV38 PVBC 13 -300:50:300 20000 0.1 1.9999 IN 0 0.5315 1.0000 -78.9 9.5
PV72 PVBC 15 -300:50:400 20000 0.1 1.9999 IN 1 0.5315 1.0000 -77.0 7.4
PV80 PVBC 16 -300:50:450 20000 0.1 1.9999 IN 1 0.5316 1.0000 -83.1 26.3
group
PVBC 6
dPC 9
sPC 8
units of every voltage column: ['mV)']
time column: ['Time (s)']
ATF header keys in every file: ['AcquisitionMode', 'Comment', 'Signals', 'SignalsExported', 'SweepStartTimesMS', 'SyncTimeUnits', 'YBottom', 'YTop']
header of D1_25abf:
"AcquisitionMode=Episodic Stimulation"
"Comment="
"YTop=1000"
"YBottom=-1000"
"SyncTimeUnits=10"
"SweepStartTimesMS=0.000,5000.000,10000.000,15000.000,20000.000,25000.000,30000.000,35000.000,40000.000,45000.
"SignalsExported=IN 1"
"Signals=" "IN 1" "IN 1" "IN 1" "IN 1" "IN 1" "IN 1" "IN 1" "IN 1" "IN 1" "IN 1" "IN 1" "IN 1" "IN 1" "IN 1" "
spacing of SweepStartTimesMS in all cells (ms): [5000.0]
Counts match the descriptor and the paper (sPC n = 8, dPC n = 9, Figure S1 legend), and each file
has one sweep per step of the descriptor's range (20 for the PCs, -400 to +550 pA; 13 to 23 for
the PVBCs). Every column is a voltage in mV; no file has a current column, so the step levels
come from the descriptor alone. Sampling is 0.1 ms (10 kHz, as the Methods state). Each sweep
lasts 2 s; the step starts at 0.5315 s and lasts 1.000 s in every cell, as the Supplemental
Experimental Procedures 2B ("1s-long step currents") and the descriptor ("about half a second
into the recording") say. Voltages range from -140 to +54 mV, as expected of a somatic
recording in mV. The ATF header holds the acquisition mode, the display range, the start time of
each sweep (SweepStartTimesMS, one sweep every 5 s in every cell) and the signal name. It gives no
step onset, amplitude or holding current, so the onset is found from the voltage.
The files have no trial table and only the voltage stream, so the check of the step labels is made on the voltage itself: if sweep k carries the k-th step of the descriptor's range, the steady-state deflection rises with k, is near 0 for the 0 pA sweep, and changes sign there.
rows = []
for c, d in cells.items():
base = hc10.baseline(d["v"], d["on"])
dv = hc10.steady_state(d["v"], d["on"]) - base
sub = d["steps"] <= 0 # below threshold, so no spike enters the steady state
zero = d["steps"] == 0
pre = d["v"][d["on"] - int(0.5 * hc10.FS):d["on"]]
rows.append({
"cell": c, "group": d["group"],
"monotonic_up_to_0pA": bool(np.all(np.diff(dv[sub]) > 0)),
"dV_at_0pA_mV": round(float(dv[zero][0]), 2),
"dV_at_-100pA_mV": round(float(dv[d["steps"] == -100][0]), 2),
"spearman_dV_vs_step": round(stats.spearmanr(d["steps"][sub], dv[sub])[0], 3),
"baseline_0pA_mV": round(float(base[zero][0]), 2),
"baseline_range_mV": f"{base.min():.1f} to {base.max():.1f}",
"prestep_drift_sd_mV": round(float(pre.std(axis=0).max()), 2),
})
chk = pd.DataFrame(rows)
print(chk.to_string(index=False))
print()
print("cells with monotonic subthreshold deflection:", int(chk.monotonic_up_to_0pA.sum()), "of", len(chk))
print("largest |dV| on the 0 pA sweep: %.2f mV" % chk["dV_at_0pA_mV"].abs().max())
d = cells["PV37"]
dv37 = hc10.steady_state(d["v"], d["on"]) - hc10.baseline(d["v"], d["on"])
print("PV37 steady-state deflection (mV) by step (pA):",
{int(s): round(float(x), 1) for s, x in zip(d["steps"], dv37) if s <= 0})
cell group monotonic_up_to_0pA dV_at_0pA_mV dV_at_-100pA_mV spearman_dV_vs_step baseline_0pA_mV baseline_range_mV prestep_drift_sd_mV
D1_25abf dPC True -1.61 -14.42 1.000 -69.01 -76.7 to -69.0 0.83
D1_45abf dPC True 0.22 -7.65 1.000 -68.60 -70.7 to -67.5 0.42
D2_06abf dPC True 0.17 -7.69 1.000 -70.19 -71.3 to -68.7 0.70
D2_49abf dPC True -0.00 -6.40 1.000 -69.36 -70.6 to -68.6 0.23
D3_55abf dPC True -0.34 -7.74 1.000 -68.22 -70.0 to -68.2 0.33
D4_11abf dPC True 0.05 -14.90 1.000 -70.86 -76.1 to -70.7 0.25
D5_15abf dPC True -0.04 -10.68 1.000 -70.64 -74.0 to -69.6 0.19
D6_19abf dPC True 0.09 -11.49 1.000 -70.72 -74.2 to -70.6 0.36
D7 dPC True -0.10 -11.11 1.000 -70.25 -74.1 to -69.8 0.91
S1_04abf sPC True -0.11 -8.38 1.000 -69.84 -72.0 to -69.7 0.12
S1_47abf sPC True 0.10 -16.86 1.000 -69.07 -71.0 to -68.6 0.17
S2_08abf sPC True 0.16 -9.85 1.000 -69.41 -70.9 to -68.8 0.52
S2_31abf sPC True 0.11 -10.44 1.000 -70.84 -72.4 to -69.7 0.37
S2_51abf sPC True 0.17 -9.13 1.000 -70.92 -71.7 to -69.9 0.11
S3_13abf sPC True -0.06 -9.83 1.000 -70.62 -72.5 to -70.2 0.19
S4 sPC True 0.01 -11.00 1.000 -72.15 -75.3 to -71.7 0.33
S5_21abf sPC True -0.03 -9.56 1.000 -67.38 -71.1 to -67.4 0.28
PV34 PVBC True -0.11 -4.88 1.000 -60.71 -61.8 to -59.6 0.15
PV36 PVBC True -0.26 -4.34 1.000 -64.46 -67.9 to -61.0 0.15
PV37 PVBC False 0.11 -4.19 0.964 -60.75 -62.8 to -59.9 0.35
PV38 PVBC True 0.02 -7.03 1.000 -60.31 -61.7 to -58.5 0.45
PV72 PVBC True -0.29 -6.48 1.000 -58.54 -61.7 to -57.2 0.32
PV80 PVBC True -0.38 -7.64 1.000 -61.39 -66.0 to -59.9 0.54
cells with monotonic subthreshold deflection: 22 of 23
largest |dV| on the 0 pA sweep: 1.61 mV
PV37 steady-state deflection (mV) by step (pA): {-300: -13.1, -250: -8.7, -200: -9.1, -150: -6.7, -100: -4.2, -50: -2.7, 0: 0.1}
In every PC the deflection rises with the sweep index through the subthreshold steps and is within 0.4 mV of 0 on the sweep the descriptor gives as 0 pA, except D1_25abf (-1.61 mV), so the sweep order is consistent with the descriptor's step ranges (consistent with, not shown: the step amplitudes themselves are not recorded). Among the PVBCs only PV37 breaks the order, between its -250 and -200 pA sweeps (-8.7 then -9.1 mV, printed above); its other sweeps are in order. Before the step every PC sits near -70 mV, the holding potential the Methods give ("the PCs were held at -70mV"), and every PVBC near -60 mV, the interneuron holding potential of the Supplemental Experimental Procedures ("holding potential was -60 mV"). The files carry no subject, slice, region (septal or temporal) or soma position; groups come from the file names and the descriptor's table.
figs1e-if-curves¶
Superficial and deep CA1 PCs do not differ in firing frequency as a function of injected current (two-way ANOVA, p > 0.4; 8 sPCs, 9 dPCs).
Steps 0 to +550 pA (Supplemental Experimental Procedures 2B), firing frequency under readings (a) spikes in the 1 s step and (b) (spikes - 1) over the first-to-last spike interval, spikes as upward crossings of 0 mV (the criterion). The paper's test is a two-way ANOVA of frequency on group and step (here with their interaction, the standard two-way model); the mixed (repeated-measures) ANOVA is the variant the criterion asks for. Expected at +550 pA: sPC 31.5 ± 3.15 Hz, dPC 30.5 ± 3.05 Hz.
fi_rows = []
for c, d in cells.items():
if d["group"] == "PVBC":
continue
n, ra, rb = hc10.firing(d, d["on"], d["off"])
for s, k, a, b in zip(d["steps"], n, ra, rb):
if s >= 0:
fi_rows.append({"cell": c, "group": d["group"], "step": int(s), "spikes": int(k), "rate_a": a, "rate_b": b})
fi = pd.DataFrame(fi_rows)
tab = fi.pivot_table(index="step", columns="group", values=["rate_a", "rate_b"], aggfunc=["mean", "sem"])
print("Group mean and SEM of firing frequency (Hz) per step:")
print(tab.round(2).to_string())
print()
print("Per cell, reading (a), Hz:")
print(fi.pivot_table(index="cell", columns="step", values="rate_a").round(0).astype(int).to_string())
# Reading (b) on sweeps with few spikes: one spike has no interval, two close spikes give a high rate.
few = fi[(fi.spikes > 0) & (fi.spikes < 3)]
print(f"sweeps with 1 or 2 spikes: {len(few)}, of which {(few.spikes == 1).sum()} with one (rate a 1 Hz, rate b 0 Hz)")
Group mean and SEM of firing frequency (Hz) per step:
mean sem
rate_a rate_b rate_a rate_b
group dPC sPC dPC sPC dPC sPC dPC sPC
step
0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
50 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
100 0.89 0.88 1.77 0.83 0.61 0.88 1.18 0.83
150 3.56 2.62 4.28 2.96 1.72 2.23 2.22 2.29
200 9.44 8.12 10.99 8.92 2.25 2.77 2.43 2.69
250 14.22 14.50 15.79 14.92 2.59 2.44 2.56 2.40
300 19.11 20.00 20.35 20.29 2.11 2.09 2.06 1.93
350 22.22 23.75 23.47 24.12 1.83 1.86 1.83 1.82
400 25.22 26.75 26.04 27.04 1.76 1.75 1.73 1.75
450 27.44 29.12 28.20 29.42 1.65 1.71 1.59 1.68
500 29.00 31.25 29.86 31.31 1.55 1.51 1.49 1.59
550 30.56 31.62 31.24 33.63 1.43 1.69 1.41 1.78
Per cell, reading (a), Hz:
step 0 50 100 150 200 250 300 350 400 450 500 550
cell
D1_25abf 0 0 5 12 18 22 25 27 29 30 31 32
D1_45abf 0 0 0 0 10 16 21 25 28 31 32 33
D2_06abf 0 0 0 0 0 4 10 14 17 19 21 23
D2_49abf 0 0 0 0 0 0 9 14 18 22 24 27
D3_55abf 0 0 0 0 9 18 24 27 31 33 35 37
D4_11abf 0 0 3 12 17 21 23 25 27 29 30 31
D5_15abf 0 0 0 1 9 14 18 21 24 25 28 29
D6_19abf 0 0 0 1 6 12 16 19 22 25 26 28
D7 0 0 0 6 16 21 26 28 31 33 34 35
S1_04abf 0 0 0 3 12 18 23 26 29 32 33 35
S1_47abf 0 0 7 18 25 29 32 33 34 35 34 27
S2_08abf 0 0 0 0 4 10 14 17 20 22 25 26
S2_31abf 0 0 0 0 7 15 22 27 30 32 34 35
S2_51abf 0 0 0 0 0 7 19 25 31 34 38 40
S3_13abf 0 0 0 0 3 10 15 19 23 26 29 31
S4 0 0 0 0 10 16 20 24 25 28 30 31
S5_21abf 0 0 0 0 4 11 15 19 22 24 27 28
sweeps with 1 or 2 spikes: 2, of which 2 with one (rate a 1 Hz, rate b 0 Hz)
def anova_group(df, col):
m = ols(f"{col} ~ C(group) * C(step)", data=df).fit()
full = anova_lm(m, typ=2)
add = anova_lm(ols(f"{col} ~ C(group) + C(step)", data=df).fit(), typ=2)
mixed = pg.mixed_anova(data=df, dv=col, within="step", between="group", subject="cell")
return full, add, mixed
fi_results = {}
for col in ["rate_a", "rate_b"]:
full, add, mixed = anova_group(fi, col)
g = full.loc["C(group)"]
eta = g["sum_sq"] / full["sum_sq"].sum()
mg = mixed.set_index("Source").loc["group"]
fi_results[col] = dict(F=g["F"], p=g["PR(>F)"], eta=eta, p_add=add.loc["C(group)", "PR(>F)"],
p_inter=full.loc["C(group):C(step)", "PR(>F)"], F_mixed=mg["F"], p_mixed=mg["p_unc"],
np2_mixed=mg["np2"])
print(f"Reading {col[-1]}: two-way ANOVA (group x step): group F = {g['F']:.3f}, p = {g['PR(>F)']:.3f}, "
f"eta^2 = {eta:.4f}; interaction p = {fi_results[col]['p_inter']:.3f}; additive model group p = "
f"{fi_results[col]['p_add']:.3f}")
print(f" mixed ANOVA (step within cell): group F = {mg['F']:.3f}, p = {mg["p_unc"]:.3f}, "
f"partial eta^2 = {mg['np2']:.3f}")
at550 = fi[fi.step == 550].groupby("group")[["rate_a", "rate_b"]].agg(["mean", "sem"])
print()
print("At +550 pA (Hz):")
print(at550.round(2).to_string())
exp = {"sPC": (31.5, 3.15), "dPC": (30.5, 3.05)}
for col in ["rate_a", "rate_b"]:
ok = {g: abs(at550.loc[g, (col, "mean")] - v) <= tol for g, (v, tol) in exp.items()}
print(f"reading {col[-1]}: sPC within 31.5 +- 3.15: {ok['sPC']}; dPC within 30.5 +- 3.05: {ok['dPC']}")
Reading a: two-way ANOVA (group x step): group F = 0.678, p = 0.411, eta^2 = 0.0005; interaction p = 0.997; additive model group p = 0.400
mixed ANOVA (step within cell): group F = 0.098, p = 0.759, partial eta^2 = 0.006
Reading b: two-way ANOVA (group x step): group F = 0.029, p = 0.866, eta^2 = 0.0000; interaction p = 0.991; additive model group p = 0.863
mixed ANOVA (step within cell): group F = 0.004, p = 0.951, partial eta^2 = 0.000
At +550 pA (Hz):
rate_a rate_b
mean sem mean sem
group
dPC 30.56 1.43 31.24 1.41
sPC 31.62 1.69 33.63 1.78
reading a: sPC within 31.5 +- 3.15: True; dPC within 30.5 +- 3.05: True
reading b: sPC within 31.5 +- 3.15: True; dPC within 30.5 +- 3.05: True
# Spike threshold: the 0 mV crossing is a standard choice; counts with -20 mV and +10 mV.
alt = []
for thr in [-20.0, 0.0, 10.0]:
tot = 0
for c, d in cells.items():
if d["group"] == "PVBC":
continue
seg = d["v"][d["on"]:d["off"]]
tot += int(((seg[1:] >= thr) & (seg[:-1] < thr)).sum())
alt.append((thr, tot))
print("total spikes in all PC steps by threshold (mV):", alt)
fig, ax = plt.subplots(1, 2, figsize=(9, 3.2))
for i, col in enumerate(["rate_a", "rate_b"]):
for g, colr in [("sPC", "tab:blue"), ("dPC", "tab:green")]:
s = fi[fi.group == g].groupby("step")[col]
ax[i].errorbar(s.mean().index, s.mean(), s.sem(), color=colr, label=g, marker="o", ms=3)
ax[i].set(xlabel="step (pA)", ylabel="firing frequency (Hz)", title=f"reading ({col[-1]})")
ax[i].legend()
plt.tight_layout(); plt.show()
print("plotted range, reading a: %.1f to %.1f Hz; reading b: %.1f to %.1f Hz (all points within the axes)"
% (fi.rate_a.min(), fi.rate_a.max(), fi.rate_b.min(), fi.rate_b.max()))
total spikes in all PC steps by threshold (mV): [(-20.0, 3121), (0.0, 3144), (10.0, 3143)]
plotted range, reading a: 0.0 to 40.0 Hz; reading b: 0.0 to 40.3 Hz (all points within the axes)
Result: reproduced. Under both readings the two-way ANOVA finds no group effect (reading a: F = 0.68, p = 0.411, eta^2 = 0.0005; reading b: p = 0.866), nor does the mixed ANOVA (p = 0.759 and 0.951), and the group means at +550 pA are within tolerance (reading a: sPC 31.62, dPC 30.56 Hz; reading b: 33.63 and 31.24 Hz). Reading (a) also gives the paper's p > 0.4. Reading (b) gives 0 Hz to a sweep with a single spike, but only 2 PC sweeps have one spike and none has two, so this bears little on the test.
figs1f-input-resistance¶
Superficial and deep PCs do not differ in input resistance (117 against 124 MOhm).
Steady state 0.8 to 1.0 s after step onset on the -100 to +100 pA steps (Supplemental Experimental Procedures 2B). Readings (a) slope of a linear fit over the five steps, (b) mean of change over current over the four non-zero steps. Group test by the paper's rule (Shapiro-Wilk in each group; two-tailed unpaired t test, else Mann-Whitney).
def paper_rule(x, y, paired=False):
# Statistical Analysis: t test unless a group fails Shapiro-Wilk, then the rank test.
normal = stats.shapiro(x).pvalue >= 0.05 and stats.shapiro(y).pvalue >= 0.05
if paired:
return ("paired t", stats.ttest_rel(x, y).pvalue) if normal else ("Wilcoxon", stats.wilcoxon(x, y).pvalue)
return ("t", stats.ttest_ind(x, y).pvalue) if normal else ("Mann-Whitney", stats.mannwhitneyu(x, y).pvalue)
def cohen_d(x, y):
sp = np.sqrt(((len(x) - 1) * np.var(x, ddof=1) + (len(y) - 1) * np.var(y, ddof=1)) / (len(x) + len(y) - 2))
return (np.mean(x) - np.mean(y)) / sp
ri_rows = []
for c, d in cells.items():
if d["group"] == "PVBC":
continue
a, b = hc10.input_resistance(d, d["on"])
n, _, _ = hc10.firing(d, d["on"], d["off"])
# Variant: only the steps without spikes (-100 to 0 pA in every cell).
sel = (d["steps"] >= -100) & (d["steps"] <= 0)
ss = hc10.steady_state(d["v"], d["on"])[sel]
a_sub = np.polyfit(d["steps"][sel], ss, 1)[0] * 1000
ri_rows.append({"cell": c, "group": d["group"], "Rin_a": a, "Rin_b": b, "Rin_sub": a_sub,
"spikes_at_+100": int(n[d["steps"] == 100][0])})
ri = pd.DataFrame(ri_rows)
print(ri.round(1).to_string(index=False))
print()
exp = {"sPC": (117, 11.7), "dPC": (124, 12.4)}
for col in ["Rin_a", "Rin_b", "Rin_sub"]:
s, dd = ri[ri.group == "sPC"][col].values, ri[ri.group == "dPC"][col].values
test, p = paper_rule(s, dd)
ok = [abs(np.mean(x) - exp[g][0]) <= exp[g][1] for g, x in [("sPC", s), ("dPC", dd)]]
print(f"{col}: sPC {s.mean():.1f} +- {stats.sem(s):.1f}, dPC {dd.mean():.1f} +- {stats.sem(dd):.1f} MOhm; "
f"{test} p = {p:.3f}; Cohen's d (sPC - dPC) = {cohen_d(s, dd):.2f}; within tolerance sPC {ok[0]}, dPC {ok[1]}")
cell group Rin_a Rin_b Rin_sub spikes_at_+100
D1_25abf dPC 199.9 199.5 137.7 5
D1_45abf dPC 95.4 86.0 86.3 0
D2_06abf dPC 77.8 81.8 68.4 0
D2_49abf dPC 69.9 67.4 66.2 0
D3_55abf dPC 83.6 79.8 78.0 0
D4_11abf dPC 219.0 218.3 151.3 3
D5_15abf dPC 116.5 121.1 96.4 0
D6_19abf dPC 139.5 136.5 122.6 0
D7 dPC 122.8 123.4 109.0 0
S1_04abf sPC 100.7 98.3 88.6 0
S1_47abf sPC 214.1 208.3 168.2 7
S2_08abf sPC 109.7 108.8 102.4 0
S2_31abf sPC 118.1 115.4 104.3 0
S2_51abf sPC 99.2 95.2 94.3 0
S3_13abf sPC 98.6 103.1 93.3 0
S4 sPC 116.4 118.5 107.1 0
S5_21abf sPC 93.1 103.7 99.2 0
Rin_a: sPC 118.7 +- 14.0, dPC 124.9 +- 17.7 MOhm; Mann-Whitney p = 1.000; Cohen's d (sPC - dPC) = -0.13; within tolerance sPC True, dPC True
Rin_b: sPC 118.9 +- 13.1, dPC 123.7 +- 17.9 MOhm; Mann-Whitney p = 1.000; Cohen's d (sPC - dPC) = -0.10; within tolerance sPC True, dPC True
Rin_sub: sPC 107.2 +- 9.0, dPC 101.8 +- 10.2 MOhm; Mann-Whitney p = 0.673; Cohen's d (sPC - dPC) = 0.19; within tolerance sPC True, dPC False
Result: reproduced. Under reading (a) sPC 118.7 and dPC 124.9 MOhm, both within tolerance of 117 and 124, with no group difference (Shapiro-Wilk fails, Mann-Whitney p = 1.000, Cohen's d = -0.13); reading (b) gives 118.9 and 123.7 MOhm (p = 1.000). Three cells (D1_25abf, D4_11abf, S1_47abf) fire on the +100 pA step, which enters the steady state; with only the -100 to 0 pA steps, sPC 107.2 and dPC 101.8 MOhm (p = 0.673), the dPC mean then outside tolerance.
figs1g-resting-potential (blocked)¶
Superficial PCs have more depolarized resting membrane potentials than deep PCs (about -66 against -72 mV uncorrected; -80.9 against -86.6 mV corrected for the junction potential).
The criterion reads the resting potential as the pre-step baseline of sweeps with zero holding current, and says that if the files have no current channel and a baseline at the holding level, the sweeps do not hold the resting potential and the claim cannot be tested on them. The values are shown so that this can be seen.
rest = chk[chk.group != "PVBC"][["cell", "group", "baseline_0pA_mV", "baseline_range_mV"]]
print(rest.to_string(index=False))
s = rest[rest.group == "sPC"].baseline_0pA_mV.values
dd = rest[rest.group == "dPC"].baseline_0pA_mV.values
test, p = paper_rule(s, dd)
print(f"pre-step baseline of the 0 pA sweep: sPC {s.mean():.2f} +- {stats.sem(s):.2f}, dPC {dd.mean():.2f} +- "
f"{stats.sem(dd):.2f} mV; {test} p = {p:.3f}")
allpc = np.concatenate([s, dd])
print(f"all 17 PCs: {allpc.min():.1f} to {allpc.max():.1f} mV, mean {allpc.mean():.2f}; distance from the -70 mV "
f"holding level at most {np.abs(allpc + 70).max():.1f} mV")
print("current channel in any PC file:", any("pA" in t for d in cells.values() if d["group"] != "PVBC" for t in d["titles"]))
cell group baseline_0pA_mV baseline_range_mV
D1_25abf dPC -69.01 -76.7 to -69.0
D1_45abf dPC -68.60 -70.7 to -67.5
D2_06abf dPC -70.19 -71.3 to -68.7
D2_49abf dPC -69.36 -70.6 to -68.6
D3_55abf dPC -68.22 -70.0 to -68.2
D4_11abf dPC -70.86 -76.1 to -70.7
D5_15abf dPC -70.64 -74.0 to -69.6
D6_19abf dPC -70.72 -74.2 to -70.6
D7 dPC -70.25 -74.1 to -69.8
S1_04abf sPC -69.84 -72.0 to -69.7
S1_47abf sPC -69.07 -71.0 to -68.6
S2_08abf sPC -69.41 -70.9 to -68.8
S2_31abf sPC -70.84 -72.4 to -69.7
S2_51abf sPC -70.92 -71.7 to -69.9
S3_13abf sPC -70.62 -72.5 to -70.2
S4 sPC -72.15 -75.3 to -71.7
S5_21abf sPC -67.38 -71.1 to -67.4
pre-step baseline of the 0 pA sweep: sPC -70.03 +- 0.51, dPC -69.76 +- 0.33 mV; t p = 0.659
all 17 PCs: -72.2 to -67.4 mV, mean -69.89; distance from the -70 mV holding level at most 2.6 mV
current channel in any PC file: False
Result: blocked (data missing). No PC file has a current channel, and every PC's pre-step baseline is within 2.6 mV of the -70 mV holding potential (sPC -70.03, dPC -69.76 mV), so by the criterion the sweeps do not hold the resting potential. The Table S1 footnote says the tonic current was not recorded.
figs1h-sag¶
Superficial PCs show larger sag potentials than deep PCs in response to large hyperpolarizing current pulses (about 8.7 against 5.6 mV).
Sag is steady state (0.8 to 1.0 s) minus the most negative voltage in the step. Readings for the step: (a) -400, (b) -300, (c) -200 pA (the criterion). Expected sPC 8.7 ± 0.87, dPC 5.6 ± 0.56 mV.
sag_rows = []
for c, d in cells.items():
if d["group"] == "PVBC":
continue
row = {"cell": c, "group": d["group"]}
for st in [-400, -300, -200]:
row[f"sag_{st}"] = hc10.sag(d, d["on"], st)
# Variant: peak from the voltage smoothed over 1 ms, against noise in the minimum.
k = int(np.where(d["steps"] == st)[0][0])
x = np.convolve(d["v"][:, k], np.ones(10) / 10, mode="same")
row[f"sag_{st}_smooth"] = hc10.steady_state(d["v"][:, [k]], d["on"])[0] - x[d["on"]:d["on"] + 10000].min()
sag_rows.append(row)
sg = pd.DataFrame(sag_rows)
print(sg.round(2).to_string(index=False))
print()
exp = {"sPC": (8.7, 0.87), "dPC": (5.6, 0.56)}
for col in [c for c in sg.columns if c.startswith("sag_")]:
s, dd = sg[sg.group == "sPC"][col].values, sg[sg.group == "dPC"][col].values
test, p = paper_rule(s, dd)
ok = [abs(np.mean(x) - exp[g][0]) <= exp[g][1] for g, x in [("sPC", s), ("dPC", dd)]]
print(f"{col:17s}: sPC {s.mean():.2f} +- {stats.sem(s):.2f}, dPC {dd.mean():.2f} +- {stats.sem(dd):.2f} mV; "
f"{test} p = {p:.4f}; d = {cohen_d(s, dd):.2f}; within tolerance sPC {ok[0]}, dPC {ok[1]}")
cell group sag_-400 sag_-400_smooth sag_-300 sag_-300_smooth sag_-200 sag_-200_smooth
D1_25abf dPC 5.91 5.88 4.59 4.57 4.88 4.83
D1_45abf dPC 6.95 6.93 5.30 5.27 2.83 2.75
D2_06abf dPC 5.26 5.25 4.36 4.32 3.08 3.04
D2_49abf dPC 4.68 4.64 3.71 3.66 2.77 2.77
D3_55abf dPC 7.11 7.09 5.81 5.79 4.18 4.15
D4_11abf dPC 4.38 4.35 3.47 3.45 2.95 2.91
D5_15abf dPC 5.68 5.66 4.36 4.32 4.06 4.01
D6_19abf dPC 3.42 3.38 3.08 3.05 2.34 2.32
D7 dPC 7.83 7.79 5.68 5.65 4.92 4.89
S1_04abf sPC 8.08 8.04 6.59 6.56 5.20 5.19
S1_47abf sPC 9.31 9.28 7.78 7.74 6.08 6.07
S2_08abf sPC 7.60 7.56 6.38 6.35 4.98 4.96
S2_31abf sPC 12.16 12.15 9.09 9.06 6.62 6.60
S2_51abf sPC 5.63 5.57 4.46 4.43 3.01 2.98
S3_13abf sPC 7.95 7.91 5.91 5.90 4.33 4.30
S4 sPC 9.73 9.68 9.27 9.13 6.03 6.01
S5_21abf sPC 9.23 9.21 6.81 6.77 5.72 5.71
sag_-400 : sPC 8.71 +- 0.67, dPC 5.69 +- 0.48 mV; t p = 0.0020; d = 1.81; within tolerance sPC True, dPC True
sag_-400_smooth : sPC 8.68 +- 0.68, dPC 5.67 +- 0.48 mV; t p = 0.0021; d = 1.80; within tolerance sPC True, dPC True
sag_-300 : sPC 7.04 +- 0.57, dPC 4.48 +- 0.32 mV; t p = 0.0011; d = 1.95; within tolerance sPC False, dPC False
sag_-300_smooth : sPC 6.99 +- 0.56, dPC 4.45 +- 0.32 mV; t p = 0.0011; d = 1.95; within tolerance sPC False, dPC False
sag_-200 : sPC 5.25 +- 0.41, dPC 3.56 +- 0.32 mV; t p = 0.0050; d = 1.59; within tolerance sPC False, dPC False
sag_-200_smooth : sPC 5.23 +- 0.41, dPC 3.52 +- 0.32 mV; t p = 0.0047; d = 1.61; within tolerance sPC False, dPC False
Result: reproduced. Under reading (a), the -400 pA step, sPC sag is 8.71 mV and dPC 5.69 mV, both within tolerance, and sPCs exceed dPCs (t test p = 0.0020, Cohen's d = 1.81). Readings (b) and (c) give the same direction and significance (p = 0.0011 and 0.0050) with smaller values, outside tolerance (-300 pA: 7.04 and 4.48 mV; -200 pA: 5.25 and 3.56 mV). Smoothing the voltage over 1 ms before taking the peak changes the means by at most 0.05 mV.
tables1-rheobase¶
The experimental superficial and deep PCs have the same rheobase, +150 pA, at the 50 pA resolution of the step protocol.
Per cell, the smallest step with at least one spike (steps are relative to the holding current, so the tonic current is excluded, as the Table S1 footnote says). Readings for the group: (a) median of per-cell rheobases, (b) mean rounded to the nearest 50 pA step.
rb_rows = []
for c, d in cells.items():
if d["group"] == "PVBC":
continue
n, _, _ = hc10.firing(d, d["on"], d["off"])
k0 = int(np.argmax(n > 0))
row = {"cell": c, "group": d["group"], "rheobase_pA": int(d["steps"][k0]), "spikes_at_rheobase": int(n[k0]),
"peak_mV_at_rheobase": round(float(d["v"][d["on"]:d["off"], k0].max()), 1)}
# Variants: spike thresholds of -20 and +10 mV within the step, and the definition of the CellData tool
# the data descriptor names (SimTracker tools/CellData.m: "Least depolarized step with spikes", spikes as
# upward crossings of -20 mV anywhere in the sweep, positive steps only).
seg = d["v"][d["on"]:d["off"]]
for thr in [-20.0, 10.0]:
k = ((seg[1:] >= thr) & (seg[:-1] < thr)).sum(axis=0)
row[f"rb_{thr:+.0f}mV"] = int(d["steps"][np.argmax(k > 0)])
k = ((d["v"][1:] > -20) & (d["v"][:-1] < -20)).sum(axis=0)
pos = d["steps"] > 0
row["rb_CellData"] = int(d["steps"][pos][np.argmax(k[pos] > 0)])
rb_rows.append(row)
rbd = pd.DataFrame(rb_rows)
print(rbd.to_string(index=False))
print()
for col in ["rheobase_pA", "rb_-20mV", "rb_+10mV", "rb_CellData"]:
for g in ["sPC", "dPC"]:
x = rbd[rbd.group == g][col].values
print(f"{col:12s} {g}: per-cell rheobases {sorted(int(v) for v in x)}; (a) median {np.median(x):.0f} pA; "
f"(b) mean {x.mean():.1f} pA, rounded to 50 pA: {50 * np.round(x.mean() / 50):.0f} pA")
print("cells whose rheobase changes under a variant:",
[c for c, r in rbd.set_index("cell").iterrows() if len({r.rheobase_pA, r["rb_-20mV"], r["rb_+10mV"], r.rb_CellData}) > 1])
s, dd = rbd[rbd.group == "sPC"].rheobase_pA.values, rbd[rbd.group == "dPC"].rheobase_pA.values
print(f"groups compared (paper's rule): {paper_rule(s, dd)[0]} p = {paper_rule(s, dd)[1]:.3f}")
cell group rheobase_pA spikes_at_rheobase peak_mV_at_rheobase rb_-20mV rb_+10mV rb_CellData
D1_25abf dPC 100 5 37.0 100 100 100
D1_45abf dPC 200 10 43.1 200 200 200
D2_06abf dPC 250 4 51.1 250 250 250
D2_49abf dPC 300 9 53.7 300 300 300
D3_55abf dPC 200 9 49.0 200 200 200
D4_11abf dPC 100 3 41.9 100 100 100
D5_15abf dPC 150 1 46.1 150 150 150
D6_19abf dPC 150 1 42.0 150 150 150
D7 dPC 150 6 33.8 150 150 150
S1_04abf sPC 150 3 51.1 150 150 150
S1_47abf sPC 100 7 26.9 100 100 100
S2_08abf sPC 200 4 34.2 200 200 200
S2_31abf sPC 200 7 39.2 200 200 200
S2_51abf sPC 250 7 45.7 250 250 250
S3_13abf sPC 200 3 37.6 200 200 200
S4 sPC 200 10 40.0 200 200 200
S5_21abf sPC 200 4 41.7 200 200 200
rheobase_pA sPC: per-cell rheobases [100, 150, 200, 200, 200, 200, 200, 250]; (a) median 200 pA; (b) mean 187.5 pA, rounded to 50 pA: 200 pA
rheobase_pA dPC: per-cell rheobases [100, 100, 150, 150, 150, 200, 200, 250, 300]; (a) median 150 pA; (b) mean 177.8 pA, rounded to 50 pA: 200 pA
rb_-20mV sPC: per-cell rheobases [100, 150, 200, 200, 200, 200, 200, 250]; (a) median 200 pA; (b) mean 187.5 pA, rounded to 50 pA: 200 pA
rb_-20mV dPC: per-cell rheobases [100, 100, 150, 150, 150, 200, 200, 250, 300]; (a) median 150 pA; (b) mean 177.8 pA, rounded to 50 pA: 200 pA
rb_+10mV sPC: per-cell rheobases [100, 150, 200, 200, 200, 200, 200, 250]; (a) median 200 pA; (b) mean 187.5 pA, rounded to 50 pA: 200 pA
rb_+10mV dPC: per-cell rheobases [100, 100, 150, 150, 150, 200, 200, 250, 300]; (a) median 150 pA; (b) mean 177.8 pA, rounded to 50 pA: 200 pA
rb_CellData sPC: per-cell rheobases [100, 150, 200, 200, 200, 200, 200, 250]; (a) median 200 pA; (b) mean 187.5 pA, rounded to 50 pA: 200 pA
rb_CellData dPC: per-cell rheobases [100, 100, 150, 150, 150, 200, 200, 250, 300]; (a) median 150 pA; (b) mean 177.8 pA, rounded to 50 pA: 200 pA
cells whose rheobase changes under a variant: []
groups compared (paper's rule): t p = 0.732
Result: partially reproduced. Reading (a) gives dPC 150 pA, as Table S1, but sPC 200 pA; reading (b) gives the same step for both groups, 200 pA (means 187.5 and 177.8 pA), not 150. By the criterion this is partial: the groups share a step under (b), but it is not +150 pA. No cell's rheobase changes with a spike threshold of -20 or +10 mV, or under the definition of SimTracker's CellData tool, which the data descriptor names (the least positive step with a crossing of -20 mV anywhere in the sweep). The single spikes that set the rheobase of D5_15abf and D6_19abf peak at 46.1 and 42.0 mV. The per-cell rheobases do not differ between groups (t test p = 0.732).
figs3f-pvbc-firing¶
A biological PV+ basket cell does not fire up to +300 pA, fires at about 2 Hz at +350 pA, and its firing rises steeply above that, to about 17 Hz at +400, 36 Hz at +450 and 52 Hz at +500 pA, matched by the PVBC model.
Firing per step as in figs1e-if-curves (readings a and b of the rate). Readings for the cell: (a) any one PVBC, (b) the mean over PVBCs on the steps every cell has. The 1 s step of 50 pA increments is the claim's stated assumption; the data show a 1 s step and the descriptor gives 50 pA increments for all six PVBCs.
pv_rows = []
for c, d in cells.items():
if d["group"] != "PVBC":
continue
n, ra, rb = hc10.firing(d, d["on"], d["off"])
for s, k, a, b in zip(d["steps"], n, ra, rb):
if s >= 0:
pv_rows.append({"cell": c, "step": int(s), "spikes": int(k), "rate_a": a, "rate_b": b})
pv = pd.DataFrame(pv_rows)
print("Reading (a) of the rate, Hz, per cell and step (blank: step not recorded):")
print(pv.pivot_table(index="cell", columns="step", values="rate_a").round(1).to_string(na_rep=""))
print()
print("Reading (b) of the rate, Hz:")
print(pv.pivot_table(index="cell", columns="step", values="rate_b").round(1).to_string(na_rep=""))
targets = {350: (2, 1), 400: (17, 1.7), 450: (36, 3.6), 500: (52, 5.2)}
print()
for c in hc10.PVBCS:
p = pv[pv.cell == c].set_index("step")
silent = bool((p.loc[0:300, "spikes"] == 0).all())
for col in ["rate_a", "rate_b"]:
vals = {s: (p.loc[s, col] if s in p.index else np.nan) for s in targets}
within = all(s in p.index and abs(vals[s] - v) <= tol for s, (v, tol) in targets.items())
print(f"{c} {col}: silent 0..+300 pA: {silent}; at 350/400/450/500: "
+ ", ".join("--" if np.isnan(x) else f"{x:.1f}" for x in vals.values())
+ f"; all four within tolerance: {within}")
common = pv.groupby("step").cell.nunique()
common = common[common == len(hc10.PVBCS)].index
print()
print(f"reading (b): steps every PVBC has: 0 to {common.max()} pA; mean rate_a there:",
pv[pv.step.isin(common)].groupby("step").rate_a.mean().round(2).to_dict())
print("mean over the PVBCs that have each step (variant):",
pv.groupby("step").agg(n=("cell", "nunique"), rate_a=("rate_a", "mean")).loc[[350, 400, 450, 500]].round(1).to_dict("index"))
Reading (a) of the rate, Hz, per cell and step (blank: step not recorded): step 0 50 100 150 200 250 300 350 400 450 500 550 600 650 700 750 800 cell PV34 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.0 17.0 36.0 52.0 PV36 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 6.0 12.0 32.0 44.0 64.0 75.0 PV37 0.0 0.0 0.0 0.0 0.0 0.0 13.0 28.0 42.0 57.0 71.0 PV38 0.0 0.0 0.0 2.0 21.0 40.0 59.0 PV72 0.0 0.0 0.0 0.0 0.0 3.0 12.0 28.0 41.0 PV80 0.0 0.0 0.0 0.0 0.0 2.0 13.0 29.0 51.0 72.0 Reading (b) of the rate, Hz: step 0 50 100 150 200 250 300 350 400 450 500 550 600 650 700 750 800 cell PV34 0.0 0.0 0.0 0.0 0.0 0.0 0.0 14.9 17.3 35.6 52.5 PV36 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 18.6 44.5 48.4 55.0 64.6 75.6 PV37 0.0 0.0 0.0 0.0 0.0 0.0 13.6 28.1 42.5 57.6 71.0 PV38 0.0 0.0 0.0 6.0 21.0 40.4 59.0 PV72 0.0 0.0 0.0 0.0 0.0 6.5 12.1 28.2 41.9 PV80 0.0 0.0 0.0 0.0 0.0 12.2 13.3 31.3 51.6 73.0
PV34 rate_a: silent 0..+300 pA: True; at 350/400/450/500: 2.0, 17.0, 36.0, 52.0; all four within tolerance: True
PV34 rate_b: silent 0..+300 pA: True; at 350/400/450/500: 14.9, 17.3, 35.6, 52.5; all four within tolerance: False
PV36 rate_a: silent 0..+300 pA: True; at 350/400/450/500: 0.0, 0.0, 0.0, 1.0; all four within tolerance: False
PV36 rate_b: silent 0..+300 pA: True; at 350/400/450/500: 0.0, 0.0, 0.0, 0.0; all four within tolerance: False
PV37 rate_a: silent 0..+300 pA: False; at 350/400/450/500: 28.0, 42.0, 57.0, 71.0; all four within tolerance: False
PV37 rate_b: silent 0..+300 pA: False; at 350/400/450/500: 28.1, 42.5, 57.6, 71.0; all four within tolerance: False
PV38 rate_a: silent 0..+300 pA: False; at 350/400/450/500: --, --, --, --; all four within tolerance: False
PV38 rate_b: silent 0..+300 pA: False; at 350/400/450/500: --, --, --, --; all four within tolerance: False
PV72 rate_a: silent 0..+300 pA: False; at 350/400/450/500: 28.0, 41.0, --, --; all four within tolerance: False
PV72 rate_b: silent 0..+300 pA: False; at 350/400/450/500: 28.2, 41.9, --, --; all four within tolerance: False
PV80 rate_a: silent 0..+300 pA: False; at 350/400/450/500: 29.0, 51.0, 72.0, --; all four within tolerance: False
PV80 rate_b: silent 0..+300 pA: False; at 350/400/450/500: 31.3, 51.6, 73.0, --; all four within tolerance: False
reading (b): steps every PVBC has: 0 to 300 pA; mean rate_a there: {0: 0.0, 50: 0.0, 100: 0.0, 150: 0.33, 200: 3.5, 250: 7.5, 300: 16.17}
mean over the PVBCs that have each step (variant): {350: {'n': 5, 'rate_a': 17.4}, 400: {'n': 5, 'rate_a': 30.2}, 450: {'n': 4, 'rate_a': 41.2}, 500: {'n': 3, 'rate_a': 41.3}}
Result: reproduced. Under reading (a) of the cell and of the rate (spikes per second), PVBC PV34 is silent from 0 to +300 pA and fires at 2, 17, 36 and 52 Hz at +350, +400, +450 and +500 pA, the four expected values. With the rate's reading (b) PV34 gives 14.9 Hz at +350 pA (two spikes), outside tolerance. No other PVBC matches; PV37, PV38, PV72 and PV80 fire at or below +300 pA, and PV36 starts at +500 pA. The mean of reading (b) of the cell cannot be formed above +300 pA, since PV38 was recorded only to +300 pA (mean 16.17 Hz at +300 pA). The paper does not say which cell Figure S3F shows, so taking the best match of six cells is permissive; PV34 is the only one that matches, at all four steps and in its silence up to +300 pA. The model's half of the statement is not tested.
Claims not tested¶
The other 28 claims rest on data the data set does not hold: paired recordings (Figures 1, 3, 5, 6), anatomy and bouton counts (Figures 1J to 1L, 2G to 2I, 5, S1A to S1D, S4, S5), optogenetics (Figure 1N), in vivo two-photon imaging (Figure 2B to 2F, S2), PVBC trains against PC firing (Figure 4A, 4B), retrograde labelling (Figure 6), and the network model's simulations (Figure 4C to 4F). The two model claims could use the model's public code (ModelDB 153280), but the 39 simulations they need (13 conditions in three networks, 5,000 ms each) are far too large to run here. The next cell times a 20 ms run of one network on one core to estimate their cost. The zip's other files are axo-axonic, bistratified, CCK+ basket, ivy, neurogliaform and Schaffer collateral-associated cells from other papers or unpublished.
# Cost of the model claims: build one network of the paper's model (ModelDB 153280, GitHub mirror at a fixed
# commit, default parameters) and simulate 20 ms on one core.
import io
import re
import subprocess
import sys
import tarfile
import tempfile
from pathlib import Path
import requests
MODEL_COMMIT = "5314d078ac4df2954ae594fb704e739e86802262"
bindir = Path(sys.executable).parent
work = Path(tempfile.mkdtemp())
r = requests.get(f"https://codeload.github.com/ModelDBRepository/153280/tar.gz/{MODEL_COMMIT}", timeout=300)
r.raise_for_status()
tarfile.open(fileobj=io.BytesIO(r.content)).extractall(work, filter="data")
src = next(work.iterdir())
subprocess.run([str(bindir / "nrnivmodl")], cwd=src, check=True, capture_output=True)
(src / "results" / "T").mkdir(parents=True)
t0 = time.time()
run = subprocess.run([str(bindir / "nrniv"), "-nobanner", "-nogui", "-c", "strdef RunName", "-c", 'RunName="T"',
"-c", "SimDuration=20", "-c", "StepBy=10", "superdeep.hoc"],
cwd=src, capture_output=True, text=True, check=True)
wall = time.time() - t0
summary = run.stdout[run.stdout.index("TIME SUMMARY"):run.stdout.index("ALLOTTED")]
print(summary)
build = float(re.search(r"created cells in ([\d.]+)", summary).group(1))
per_ms = float(re.search(r"ran simulation in ([\d.]+)", summary).group(1)) / 20
one = build + 5000 * per_ms
print(f"wall time of the 20 ms run: {wall:.0f} s; {per_ms:.2f} s per simulated ms after building the cells")
print(f"one 5,000 ms run: about {one / 3600:.1f} h on one core; 39 runs: about {39 * one / 3600:.0f} core-hours")
print(subprocess.run([str(bindir / "nrniv"), "--version"], capture_output=True, text=True).stdout.strip())
cores = {re.search(r"mpiexec -np (\d+)", f.read_text()).group(1) for f in (src / "jobscripts").glob("*.sh")}
print(f"{len(list((src / 'jobscripts').glob('*.sh')))} job scripts in the model's jobscripts/, cores per run (mpiexec -np):", sorted(cores))
TIME SUMMARY for host 0 set up in 0.318866 seconds created cells in 470.885 seconds connected cells in 0.973178 seconds ran simulation in 224.867 seconds wrote results in 0.842134 seconds TOTAL TIME = 715.239 seconds wall time of the 20 ms run: 716 s; 11.24 s per simulated ms after building the cells one 5,000 ms run: about 15.7 h on one core; 39 runs: about 614 core-hours NEURON -- VERSION 9.0.2 HEAD (ba57833) 2026-08-10 75 job scripts in the model's jobscripts/, cores per run (mpiexec -np): ['64']
Result: blocked (too large). Building one network took 8 to 9 minutes and each simulated
millisecond about 8 s on one core, so one 5,000 ms run would take 11 to 12 hours and the 39 runs
the two claims need about 450 core-hours, far over the notebook's 60 minute limit. The
model compiles and runs with NEURON 9.0.2, and its 75 job scripts each run a simulation on 64
cores (mpiexec -np 64).
other = sorted({n.split("/")[-1] for n in names} - {hc10.member_name(names, c).split("/")[-1] for c in cells}
- {"PV34_PVBC_mouse.atf"})
print(f"{len(other)} files not used:", other)
print(f"notebook run time: {(time.time() - t_start) / 60:.1f} min")
13 files not used: ['Axoaxocell_CA203LF57.atf', 'Axoaxocell_CA204LF59.atf', 'Bistratifiedcell_PV16IM.atf', 'Bistratifiedcell_PV74.atf', 'CA204RF59_axoaxonic_cell_mouse.atf', 'PV27IM_bistratified_cell_mouse.atf', 'ivy_10422005.atf', 'ivy_10428004.atf', 'ngf_09o21004.atf', 'ngf_09o27007.atf', 'sh108_BC.atf', 'sh114_SCA.atf', 'sh153_SCA.atf'] notebook run time: 12.3 min
Summary¶
| Claim | Outcome |
|---|---|
| figs1e-if-curves | reproduced |
| figs1f-input-resistance | reproduced |
| figs1g-resting-potential | blocked: data missing (sweeps at the holding potential) |
| figs1h-sag | reproduced |
| tables1-rheobase | partially reproduced |
| figs3f-pvbc-firing | reproduced |
| 26 claims on paired recordings, anatomy, imaging and optogenetics | blocked: data missing |
| 2 claims on the network model | blocked: too large (about 450 core-hours, from a 20 ms run timed here) |
A failure to reproduce here may be a failure of this attempt, not of the paper: see the reasoning and the differences from the paper's method.
Differences from the paper's method: the step amplitudes come from the descriptor, since the files record no current; firing frequency, input resistance, sag and rheobase use the readings the claims file lists, and spikes are counted at 0 mV (the rheobase is the same at -20 and +10 mV and under the CellData tool's definition); the paper's ANOVA for Figure S1E is run with and without the interaction and as a mixed ANOVA.
What was found about the data set: PV34 is deposited twice under two names; the files record no injected current, no holding current, and no animal, slice, region or soma position for any cell; the PC sweeps start at the -70 mV holding potential, so the resting potential of Figure S1G and Table S1 is not in them; the step timing and the sweep order agree with the descriptor.