Liu et al. (2026): the claims whose data are elsewhere¶
Paper: doi:10.1038/s41556-026-02009-4. The registry's dataset is DANDI:001752, version 0.260825.0222
(reproduce_liu_2026.ipynb); this notebook tests claims that the claims file marks data: elsewhere,
on the data its where names, and only those cheap enough for this run. They are counted apart from the
dataset's claims.
Sources, all pinned:
- the paper's code and per-cell tables, github.com/RFLiu2021/AIC_proj at commit
44cd8a6dfbb1f1ce363d73742e4f3652086b0f9d (
aic_tables.CODE_COMMIT); - DANDI:001750 (somatic Na+ currents in outside-out patches), version 0.260825.0222, its only published version, streamed;
- DANDI:001746 (Patch-seq electrophysiology), version 0.260825.0222, its only published version, each file read into memory in one request;
- DANDI:001751 (multi-patch), version 0.260825.0222, metadata only;
- MetaboLights MTBLS13927, the metabolite assignment file of metadata revision MTBLS13927_01.
| claim | source | here |
|---|---|---|
| ven-map-et-ct | mappingResults_neurons.csv (and results_Ext_240415.csv) | tested |
| patchseq-mapping | the same two tables | tested |
| fig3e-phase-peak-index | PeakIdx_Fig5e.xlsx | tested |
| fig4j-eepsp-amplitude | sumData_StimWM.xlsx | tested |
| fig5-connectivity-total, fig5-connectivity-by-type | DANDI:001751 metadata, and metadata_multiPatch.xlsx, the code's annotation of it | tested (by-type blocked by its criterion) |
| fig4d-sodium-current | DANDI:001750 | tested |
| fig8a-metabolite-gradient, fig8de-glycolytic-bias | MetaboLights MTBLS13927 (revision MTBLS13927_01), checked against the code's Metabolic_data.xlsx | tested |
| fig4ac-ap-width-amplitude | DANDI:001746, the VENs and L5 PCs it holds | tested on the deposited cells, which may not be the paper's |
| fig6-ven-subtype-morphology | morphFeatTables_PC_VENL_VENS.xlsx, with the key from the code's Fig. 6d script | axon part tested |
| fig6f-g-ven-subtype-mapping | metaInfo_ephysio_patchSeq.csv (subtype and cluster per VEN) | counts tested |
| fig2d-f-l23-it-tau-width, ven-subtypes-similar-physiology | DANDI:001746 (Patch-seq electrophysiology), with the code's cell table | tested |
| the other elsewhere claims | blocked; see the attempt record |
import numpy as np
import pandas as pd
from scipy import stats
import statsmodels.formula.api as smf
import statsmodels.api as sm
import matplotlib.pyplot as plt
import aic_tables as T
pd.set_option("display.width", 250)
pd.set_option("display.max_rows", 200)
print("code commit:", T.CODE_COMMIT, "; sodium dandiset:", T.SODIUM_DANDISET, T.SODIUM_VERSION)
code commit: 44cd8a6dfbb1f1ce363d73742e4f3652086b0f9d ; sodium dandiset: 001750 0.260825.0222
# What each table holds.
mapping = T.csv("patchSeqMappingTo10X/data/mappingRes/mappingResults_neurons.csv").rename(columns={"Unnamed: 0": "cell"})
mapping_ext = T.csv("patchSeqMappingTo10X/data/mappingRes/results_Ext_240415.csv").rename(columns={"Unnamed: 0": "cell"})
peak = T.excel("ephysio/data_ephy/PeakIdx_Fig5e.xlsx", "Sheet1")
stim = T.excel("ephysio/data_ephy/sumData_StimWM.xlsx", "re-orgnized_data")
multi = T.excel("ephysio/data_ephy/rawdata_ephysio/metadata_multiPatch.xlsx", "metadata_multiPatch", header=0)
na_meta = T.csv("ephysio/data_ephy/rawdata_ephysio/metadata_outSideOutSodiumCurrentRec.csv")
for name, df in [("mappingResults_neurons", mapping), ("results_Ext_240415", mapping_ext), ("PeakIdx_Fig5e", peak),
("sumData_StimWM", stim), ("metadata_multiPatch", multi), ("metadata_outSideOutSodiumCurrentRec", na_meta)]:
print(f"{name}: {df.shape[0]} rows x {df.shape[1]} columns; columns: {list(df.columns) if df.columns.dtype == object else list(df.iloc[0])}")
print("\npatchCellTypeIDs x patchCellSubtypeNames (mappingResults_neurons):")
print(pd.crosstab(mapping.patchCellSubtypeNames.fillna("(none)"), mapping.patchCellTypeIDs).to_string())
ais = T.excel("morpho/dataMorph/AIScmp_PCvsVEN_Fig5c.xlsx", "Sheet1")
print("\nAIScmp_PCvsVEN_Fig5c.xlsx (fig3c, blocked):", ais.shape, "; non-missing values per column:", ais.notna().sum().to_dict())
print(ais.iloc[:8].to_string())
mappingResults_neurons: 307 rows x 7 columns; columns: ['s173', np.int64(2), np.int64(4), 'VEN_Long', np.float64(0.8957), np.int64(16), np.float64(0.53)]
results_Ext_240415: 273 rows x 7 columns; columns: ['s173', np.int64(2), np.int64(5), 'VEN_Long', np.float64(0.8957), np.int64(16), np.float64(0.54)]
PeakIdx_Fig5e: 131 rows x 17 columns; columns: ['L23IT_HAPCAL1', 'Peak_Index', np.float64(nan), 'ITrorb', 'Peak_Index', np.float64(nan), 'L5IT', 'Peak_Index', np.float64(nan), 'VEN', 'Peak_Index', np.float64(nan), 'L5ET', 'Peak_Index', np.float64(nan), 'L6PC', 'Peak_Index']
sumData_StimWM: 106 rows x 16 columns; columns: ['copied data', 'stim current (mA)', 'EPSP_amp_PC', 'EPSP_amp_VEN', np.float64(nan), 're-orgnized data', 'stim current (mA)', 'EPSP_amp_PC', 'EPSP_amp_VEN', 'cellType', np.float64(nan), np.float64(nan), 'stim current (mA)', 'EPSP_amp_PC', 'EPSP_amp_VEN', 'cellType']
metadata_multiPatch: 1417 rows x 12 columns; columns: ['Mfa190314', '190314s1', np.float64(0.0), '190314s1c2', 'sub-Mfa190314_ses-190314s1_obj-dktfoi_icephys.nwb', np.float64(2.0), np.float64(3.0), 'PC', 'PC', nan, nan, nan]
metadata_outSideOutSodiumCurrentRec: 35 rows x 6 columns; columns: ['Mfa221206', '20221206AS1c1', 'sub-Mfa-221206_ses-sess-221206AS_obj-o5c1ca_icephys.nwb', 'VEN', np.int64(2), np.float64(-13.8366)]
patchCellTypeIDs x patchCellSubtypeNames (mappingResults_neurons):
patchCellTypeIDs -1 0 1 2
patchCellSubtypeNames
(none) 49 0 0 0
INTER_L23 0 6 0 0
INTER_L5 0 12 0 0
L1_INTER 0 1 0 0
L23_INTER 0 13 0 0
L23_IT 0 0 1 0
L23_PC 0 0 13 0
L6_INTER 0 1 0 0
PC_L23 0 0 16 0
PC_L5 0 0 150 0
PC_L6 0 0 15 0
VEN 0 0 0 3
VEN_Long 0 0 0 27
AIScmp_PCvsVEN_Fig5c.xlsx (fig3c, blocked): (506, 6) ; non-missing values per column: {0: 1, 1: 501, 2: 121, 3: 0, 4: 502, 5: 121}
0 1 2 3 4 5
0 NaN NaN NaN NaN NaN NaN
1 Right top NaN NaN NaN Right bottom NaN
2 NaN NaN NaN NaN NaN NaN
3 NaN NaN NaN NaN NaN NaN
4 NaN PC_AIS_L (um) VEN_AIS_L (um) NaN PC_AIS_D (um) VEN_AIS_D (um)
5 NaN NaN NaN NaN NaN NaN
6 NaN 23.1566 7.9532 NaN 4.3444 1.0719
7 NaN 29.6454 18.3688 NaN 2.2102 18.4583
ven-map-et-ct¶
The 29 morphologically identified VENs do not map to one molecular cluster; 14 map to L5 ET and 15 to L5/6 CT.
VENs are the cells whose subtype name contains "VEN". The cluster numbers of L5 ET (16) and L5/6 CT (8) are
the code's (morpho/Fig3f_plotCellTypesAIS_Cmp.m, cluster_VEN_L5ET = {16}, cluster_VEN_L56CT = {8}).
The claim names mappingResults_neurons.csv; the excitatory table results_Ext_240415.csv in the same folder
gives other subtype names and numbers, and is shown too.
for name, df in [("mappingResults_neurons.csv", mapping), ("results_Ext_240415.csv", mapping_ext)]:
v = df[df.patchCellSubtypeNames.fillna("").str.contains("VEN", case=False)]
print(f"{name}: {len(v)} VENs; subtype x cluster:")
print(pd.crosstab(v.patchCellSubtypeNames, v.predictClustersIDs).to_string())
print(f" L5 ET (cluster {T.CLUSTER_L5_ET}): {(v.predictClustersIDs == T.CLUSTER_L5_ET).sum()}; "
f"L5/6 CT (cluster {T.CLUSTER_L56_CT}): {(v.predictClustersIDs == T.CLUSTER_L56_CT).sum()}; "
f"other clusters: {(~v.predictClustersIDs.isin([T.CLUSTER_L5_ET, T.CLUSTER_L56_CT])).sum()}\n")
mappingResults_neurons.csv: 30 VENs; subtype x cluster: predictClustersIDs 8 14 16 patchCellSubtypeNames VEN 1 0 2 VEN_Long 13 1 13 L5 ET (cluster 16): 15; L5/6 CT (cluster 8): 14; other clusters: 1 results_Ext_240415.csv: 29 VENs; subtype x cluster: predictClustersIDs 8 16 patchCellSubtypeNames VEN_Long 0 14 VEN_Short 14 0 VEN_short 1 0 L5 ET (cluster 16): 14; L5/6 CT (cluster 8): 15; other clusters: 0
Result: reproduced. In mappingResults_neurons.csv, the file the claim names, 30 cells are VENs; 15 map to L5 ET (cluster 16), 14 to L5/6 CT (cluster 8) and 1 to cluster 14, so the VENs do not map to one cluster and both counts are within their tolerances (14 +- 1.4, 15 +- 1.5). In results_Ext_240415.csv the 29 VENs split exactly as the paper says, 14 VEN-Long in cluster 16 and 15 VEN-Short in cluster 8. These are the code's mapping results, not a new mapping of the Patch-seq reads.
patchseq-mapping¶
Of 307 Patch-seq neurons with transcriptomes, 273 excitatory neurons map to 18 of the 20 excitatory types and 34 inhibitory neurons to 17 of the 33 inhibitory types.
Counts from the code's mapping tables. Excitatory neurons are the 273 rows of results_Ext_240415.csv (the
excitatory mapping) and inhibitory neurons the rows of mappingResults_neurons.csv not in it; the cells the
code labels as interneurons (patchCellTypeIDs 0) are a second reading.
print("mappingResults_neurons.csv rows:", len(mapping), "; results_Ext_240415.csv rows:", len(mapping_ext))
ext_types = mapping_ext.predictClustersIDs.nunique()
print("excitatory: neurons", len(mapping_ext), "; distinct clusters", ext_types,
"; cluster numbers", sorted(mapping_ext.predictClustersIDs.unique()))
inh_a = mapping[~mapping.cell.isin(mapping_ext.cell)]
inh_b = mapping[mapping.patchCellTypeIDs == 0]
for label, inh in [("rows not in the excitatory table", inh_a), ("patchCellTypeIDs 0 (interneurons)", inh_b)]:
print(f"inhibitory, {label}: neurons {len(inh)}; distinct clusters {inh.predictClustersIDs.nunique()}; "
f"cluster numbers {sorted(inh.predictClustersIDs.unique())}")
print("excitatory-table cells not in mappingResults_neurons.csv:", sorted(set(mapping_ext.cell) - set(mapping.cell)))
mappingResults_neurons.csv rows: 307 ; results_Ext_240415.csv rows: 273 excitatory: neurons 273 ; distinct clusters 17 ; cluster numbers [np.int64(0), np.int64(1), np.int64(2), np.int64(3), np.int64(4), np.int64(5), np.int64(6), np.int64(8), np.int64(9), np.int64(11), np.int64(13), np.int64(14), np.int64(15), np.int64(16), np.int64(17), np.int64(18), np.int64(19)] inhibitory, rows not in the excitatory table: neurons 35; distinct clusters 19; cluster numbers [np.int64(2), np.int64(4), np.int64(5), np.int64(8), np.int64(10), np.int64(11), np.int64(13), np.int64(14), np.int64(16), np.int64(18), np.int64(19), np.int64(21), np.int64(24), np.int64(26), np.int64(27), np.int64(29), np.int64(30), np.int64(31), np.int64(32)] inhibitory, patchCellTypeIDs 0 (interneurons): neurons 33; distinct clusters 17; cluster numbers [np.int64(2), np.int64(4), np.int64(5), np.int64(10), np.int64(11), np.int64(13), np.int64(14), np.int64(16), np.int64(19), np.int64(21), np.int64(24), np.int64(26), np.int64(27), np.int64(29), np.int64(30), np.int64(31), np.int64(32)] excitatory-table cells not in mappingResults_neurons.csv: ['s657_1']
Result: reproduced (resting on an assumption). Excitatory: 273 neurons (results_Ext_240415.csv) in
17 distinct clusters, within the tolerances of 273 and 18 (+- 1.8). Inhibitory, taking the cells the code
labels as interneurons (patchCellTypeIDs 0, the assumption): 33 neurons in 17 distinct clusters, within
the tolerances of 34 (+- 3.4) and 17 (+- 1.7). The other reading, every row outside the excitatory table,
gives 35 neurons in 19 clusters, outside the tolerance of 17 types. The tables do not say which numbering
the inhibitory cluster numbers follow, so the type counts rest on reading them as inhibitory types.
fig3e-phase-peak-index¶
VENs have lower AP phase-plane peak indices than every PC type.
Values as the code reads them (ephysio/Fig3e_plotBoxplot_PeakIdx_cellTypes.m: rows 1 to 30, 22, 122, 29,
17 and 13 of the six columns). Kruskal-Wallis, then Dunn's test with Bonferroni correction (Fig. 3e legend;
the sheet's "statistics" names "Dunn's Test Results (Bonferroni-corrected p-values)").
n_code = {"L23IT_HAPCAL1": 30, "ITrorb": 22, "L5IT": 122, "VEN": 29, "L5ET": 17, "L6PC": 13}
groups = {}
for c in range(0, peak.shape[1], 3):
name = peak.iat[0, c]
vals = pd.to_numeric(peak.iloc[1:, c + 1], errors="coerce").to_numpy()
groups[name] = vals[: n_code[name]]
print(f"{name}: code n {n_code[name]}, non-missing in the code's rows {np.isfinite(groups[name]).sum()}, "
f"values in the column {np.isfinite(vals).sum()}; median {np.nanmedian(groups[name]):.3f}, "
f"range {np.nanmin(groups[name]):.3f} to {np.nanmax(groups[name]):.3f}")
groups = {k: v[np.isfinite(v)] for k, v in groups.items()}
kw = stats.kruskal(*groups.values())
print(f"\nKruskal-Wallis H = {kw.statistic:.2f}, p = {kw.pvalue:.3g}")
dunn = T.dunn_bonferroni(groups)
print(dunn[(dunn.a == "VEN") | (dunn.b == "VEN")].round(5).to_string())
L23IT_HAPCAL1: code n 30, non-missing in the code's rows 30, values in the column 33; median 0.223, range -0.010 to 0.441
ITrorb: code n 22, non-missing in the code's rows 21, values in the column 24; median 0.277, range 0.131 to 0.424
L5IT: code n 122, non-missing in the code's rows 121, values in the column 124; median 0.250, range -0.093 to 0.451
VEN: code n 29, non-missing in the code's rows 29, values in the column 32; median 0.117, range -0.268 to 0.251
L5ET: code n 17, non-missing in the code's rows 17, values in the column 20; median 0.289, range -0.056 to 0.433
L6PC: code n 13, non-missing in the code's rows 13, values in the column 16; median 0.338, range -0.281 to 0.428
Kruskal-Wallis H = 42.39, p = 4.92e-08
a b z p p_bonferroni
2 L23IT_HAPCAL1 VEN 3.98358 0.00007 0.00102
6 ITrorb VEN 4.84596 0.00000 0.00002
9 L5IT VEN 5.73074 0.00000 0.00000
12 VEN L5ET -4.57452 0.00000 0.00007
13 VEN L6PC -4.78428 0.00000 0.00003
Result: reproduced. The VEN median (0.117) is the lowest of the six groups (the others 0.223 to 0.338); Kruskal-Wallis H = 42.4, p = 4.9e-08; Dunn's test with Bonferroni correction separates VENs from every PC type (adjusted p 0.001 for L2/3 IT HPCAL1, 2e-05 for IT RORB, below 1e-05 for L5 IT, 7e-05 for L5 ET, 3e-05 for L6 PC). The values are the code's per-cell indices; the code's group sizes (30, 22, 122, 29, 17, 13) differ from the Fig. 2 legend's, and one IT RORB and one L5 IT row are empty.
fig4j-eepsp-amplitude¶
eEPSP amplitudes are higher in VENs than in adjacent PCs, with effects of cell type and stimulation level in an ANOVA.
The sheet "re-orgnized_data" (columns stim current, EPSP_amp_PC, EPSP_amp_VEN, rows 2 to 79: 26 pairs at three currents, the rows the code averages from; its rows 81 to 83 hold the code's means). Two-way ANOVA of amplitude on cell type and stimulation level (criterion); with their interaction and with pair as a blocking factor as variants. Amplitudes are in V in the sheet (the code multiplies by 1000 for mV).
block = stim.iloc[1:79, 6:9].apply(pd.to_numeric, errors="coerce")
block.columns = ["current_mA", "PC", "VEN"]
print("rows:", len(block), "; per current:", block.current_mA.value_counts().sort_index().to_dict(),
"; missing:", int(block.isna().sum().sum()))
block["pair"] = block.groupby("current_mA").cumcount()
long = block.melt(id_vars=["current_mA", "pair"], value_vars=["PC", "VEN"], var_name="cell", value_name="amp")
long["amp_mV"] = long.amp * 1000
print("means (mV) by current and cell type:")
print(long.pivot_table(index="current_mA", columns="cell", values="amp_mV", aggfunc="mean").round(2).to_string())
print("code's means (rows 81 to 83, x1000):", (stim.iloc[81:84, 7:9].astype(float) * 1000).round(2).values.tolist())
fit = smf.ols("amp_mV ~ C(cell) + C(current_mA)", data=long).fit()
print("\ntwo-way ANOVA, main effects:"); print(sm.stats.anova_lm(fit, typ=2).round(5).to_string())
fit2 = smf.ols("amp_mV ~ C(cell) * C(current_mA)", data=long).fit()
print("\nwith interaction:"); print(sm.stats.anova_lm(fit2, typ=2).round(5).to_string())
fit3 = smf.ols("amp_mV ~ C(cell) + C(current_mA) + C(pair)", data=long).fit()
print("\nwith pair as a block (variant):"); print(sm.stats.anova_lm(fit3, typ=2).loc[["C(cell)", "C(current_mA)"]].round(5).to_string())
d = block.VEN - block.PC
print(f"\nVEN minus PC per pair and current: median {1000*d.median():.2f} mV, VEN higher in {(d > 0).sum()} of {d.notna().sum()}")
rows: 78 ; per current: {0.5: 26, 1.0: 26, 2.0: 26} ; missing: 0
means (mV) by current and cell type:
cell PC VEN
current_mA
0.5 3.97 5.01
1.0 5.84 10.57
2.0 8.69 14.54
code's means (rows 81 to 83, x1000): [[3.97, 5.01], [5.84, 10.57], [8.69, 14.54]]
two-way ANOVA, main effects:
sum_sq df F PR(>F)
C(cell) 583.91335 1.0 8.86433 0.00339
C(current_mA) 1323.18649 2.0 10.04358 0.00008
Residual 10012.57866 152.0 NaN NaN
with interaction:
sum_sq df F PR(>F)
C(cell) 583.91335 1.0 8.89379 0.00334
C(current_mA) 1323.18649 2.0 10.07696 0.00008
C(cell):C(current_mA) 164.47189 2.0 1.25256 0.28874
Residual 9848.10677 150.0 NaN NaN
with pair as a block (variant):
sum_sq df F PR(>F)
C(cell) 583.91335 1.0 14.97708 0.00017
C(current_mA) 1323.18649 2.0 16.96953 0.00000
VEN minus PC per pair and current: median 2.23 mV, VEN higher in 60 of 78
Result: reproduced. VEN amplitudes are higher at each current (5.01 against 3.97, 10.57 against 5.84 and 14.54 against 8.69 mV, the code's own means), and in the two-way ANOVA the cell-type effect has p = 0.0034 (the paper's value) and the stimulation level p = 8e-05 (paper < 0.001). With the interaction (p = 0.29 for it) or with pair as a block, cell type stays significant (p = 0.0033, 0.00017). The values are the code's per-pair amplitudes, not a new measurement from raw recordings.
fig5-connectivity-total and fig5-connectivity-by-type¶
Of 1,292 potential connections among 377 layer 5b neurons, 31 monosynaptic connections were found. PCs connect to PCs in 24 of 503 pairs, VENs make no connections to VENs (0 of 110) or PCs (0 of 200), PCs connect to VENs in 1 of 200, PCs and INs connect in 2 and 4 of 65, and no VEN-IN connections occur.
The criterion of fig5-connectivity-by-type asks for the deposit's own connection annotations and cell types,
and blocks the claim as methods_underspecified if the deposit has none. The first cell reads the first file of
each session of DANDI:001751 (version 0.260825.0222, metadata only) for anything other than the traces. The paper's code holds an
annotation of the deposit, metadata_multiPatch.xlsx, one row per tested pair (presynaptic and postsynaptic
channel and cell type, and, for a connection, its type and quality), with the NWB file of each presynaptic
cell; its counts are shown, by subject and session. "GABA" is read as IN.
# What the deposit DANDI:001751 itself holds apart from the traces (metadata only), in the first file of each
# session (reading every file's names takes about 2.5 s a file; the files of a session were written alike).
import re
multi_assets = T.multi_assets()
first_of_session = {}
for a in sorted(multi_assets, key=lambda a: a["path"]):
first_of_session.setdefault(re.search(r"ses-([^_]+)", a["path"]).group(1), a)
mc = pd.DataFrame([T.multi_file_contents(a) for a in first_of_session.values()])
print("DANDI:001751", T.MULTI_VERSION, "files:", len(multi_assets), "; subjects:", len({a["path"].split("/")[0] for a in multi_assets}),
"; sessions:", len(first_of_session), "; files read:", len(mc))
print("files with a non-empty analysis, processing, intervals or scratch group:", int((mc.nonempty_groups.str.len() > 0).sum()),
"; with entries other than electrodes in general/intracellular_ephys:", int((mc.non_electrode_entries.str.len() > 0).sum()))
print("electrodes per file:", mc.n_electrodes.value_counts().to_dict(), "; series per file:", mc.n_series.min(), "to", mc.n_series.max())
print("example electrode:", mc.example_electrode.iloc[0])
print("session descriptions:", mc.session_description.value_counts().to_dict())
DANDI:001751 0.260825.0222 files: 301 ; subjects: 6 ; sessions: 56 ; files read: 56
files with a non-empty analysis, processing, intervals or scratch group: 0 ; with entries other than electrodes in general/intracellular_ephys: 0
electrodes per file: {8: 56} ; series per file: 16 to 240
example electrode: {'cell_id': '190314s1_Elec_001', 'description': 'Patch pipette channel 1', 'filtering': 'Low-pass 10kHz', 'location': 'Soma', 'resistance': '5 MOhm', 'seal': 'Giga-Ohm', 'slice': 'Coronal slice'}
session descriptions: {'simutaneous recording of up to 8 channels with multiple repetitions': 56}
pairs = multi.dropna(subset=["preSynCellType", "postSynCellType"]).copy()
pairs["file"] = pairs.filename.ffill()
pairs["pre_ch"] = pairs.preSynChannel.ffill()
pairs["subject"] = multi.Subject_id.ffill().loc[pairs.index]
pairs["session"] = multi["Session_ID/SliceID"].ffill().loc[pairs.index]
pairs["connected"] = pairs.ConnType.notna()
print("tested pairs (rows with both cell types):", len(pairs), "; connections:", int(pairs.connected.sum()),
"; presynaptic files:", pairs.file.nunique(), "; subjects:", multi.Subject_id.nunique())
print("connections by type and quality:", pairs[pairs.connected].groupby(["ConnType", "connQuality"]).size().to_dict())
print("rows naming a file:", int(multi.filename.notna().sum()), "; rows without a presynaptic channel after filling:",
int(pairs.pre_ch.isna().sum()))
dandi_files = {a["path"].split("/")[-1] for a in multi_assets}
print("files the table names that are in DANDI:001751:", int(pairs.file.drop_duplicates().isin(dandi_files).sum()), "of",
pairs.file.nunique(), "; dandiset files the table does not name:", len(dandi_files - set(pairs.file)))
# neurons: a neuron is a channel of a session (slice), as the table names them
neur = pd.concat([pairs[["session", "pre_ch"]].rename(columns={"pre_ch": "ch"}),
pairs[["session", "posySynChannel"]].rename(columns={"posySynChannel": "ch"})]).drop_duplicates()
print("distinct neurons (session and channel):", len(neur), "(paper 377)")
print("\nper subject: sessions, presynaptic files, neurons, tested pairs and connections:")
per = pairs.groupby("subject").agg(sessions=("session", "nunique"), files=("file", "nunique"),
pairs=("connected", "size"), connections=("connected", "sum"))
per["neurons"] = neur.assign(subject=neur.session.map(pairs.drop_duplicates("session").set_index("session").subject)).groupby("subject").size()
print(per.to_string())
print("\ntested pairs per session (largest 10):", pairs.groupby("session").size().sort_values(ascending=False).head(10).to_dict())
tested pairs (rows with both cell types): 1416 ; connections: 26 ; presynaptic files: 288 ; subjects: 6
connections by type and quality: {('Ext', 'Excellent'): 11, ('Ext', 'Good'): 2, ('Ext', 'OK'): 1, ('Inh', 'Excellent'): 5, ('Inh', 'Good'): 5, ('Inh', 'OK'): 2}
rows naming a file: 288 ; rows without a presynaptic channel after filling: 0
files the table names that are in DANDI:001751: 288 of 288 ; dandiset files the table does not name: 13
distinct neurons (session and channel): 298 (paper 377)
per subject: sessions, presynaptic files, neurons, tested pairs and connections:
sessions files pairs connections neurons
subject
Mfa190314 8 39 210 4 44
Mfa240911 8 37 182 8 41
Mfa241008 4 17 58 0 17
Mfa241014 17 99 522 9 100
Mfa241105 14 74 344 5 74
Mfa241218 4 22 100 0 22
tested pairs per session (largest 10): {'20241014venHS7': 56, '20241014venHS4': 56, '20241014venHS2': 56, '20240912venHS5': 42, '190315s2': 42, '190315s5': 42, '20241014venHS11': 42, '20241105venHS14': 42, '20241105venHS13': 42, '20241105venHS9': 42}
Result: partially reproduced. DANDI:001751 itself holds no connection annotation and no cell type: the first file of each of its 56 sessions has empty analysis, processing, intervals and scratch groups, no icephys tables, and electrodes described only by channel. The counts come from the code's annotation of the deposit, which names 288 of its 301 files: 1,416 tested pairs, within the tolerance of 1,292 (+- 129), and 26 connections (14 excitatory, 12 inhibitory), outside the tolerance of 31 (+- 3.1). Neurons, counted as the channels of a session, number 298 where the paper has 377. Per subject the tested pairs range from 58 to 522, and two subjects (Mfa241008, Mfa241218) have no connection.
pairs["pre"] = pairs.preSynCellType.replace({"GABA": "IN"})
pairs["post"] = pairs.postSynCellType.replace({"GABA": "IN"})
tab = pairs.groupby(["pre", "post"]).agg(tested=("connected", "size"), connected=("connected", "sum"))
tab["paper_tested"] = pd.Series({("PC", "PC"): 503, ("VEN", "VEN"): 110, ("VEN", "PC"): 200, ("PC", "VEN"): 200,
("PC", "IN"): 65, ("IN", "PC"): 65, ("VEN", "IN"): 55, ("IN", "VEN"): 55})
tab["paper_connected"] = pd.Series({("PC", "PC"): 24, ("VEN", "VEN"): 0, ("VEN", "PC"): 0, ("PC", "VEN"): 1,
("PC", "IN"): 2, ("IN", "PC"): 4, ("VEN", "IN"): 0, ("IN", "VEN"): 0})
print(tab.to_string())
print("\nconnections listed:")
print(pairs[pairs.connected][["file", "pre_ch", "posySynChannel", "pre", "post", "ConnType", "connQuality", "projection"]].to_string())
# Rows of the annotation that disagree with themselves: connections between two PCs typed inhibitory, and
# a projection label that names other channels than the row's.
conn = pairs[pairs.connected]
print("\nPC-to-PC connections typed Inh:", int(((conn.pre == "PC") & (conn.post == "PC") & (conn.ConnType == "Inh")).sum()),
"of", int(((conn.pre == "PC") & (conn.post == "PC")).sum()))
lab_ch = conn.projection.astype(str).str.split("→", expand=True).astype(float)
bad = conn[(lab_ch[0] != conn.pre_ch) | (lab_ch[1] != conn.posySynChannel)]
print("connections whose projection label disagrees with their channels:")
print(bad[["file", "pre_ch", "posySynChannel", "projection"]].to_string())
tested connected paper_tested paper_connected
pre post
IN IN 39 0 NaN NaN
PC 86 4 65.0 4.0
VEN 54 0 55.0 0.0
PC IN 84 2 65.0 2.0
PC 749 18 503.0 24.0
VEN 145 1 200.0 1.0
VEN IN 54 0 55.0 0.0
PC 146 1 200.0 0.0
VEN 59 0 110.0 0.0
connections listed:
file pre_ch posySynChannel pre post ConnType connQuality projection
51 sub-Mfa190314_ses-190315s2_obj-1e6g6jn_icephys.nwb 4.0 6.0 VEN PC Ext Excellent 4→6
82 sub-Mfa190314_ses-190315s3_obj-18qmqq1_icephys.nwb 6.0 3.0 PC PC Ext Excellent 6→3
93 sub-Mfa190314_ses-190315s4_obj-1hcjbol_icephys.nwb 2.0 8.0 PC PC Ext Excellent 2→8
125 sub-Mfa190314_ses-190315s5_obj-u9g7xs_icephys.nwb 2.0 7.0 PC VEN Ext Excellent 2→7
219 sub-Mfa240911_ses-20240911HS2_obj-1vw8u2v_icephys.nwb 1.0 7.0 PC PC Inh Good 1→7
220 sub-Mfa240911_ses-20240911HS2_obj-1vw8u2v_icephys.nwb 1.0 8.0 PC PC Inh Good 1→8
249 sub-Mfa240911_ses-20240911HS3_obj-19efx8r_icephys.nwb 1.0 7.0 IN PC Inh Good 1→7
250 sub-Mfa240911_ses-20240911HS3_obj-19efx8r_icephys.nwb 1.0 8.0 IN PC Inh OK 1→8
288 sub-Mfa240911_ses-20240911HS4_obj-4uram0_icephys.nwb 4.0 6.0 PC IN Inh OK 4→6
289 sub-Mfa240911_ses-20240911HS4_obj-4uram0_icephys.nwb 4.0 7.0 PC IN Ext Excellent 4→7
293 sub-Mfa240911_ses-20240911HS4_obj-pykjqu_icephys.nwb 6.0 4.0 IN PC Inh Good 6→4
368 sub-Mfa240911_ses-20240912HS5_obj-d4b8xx_icephys.nwb 4.0 1.0 PC PC Ext Excellent 4→3
755 sub-Mfa241014_ses-20241014HS9_obj-rp68xb_icephys.nwb 4.0 3.0 PC PC Ext OK 4→3
786 sub-Mfa241014_ses-20241014HS10_obj-1w77zuf_icephys.nwb 4.0 6.0 PC PC Ext Excellent 4→6
788 sub-Mfa241014_ses-20241014HS10_obj-1w77zuf_icephys.nwb 4.0 8.0 PC PC Inh Good 4→8
794 sub-Mfa241014_ses-20241014HS10_obj-1tfmerl_icephys.nwb 7.0 2.0 PC PC Inh Excellent 7→2
795 sub-Mfa241014_ses-20241014HS10_obj-1tfmerl_icephys.nwb 7.0 3.0 PC PC Inh Excellent 7→3
796 sub-Mfa241014_ses-20241014HS10_obj-1tfmerl_icephys.nwb 7.0 4.0 PC PC Inh Excellent 7→4
797 sub-Mfa241014_ses-20241014HS10_obj-1tfmerl_icephys.nwb 7.0 6.0 PC PC Inh Excellent 7→6
798 sub-Mfa241014_ses-20241014HS10_obj-1tfmerl_icephys.nwb 7.0 8.0 PC PC Ext Excellent 7→8
836 sub-Mfa241014_ses-20241014HS11_obj-1eb9oul_icephys.nwb 6.0 3.0 IN PC Inh Excellent 6→3
993 sub-Mfa241105_ses-20241105HS4_obj-7zjodo_icephys.nwb 6.0 1.0 PC PC Ext Excellent 6→1
1113 sub-Mfa241105_ses-20241105HS9_obj-8ohfbl_icephys.nwb 2.0 4.0 PC PC Ext Excellent 2→4
1137 sub-Mfa241105_ses-20241105HS9_obj-10ey26e_icephys.nwb 7.0 2.0 PC PC Ext Excellent 7→2
1190 sub-Mfa241105_ses-20241105HS12_obj-h1hg7l_icephys.nwb 8.0 5.0 PC PC Ext Good 8→5
1310 sub-Mfa241105_ses-20241105HS16_obj-1r3cu01_icephys.nwb 6.0 3.0 PC PC Ext Good 8→5
PC-to-PC connections typed Inh: 7 of 18
connections whose projection label disagrees with their channels:
file pre_ch posySynChannel projection
368 sub-Mfa240911_ses-20240912HS5_obj-d4b8xx_icephys.nwb 4.0 1.0 4→3
1310 sub-Mfa241105_ses-20241105HS16_obj-1r3cu01_icephys.nwb 6.0 3.0 8→5
Result: blocked (methods_underspecified). The criterion takes cell types and connections from the deposit's own annotations and blocks the claim when it has none, and DANDI:001751 has none (cell above). On the code's annotation, a variant that decides nothing, six of the eight connection counts match the paper: VEN-to-VEN 0, PC-to-VEN 1, PC-to-IN 2, IN-to-PC 4, VEN-to-IN 0 and IN-to-VEN 0. Two do not: PC-to-PC is 18 (paper 24 +- 2.4) and VEN-to-PC is 1 (paper 0), a connection annotated "Ext, Excellent" from channel 4 to 6 of sub-Mfa190314_ses-190315s2_obj-1e6g6jn. The tested-pair counts differ from the paper's for every type (PC-to-PC 749 against 503, VEN-to-VEN 59 against 110). The annotation also disagrees with itself in places: 7 of the 18 PC-to-PC connections are typed "Inh", and two connections carry a projection label that names other channels than the row (channels 4 to 1 labelled "4→3", and 6 to 3 labelled "8→5").
fig4d-sodium-current¶
Somatic Na+ currents in outside-out patches are lower in VENs (n = 14) than in L5 PCs (n = 21).
Per patch, the sweeps of each command step are averaged, the current is referred to the mean over 2 to
0.2 ms before the step and smoothed over 0.1 ms (10 samples at 100 kHz), and its most negative value in 0.1
to 3 ms after the step onset is the peak inward current (standard choices; the Methods give the steps,
-80 to 0 mV in 5 mV for 25 ms, and leak subtraction online). The patch's Na+ current is the largest peak
over the steps from -60 to 0 mV. Reading (b), current density, divides by the patch area estimated from
capacitance; the files hold no capacitance, and the Methods give one area (~5 um2 from ~50 fF) and say
similar areas were sampled, so (b) is (a) divided by a constant and gives the same test. Cell types come
from the code's metadata_outSideOutSodiumCurrentRec.csv, which also gives a max_Na_current per cell,
used as a check.
na_assets = T.sodium_assets()
na_files = T.sodium_all(na_assets)
rows = []
for f in na_files:
by_step = {}
for name, s in f["sweeps"].items():
v, i = s["command_mV"], s["current_pA"]
onset = np.flatnonzero(np.abs(v - v[0]) > 1)
if len(onset) == 0:
continue
step = round(float(v[onset[0] + 5]))
by_step.setdefault(step, []).append((onset[0], i, s["rate"]))
best, best_step = 0.0, None
for step, sw in by_step.items():
if not -60 <= step <= 0:
continue
on, rate = sw[0][0], sw[0][2]
mean_i = np.mean([x[1] for x in sw], axis=0)
sm_i = np.convolve(mean_i, np.ones(10) / 10, mode="same")
b = sm_i[on - int(0.002 * rate): on - int(0.0002 * rate)].mean()
pk = sm_i[on + int(0.0001 * rate): on + int(0.003 * rate)].min() - b
if pk < best:
best, best_step = pk, step
rows.append(dict(file=f["file"], cell_id=f["cell_id"], subject=f["subject"], n_sweeps=len(f["sweeps"]),
steps=f"{min(by_step)} to {max(by_step)}", onset_ms=on / rate * 1000, peak_pA=best, at_mV=best_step))
na = pd.DataFrame(rows).merge(na_meta, left_on="file", right_on="fileName_nwb", how="left")
print("files:", len(na), "; with a cell type:", int(na.cellType.notna().sum()), "; by type:", na.cellType.value_counts().to_dict())
print("sampling rates (Hz):", sorted({round(s['rate']) for f in na_files for s in f['sweeps'].values()}),
"; steps per file:", na.steps.value_counts().to_dict(), "; step onset (ms):", sorted(na.onset_ms.round(2).unique()))
print(na[["file", "cell_id", "cellType", "n_sweeps", "peak_pA", "at_mV", "max_Na_current"]].round(2).to_string())
r = stats.spearmanr(na.peak_pA, na.max_Na_current)
print(f"\nagreement with the code's max_Na_current: Spearman rho = {r[0]:.2f}, p = {r[1]:.2g}; "
f"median ratio {np.median(na.peak_pA / na.max_Na_current):.2f}")
files: 35 ; with a cell type: 35 ; by type: {'PC': 21, 'VEN': 14}
sampling rates (Hz): [100000] ; steps per file: {'-75 to 55': 18, '-75 to 85': 17} ; step onset (ms): [np.float64(20.0)]
file cell_id cellType n_sweeps peak_pA at_mV max_Na_current
0 sub-Mfa-221206_ses-sess-221206AS_obj-17h3xyf_icephys.nwb Cell_AS006 VEN 34 -29.18 -30 -22.41
1 sub-Mfa-221206_ses-sess-221206AS_obj-10rlo0z_icephys.nwb Cell_AS019 PC 34 -48.80 -25 -32.52
2 sub-Mfa-221206_ses-sess-221206AS_obj-18grn52_icephys.nwb Cell_AS014 VEN 34 -21.86 -30 -15.49
3 sub-Mfa-221206_ses-sess-221206AS_obj-155xyap_icephys.nwb Cell_AS004 PC 102 -24.08 -10 -19.26
4 sub-Mfa-221206_ses-sess-221206AS_obj-182f7kb_icephys.nwb Cell_AS024 PC 102 -21.00 -5 -18.17
5 sub-Mfa-221206_ses-sess-221206AS_obj-14kgrex_icephys.nwb Cell_AS009 VEN 170 -10.27 -25 -7.66
6 sub-Mfa-221206_ses-sess-221206AS_obj-1d8cqve_icephys.nwb Cell_AS023 PC 84 -34.04 -20 -28.93
7 sub-Mfa-221206_ses-sess-221206AS_obj-1tbfvx1_icephys.nwb Cell_AS011 VEN 34 -24.14 -10 -17.55
8 sub-Mfa-221206_ses-sess-221206AS_obj-o5c1ca_icephys.nwb Cell_AS001 VEN 68 -24.44 -20 -13.84
9 sub-Mfa-221206_ses-sess-221206AS_obj-1dtq5gg_icephys.nwb Cell_AS017 VEN 136 -29.04 -25 -26.27
10 sub-Mfa-221206_ses-sess-221206AS_obj-tq58al_icephys.nwb Cell_AS020 PC 34 -24.42 -15 -20.95
11 sub-Mfa-221206_ses-sess-221206AS_obj-1hze3nr_icephys.nwb Cell_AS002 PC 204 -34.03 -5 -31.59
12 sub-Mfa-221206_ses-sess-221206AS_obj-xjy9zs_icephys.nwb Cell_AS010 PC 34 -34.62 -25 -29.34
13 sub-Mfa-221206_ses-sess-221206HS_obj-12n6bj2_icephys.nwb Cell_HS008 PC 28 -54.39 -10 -42.96
14 sub-Mfa-221206_ses-sess-221206AS_obj-r9kq44_icephys.nwb Cell_AS016 PC 170 -41.91 -25 -40.05
15 sub-Mfa-221206_ses-sess-221206AS_obj-w5maeh_icephys.nwb Cell_AS007 PC 102 -22.89 -60 -17.22
16 sub-Mfa-221206_ses-sess-221206HS_obj-14nb7lg_icephys.nwb Cell_HS012 PC 28 -55.87 0 -44.30
17 sub-Mfa-221206_ses-sess-221206HS_obj-1hd5igg_icephys.nwb Cell_HS017 VEN 28 -27.50 -25 -20.58
18 sub-Mfa-221206_ses-sess-221206AS_obj-yhmune_icephys.nwb Cell_AS022 PC 102 -39.09 -15 -34.91
19 sub-Mfa-221206_ses-sess-221206AS_obj-1mpyhuf_icephys.nwb Cell_AS005 VEN 340 -40.97 -10 -36.83
20 sub-Mfa-221206_ses-sess-221206HS_obj-1fus1iv_icephys.nwb Cell_HS018 VEN 102 -26.69 0 -19.38
21 sub-Mfa-221206_ses-sess-221206HS_obj-1pjbu7s_icephys.nwb Cell_HS019 PC 28 -36.12 -10 -31.66
22 sub-Mfa-221206_ses-sess-221206HS_obj-1m86n5_icephys.nwb Cell_HS003 PC 84 -34.51 -10 -28.30
23 sub-Mfa-221206_ses-sess-221206HS_obj-1hdj9io_icephys.nwb Cell_HS002 PC 112 -31.11 -15 -28.59
24 sub-Mfa-221206_ses-sess-221206HS_obj-1vqgzg9_icephys.nwb Cell_HS022 VEN 28 -12.65 -35 -8.79
25 sub-Mfa-221206_ses-sess-221206HS_obj-406lwf_icephys.nwb Cell_HS006 VEN 28 -14.40 -20 -10.64
26 sub-Mfa-221206_ses-sess-221206HS_obj-1na2n9x_icephys.nwb Cell_HS016 VEN 140 -15.14 -20 -12.39
27 sub-Mfa-221206_ses-sess-221206HS_obj-6hfvu1_icephys.nwb Cell_HS025 PC 28 -39.43 -25 -27.01
28 sub-Mfa-221206_ses-sess-221206HS_obj-1w64zn_icephys.nwb Cell_HS014 VEN 84 -19.12 -20 -14.26
29 sub-Mfa-221206_ses-sess-221206HS_obj-93pwgg_icephys.nwb Cell_HS011 PC 28 -38.04 -20 -31.85
30 sub-Mfa-221206_ses-sess-221206HS_obj-5ueuaq_icephys.nwb Cell_HS023 VEN 84 -10.05 -15 -7.32
31 sub-Mfa-221206_ses-sess-221206HS_obj-k6mepx_icephys.nwb Cell_HS009 PC 28 -48.96 -15 -38.86
32 sub-Mfa-221206_ses-sess-221206HS_obj-gk29ja_icephys.nwb Cell_HS020 PC 84 -38.63 -15 -31.48
33 sub-Mfa-221206_ses-sess-221206HS_obj-xcpo2b_icephys.nwb Cell_HS010 PC 84 -15.35 -25 -12.04
34 sub-Mfa-221206_ses-sess-221206HS_obj-jbicqk_icephys.nwb Cell_HS004 PC 140 -15.85 -30 -13.69
agreement with the code's max_Na_current: Spearman rho = 0.97, p = 2.8e-21; median ratio 1.26
for col, label in [("peak_pA", "peak inward current here"), ("max_Na_current", "the code's max_Na_current")]:
v, p = na[na.cellType == "VEN"][col].abs(), na[na.cellType == "PC"][col].abs()
t = stats.mannwhitneyu(v, p, alternative="two-sided")
print(f"{label}: |I| VEN median {v.median():.1f} (n {len(v)}, {v.min():.1f} to {v.max():.1f}) against PC "
f"{p.median():.1f} pA (n {len(p)}, {p.min():.1f} to {p.max():.1f}); U = {t.statistic:.0f}, p = {t.pvalue:.4f}")
area_um2 = 5.0
v, p = na[na.cellType == "VEN"].peak_pA.abs() / area_um2, na[na.cellType == "PC"].peak_pA.abs() / area_um2
print(f"reading (b), density at the Methods' ~5 um2 for every patch: VEN {v.median():.2f} against PC {p.median():.2f} pA/um2, "
f"p = {stats.mannwhitneyu(v, p, alternative='two-sided').pvalue:.4f}")
print("by session:")
na["session"] = na.file.str.extract(r"sess-(\w+?)_obj")[0]
print(na.groupby(["session", "cellType"]).peak_pA.agg(["size", "median"]).round(1).to_string())
peak inward current here: |I| VEN median 23.0 (n 14, 10.0 to 41.0) against PC 34.6 pA (n 21, 15.4 to 55.9); U = 56, p = 0.0023
the code's max_Na_current: |I| VEN median 14.9 (n 14, 7.3 to 36.8) against PC 29.3 pA (n 21, 12.0 to 44.3); U = 49, p = 0.0010
reading (b), density at the Methods' ~5 um2 for every patch: VEN 4.60 against PC 6.92 pA/um2, p = 0.0023
by session:
size median
session cellType
221206AS PC 10 -34.0
VEN 7 -24.4
221206HS PC 11 -38.0
VEN 7 -15.1
Result: reproduced. The peak inward current is smaller in VENs (median |I| 23.0 pA, n = 14) than in PCs
(34.6 pA, n = 21), two-tailed rank-sum p = 0.0023; the density reading gives the same p, and VENs are
smaller in both sessions. Reading (b) could not be formed as
the criterion defines it: the files hold no capacitance, so no patch has its own area, and the density is
the current divided by the single patch area the Methods give, which leaves the test unchanged. The outcome
therefore rests on an assumption (that one area for all patches is an acceptable reading (b)), and is marked
assumed in the record. The measure follows the code's per-cell max_Na_current closely (rho = 0.97, a
median 1.26 times larger in magnitude), which gives p = 0.0010.
fig8a-metabolite-gradient¶
Of 581 metabolites, 228 differ between AIC and V1 and only 108 between AIC and parietal cortex.
The claim names MetaboLights MTBLS13927. Its metabolite assignment file is read from the study's first metadata
revision (aic_tables.MTBLS_MAF), and compared with the code's normalized table
VEN_Metabolism/Metabolic_data.xlsx (sheet "Identified"), which the first run used.
Per metabolite, Welch's ANOVA over the three regions, then the Games-Howell test (Fig. 8 legend), at
P < 0.05 (criterion). Readings: a metabolite differs when its Games-Howell p < 0.05 (a) alone or (b) only
after a Welch ANOVA p < 0.05; values raw, as the code leaves its log10 line commented out, with log10 as a
variant.
Result: not reproduced. The MetaboLights deposit holds 558 identified metabolites where the paper reports 581; its values are the code's table's, except that two V1 samples (V1-4-Q and V1-4-S) carry each other's values, which leaves the groups unchanged. Under every reading the count for AIC against V1 is outside the tolerance of 228 (+- 23): raw values 179 (Games-Howell alone) or 175 (after Welch), log10 values 194 or 190. The count for AIC against PrC is within the tolerance of 108 (+- 11) only on log10 values with Games-Howell alone (98); raw 85 or 84, log10 after Welch 95. About twice as many metabolites differ against V1 as against PrC under every reading, so the direction of the gradient holds, but not the counts the claim states.
fig8de-glycolytic-bias¶
Compared with V1, AIC shows elevated citrate, reduced 2-ketobutyrate and increased glutamate, with altered expression of oxidative enzyme genes, read as a glycolytic bias.
The three metabolites the criterion names, by their names in the MetaboLights table ("Citric acid", "2-Ketobutyric acid", "L-Glutamic acid"), Games-Howell AIC against V1 after Welch's ANOVA, raw values (log10 shown).
named = ["Citric acid", "2-Ketobutyric acid", "L-Glutamic acid"]
print(mres[mres.name.isin(named)][["transform", "name", "AIC", "PrC", "V1", "p_welch", "gh_AIC_V1"]]
.sort_values(["name", "transform"]).to_string())
transform name AIC PrC V1 p_welch gh_AIC_V1 597 log10 2-Ketobutyric acid 1.332639e+00 1.476045e+00 1.711686e+00 0.117166 0.086409 39 raw 2-Ketobutyric acid 2.432980e+01 3.202188e+01 6.648171e+01 0.169709 0.183116 716 log10 Citric acid 6.901360e+00 6.829062e+00 6.764063e+00 0.000626 0.000279 158 raw Citric acid 7.994278e+06 6.794487e+06 5.836140e+06 0.000816 0.000462 862 log10 L-Glutamic acid 7.177516e+00 7.036201e+00 7.047181e+00 0.000044 0.000130 304 raw L-Glutamic acid 1.507785e+07 1.091388e+07 1.119265e+07 0.000052 0.000101
Result: partially reproduced. On the MetaboLights table, citrate is higher in AIC than in V1 (Games-Howell p = 0.0005, Welch p = 0.0008) and glutamate (L-glutamic acid) is higher (p = 0.0001). 2-Ketobutyrate is lower in AIC (mean 24.3 against 66.5) but not significantly (Games-Howell p = 0.18, Welch p = 0.17; on log10 values p = 0.086). The gene-expression part of the statement is not tested here.
fig2d-f-l23-it-tau-width¶
Among projection neuron subclasses, L2/3 IT HPCAL1 neurons have a small membrane time constant and a narrow AP width.
From DANDI:001746 (version 0.260825.0222), streamed. Each file is read into memory in one request (helper
aic_tables.patchseq_features). Per cell, as the Methods define them: tau from an exponential fitted from
the stimulation onset to the bottom of the sag on each hyperpolarizing sweep, averaged over the sweeps; the
first AP of the rheobase sweep, its threshold at the largest third derivative in the 20 ms before the peak, sought on the rising phase (up to the
largest first derivative; the first run searched the whole window, kept as the variant _v0), its half-width at
half the amplitude above threshold. Every file of the dandiset is read, for this claim and for fig4ac. APs are found by a crossing of 0 mV and failed fits
(tau outside 0 to 600 ms) are dropped, standard choices. Subclasses as the code's Fig. 2d script groups the
predicted clusters (ephysio/Fig2D_ephyFeatCmp.m), with the code's cell table
(metaInfo_ephysio_patchSeq.csv); the script also drops tau values of 1 ms or less, as here. Two-tailed
rank-sum tests between every pair of subclasses, Benjamini-Hochberg over the 15 pairs of each feature
(the family is not stated; a standard choice).
from statsmodels.stats.multitest import multipletests
ps_assets = T.patchseq_assets()
ps_meta = T.csv("ephysio/data_ephy/rawdata_ephysio/metaInfo_ephysio_patchSeq.csv")
ps_meta["subclass"] = [T.subclass(c, t) for c, t in zip(ps_meta.predictCluster, ps_meta.cellType)]
byname = {a["path"].split("/")[-1]: a for a in ps_assets}
print("dandiset files:", len(ps_assets), "; rows of the code's table:", len(ps_meta),
"; table rows naming a dandiset file:", int(ps_meta.filename_nwb.isin(byname).sum()))
print("cells by subclass (code's grouping):", ps_meta.subclass.value_counts(dropna=False).to_dict())
# every file is read (the subclasses of Fig. 2d, the VENs and the L5 PCs of fig4ac)
# One table row per file: the table names one file twice (printed), so its second row is dropped.
dup = ps_meta[ps_meta.filename_nwb.duplicated(keep=False)]
print("table rows naming the same file:", dup[["subject_id", "cell_ID", "filename_nwb", "cellType"]].to_dict("records"))
ps_meta = ps_meta.drop_duplicates("filename_nwb")
print("dandiset files the table does not name:", sorted(set(byname) - set(ps_meta.filename_nwb)))
feats = pd.DataFrame(T.patchseq_all([byname[f] for f in ps_meta.filename_nwb if f in byname]))
ps = ps_meta.merge(feats, left_on="filename_nwb", right_on="file", how="left")
print("cells read:", len(feats), "; errors:", int(feats.get("error", pd.Series(dtype=object)).notna().sum()),
"; sampling rates:", feats.rate.round().value_counts().to_dict(), "; step lengths (ms):", feats.step_ms.round(1).value_counts().to_dict())
print("hyperpolarizing sweeps fitted per cell: median", ps.n_tau_sweeps.median(), "; failed fits in all:", int(ps.n_tau_failed.sum()),
"; cells with no AP found:", int(ps.half_width_ms.isna().sum()))
print(ps[["tau_ms", "rheobase_pA", "threshold_mV", "amplitude_mV", "half_width_ms", "threshold_mV_v0", "amplitude_mV_v0",
"half_width_ms_v0"]].describe(percentiles=[0.01, 0.05, 0.5, 0.95, 0.99]).round(2).to_string())
dandiset files: 462 ; rows of the code's table: 462 ; table rows naming a dandiset file: 462
cells by subclass (code's grouping): {nan: 225, 'L5 IT FEZF2': 125, 'L2/3 IT HPCAL1': 30, 'VEN': 29, 'IT RORB': 21, 'L5 ET': 18, 'L6 PC': 14}
table rows naming the same file: [{'subject_id': 'Mfa220428', 'cell_ID': 'n172', 'filename_nwb': 'sub-Mfa220428_ses-sess-220419d1HS_obj-1gxrou_icephys.nwb', 'cellType': 'PC'}, {'subject_id': 'Mfa180730', 'cell_ID': 'n172', 'filename_nwb': 'sub-Mfa220428_ses-sess-220419d1HS_obj-1gxrou_icephys.nwb', 'cellType': nan}]
dandiset files the table does not name: ['sub-Mfa180730_ses-sess-180730d1_obj-1qsqh8f_icephys.nwb']
/home/runner/work/encore/encore/entries/001752-liu-2026/aic_tables.py:205: RuntimeWarning: overflow encountered in exp p, _ = curve_fit(lambda t, a, tau, c: a * np.exp(-t / tau) + c, t, y, /home/runner/work/encore/encore/entries/001752-liu-2026/aic_tables.py:205: RuntimeWarning: overflow encountered in multiply p, _ = curve_fit(lambda t, a, tau, c: a * np.exp(-t / tau) + c, t, y,
cells read: 461 ; errors: 0 ; sampling rates: {50000.0: 249, 25000.0: 212} ; step lengths (ms): {600.0: 461}
hyperpolarizing sweeps fitted per cell: median 10.0 ; failed fits in all: 30 ; cells with no AP found: 2
tau_ms rheobase_pA threshold_mV amplitude_mV half_width_ms threshold_mV_v0 amplitude_mV_v0 half_width_ms_v0
count 461.00 459.00 459.00 459.00 459.00 459.00 459.00 459.00
mean 46.12 73.33 -41.22 88.45 3.03 -37.77 85.00 2.93
std 26.96 57.00 10.59 13.76 1.73 19.66 21.24 1.74
min 8.05 20.00 -63.94 25.76 0.28 -63.94 0.58 0.04
1% 9.33 20.00 -58.67 45.29 0.58 -58.67 4.56 0.17
5% 16.44 20.00 -55.03 62.24 1.00 -55.03 26.53 0.82
50% 41.92 60.00 -43.24 91.52 2.72 -42.45 90.98 2.68
95% 89.23 160.00 -16.32 104.71 6.15 -0.06 104.65 6.01
99% 152.79 300.00 -5.04 112.98 10.15 50.06 111.05 10.15
max 195.85 460.00 2.90 114.12 12.06 64.94 114.12 12.06
# How many AP measures are implausible for a cortical neuron (threshold above -10 mV, amplitude below 40 mV,
# half-width below 0.3 ms or above 8 ms), under the extraction used here and the first run's (suffix _v0).
for sfx, label in (("", "rising phase only (used)"), ("_v0", "whole 20 ms window (first run)")):
q = ps.dropna(subset=["half_width_ms" + sfx])
print(f"{label}: cells {len(q)}; threshold > -10 mV {int((q['threshold_mV' + sfx] > -10).sum())}; amplitude < 40 mV "
f"{int((q['amplitude_mV' + sfx] < 40).sum())}; half-width < 0.3 ms {int((q['half_width_ms' + sfx] < 0.3).sum())}, "
f"> 8 ms {int((q['half_width_ms' + sfx] > 8).sum())}")
order = ["L2/3 IT HPCAL1", "IT RORB", "L5 IT FEZF2", "VEN", "L5 ET", "L6 PC"]
g6 = ps[ps.subclass.isin(order)]
print("\nper subclass, median and range (used extraction):")
print(g6.groupby("subclass")[["tau_ms", "threshold_mV", "amplitude_mV", "half_width_ms"]].agg(["size", "median", "min", "max"])
.reindex(order).round(2).to_string())
fig, axes = plt.subplots(1, 4, figsize=(16, 3.4))
for ax, (feat, lim) in zip(axes, (("tau_ms", (0, 150)), ("threshold_mV", (-70, 0)), ("amplitude_mV", (0, 130)), ("half_width_ms", (0, 8)))):
for k in order:
v = g6[g6.subclass == k][feat].dropna()
ax.hist(v.clip(*lim), bins=30, range=lim, histtype="step", label=k)
ax.set_xlabel(feat); ax.set_xlim(*lim)
out_n = int(((g6[feat] < lim[0]) | (g6[feat] > lim[1])).sum())
print(f"{feat}: axis {lim}; {out_n} values outside, drawn at the edge")
axes[0].legend(fontsize=7); plt.tight_layout(); plt.show()
rising phase only (used): cells 459; threshold > -10 mV 12; amplitude < 40 mV 3; half-width < 0.3 ms 1, > 8 ms 11
whole 20 ms window (first run): cells 459; threshold > -10 mV 33; amplitude < 40 mV 25; half-width < 0.3 ms 10, > 8 ms 10
per subclass, median and range (used extraction):
tau_ms threshold_mV amplitude_mV half_width_ms
size median min max size median min max size median min max size median min max
subclass
L2/3 IT HPCAL1 30 31.84 9.21 194.06 30 -39.62 -56.15 -3.37 30 94.52 44.13 113.49 30 2.10 1.44 5.14
IT RORB 21 42.64 11.21 153.77 21 -43.25 -56.60 -11.75 21 96.62 58.47 104.73 21 1.92 1.16 8.98
L5 IT FEZF2 125 47.22 16.19 152.13 125 -42.39 -57.11 -6.41 125 89.14 25.76 109.20 125 3.04 1.28 10.44
VEN 29 44.37 15.06 142.68 29 -43.49 -57.32 -12.16 29 89.20 49.71 102.20 29 3.16 1.84 12.06
L5 ET 18 38.18 8.36 76.60 18 -47.80 -56.38 -3.75 18 92.45 61.48 103.92 18 2.18 0.76 4.10
L6 PC 14 54.07 11.46 94.25 14 -46.39 -56.76 -14.63 14 97.30 58.06 109.41 14 2.28 1.32 4.54
tau_ms: axis (0, 150); 3 values outside, drawn at the edge
threshold_mV: axis (-70, 0); 0 values outside, drawn at the edge
amplitude_mV: axis (0, 130); 0 values outside, drawn at the edge
half_width_ms: axis (0, 8); 5 values outside, drawn at the edge
g6 = ps[ps.subclass.isin(order)]
for feat, keep in (("tau_ms", lambda x: x > 1), ("half_width_ms", lambda x: x > 0), ("half_width_ms_v0", lambda x: x > 0)):
vals = {k: g6[g6.subclass == k][feat].dropna() for k in order}
vals = {k: v[keep(v)] for k, v in vals.items()}
print(f"\n{feat}: median (n) by subclass:", {k: (round(v.median(), 2), len(v)) for k, v in vals.items()})
pairs_ = [(a, b) for i, a in enumerate(order) for b in order[i + 1:]]
p = [stats.mannwhitneyu(vals[a], vals[b], alternative="two-sided").pvalue for a, b in pairs_]
q = multipletests(p, method="fdr_bh")[1]
res = pd.DataFrame(dict(a=[x[0] for x in pairs_], b=[x[1] for x in pairs_], p=p, fdr=q))
print(res[(res.a == "L2/3 IT HPCAL1") | (res.b == "L2/3 IT HPCAL1")].round(5).to_string())
print("lowest median:", min(vals, key=lambda k: vals[k].median()))
print("\nby subject, median tau (ms) and half-width (ms), L2/3 IT HPCAL1 against the other five subclasses pooled:")
g6 = g6.assign(group=np.where(g6.subclass == "L2/3 IT HPCAL1", "L2/3 IT HPCAL1", "others"))
print(g6[g6.tau_ms > 1].groupby(["subject_id", "group"]).agg(n=("tau_ms", "size"), tau=("tau_ms", "median"),
width=("half_width_ms", "median")).unstack("group").round(2).to_string())
tau_ms: median (n) by subclass: {'L2/3 IT HPCAL1': (np.float64(31.84), 30), 'IT RORB': (np.float64(42.64), 21), 'L5 IT FEZF2': (np.float64(47.22), 125), 'VEN': (np.float64(44.37), 29), 'L5 ET': (np.float64(38.18), 18), 'L6 PC': (np.float64(54.07), 14)}
a b p fdr
0 L2/3 IT HPCAL1 IT RORB 0.00850 0.06374
1 L2/3 IT HPCAL1 L5 IT FEZF2 0.00430 0.06374
2 L2/3 IT HPCAL1 VEN 0.02341 0.11704
3 L2/3 IT HPCAL1 L5 ET 0.54390 0.81584
4 L2/3 IT HPCAL1 L6 PC 0.03764 0.14113
lowest median: L2/3 IT HPCAL1
half_width_ms: median (n) by subclass: {'L2/3 IT HPCAL1': (np.float64(2.1), 30), 'IT RORB': (np.float64(1.92), 21), 'L5 IT FEZF2': (np.float64(3.04), 125), 'VEN': (np.float64(3.16), 29), 'L5 ET': (np.float64(2.18), 18), 'L6 PC': (np.float64(2.28), 14)}
a b p fdr
0 L2/3 IT HPCAL1 IT RORB 0.61181 0.67934
1 L2/3 IT HPCAL1 L5 IT FEZF2 0.00000 0.00000
2 L2/3 IT HPCAL1 VEN 0.00001 0.00005
3 L2/3 IT HPCAL1 L5 ET 0.42431 0.56874
4 L2/3 IT HPCAL1 L6 PC 0.33814 0.50721
lowest median: IT RORB
half_width_ms_v0: median (n) by subclass: {'L2/3 IT HPCAL1': (np.float64(2.1), 30), 'IT RORB': (np.float64(1.92), 21), 'L5 IT FEZF2': (np.float64(3.0), 125), 'VEN': (np.float64(3.16), 29), 'L5 ET': (np.float64(2.18), 18), 'L6 PC': (np.float64(2.24), 14)}
a b p fdr
0 L2/3 IT HPCAL1 IT RORB 0.59844 0.72137
1 L2/3 IT HPCAL1 L5 IT FEZF2 0.00001 0.00008
2 L2/3 IT HPCAL1 VEN 0.00001 0.00008
3 L2/3 IT HPCAL1 L5 ET 0.42431 0.62044
4 L2/3 IT HPCAL1 L6 PC 0.72417 0.77590
lowest median: IT RORB
by subject, median tau (ms) and half-width (ms), L2/3 IT HPCAL1 against the other five subclasses pooled:
n tau width
group L2/3 IT HPCAL1 others L2/3 IT HPCAL1 others L2/3 IT HPCAL1 others
subject_id
Mfa180730 NaN 16.0 NaN 50.04 NaN 2.85
Mfa180901 1.0 13.0 194.06 54.27 5.14 3.14
Mfa180913 NaN 17.0 NaN 74.54 NaN 3.92
Mfa180920 5.0 24.0 51.69 58.15 2.90 2.99
Mfa181204 NaN 19.0 NaN 52.17 NaN 4.46
Mfa181208 NaN 20.0 NaN 30.35 NaN 3.21
Mfa191122 3.0 24.0 16.95 39.13 2.16 2.68
Mfa220407 3.0 29.0 51.10 40.81 2.12 2.24
Mfa220419 9.0 18.0 37.46 37.03 2.16 2.28
Mfa220428 9.0 27.0 26.99 37.84 1.72 1.96
Result: not reproduced. Under neither reading does the claim hold for AP width. L2/3 IT HPCAL1 has the lowest median tau (31.8 ms, n = 30; others 38.2 to 54.1 ms), but no pairwise difference with it survives FDR (0.064 to 0.82). Its median AP half-width (2.10 ms) is not the lowest; IT RORB is lower (1.92 ms), and L2/3 IT HPCAL1 is narrower than L5 IT FEZF2 and VEN only (FDR below 1e-4 and 5e-5), not than IT RORB, L5 ET or L6 PC (FDR 0.51 to 0.68). The threshold is now sought on the rising phase only, which cuts the implausible values (thresholds above -10 mV from 36 to 12, amplitudes below 40 mV from 28 to 3, half-widths below 0.3 ms from 10 to 1, of 462 cells); the first run's extraction, as a variant, gives the same order (IT RORB lowest, FDR 0.62 to 0.78 for the same three pairs). The group sizes by the code's grouping (30, 21, 125, 29, 18, 14) differ from the legend's (30, 17, 119, 22, 16, 13), and the features are this attempt's extraction, not the paper's PatchElectroLab values, so the outcome may be a failure of this attempt.
ven-subtypes-similar-physiology¶
VEN-L and VEN-S have similar physiological properties.
A claim of absence, judged on two-tailed rank-sum tests with Benjamini-Hochberg FDR over AP width and amplitude (Extended Data Fig. 9c,d). DANDI:001746 holds the Patch-seq VENs only; the code's table names them VEN_Long and VEN_Short (or VEN_short), far fewer than the paper's 85 VEN-L and 41 VEN-S.
As a claim of absence on about a quarter of the paper's cells, the test's power at the paper's n is estimated by resampling the cells here (seeded), and shown.
ven = ps[ps.cellSubtype.astype(str).str.contains("VEN", case=False)].copy()
ven["sub"] = np.where(ven.cellSubtype.str.lower().str.contains("long"), "VEN-L", "VEN-S")
print("cells the table names VEN_Long or VEN_Short:", int(ps.cellSubtype.astype(str).str.contains("VEN", case=False).sum()),
ven["sub"].value_counts().to_dict(), "; of them with a cell type other than VEN:", int((ven.cellType != "VEN").sum()))
pv, obs = [], {}
for feat in ("half_width_ms", "amplitude_mV"):
a, b = ven[ven["sub"] == "VEN-L"][feat].dropna(), ven[ven["sub"] == "VEN-S"][feat].dropna()
obs[feat] = (a.to_numpy(), b.to_numpy())
t = stats.mannwhitneyu(a, b, alternative="two-sided")
pv.append(t.pvalue)
print(f"{feat}: VEN-L median {a.median():.2f} (n {len(a)}) against VEN-S {b.median():.2f} (n {len(b)}), p = {t.pvalue:.4f}")
print("FDR (BH over the two):", np.round(multipletests(pv, method="fdr_bh")[1], 4))
# Power: how often the test would find a difference at the paper's n (85 VEN-L, 41 VEN-S) if the cells were like
# these, by resampling them with replacement (2,000 draws).
rng_power = np.random.default_rng(6)
hits = np.zeros((2000, 2), bool)
for i in range(2000):
ps_i = [stats.mannwhitneyu(rng_power.choice(obs[f][0], 85), rng_power.choice(obs[f][1], 41)).pvalue for f in obs]
hits[i] = multipletests(ps_i, method="fdr_bh")[1] < 0.05
print(f"at n = 85 and 41: half-width significant at FDR 0.05 in {hits[:, 0].mean():.2f} of draws, amplitude in "
f"{hits[:, 1].mean():.2f}, either in {hits.any(axis=1).mean():.2f}")
hits34 = np.zeros((2000, 2), bool)
for i in range(2000):
ps_i = [stats.mannwhitneyu(rng_power.choice(obs[f][0], len(obs[f][0])), rng_power.choice(obs[f][1], len(obs[f][1]))).pvalue for f in obs]
hits34[i] = multipletests(ps_i, method="fdr_bh")[1] < 0.05
print(f"at the n here ({len(obs['half_width_ms'][0])} and {len(obs['half_width_ms'][1])}): either significant in {hits34.any(axis=1).mean():.2f} of draws")
cells the table names VEN_Long or VEN_Short: 34 {'VEN-L': 18, 'VEN-S': 16} ; of them with a cell type other than VEN: 5
half_width_ms: VEN-L median 3.33 (n 18) against VEN-S 2.76 (n 16), p = 0.0417
amplitude_mV: VEN-L median 88.12 (n 18) against VEN-S 91.41 (n 16), p = 0.1012
FDR (BH over the two): [0.0835 0.1012]
at n = 85 and 41: half-width significant at FDR 0.05 in 0.96 of draws, amplitude in 0.89, either in 0.99
at the n here (18 and 16): either significant in 0.60 of draws
Result: partially reproduced. Neither difference is significant after FDR: AP half-width VEN-L 3.33 ms (n = 18) against VEN-S 2.76 ms (n = 16), p = 0.042, FDR 0.084; amplitude 88.1 against 91.4 mV, p = 0.10, FDR 0.10. But the claim is one of absence tested on 34 of the paper's 126 VENs (5 of them typed other than VEN in the table). Resampled to the paper's n (85 VEN-L, 41 VEN-S), cells like these give a half-width difference at FDR 0.05 in 0.96 of draws and a difference in either feature in 0.99; at the n here, in 0.60. So the absence found here holds only for lack of power: the resampling assumes the observed difference is the true one, so it estimates power and does not show that the data contradict the claim.
fig4ac-ap-width-amplitude¶
In 281 VENs and 306 L5 PCs, APs of VENs are broader and lower in amplitude.
The 281 VENs and 306 L5 PCs are not in DANDI:001746; it holds 68 VENs and 135 L5 PCs by the code's table, and the test is run on those, with the features of fig2d-f. L5 PCs are read (a) by the table's layer and (b) as the PCs of the L5 subclasses. Two-tailed rank-sum, criterion p < 0.001 for each.
ven4 = ps[ps.cellType == "VEN"]
readings = {"(a) L5 PCs by the table's layer (PC_L5, PC_L5ET, PC_5)": ps[(ps.cellType == "PC") & ps.cellSubtype.isin(["PC_L5", "PC_L5ET", "PC_5"])],
"(b) PCs of the L5 subclasses (L5 IT FEZF2, L5 ET)": ps[ps.subclass.isin(["L5 IT FEZF2", "L5 ET"])]}
print("VENs in the code's table:", len(ven4), "; with an AP measured:", int(ven4.half_width_ms.notna().sum()))
for name, pc in readings.items():
print(name)
for feat in ("half_width_ms", "amplitude_mV", "half_width_ms_v0", "amplitude_mV_v0"):
a, b = ven4[feat].dropna(), pc[feat].dropna()
t = stats.mannwhitneyu(a, b, alternative="two-sided")
print(f" {feat}: VEN median {a.median():.2f} (n {len(a)}, {a.min():.2f} to {a.max():.2f}) against PC {b.median():.2f} "
f"(n {len(b)}, {b.min():.2f} to {b.max():.2f}); difference {a.median() - b.median():.2f}; p = {t.pvalue:.2g}")
pc = readings["(a) L5 PCs by the table's layer (PC_L5, PC_L5ET, PC_5)"]
both = pd.concat([ven4.assign(g="VEN"), pc.assign(g="L5 PC")])
print("\nby subject (reading a), median half-width (ms) and amplitude (mV):")
print(both.groupby(["subject_id", "g"]).agg(n=("half_width_ms", "count"), width=("half_width_ms", "median"),
amp=("amplitude_mV", "median")).unstack("g").round(2).to_string())
VENs in the code's table: 68 ; with an AP measured: 68
(a) L5 PCs by the table's layer (PC_L5, PC_L5ET, PC_5)
half_width_ms: VEN median 3.17 (n 68, 1.68 to 12.06) against PC 2.94 (n 135, 0.76 to 9.94); difference 0.23; p = 0.015
amplitude_mV: VEN median 88.53 (n 68, 44.83 to 107.59) against PC 91.23 (n 135, 33.51 to 113.89); difference -2.70; p = 0.073
half_width_ms_v0: VEN median 3.17 (n 68, 0.96 to 12.06) against PC 2.80 (n 135, 0.08 to 9.94); difference 0.37; p = 0.0089
amplitude_mV_v0: VEN median 88.53 (n 68, 18.65 to 107.59) against PC 90.51 (n 135, 0.58 to 113.89); difference -1.97; p = 0.23
(b) PCs of the L5 subclasses (L5 IT FEZF2, L5 ET)
half_width_ms: VEN median 3.17 (n 68, 1.68 to 12.06) against PC 2.98 (n 143, 0.76 to 10.44); difference 0.19; p = 0.22
amplitude_mV: VEN median 88.53 (n 68, 44.83 to 107.59) against PC 90.12 (n 143, 25.76 to 109.20); difference -1.59; p = 0.35
half_width_ms_v0: VEN median 3.17 (n 68, 0.96 to 12.06) against PC 2.96 (n 143, 0.08 to 10.44); difference 0.21; p = 0.14
amplitude_mV_v0: VEN median 88.53 (n 68, 18.65 to 107.59) against PC 89.14 (n 143, 3.48 to 109.20); difference -0.61; p = 0.62
by subject (reading a), median half-width (ms) and amplitude (mV):
n width amp
g L5 PC VEN L5 PC VEN L5 PC VEN
subject_id
Mfa180730 5 5 2.98 2.72 94.67 88.17
Mfa180901 10 2 3.10 3.14 93.70 97.75
Mfa180913 11 6 3.92 3.30 92.24 84.85
Mfa180920 15 3 2.82 3.08 88.41 90.45
Mfa181204 18 17 3.88 3.54 88.88 85.24
Mfa181208 13 6 3.62 3.50 78.74 83.82
Mfa191122 26 9 2.76 3.36 91.66 89.01
Mfa220407 12 8 1.84 2.42 83.96 95.93
Mfa220419 8 4 2.20 5.55 93.75 68.79
Mfa220428 17 8 1.84 2.26 95.83 96.55
Result: not reproduced, on the cells deposited. On the 68 VENs and 135 L5 PCs (by the table's layer) of DANDI:001746, VEN APs are broader (median 3.17 against 2.94 ms, p = 0.015) and lower (88.5 against 91.2 mV, p = 0.073), the direction the paper reports, but neither difference reaches the criterion's p < 0.001. With the PCs of the L5 subclasses instead (143 cells) the differences are smaller (p = 0.22 and 0.35). The other recordings of Fig. 4a-c are in no deposit the paper names. Only the direction agrees with the paper, and the criterion defines no partial case, so the outcome is not reproduced, as the third verification round agreed. The Results describe the 281 VENs and 306 PCs as whole-cell recordings on additional L5 projection neurons, so the deposited Patch-seq cells may not be the cells of Fig. 4a-c at all; a question to a reader asks.
fig6-ven-subtype-morphology¶
VEN-L has a larger basal dendritic arborization than L5 PCs, VEN-S an intermediate one similar to PCs; the axon origin lies farther from the soma in both VEN subtypes than in PCs, with no difference between VEN-L and VEN-S.
The table the claim names codes cell types by number with no key; the code's Fig. 6d script lists the cells of each group, which gives the key. Rank-sum tests with Benjamini-Hochberg over the three pairs of each feature (Fig. 6d,e legend).
# morphFeatTables_PC_VENL_VENS.xlsx codes cell types as 1, 3, 4 and 5; the code's Fig. 6d script
# (morpho/Fig6d_plotBasalDenAreaCmp.m) lists the cells of each group by file name, which gives the key.
import re
morph = T.excel("morpho/dataMorph/unSeqCell_morph/morphFeatTables_PC_VENL_VENS.xlsx", 0, header=0).rename(columns={"Unnamed: 0": "cell"})
src = T.get("morpho/Fig6d_plotBasalDenAreaCmp.m").decode()
script_group = {}
for line in src.splitlines():
m = re.match(r"\s*(ven_Long_files|ven_Short_files|PC_files)\{end\+1\} = '([^']+)';", line)
if m:
script_group[m.group(2).split("/")[-1][:-4]] = {"ven_Long_files": "VEN-L", "ven_Short_files": "VEN-S", "PC_files": "PC"}[m.group(1)]
morph["group"] = morph.cell.map(script_group)
print("rows:", len(morph), "; cellTypeID against the script's group:")
print(pd.crosstab(morph.cellTypeID, morph.group.fillna("(not in the script)")).to_string())
morph["g"] = morph.cellTypeID.map({4: "VEN-L", 5: "VEN-S", 1: "PC", 3: "PC"})
morph["basal_height"] = morph.minBasalY.abs()
print("columns about basal dendrites (the script's field area, ASC.basalDendriticFieldArea, is not among them):",
[c for c in morph.columns if "basal" in str(c).lower()])
for feat, note in (("axonDist", "axon distance (criterion)"), ("basal_height", "basal height, |minBasalY| (the script's height; a variant)")):
v = {k: morph[morph.g == k][feat].dropna() for k in ("VEN-L", "VEN-S", "PC")}
cmp_ = [("VEN-L", "PC"), ("VEN-S", "PC"), ("VEN-L", "VEN-S")]
p = [stats.mannwhitneyu(v[a], v[b], alternative="two-sided").pvalue for a, b in cmp_]
q = multipletests(p, method="fdr_bh")[1]
print(f"\n{note}: medians (n)", {k: (round(s.median(), 2), len(s)) for k, s in v.items()},
"; zeros:", {k: int((s == 0).sum()) for k, s in v.items()})
print(pd.DataFrame(dict(pair=[f"{a} vs {b}" for a, b in cmp_], p=p, fdr=q)).round(6).to_string(index=False))
rows: 157 ; cellTypeID against the script's group:
group (not in the script) PC VEN-L VEN-S
cellTypeID
1 1 59 0 0
3 0 25 0 0
4 0 0 38 0
5 0 0 0 34
columns about basal dendrites (the script's field area, ASC.basalDendriticFieldArea, is not among them): ['allBasalDenLen', 'centroid_allBasalDenY', 'lengthFractionAboveSoma_basal', 'maxBasalRadius', 'maxOrder_basal', 'maxRadialDist_basal', 'minBasalY', 'nBasalBranch', 'numNeurite_basal', 'numSec_basal', 'shapeFactor_basal', 'totalBasalLength', 'totalBasalSurfaceArea', 'totalBasalVolume', 'basal_height']
axon distance (criterion): medians (n) {'VEN-L': (np.float64(14.52), 36), 'VEN-S': (np.float64(25.29), 20), 'PC': (np.float64(0.0), 74)} ; zeros: {'VEN-L': 9, 'VEN-S': 3, 'PC': 69}
pair p fdr
VEN-L vs PC 0.000000 0.000000
VEN-S vs PC 0.000000 0.000000
VEN-L vs VEN-S 0.191555 0.191555
basal height, |minBasalY| (the script's height; a variant): medians (n) {'VEN-L': (np.float64(486.62), 38), 'VEN-S': (np.float64(256.14), 34), 'PC': (np.float64(191.19), 85)} ; zeros: {'VEN-L': 0, 'VEN-S': 0, 'PC': 0}
pair p fdr
VEN-L vs PC 0.000000 0.000000
VEN-S vs PC 0.006288 0.006288
VEN-L vs VEN-S 0.000000 0.000000
Result: partially reproduced. The code's Fig. 6d script lists the cells of each group, and its lists give the table's key exactly: cellTypeID 4 is VEN-L (38 cells), 5 is VEN-S (34), 1 and 3 are PCs (85, one of them not in the script), the legend's n. The axon part of the claim holds: the axon origin lies farther from the soma in VEN-L (median 14.5 um, n = 36) and VEN-S (25.3 um, n = 20) than in PCs (0 um, n = 74; 69 at the soma), FDR below 1e-6 each, with no difference between VEN-L and VEN-S (FDR 0.19). The basal dendritic field area, the first half of the claim, is not in the table (the script reads it from the ASC reconstructions in the 11.8 GB Zenodo archive), so that half is not tested. Basal height, which the table holds and the claim does not test, is larger in VEN-L than in PCs (487 against 191 um) and also in VEN-S (256 um, FDR 0.006).
fig6f-g-ven-subtype-mapping¶
VEN-Ls map to L5 ET (Exc FEZF2 DSG2, n = 10) and VEN-Ss to L5/6 CT (Exc FEZF2 COL24A1, n = 11), where they fall in the subcluster COL24A1 POC5 apart from canonical L5/6 CT neurons.
From the code's Patch-seq cell table, which gives each VEN's morphological subtype and predicted cluster. The subclusters of Exc FEZF2 COL24A1 are not in the tables; they need the scRNA-seq data (23 GB on GEO), so that part is not tested. Readings of which VENs count: (a) every VEN with a cluster, (b) the traced VENs only.
# The code's Patch-seq cell table names each VEN's morphological subtype (cellSubtype) and its predicted
# scRNA-seq cluster (predictCluster; 16 Exc FEZF2 DSG2, L5 ET; 8 Exc FEZF2 COL24A1, L5/6 CT).
vt = ps_meta[ps_meta.cellSubtype.astype(str).str.contains("VEN")].copy()
vt["sub"] = np.where(vt.cellSubtype.str.lower().str.contains("long"), "VEN-L", "VEN-S")
print(pd.crosstab([vt["sub"], vt.morphoTraced.fillna("not traced")], vt.predictCluster_label.fillna("(no transcriptome)")).to_string())
for name, q in (("(a) every VEN with a cluster", vt), ("(b) traced VENs only", vt[vt.morphoTraced == "traced"])):
l_et = int(((q["sub"] == "VEN-L") & (q.predictCluster == T.CLUSTER_L5_ET)).sum())
s_ct = int(((q["sub"] == "VEN-S") & (q.predictCluster == T.CLUSTER_L56_CT)).sum())
cross = int(((q["sub"] == "VEN-L") & (q.predictCluster == T.CLUSTER_L56_CT)).sum() + ((q["sub"] == "VEN-S") & (q.predictCluster == T.CLUSTER_L5_ET)).sum())
print(f"{name}: VEN-L in L5 ET {l_et} (expected 10 +- 1), VEN-S in L5/6 CT {s_ct} (expected 11 +- 1.1), in the other cluster {cross}")
others = vt[vt.cellType != "VEN"]
print("rows named VEN_Long or VEN_Short whose cell type is not VEN (kept):", others[["cellType", "cellSubtype", "predictCluster"]].to_dict("records"))
print("results_Ext_240415.csv, subtype names against cluster, for comparison:")
print(pd.crosstab(mapping_ext.patchCellSubtypeNames, mapping_ext.predictClustersIDs).loc[lambda d: d.index.str.contains("VEN")].to_string())
predictCluster_label (no transcriptome) Exc FEZF2 COL24A1 Exc FEZF2 DSG2 Exc RORB SCN7A Inh SNCG S100A6
sub morphoTraced
VEN-L not traced 6 0 2 0 0
traced 0 0 10 0 0
VEN-S not traced 3 3 1 1 1
traced 0 7 0 0 0
(a) every VEN with a cluster: VEN-L in L5 ET 12 (expected 10 +- 1), VEN-S in L5/6 CT 10 (expected 11 +- 1.1), in the other cluster 1
(b) traced VENs only: VEN-L in L5 ET 10 (expected 10 +- 1), VEN-S in L5/6 CT 7 (expected 11 +- 1.1), in the other cluster 0
rows named VEN_Long or VEN_Short whose cell type is not VEN (kept): [{'cellType': 'PC', 'cellSubtype': 'VEN_short', 'predictCluster': 0.0}, {'cellType': 'PC', 'cellSubtype': 'VEN_Short', 'predictCluster': nan}, {'cellType': 'PC', 'cellSubtype': 'VEN_Short', 'predictCluster': 16.0}, {'cellType': nan, 'cellSubtype': 'VEN_Short', 'predictCluster': nan}, {'cellType': 'INTER', 'cellSubtype': 'VEN_Short', 'predictCluster': 41.0}]
results_Ext_240415.csv, subtype names against cluster, for comparison:
predictClustersIDs 0 1 2 3 4 5 6 8 9 11 13 14 15 16 17 18 19
patchCellSubtypeNames
VEN_Long 0 0 0 0 0 0 0 0 0 0 0 0 0 14 0 0 0
VEN_Short 0 0 0 0 0 0 0 14 0 0 0 0 0 0 0 0 0
VEN_short 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0
Result: partially reproduced. In the code's Patch-seq cell table every VEN-L with a transcriptome maps to L5 ET (Exc FEZF2 DSG2), and VEN-Ss map mostly to L5/6 CT (Exc FEZF2 COL24A1). The counts match under neither reading: every VEN with a cluster gives 12 VEN-L in L5 ET (expected 10 +- 1) and 10 VEN-S in L5/6 CT (11 +- 1.1, within), with one VEN-S in L5 ET; the traced VENs give 10 (within) and 7 (outside). The excitatory mapping table results_Ext_240415.csv names 14 and 15. The subcluster COL24A1 POC5 needs the scRNA-seq data (23 GB on GEO) and is not tested.
Summary¶
| claim | outcome |
|---|---|
| ven-map-et-ct | reproduced |
| patchseq-mapping | reproduced, resting on an assumption (which rows are inhibitory) |
| fig3e-phase-peak-index | reproduced |
| fig4j-eepsp-amplitude | reproduced |
| fig5-connectivity-total | partially reproduced |
| fig5-connectivity-by-type | blocked, methods_underspecified (the deposit holds no annotation) |
| fig4d-sodium-current | reproduced, resting on an assumption (one patch area for reading (b)) |
| fig8a-metabolite-gradient | not reproduced |
| fig8de-glycolytic-bias | partially reproduced |
| fig2d-f-l23-it-tau-width | not reproduced |
| ven-subtypes-similar-physiology | partially reproduced |
| fig4ac-ap-width-amplitude | not reproduced (on the deposited cells) |
| fig6-ven-subtype-morphology | partially reproduced |
| fig6f-g-ven-subtype-mapping | partially reproduced |
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.
ven-map-et-ct, patchseq-mapping, fig3e, fig4j, the connection counts, fig6 and fig6f-g are tested on the code's per-cell tables, not on raw data: they check that the published tables support the paper's numbers. The connection counts come from the code's annotation of DANDI:001751, as the deposit holds none. fig4d, fig2d-f, ven-subtypes-similar-physiology and fig4ac are measured from the recordings of DANDI:001750 and DANDI:001746, and fig8a and fig8de from the MetaboLights deposit.