Patel, Kim et al. (2026) from dandiset 001454: patch clamp¶
Paper. Patel RR, Kim KN, Patarino M, et al. (2026). Social isolation recruits amygdala–medial prefrontal cortex projections to escalate alcohol drinking in male mice. Nature Neuroscience. doi:10.1038/s41593-026-02413-x. The claims file was written from the version of record (PMC13633117), its figure legends, Extended Data legends, Methods and reporting summary; Supplementary Tables 1 and 2 were not in the text read.
Dandiset. DANDI:001454, version 0.260911.2319. The paper cites the dandiset without a version ("Unprocessed data are available via the DANDI Archive at https://dandiarchive.org/dandiset/001454"). This is the only published version, and its release notes say it holds "all recordings and imaging data used in the Nature Neuroscience publication". The draft has the same 359 assets and size; it is not pinned because it can change.
This notebook tests the patch-clamp claims (Figure 2, Extended Data Figs. 2 and 3, Supplementary
Table 1). The imaging claims are in imaging_patel_2026.ipynb. No random numbers are drawn here.
| Claim | Status |
|---|---|
| fig2c-male-blampfc-excitability-up | tested |
| fig2d-female-blampfc-excitability-down | blocked: 11 of 14 isolated female files hold only a flat secondary channel, no recording |
| fig2e-female-higher-baseline-excitability | tested |
| fig2-threeway-sex-current-housing | blocked: needs the isolated females |
| supt1-male-input-resistance-up | tested |
| supt1-female-input-resistance-threshold | blocked: needs the isolated females |
| ed2e-nonspecific-bla-excitability | tested |
| ed2bcd-nonspecific-bla-no-rank | tested |
| ed3c-male-rank-blampfc-excitability | tested |
| ed3d-female-rank-blampfc-none | tested |
| Imaging claims (Figs. 3, 5, 6; Extended Data Figs. 5, 6, 8) | in imaging_patel_2026.ipynb |
| Home-cage 2BC, rank and blood alcohol (Fig. 1, Extended Data Fig. 1, 5c), optogenetics with behaviour (Fig. 4, 6q, Extended Data Fig. 4), stability imaging (Extended Data Fig. 7), resident-intruder imaging (Extended Data Fig. 9), rank of imaged mice (Extended Data Fig. 6c,d) | blocked (see the attempt record) |
import hashlib
import time
import warnings
import numpy as np
import pandas as pd
from scipy import stats
import statsmodels.formula.api as smf
from statsmodels.stats.anova import anova_lm
import patel2026 as P
warnings.filterwarnings("ignore", category=RuntimeWarning)
pd.set_option("display.width", 200, "display.max_columns", 40, "display.max_rows", 200)
t_start = time.time()
# spike readings (M6): crossings of 0 or -20 mV with a 1 mV re-arm; variants "r0" without a
# re-arm (every crossing more than 1 ms apart counts) and "r5" with a 5 mV re-arm
RULES = (0, -20, "0r0", "-20r0", "0r5", "-20r5")
LBL = {0: "0 mV", -20: "-20 mV", "0r0": "0 mV, no re-arm", "-20r0": "-20 mV, no re-arm",
"0r5": "0 mV, 5 mV re-arm", "-20r5": "-20 mV, 5 mV re-arm"}
print("dandiset", P.DANDISET_ID, "version", P.DANDISET_VERSION)
dandiset 001454 version 0.260911.2319
A = P.assets()
print(len(A), "assets;", A.path.str.endswith(".nwb").sum(), "NWB files")
print(A.assign(kind=A.path.str.extract(r"_(icephys|behavior\+image\+ophys|image\+ophys)\.nwb$")[0].fillna("video"))
.groupby("kind").agg(files=("path", "size"), GB=("size", lambda s: round(s.sum() / 1e9, 1))))
ic = A[A.path.str.endswith("icephys.nwb")].reset_index(drop=True)
t0 = time.time()
cells = P.parallel(P.load_cell, list(ic.asset_id), workers=32)
for c, p in zip(cells, ic.path):
c["path"] = p
D = P.cell_table(cells)
print(f"loaded {len(cells)} neurons in {time.time() - t0:.0f} s")
359 assets; 282 NWB files
files GB
kind
behavior+image+ophys 53 77.9
icephys 205 2.7
image+ophys 24 15.1
video 77 8.9
loaded 205 neurons in 158 s
Data check¶
Each file holds one neuron. The electrode description says whether the neuron was a BLA-mPFC projector or a nonspecific neighbour, the session description gives the housing, and the subject description gives the rank (1 to 3) for most mice. The first cell lists, for every file without a recording, every acquisition and stimulus series it holds.
Spikes (M6) are upward crossings of 0 mV (reading a) or -20 mV (reading b). Against noise at the threshold, a crossing counts only after the voltage has fallen 1 mV below the threshold since the last counted one, and not within 1 ms of it (standard choices; 1 mV is about 8 times the median sample-to-sample noise s.d., printed below). Two variants of this guard are shown for every excitability claim: no re-arm (the 1 ms dead time only, the literal reading of "upward crossings"), and a 5 mV re-arm (the rule of the first version of this attempt). The synthetic traces below show what each does: the literal rule counts the noise on a plateau at the threshold as hundreds of spikes, and the 5 mV re-arm misses spikes whose troughs stay within 5 mV of the threshold.
print("electrode locations:", D.shape[0], "neurons,", pd.Series([c["location"] for c in cells]).value_counts().to_dict())
print("series descriptions:", pd.Series([c["series_description"] for c in cells]).value_counts().to_dict())
print("sweeps per file:", D.n_sweeps.value_counts().sort_index().to_dict())
g = D.groupby(["sex", "housing", "target"])
print(pd.DataFrame({"files": g.size(), "mice": g.subject.nunique(),
"recorded": g.recorded.sum(),
"mice_recorded": D[D.recorded].groupby(["sex", "housing", "target"]).subject.nunique()}))
# files that hold no recording
bad = D[~D.recorded]
print("\nfiles with no recording:", len(bad))
for i in bad.index:
c = cells[i]
print(f" {c['path'].split('/')[-1]:70s} {D.housing[i]} V {c['V'].min():8.2f} to {c['V'].max():8.2f} mV, largest step {np.abs(c['step_pA']).max():5.1f} pA, sweeps {c['n_sweeps']}")
print(f" acquisition {c['acquisition']}, stimulus {c['stimulus']}, voltage series shape {c['series_shape']}, "
f"histology images {c['histology_shapes']}, file {ic['size'][i] / 1e6:.1f} MB")
# every file holds one voltage series and one stimulus series; the name ends in the amplifier channel
suffix = pd.Series([[k for k in c["acquisition"] if "Clamp" in k][0] for c in cells]).str.extract(r"\d{12}(\D\w*)$")[0]
print("\nseries per file: acquisition", pd.Series([len(c["acquisition"]) for c in cells]).value_counts().to_dict(),
"(the voltage series and, in some, histology_images), stimulus", pd.Series([len(c["stimulus"]) for c in cells]).value_counts().to_dict())
print("channel in the series name, by whether the file holds a recording:")
print(pd.crosstab(suffix.values, D.recorded.values, rownames=["channel"], colnames=["recorded"]))
# file size against the histology images
hb = np.array([sum(np.prod(s) for s in c["histology_shapes"]) for c in cells]) / 1e6
print(f"file size less histology bytes (MB): recorded {np.percentile(ic['size'][D.recorded] / 1e6 - hb[D.recorded], [0, 50, 100]).round(1)}, "
f"not recorded {np.percentile(ic['size'][~D.recorded] / 1e6 - hb[~D.recorded], [0, 50, 100]).round(1)}")
electrode locations: 205 neurons, {'BLA': 205}
series descriptions: {'Group-housed, 20pA steps from 0-500pA': 105, 'Socially-isolated, 20pA steps from 0-500pA': 100}
sweeps per file: {1: 1, 32: 175, 36: 3, 38: 25, 45: 1}
files mice recorded mice_recorded
sex housing target
F GH BLA-mPFC 18 9 16 8
SI BLA-mPFC 14 6 3 1
M GH BLA-mPFC 37 12 37 12
nonspecific 50 11 50 11
SI BLA-mPFC 30 9 29 9
nonspecific 56 11 56 11
files with no recording: 14
sub-M2-2-female-2024-08-21_ses-20240821_obj-1craycm_icephys.nwb GH V 0.12 to 0.31 mV, largest step 0.6 pA, sweeps 32
acquisition ['CurrentClampSeries202408210003VmSec', 'histology_images'], stimulus ['CurrentClampStimulusSeries202408210003VmSec'], voltage series shape (640000,), histology images [(3200, 3200, 3), (3200, 3200, 3)], file 62.2 MB
sub-M2-2-female-2024-08-21_ses-20240821_obj-1o0zf0j_icephys.nwb GH V 0.12 to 0.31 mV, largest step 0.0 pA, sweeps 32
acquisition ['CurrentClampSeries202408210007VmSec', 'histology_images'], stimulus ['CurrentClampStimulusSeries202408210007VmSec'], voltage series shape (640000,), histology images [(3200, 3200, 3), (3200, 3200, 3)], file 62.3 MB
sub-M3-1-female-2024-09-03_ses-20240903_obj-1y84wnt_icephys.nwb SI V 0.12 to 0.31 mV, largest step 4.3 pA, sweeps 32
acquisition ['CurrentClampSeries202409030017VmSec', 'histology_images'], stimulus ['CurrentClampStimulusSeries202409030017VmSec'], voltage series shape (640000,), histology images [(3200, 3200, 3)], file 31.6 MB
sub-M3-1-female-2024-09-03_ses-20240903_obj-nb0lo8_icephys.nwb SI V 0.12 to 0.31 mV, largest step 3.7 pA, sweeps 32
acquisition ['CurrentClampSeries202409030018VmSec', 'histology_images'], stimulus ['CurrentClampStimulusSeries202409030018VmSec'], voltage series shape (640000,), histology images [(3200, 3200, 3)], file 31.6 MB
sub-M3-1-female-2024-09-03_ses-20240903_obj-sk3x9d_icephys.nwb SI V 0.12 to 0.31 mV, largest step 2.4 pA, sweeps 32
acquisition ['CurrentClampSeries202409030014VmSec', 'histology_images'], stimulus ['CurrentClampStimulusSeries202409030014VmSec'], voltage series shape (640000,), histology images [(3200, 3200, 3)], file 31.6 MB
sub-M3-1-female-2024-09-03_ses-20240903_obj-yuwp7z_icephys.nwb SI V 0.12 to 0.31 mV, largest step 1.5 pA, sweeps 32
acquisition ['CurrentClampSeries202409030013VmSec', 'histology_images'], stimulus ['CurrentClampStimulusSeries202409030013VmSec'], voltage series shape (640000,), histology images [(3200, 3200, 3)], file 31.6 MB
sub-M3-3-female-2024-09-04_ses-20240904_obj-19s2r47_icephys.nwb SI V -0.12 to 0.06 mV, largest step 0.9 pA, sweeps 32
acquisition ['CurrentClampSeries202409040006VmSec', 'histology_images'], stimulus ['CurrentClampStimulusSeries202409040006VmSec'], voltage series shape (640000,), histology images [(3200, 3200, 3)], file 31.5 MB
sub-M3-3-female-2024-09-04_ses-20240904_obj-1b7s988_icephys.nwb SI V -0.12 to 0.06 mV, largest step 3.4 pA, sweeps 32
acquisition ['CurrentClampSeries202409040002VmSec', 'histology_images'], stimulus ['CurrentClampStimulusSeries202409040002VmSec'], voltage series shape (640000,), histology images [(3200, 3200, 3)], file 31.6 MB
sub-M3-3-female-2024-09-04_ses-20240904_obj-utpwue_icephys.nwb SI V -0.12 to 0.06 mV, largest step 1.2 pA, sweeps 32
acquisition ['CurrentClampSeries202409040010VmSec', 'histology_images'], stimulus ['CurrentClampStimulusSeries202409040010VmSec'], voltage series shape (640000,), histology images [(3200, 3200, 3)], file 31.5 MB
sub-M4-1-female-2024-09-06_ses-20240906_icephys.nwb SI V -209.44 to -208.40 mV, largest step 1.2 pA, sweeps 32
acquisition ['CurrentClampSeries202409060002VmSec', 'histology_images'], stimulus ['CurrentClampStimulusSeries202409060002VmSec'], voltage series shape (640000,), histology images [(3200, 3200, 3)], file 31.6 MB
sub-M4-2-female-2024-09-06_ses-20240906_icephys.nwb SI V -210.57 to -207.70 mV, largest step 0.6 pA, sweeps 32
acquisition ['CurrentClampSeries202409060005VmSec', 'histology_images'], stimulus ['CurrentClampStimulusSeries202409060005VmSec'], voltage series shape (640000,), histology images [(3200, 3200, 3), (3200, 3200, 3)], file 62.3 MB
sub-M4-3-female-2024-09-05_ses-20240905_obj-1niteox_icephys.nwb SI V -209.66 to -207.86 mV, largest step 0.6 pA, sweeps 32
acquisition ['CurrentClampSeries202409050002VmSec', 'histology_images'], stimulus ['CurrentClampStimulusSeries202409050002VmSec'], voltage series shape (640000,), histology images [(3200, 3200, 3), (3200, 3200, 3)], file 62.4 MB
sub-M4-3-female-2024-09-05_ses-20240905_obj-mhz14d_icephys.nwb SI V -208.92 to -208.31 mV, largest step 0.0 pA, sweeps 32
acquisition ['CurrentClampSeries202409050006VmSec', 'histology_images'], stimulus ['CurrentClampStimulusSeries202409050006VmSec'], voltage series shape (640000,), histology images [(3200, 3200, 3), (3200, 3200, 3)], file 62.3 MB
sub-M6-3-male-2022-07-27_ses-20220727_obj-hirjcn_icephys.nwb SI V -79.80 to -65.12 mV, largest step 120.2 pA, sweeps 1
acquisition ['CurrentClampSeries202207270000VmPrime', 'histology_images'], stimulus ['CurrentClampStimulusSeries202207270000VmPrime'], voltage series shape (20000,), histology images [(1040, 1392)], file 1.7 MB
series per file: acquisition {1: 106, 2: 99} (the voltage series and, in some, histology_images), stimulus {1: 205}
channel in the series name, by whether the file holds a recording:
recorded False True
channel
ImPrime 0 16
ImPrime2 0 1
VmPrime 1 156
VmSec 13 0
file size less histology bytes (MB): recorded [0.8 1.3 1.6], not recorded [0.3 0.9 0.9]
# units and ranges of what is used, on the recorded neurons
R = D[D.recorded]
rc = [cells[i] for i in R.index]
err = [np.max(np.abs(c["step_pA"] - P.nominal_steps(c))[P.nominal_steps(c) != 0] / np.abs(P.nominal_steps(c)[P.nominal_steps(c) != 0])) for c in rc]
print("sampling rate 10 kHz, sweep 2 s: step onset sample", sorted({c["step_on"] for c in rc}), "offset", sorted({c["step_off"] for c in rc}),
"-> step of", sorted({(c["step_off"] - c["step_on"]) / 10 for c in rc}), "ms (Methods: 500 ms)")
print(f"measured steps against -120 + 20 k pA: largest relative difference {max(err):.3f}")
print("first and last measured step (pA), range over neurons:",
np.round(np.percentile([c["step_pA"][0] for c in rc], [0, 100]), 1),
np.round(np.percentile([c["step_pA"][-1] for c in rc], [0, 100]), 1))
print("resting potential (mV), before the first step:", R.vrest.describe().round(1).to_dict())
print("voltage range over all sweeps (mV):", round(min(c["V"].min() for c in rc), 1), "to", round(max(c["V"].max() for c in rc), 1))
print("input resistance, last 100 ms (MOhm):", R.rin100.describe().round(1).to_dict())
for thr in RULES:
E_ = P.curves(R, thr)
print(f"spikes per 500-ms step, {LBL[thr]}: max {E_.max():.0f}, median at 500 pA {np.median(E_[:, -1]):.0f}, total {E_.sum():.0f}")
# where the rules differ: sweeps (0 to 500 pA) with fewer -20 mV than 0 mV crossings
E = {k: P.curves(R, k) for k in RULES}
print(f"sweeps (0 to 500 pA) with fewer spikes at -20 mV than at 0 mV: {(E[-20] < E[0]).sum()} of {E[0].size} "
f"(no re-arm {(E['-20r0'] < E['0r0']).sum()}, 5 mV re-arm {(E['-20r5'] < E['0r5']).sum()})")
for thr in (0, -20):
print(f" {thr} mV, sweeps where the count differs from the 1 mV rule: no re-arm {(E[f'{thr}r0'] != E[thr]).sum()} "
f"(more by up to {(E[f'{thr}r0'] - E[thr]).max():.0f}), 5 mV re-arm {(E[f'{thr}r5'] != E[thr]).sum()} (fewer by up to {(E[thr] - E[f'{thr}r5']).max():.0f})")
noise = np.array([np.median([np.std(np.diff(v[: c["step_on"] - 50])) / np.sqrt(2) for v in c["V"]]) for c in rc])
print("sample-to-sample noise s.d. before the step (mV), percentiles 0, 50, 95, 100:", np.percentile(noise, [0, 50, 95, 100]).round(3))
# synthetic check of the counter: 10 spikes from a -22 mV plateau, with noise
syn = np.full((1, 5000), -22.0) + np.random.default_rng(0).normal(0, 0.3, (1, 5000))
for k in range(10):
syn[0, 200 + 400 * k: 210 + 400 * k] = 30
plateau = np.full((1, 5000), -20.0) + np.random.default_rng(1).normal(0, 0.3, (1, 5000))
plateau[0, 100:110] = 30
for name, x in (("10 spikes from a -22 mV trough", syn), ("1 spike, then a plateau at -20 mV", plateau)):
print(f"synthetic {name}: counted", {LBL[t]: int(P.count_spikes(x, 0, 5000, t if isinstance(t, int) else int(t[:-2]),
rearm_mv=None if isinstance(t, int) else P.SPIKE_RULES[t[-2:]])[0]) for t in RULES})
# the same recording deposited twice?
h = pd.Series([hashlib.md5(c["V"].tobytes()).hexdigest() for c in cells])
print("files with identical voltage data:", int(h.duplicated(keep=False).sum()))
# step and response share one clock: the -120 pA response starts at the step onset
pre = np.array([c["V"][0, c["step_on"] - 100:c["step_on"]].mean() for c in rc])
post = np.array([c["V"][0, c["step_on"] + 100:c["step_on"] + 200].mean() for c in rc])
sh = np.array([c["V"][0, c["step_on"] - 300:c["step_on"] - 200].mean() for c in rc])
print(f"-120 pA: change from the 10 ms before onset to 10-20 ms after it {np.median(post - pre):.2f} mV; "
f"the same contrast shifted 20 ms earlier {np.median(pre - sh):.2f} mV")
sampling rate 10 kHz, sweep 2 s: step onset sample [1313] offset [6313] -> step of [500.0] ms (Methods: 500 ms)
measured steps against -120 + 20 k pA: largest relative difference 0.099
first and last measured step (pA), range over neurons: [-123.3 -119.6] [502.3 764.2]
resting potential (mV), before the first step: {'count': 191.0, 'mean': -68.4, 'std': 2.8, 'min': -75.2, '25%': -70.2, '50%': -68.7, '75%': -67.0, 'max': -54.2}
voltage range over all sweeps (mV): -119.8 to 84.7
input resistance, last 100 ms (MOhm): {'count': 191.0, 'mean': 118.1, 'std': 51.7, 'min': 43.1, '25%': 84.0, '50%': 108.8, '75%': 134.0, 'max': 416.3}
spikes per 500-ms step, 0 mV: max 25, median at 500 pA 15, total 34387
spikes per 500-ms step, -20 mV: max 25, median at 500 pA 14, total 33788
spikes per 500-ms step, 0 mV, no re-arm: max 50, median at 500 pA 15, total 34756
spikes per 500-ms step, -20 mV, no re-arm: max 98, median at 500 pA 15, total 35080
spikes per 500-ms step, 0 mV, 5 mV re-arm: max 25, median at 500 pA 15, total 34262
spikes per 500-ms step, -20 mV, 5 mV re-arm: max 25, median at 500 pA 14, total 33374
sweeps (0 to 500 pA) with fewer spikes at -20 mV than at 0 mV: 77 of 4966 (no re-arm 62, 5 mV re-arm 121)
0 mV, sweeps where the count differs from the 1 mV rule: no re-arm 34 (more by up to 43), 5 mV re-arm 23 (fewer by up to 14)
-20 mV, sweeps where the count differs from the 1 mV rule: no re-arm 124 (more by up to 85), 5 mV re-arm 97 (fewer by up to 17)
sample-to-sample noise s.d. before the step (mV), percentiles 0, 50, 95, 100: [0.029 0.117 0.167 0.366]
synthetic 10 spikes from a -22 mV trough: counted {'0 mV': 10, '-20 mV': 10, '0 mV, no re-arm': 10, '-20 mV, no re-arm': 10, '0 mV, 5 mV re-arm': 10, '-20 mV, 5 mV re-arm': 1}
synthetic 1 spike, then a plateau at -20 mV: counted {'0 mV': 1, '-20 mV': 2, '0 mV, no re-arm': 1, '-20 mV, no re-arm': 417, '0 mV, 5 mV re-arm': 1, '-20 mV, 5 mV re-arm': 1}
files with identical voltage data: 0 -120 pA: change from the 10 ms before onset to 10-20 ms after it -8.93 mV; the same contrast shifted 20 ms earlier -0.02 mV
# which neurons the paper's groups hold: neurons per mouse, by recording cohort (year in the subject id)
R = D[D.recorded]
t = R.groupby(["sex", "housing", "target", "cohort"]).agg(neurons=("path", "size"), mice=("subject", "nunique"))
print(t)
print("\nranks, recorded neurons (mice):")
print(R.groupby(["sex", "housing", "target", "rank"]).agg(neurons=("path", "size"), mice=("subject", "nunique")))
neurons mice
sex housing target cohort
F GH BLA-mPFC 2024 4 3
2025 12 5
SI BLA-mPFC 2025 3 1
M GH BLA-mPFC 2022 21 7
2024 16 5
nonspecific 2021 15 2
2022 35 9
SI BLA-mPFC 2022 29 9
nonspecific 2021 14 2
2022 42 9
ranks, recorded neurons (mice):
neurons mice
sex housing target rank
F GH BLA-mPFC 1.0 5 2
2.0 6 3
3.0 5 3
M GH BLA-mPFC 1.0 13 4
2.0 7 3
3.0 17 5
nonspecific 1.0 10 3
2.0 9 3
3.0 16 3
SI BLA-mPFC 1.0 11 3
2.0 8 3
3.0 10 3
nonspecific 1.0 17 3
2.0 14 3
3.0 11 3
The groups against the paper's counts:
- Male BLA-mPFC, group-housed: the paper's Figure 2c has 21 neurons from 7 mice; the dandiset holds 37 from 12. The 2022 cohort holds exactly 21 neurons from 7 mice, and the 16 neurons of the 2024 cohort (5 subject ids) are not in Figure 2c. The rank analysis of Extended Data Fig. 3c (36 neurons from 13 mice) uses both cohorts. The dandiset does not mark which neurons enter Figure 2c; the 2022 cohort is taken as Figure 2c's group (an assumption that rests on the counts), and every male result is also shown with all 37 neurons.
- Male BLA-mPFC, isolated: 30 neurons from 9 mice, as in the paper; one file holds a single sweep (-120 pA only), so 29 neurons enter the excitability tests.
- Female BLA-mPFC: 18 group-housed files from 9 mice (paper 18 from 9), of which 2 (one mouse) hold no recording; 14 isolated files from 6 mice (paper 15 from 7), of which 11 hold no recording, so 3 neurons from 1 mouse remain. Each of these 13 files holds a single voltage series and a single stimulus series, both named with the amplifier's secondary channel ("VmSec", where every recorded file has "VmPrime", "ImPrime" or "ImPrime2"), both flat; the files are as large as recorded ones only because of their histology images. The recordings of the primary channel are not in the dandiset. The claims that need isolated females are blocked.
- Nonspecific male neurons: 50 group-housed from 11 mice (paper 50 from 11) and 56 isolated from 11 (paper 54 from 12).
- Ranks: male BLA-mPFC group-housed rank 1, 2, 3 hold 13, 7 and 17 neurons (paper 13, 9 and 14); nonspecific group-housed 10, 9 and 16 (paper 10, 9, 16); nonspecific isolated 17, 14 and 11 (paper 16, 13, 11); female BLA-mPFC group-housed 5, 6 and 5 recorded (paper 7, 6, 5; the 2 empty files are rank 1).
def anova_two(a, b, thr, labels=("a", "b")):
"""M6: two-way ANOVA, current (repeated) by group, neurons as units."""
A, B = P.curves(a, thr), P.curves(b, thr)
t = P.split_plot_anova(np.r_[A, B], pd.DataFrame({"grp": [labels[0]] * len(A) + [labels[1]] * len(B)}))
ph = P.posthoc_two(A, B)
return A, B, t, ph
def report_two(a, b, thr, name, labels):
A, B, t, ph = anova_two(a, b, thr, labels)
for lab, d, M in ((labels[0], a, A), (labels[1], b, B)):
d = d[[x is not None for x in d[f"e{thr}"]]]
print(f" {lab} mean spikes per step by mouse:", d.assign(m=M.mean(1)).groupby("subject").m.mean().round(2).tolist())
it, gr = t.loc["level:grp"], t.loc["grp"]
print(f"{name}, {LBL[thr]}: {labels[0]} n={len(A)} ({a.subject.nunique()} mice), {labels[1]} n={len(B)} ({b.subject.nunique()} mice)")
print(f" current x group F({it.df1:.0f}, {it.df2:.0f}) = {it.F:.2f}, p = {it.p:.2g}; group F({gr.df1:.0f}, {gr.df2:.0f}) = {gr.F:.2f}, p = {gr.p:.2g}")
print(f" steps where {labels[1]} > {labels[0]}: {(ph['diff'] > 0).sum()} of 26; "
f"Sidak p < 0.05 at (per-step t) {list(ph.current_pA[ph.p_sidak_step < 0.05])} pA, (pooled error) {list(ph.current_pA[ph.p_sidak_pooled < 0.05])} pA; "
f"smallest {ph.p_sidak_step.min():.3g} and {ph.p_sidak_pooled.min():.3g}")
return A, B, t, ph
R = D[D.recorded]
mp = R[(R.sex == "M") & (R.target == "BLA-mPFC")]
fp = R[(R.sex == "F") & (R.target == "BLA-mPFC")]
ns = R[(R.sex == "M") & (R.target == "nonspecific")]
mGH22, mGHall, mSI = mp[(mp.housing == "GH") & (mp.cohort == "2022")], mp[mp.housing == "GH"], mp[mp.housing == "SI"]
fig2c-male-blampfc-excitability-up¶
After isolation BLA-mPFC neurons of males fire more action potentials across current injections than those of group-housed males.
Criterion: M6, labeled neurons of males; reproduced when the current by housing interaction has p < 0.05, isolated neurons fire more at most steps, and at least one Sidak test across steps is significant, under both spike readings (0 mV and -20 mV crossings, 1 mV re-arm; the two variants of the guard are shown). The group-housed group is the 2022 cohort (21 neurons, the paper's n); all 37 group-housed neurons are a variant.
for thr in RULES:
A, B, t, ph = report_two(mGH22, mSI, thr, "fig2c, group-housed 2022 cohort", ("GH", "SI"))
if thr in (0, -20):
print(ph[["current_pA", "mean_a", "mean_b", "diff", "p_sidak_step", "p_sidak_pooled"]].round(3).to_string(index=False))
report_two(mGHall, mSI, thr, "variant, all group-housed", ("GH", "SI"))
print()
# per mouse: mean spikes over the 26 steps
for lab, d in [("GH 2022", mGH22), ("SI", mSI)]:
m = d.assign(mean=[x.mean() for x in d.e0]).groupby("subject")["mean"].agg(["size", "mean"]).round(2)
print(lab, "neurons and mean spikes per step (0 mV), by mouse:", m.to_dict("index"))
GH mean spikes per step by mouse: [8.26, 6.99, 4.65, 7.36, 10.16, 4.31, 8.85]
SI mean spikes per step by mouse: [7.21, 7.31, 2.33, 9.23, 10.12, 5.85, 6.53, 9.59, 8.35]
fig2c, group-housed 2022 cohort, 0 mV: GH n=21 (7 mice), SI n=29 (9 mice)
current x group F(25, 1200) = 4.70, p = 3.3e-13; group F(1, 48) = 0.13, p = 0.72
steps where SI > GH: 14 of 26; Sidak p < 0.05 at (per-step t) [] pA, (pooled error) [] pA; smallest 0.116 and 0.325
current_pA mean_a mean_b diff p_sidak_step p_sidak_pooled
0 0.000 0.000 0.000 1.000 1.000
20 0.000 0.000 0.000 1.000 1.000
40 0.000 0.000 0.000 1.000 1.000
60 0.000 0.103 0.103 1.000 1.000
80 0.000 0.655 0.655 0.434 1.000
100 0.286 1.483 1.197 0.337 1.000
120 0.810 2.517 1.708 0.340 0.958
140 1.190 3.586 2.396 0.116 0.508
160 2.238 4.690 2.452 0.346 0.462
180 2.952 5.586 2.634 0.390 0.325
200 4.238 6.345 2.107 0.887 0.748
220 5.619 7.138 1.519 0.999 0.989
240 6.667 7.828 1.161 1.000 1.000
260 7.857 8.724 0.867 1.000 1.000
280 8.762 9.414 0.652 1.000 1.000
300 9.619 10.172 0.553 1.000 1.000
320 10.714 10.724 0.010 1.000 1.000
340 11.714 11.414 -0.300 1.000 1.000
360 12.476 11.966 -0.511 1.000 1.000
380 13.143 12.517 -0.626 1.000 1.000
400 14.000 12.966 -1.034 1.000 1.000
420 14.571 13.379 -1.192 1.000 1.000
440 15.190 13.966 -1.225 1.000 1.000
460 15.857 14.379 -1.478 1.000 0.993
480 16.333 14.828 -1.506 0.998 0.991
500 16.762 15.034 -1.727 0.994 0.952
GH mean spikes per step by mouse: [8.26, 6.99, 4.65, 5.92, 5.15, 7.36, 6.63, 6.14, 5.72, 10.16, 4.31, 8.85] SI mean spikes per step by mouse: [7.21, 7.31, 2.33, 9.23, 10.12, 5.85, 6.53, 9.59, 8.35] variant, all group-housed, 0 mV: GH n=37 (12 mice), SI n=29 (9 mice) current x group F(25, 1600) = 4.65, p = 3.6e-13; group F(1, 64) = 1.53, p = 0.22 steps where SI > GH: 17 of 26; Sidak p < 0.05 at (per-step t) [120, 140, 160, 180] pA, (pooled error) [180] pA; smallest 0.018 and 0.0177
GH mean spikes per step by mouse: [8.27, 6.99, 4.65, 7.37, 10.16, 4.31, 8.85]
SI mean spikes per step by mouse: [7.23, 7.31, 2.33, 9.23, 9.62, 5.85, 6.53, 9.59, 8.35]
fig2c, group-housed 2022 cohort, -20 mV: GH n=21 (7 mice), SI n=29 (9 mice)
current x group F(25, 1200) = 4.83, p = 1e-13; group F(1, 48) = 0.08, p = 0.78
steps where SI > GH: 14 of 26; Sidak p < 0.05 at (per-step t) [] pA, (pooled error) [] pA; smallest 0.116 and 0.346
current_pA mean_a mean_b diff p_sidak_step p_sidak_pooled
0 0.000 0.000 0.000 1.000 1.000
20 0.000 0.000 0.000 1.000 1.000
40 0.000 0.000 0.000 1.000 1.000
60 0.000 0.103 0.103 1.000 1.000
80 0.000 0.655 0.655 0.434 1.000
100 0.286 1.483 1.197 0.337 1.000
120 0.810 2.517 1.708 0.340 0.963
140 1.190 3.586 2.396 0.116 0.531
160 2.238 4.690 2.452 0.346 0.485
180 2.952 5.586 2.634 0.390 0.346
200 4.238 6.345 2.107 0.887 0.766
220 5.667 7.138 1.471 0.999 0.994
240 6.667 7.828 1.161 1.000 1.000
260 7.857 8.724 0.867 1.000 1.000
280 8.762 9.414 0.652 1.000 1.000
300 9.619 10.172 0.553 1.000 1.000
320 10.714 10.724 0.010 1.000 1.000
340 11.714 11.414 -0.300 1.000 1.000
360 12.476 11.966 -0.511 1.000 1.000
380 13.143 12.586 -0.557 1.000 1.000
400 14.048 13.000 -1.048 1.000 1.000
420 14.571 13.379 -1.192 1.000 1.000
440 15.190 13.793 -1.397 1.000 0.997
460 15.857 13.828 -2.030 0.983 0.820
480 16.333 14.241 -2.092 0.960 0.777
500 16.762 14.448 -2.314 0.923 0.600
GH mean spikes per step by mouse: [8.27, 6.99, 4.65, 5.92, 5.15, 7.37, 6.63, 6.14, 5.72, 10.16, 4.31, 8.85] SI mean spikes per step by mouse: [7.23, 7.31, 2.33, 9.23, 9.62, 5.85, 6.53, 9.59, 8.35] variant, all group-housed, -20 mV: GH n=37 (12 mice), SI n=29 (9 mice) current x group F(25, 1600) = 4.95, p = 2.2e-14; group F(1, 64) = 1.33, p = 0.25 steps where SI > GH: 17 of 26; Sidak p < 0.05 at (per-step t) [120, 140, 160, 180] pA, (pooled error) [180] pA; smallest 0.018 and 0.0199
GH mean spikes per step by mouse: [8.26, 6.99, 4.65, 7.36, 10.16, 4.31, 8.85] SI mean spikes per step by mouse: [7.21, 7.31, 2.33, 9.23, 10.12, 5.85, 6.53, 9.59, 8.35] fig2c, group-housed 2022 cohort, 0 mV, no re-arm: GH n=21 (7 mice), SI n=29 (9 mice) current x group F(25, 1200) = 4.70, p = 3.3e-13; group F(1, 48) = 0.13, p = 0.72 steps where SI > GH: 14 of 26; Sidak p < 0.05 at (per-step t) [] pA, (pooled error) [] pA; smallest 0.116 and 0.325
GH mean spikes per step by mouse: [8.26, 6.99, 4.65, 5.92, 5.15, 7.36, 6.63, 6.14, 5.72, 10.16, 4.31, 8.85] SI mean spikes per step by mouse: [7.21, 7.31, 2.33, 9.23, 10.12, 5.85, 6.53, 9.59, 8.35] variant, all group-housed, 0 mV, no re-arm: GH n=37 (12 mice), SI n=29 (9 mice) current x group F(25, 1600) = 4.65, p = 3.6e-13; group F(1, 64) = 1.53, p = 0.22 steps where SI > GH: 17 of 26; Sidak p < 0.05 at (per-step t) [120, 140, 160, 180] pA, (pooled error) [180] pA; smallest 0.018 and 0.0177
GH mean spikes per step by mouse: [8.29, 6.99, 4.65, 7.37, 10.16, 4.31, 8.85] SI mean spikes per step by mouse: [7.23, 7.33, 2.33, 9.41, 10.63, 5.92, 6.53, 9.59, 8.35] fig2c, group-housed 2022 cohort, -20 mV, no re-arm: GH n=21 (7 mice), SI n=29 (9 mice) current x group F(25, 1200) = 2.55, p = 4.5e-05; group F(1, 48) = 0.21, p = 0.65 steps where SI > GH: 15 of 26; Sidak p < 0.05 at (per-step t) [] pA, (pooled error) [] pA; smallest 0.116 and 0.527
GH mean spikes per step by mouse: [8.29, 6.99, 4.65, 5.92, 5.15, 7.37, 6.63, 6.14, 5.72, 10.16, 4.31, 8.85] SI mean spikes per step by mouse: [7.23, 7.33, 2.33, 9.41, 10.63, 5.92, 6.53, 9.59, 8.35] variant, all group-housed, -20 mV, no re-arm: GH n=37 (12 mice), SI n=29 (9 mice) current x group F(25, 1600) = 2.83, p = 4.1e-06; group F(1, 64) = 1.83, p = 0.18 steps where SI > GH: 20 of 26; Sidak p < 0.05 at (per-step t) [120, 140, 160, 180] pA, (pooled error) [180] pA; smallest 0.018 and 0.0486
GH mean spikes per step by mouse: [8.26, 6.99, 4.65, 7.36, 10.16, 4.31, 8.85] SI mean spikes per step by mouse: [7.21, 7.31, 2.33, 9.23, 10.12, 5.85, 6.53, 9.59, 8.35] fig2c, group-housed 2022 cohort, 0 mV, 5 mV re-arm: GH n=21 (7 mice), SI n=29 (9 mice) current x group F(25, 1200) = 4.70, p = 3.3e-13; group F(1, 48) = 0.13, p = 0.72 steps where SI > GH: 14 of 26; Sidak p < 0.05 at (per-step t) [] pA, (pooled error) [] pA; smallest 0.116 and 0.325
GH mean spikes per step by mouse: [8.26, 6.99, 4.65, 5.92, 5.15, 7.36, 6.63, 6.14, 5.72, 10.16, 4.31, 8.85] SI mean spikes per step by mouse: [7.21, 7.31, 2.33, 9.23, 10.12, 5.85, 6.53, 9.59, 8.35] variant, all group-housed, 0 mV, 5 mV re-arm: GH n=37 (12 mice), SI n=29 (9 mice) current x group F(25, 1600) = 4.65, p = 3.6e-13; group F(1, 64) = 1.53, p = 0.22 steps where SI > GH: 17 of 26; Sidak p < 0.05 at (per-step t) [120, 140, 160, 180] pA, (pooled error) [180] pA; smallest 0.018 and 0.0177
GH mean spikes per step by mouse: [8.27, 6.99, 4.65, 7.37, 10.16, 4.31, 8.85] SI mean spikes per step by mouse: [7.23, 7.31, 2.33, 8.95, 8.98, 5.85, 6.53, 9.59, 8.35] fig2c, group-housed 2022 cohort, -20 mV, 5 mV re-arm: GH n=21 (7 mice), SI n=29 (9 mice) current x group F(25, 1200) = 5.38, p = 6.4e-16; group F(1, 48) = 0.02, p = 0.9 steps where SI > GH: 14 of 26; Sidak p < 0.05 at (per-step t) [] pA, (pooled error) [] pA; smallest 0.116 and 0.23
GH mean spikes per step by mouse: [8.27, 6.99, 4.65, 5.92, 5.15, 7.37, 6.63, 6.14, 5.72, 10.16, 4.31, 8.85]
SI mean spikes per step by mouse: [7.23, 7.31, 2.33, 8.95, 8.98, 5.85, 6.53, 9.59, 8.35]
variant, all group-housed, -20 mV, 5 mV re-arm: GH n=37 (12 mice), SI n=29 (9 mice)
current x group F(25, 1600) = 5.69, p = 1.8e-17; group F(1, 64) = 0.95, p = 0.33
steps where SI > GH: 16 of 26; Sidak p < 0.05 at (per-step t) [120, 140, 160, 180] pA, (pooled error) [180] pA; smallest 0.018 and 0.0233
GH 2022 neurons and mean spikes per step (0 mV), by mouse: {'M2.1_male_2022-07-29': {'size': 3, 'mean': 8.26}, 'M2.2_male_2022-07-30': {'size': 3, 'mean': 6.99}, 'M3.1_male_2022-06-30': {'size': 2, 'mean': 4.65}, 'M3.2_male_2022-07-01': {'size': 5, 'mean': 7.36}, 'M5.1_male_2022-08-01': {'size': 4, 'mean': 10.16}, 'M5.2_male_2022-08-03': {'size': 3, 'mean': 4.31}, 'M5.3_male_2022-08-03': {'size': 1, 'mean': 8.85}}
SI neurons and mean spikes per step (0 mV), by mouse: {'M1.1_male_2022-07-04': {'size': 2, 'mean': 7.21}, 'M1.2_male_2022-07-06': {'size': 2, 'mean': 7.31}, 'M1.3_male_2022-07-09': {'size': 2, 'mean': 2.33}, 'M4.1_male_2022-07-13': {'size': 5, 'mean': 9.23}, 'M4.2_male_2022-07-15': {'size': 4, 'mean': 10.12}, 'M4.3_male_2022-07-17': {'size': 5, 'mean': 5.85}, 'M6.1_male_2022-07-25': {'size': 4, 'mean': 6.53}, 'M6.2_male_2022-07-26': {'size': 4, 'mean': 9.59}, 'M6.3_male_2022-07-27': {'size': 1, 'mean': 8.35}}
Result: not reproduced, resting on the choice of group-housed neurons. Under both spike readings the current by housing interaction is significant (F(25, 1200) = 4.70 and 4.83, p < 0.0001), and isolated neurons fire more at 14 of 26 steps under both, but the curves cross: the isolated neurons fire more at low and middle currents and fewer at the top steps, and no step differs after Sidak adjustment under either post hoc reading (smallest adjusted p 0.116 per step, 0.325 and 0.346 with pooled error). The Sidak part of the criterion fails, and with crossing curves isolated neurons do not fire more across current injections. The two variants of the spike rule give the same: 14 or 15 of 26 steps, no Sidak step. With all 37 group-housed neurons (variant) the interaction holds, isolated neurons fire more at 17 of 26 steps, and the per-step Sidak tests are significant at 120 to 180 pA (pooled error at 180 pA), which would meet the criterion.
fig2e-female-higher-baseline-excitability¶
Group-housed females have more excitable BLA-mPFC neurons than group-housed males.
Criterion: M6, group-housed labeled neurons; reproduced when the current by sex interaction has p < 0.05, female neurons fire more at most steps, and at least one Sidak test is significant, under both spike readings. Females: the 16 recorded group-housed neurons (paper 18).
fGH = fp[fp.housing == "GH"]
for thr in RULES:
A, B, t, ph = report_two(mGH22, fGH, thr, "fig2e, male 2022 cohort against female", ("M", "F"))
if thr in (0, -20):
print(ph[["current_pA", "mean_a", "mean_b", "diff", "p_sidak_step", "p_sidak_pooled"]].round(3).to_string(index=False))
report_two(mGHall, fGH, thr, "variant, all group-housed males", ("M", "F"))
print()
# females by mouse, both rules, the steps where females fire more
for thr in RULES:
F_ = P.curves(fGH, thr)
print(f"{LBL[thr]}: female mean spikes per step by mouse", fGH.assign(m=F_.mean(1)).groupby("subject").m.mean().round(2).to_dict())
M mean spikes per step by mouse: [8.26, 6.99, 4.65, 7.36, 10.16, 4.31, 8.85]
F mean spikes per step by mouse: [8.38, 5.76, 12.96, 9.52, 5.46, 6.85, 5.31, 7.19]
fig2e, male 2022 cohort against female, 0 mV: M n=21 (7 mice), F n=16 (8 mice)
current x group F(25, 875) = 17.84, p = 4.5e-62; group F(1, 35) = 0.42, p = 0.52
steps where F > M: 16 of 26; Sidak p < 0.05 at (per-step t) [80, 100, 120, 140, 160, 180, 200, 480, 500] pA, (pooled error) [140, 160, 180, 200, 460, 480, 500] pA; smallest 0.00102 and 1.62e-07
current_pA mean_a mean_b diff p_sidak_step p_sidak_pooled
0 0.000 0.000 0.000 1.000 1.000
20 0.000 0.250 0.250 1.000 1.000
40 0.000 0.500 0.500 0.984 1.000
60 0.000 1.750 1.750 0.101 0.982
80 0.000 2.625 2.625 0.023 0.527
100 0.286 3.750 3.464 0.010 0.095
120 0.810 4.438 3.628 0.024 0.062
140 1.190 5.312 4.122 0.014 0.015
160 2.238 6.562 4.324 0.015 0.008
180 2.952 7.500 4.548 0.019 0.004
200 4.238 8.562 4.324 0.033 0.008
220 5.619 8.688 3.068 0.546 0.238
240 6.667 9.250 2.583 0.839 0.558
260 7.857 9.812 1.955 0.981 0.939
280 8.762 10.375 1.613 0.999 0.994
300 9.619 10.875 1.256 1.000 1.000
320 10.714 11.375 0.661 1.000 1.000
340 11.714 11.500 -0.214 1.000 1.000
360 12.476 11.750 -0.726 1.000 1.000
380 13.143 12.312 -0.830 1.000 1.000
400 14.000 12.562 -1.438 1.000 0.999
420 14.571 12.938 -1.634 0.999 0.993
440 15.190 12.500 -2.690 0.838 0.477
460 15.857 11.625 -4.232 0.103 0.011
480 16.333 10.500 -5.833 0.003 0.000
500 16.762 9.750 -7.012 0.001 0.000
M mean spikes per step by mouse: [8.26, 6.99, 4.65, 5.92, 5.15, 7.36, 6.63, 6.14, 5.72, 10.16, 4.31, 8.85] F mean spikes per step by mouse: [8.38, 5.76, 12.96, 9.52, 5.46, 6.85, 5.31, 7.19] variant, all group-housed males, 0 mV: M n=37 (12 mice), F n=16 (8 mice) current x group F(25, 1275) = 20.45, p = 3.9e-76; group F(1, 51) = 2.24, p = 0.14 steps where F > M: 19 of 26; Sidak p < 0.05 at (per-step t) [60, 80, 100, 120, 140, 160, 180, 200, 480, 500] pA, (pooled error) [100, 120, 140, 160, 180, 200, 220, 240, 480, 500] pA; smallest 0.0002 and 1.69e-07
M mean spikes per step by mouse: [8.27, 6.99, 4.65, 7.37, 10.16, 4.31, 8.85]
F mean spikes per step by mouse: [9.65, 5.62, 9.85, 6.09, 2.08, 6.85, 5.31, 7.25]
fig2e, male 2022 cohort against female, -20 mV: M n=21 (7 mice), F n=16 (8 mice)
current x group F(25, 875) = 19.37, p = 3e-67; group F(1, 35) = 0.74, p = 0.4
steps where F > M: 14 of 26; Sidak p < 0.05 at (per-step t) [80, 100, 120, 140, 160, 180, 400, 420, 440, 460, 480, 500] pA, (pooled error) [140, 160, 180, 360, 380, 400, 420, 440, 460, 480, 500] pA; smallest 0.00187 and 1.39e-07
current_pA mean_a mean_b diff p_sidak_step p_sidak_pooled
0 0.000 0.000 0.000 1.000 1.000
20 0.000 0.250 0.250 1.000 1.000
40 0.000 0.500 0.500 0.984 1.000
60 0.000 1.750 1.750 0.101 0.995
80 0.000 2.625 2.625 0.023 0.711
100 0.286 3.750 3.464 0.010 0.203
120 0.810 4.562 3.753 0.013 0.110
140 1.190 5.312 4.122 0.017 0.046
160 2.238 6.375 4.137 0.032 0.044
180 2.952 7.312 4.360 0.038 0.025
200 4.238 7.938 3.699 0.162 0.124
220 5.667 8.625 2.958 0.604 0.482
240 6.667 9.188 2.521 0.857 0.776
260 7.857 9.688 1.830 0.993 0.991
280 8.762 9.312 0.551 1.000 1.000
300 9.619 8.562 -1.057 1.000 1.000
320 10.714 7.750 -2.964 0.807 0.478
340 11.714 7.812 -3.902 0.367 0.078
360 12.476 7.938 -4.539 0.146 0.015
380 13.143 8.312 -4.830 0.131 0.007
400 14.048 8.438 -5.610 0.050 0.001
420 14.571 8.625 -5.946 0.030 0.000
440 15.190 8.688 -6.503 0.013 0.000
460 15.857 8.875 -6.982 0.007 0.000
480 16.333 9.250 -7.083 0.007 0.000
500 16.762 9.000 -7.762 0.002 0.000
M mean spikes per step by mouse: [8.27, 6.99, 4.65, 5.92, 5.15, 7.37, 6.63, 6.14, 5.72, 10.16, 4.31, 8.85] F mean spikes per step by mouse: [9.65, 5.62, 9.85, 6.09, 2.08, 6.85, 5.31, 7.25] variant, all group-housed males, -20 mV: M n=37 (12 mice), F n=16 (8 mice) current x group F(25, 1275) = 24.91, p = 3.2e-92; group F(1, 51) = 0.08, p = 0.79 steps where F > M: 14 of 26; Sidak p < 0.05 at (per-step t) [60, 80, 100, 120, 140, 160, 180, 200, 400, 420, 440, 460, 480, 500] pA, (pooled error) [100, 120, 140, 160, 180, 200, 220, 360, 380, 400, 420, 440, 460, 480, 500] pA; smallest 0.0002 and 3.79e-08
M mean spikes per step by mouse: [8.26, 6.99, 4.65, 7.36, 10.16, 4.31, 8.85] F mean spikes per step by mouse: [8.38, 6.26, 14.35, 10.93, 9.23, 6.85, 5.31, 7.19] fig2e, male 2022 cohort against female, 0 mV, no re-arm: M n=21 (7 mice), F n=16 (8 mice) current x group F(25, 875) = 3.39, p = 5.6e-08; group F(1, 35) = 2.14, p = 0.15 steps where F > M: 17 of 26; Sidak p < 0.05 at (per-step t) [80, 100, 120, 140, 160, 180] pA, (pooled error) [180, 200] pA; smallest 0.0071 and 0.000431
M mean spikes per step by mouse: [8.26, 6.99, 4.65, 5.92, 5.15, 7.36, 6.63, 6.14, 5.72, 10.16, 4.31, 8.85] F mean spikes per step by mouse: [8.38, 6.26, 14.35, 10.93, 9.23, 6.85, 5.31, 7.19] variant, all group-housed males, 0 mV, no re-arm: M n=37 (12 mice), F n=16 (8 mice) current x group F(25, 1275) = 4.48, p = 2.3e-12; group F(1, 51) = 6.01, p = 0.018 steps where F > M: 23 of 26; Sidak p < 0.05 at (per-step t) [60, 80, 100, 120, 140, 160, 180, 200, 220] pA, (pooled error) [140, 160, 180, 200, 220] pA; smallest 0.000107 and 1.76e-07
M mean spikes per step by mouse: [8.29, 6.99, 4.65, 7.37, 10.16, 4.31, 8.85] F mean spikes per step by mouse: [13.77, 5.76, 11.92, 9.74, 5.5, 6.85, 5.31, 7.25] fig2e, male 2022 cohort against female, -20 mV, no re-arm: M n=21 (7 mice), F n=16 (8 mice) current x group F(25, 875) = 6.90, p = 1.5e-21; group F(1, 35) = 0.88, p = 0.36 steps where F > M: 16 of 26; Sidak p < 0.05 at (per-step t) [80, 100, 120, 140, 160, 180, 440] pA, (pooled error) [260, 280] pA; smallest 0.00632 and 2.49e-07
M mean spikes per step by mouse: [8.29, 6.99, 4.65, 5.92, 5.15, 7.37, 6.63, 6.14, 5.72, 10.16, 4.31, 8.85] F mean spikes per step by mouse: [13.77, 5.76, 11.92, 9.74, 5.5, 6.85, 5.31, 7.25] variant, all group-housed males, -20 mV, no re-arm: M n=37 (12 mice), F n=16 (8 mice) current x group F(25, 1275) = 10.90, p = 8.1e-39; group F(1, 51) = 3.42, p = 0.07 steps where F > M: 16 of 26; Sidak p < 0.05 at (per-step t) [60, 80, 100, 120, 140, 160, 180, 200, 220, 240, 260, 280, 420, 440] pA, (pooled error) [220, 240, 260, 280, 300, 440] pA; smallest 6.23e-05 and 1.65e-13
M mean spikes per step by mouse: [8.26, 6.99, 4.65, 7.36, 10.16, 4.31, 8.85] F mean spikes per step by mouse: [8.38, 5.64, 12.48, 8.89, 4.58, 6.85, 5.31, 7.19] fig2e, male 2022 cohort against female, 0 mV, 5 mV re-arm: M n=21 (7 mice), F n=16 (8 mice) current x group F(25, 875) = 19.80, p = 1.1e-68; group F(1, 35) = 0.12, p = 0.74 steps where F > M: 16 of 26; Sidak p < 0.05 at (per-step t) [80, 100, 120, 140, 160, 180, 460, 480, 500] pA, (pooled error) [140, 160, 180, 440, 460, 480, 500] pA; smallest 0.000898 and 8.77e-09
M mean spikes per step by mouse: [8.26, 6.99, 4.65, 5.92, 5.15, 7.36, 6.63, 6.14, 5.72, 10.16, 4.31, 8.85] F mean spikes per step by mouse: [8.38, 5.64, 12.48, 8.89, 4.58, 6.85, 5.31, 7.19] variant, all group-housed males, 0 mV, 5 mV re-arm: M n=37 (12 mice), F n=16 (8 mice) current x group F(25, 1275) = 23.82, p = 2.4e-88; group F(1, 51) = 1.30, p = 0.26 steps where F > M: 19 of 26; Sidak p < 0.05 at (per-step t) [60, 80, 100, 120, 140, 160, 180, 200, 460, 480, 500] pA, (pooled error) [100, 120, 140, 160, 180, 200, 220, 240, 440, 460, 480, 500] pA; smallest 0.0002 and 3.99e-09
M mean spikes per step by mouse: [8.27, 6.99, 4.65, 7.37, 10.16, 4.31, 8.85] F mean spikes per step by mouse: [8.54, 5.61, 8.92, 5.33, 1.62, 6.85, 5.31, 7.25] fig2e, male 2022 cohort against female, -20 mV, 5 mV re-arm: M n=21 (7 mice), F n=16 (8 mice) current x group F(25, 875) = 20.14, p = 8.4e-70; group F(1, 35) = 1.66, p = 0.21 steps where F > M: 12 of 26; Sidak p < 0.05 at (per-step t) [80, 100, 120, 140, 160, 180, 400, 420, 440, 460, 480, 500] pA, (pooled error) [140, 160, 180, 360, 380, 400, 420, 440, 460, 480, 500] pA; smallest 0.000134 and 1.11e-09
M mean spikes per step by mouse: [8.27, 6.99, 4.65, 5.92, 5.15, 7.37, 6.63, 6.14, 5.72, 10.16, 4.31, 8.85]
F mean spikes per step by mouse: [8.54, 5.61, 8.92, 5.33, 1.62, 6.85, 5.31, 7.25]
variant, all group-housed males, -20 mV, 5 mV re-arm: M n=37 (12 mice), F n=16 (8 mice)
current x group F(25, 1275) = 25.76, p = 3.5e-95; group F(1, 51) = 0.63, p = 0.43
steps where F > M: 13 of 26; Sidak p < 0.05 at (per-step t) [60, 80, 100, 120, 140, 160, 180, 200, 400, 420, 440, 460, 480, 500] pA, (pooled error) [100, 120, 140, 160, 180, 200, 360, 380, 400, 420, 440, 460, 480, 500] pA; smallest 1.57e-05 and 7.53e-11
0 mV: female mean spikes per step by mouse {'2631_I8-3_female_2025-03-27': 8.38, '2631_J8-1_female_2025-03-31': 5.76, '2631_J8-3_female_2025-04-01': 12.96, '2631_K8-1_female_2025-04-02': 9.52, '2631_K8-3_female_2025-04-03': 5.46, 'M1.1_female_2024-08-22': 6.85, 'M2.1_female_2024-08-20': 5.31, 'M2.3_female_2024-08-21': 7.19}
-20 mV: female mean spikes per step by mouse {'2631_I8-3_female_2025-03-27': 9.65, '2631_J8-1_female_2025-03-31': 5.62, '2631_J8-3_female_2025-04-01': 9.85, '2631_K8-1_female_2025-04-02': 6.09, '2631_K8-3_female_2025-04-03': 2.08, 'M1.1_female_2024-08-22': 6.85, 'M2.1_female_2024-08-20': 5.31, 'M2.3_female_2024-08-21': 7.25}
0 mV, no re-arm: female mean spikes per step by mouse {'2631_I8-3_female_2025-03-27': 8.38, '2631_J8-1_female_2025-03-31': 6.26, '2631_J8-3_female_2025-04-01': 14.35, '2631_K8-1_female_2025-04-02': 10.93, '2631_K8-3_female_2025-04-03': 9.23, 'M1.1_female_2024-08-22': 6.85, 'M2.1_female_2024-08-20': 5.31, 'M2.3_female_2024-08-21': 7.19}
-20 mV, no re-arm: female mean spikes per step by mouse {'2631_I8-3_female_2025-03-27': 13.77, '2631_J8-1_female_2025-03-31': 5.76, '2631_J8-3_female_2025-04-01': 11.92, '2631_K8-1_female_2025-04-02': 9.74, '2631_K8-3_female_2025-04-03': 5.5, 'M1.1_female_2024-08-22': 6.85, 'M2.1_female_2024-08-20': 5.31, 'M2.3_female_2024-08-21': 7.25}
0 mV, 5 mV re-arm: female mean spikes per step by mouse {'2631_I8-3_female_2025-03-27': 8.38, '2631_J8-1_female_2025-03-31': 5.64, '2631_J8-3_female_2025-04-01': 12.48, '2631_K8-1_female_2025-04-02': 8.89, '2631_K8-3_female_2025-04-03': 4.58, 'M1.1_female_2024-08-22': 6.85, 'M2.1_female_2024-08-20': 5.31, 'M2.3_female_2024-08-21': 7.19}
-20 mV, 5 mV re-arm: female mean spikes per step by mouse {'2631_I8-3_female_2025-03-27': 8.54, '2631_J8-1_female_2025-03-31': 5.61, '2631_J8-3_female_2025-04-01': 8.92, '2631_K8-1_female_2025-04-02': 5.33, '2631_K8-3_female_2025-04-03': 1.62, 'M1.1_female_2024-08-22': 6.85, 'M2.1_female_2024-08-20': 5.31, 'M2.3_female_2024-08-21': 7.25}
Result: reproduced, resting on the choice of group-housed males and on the spike rule's 1 mV re-arm. The current by sex interaction is strong under both readings (F(25, 875) = 17.84 and 19.37, p < 0.0001). Female neurons fire more at 16 of 26 steps with the 0 mV threshold and at 14 of 26 with -20 mV, so at most steps under both, and Sidak tests are significant at 80 to 200 pA (0 mV, per step) and 80 to 180 pA (-20 mV, per step), where females fire more. Females also fire significantly fewer spikes at the top currents (480 to 500 pA at 0 mV, 400 to 500 pA at -20 mV), so the higher excitability holds at low and middle currents. The curves cross, as for fig2c, but here the crossing does not decide the outcome: the criterion asks for more firing at most steps and one significant Sidak step, both of which hold, while fig2c fails on the Sidak part, with the crossing as a further point against its "across current injections". The -20 mV count still misses some spikes of female neurons (one mouse averages 2.08 spikes per step at -20 mV against 5.46 at 0 mV, cell above, and 77 sweeps have fewer at -20 mV than at 0 mV, data check); that bias works against the claim. With the 5 mV re-arm, females fire more at 12 of 26 steps with -20 mV, which is not most steps; without a re-arm, at 17 and 16. With all 37 males, 19 and 14 of 26 steps.
supt1-male-input-resistance-up¶
Isolation raises the input resistance of male BLA-mPFC neurons.
Criterion: input resistance from the steady state of the -120 pA step, last 100 ms or last 50 ms; unpaired t-test between housing groups, p < 0.05, under both readings. Group-housed neurons: the 2022 cohort as in Figure 2c (variant: all 37).
for w in (100, 50):
for lab, gh in [("GH 2022 cohort", mGH22), ("variant, all GH", mGHall)]:
x, y = gh[f"rin{w}"].dropna(), mSI[f"rin{w}"].dropna()
r = stats.ttest_ind(x, y)
print(f"last {w} ms, {lab}: GH {x.mean():.1f} +- {x.sem():.1f} MOhm (n={len(x)}), SI {y.mean():.1f} +- {y.sem():.1f} (n={len(y)}), "
f"difference {y.mean() - x.mean():.1f} MOhm, t({r.df:.0f}) = {r.statistic:.2f}, p = {r.pvalue:.3g}")
print("isolated neurons include the single-sweep file:", mSI.rin100.notna().sum(), "values")
last 100 ms, GH 2022 cohort: GH 97.6 +- 6.2 MOhm (n=21), SI 118.0 +- 7.5 (n=29), difference 20.5 MOhm, t(48) = -1.99, p = 0.0524 last 100 ms, variant, all GH: GH 90.6 +- 4.6 MOhm (n=37), SI 118.0 +- 7.5 (n=29), difference 27.4 MOhm, t(64) = -3.24, p = 0.0019 last 50 ms, GH 2022 cohort: GH 97.7 +- 6.2 MOhm (n=21), SI 118.0 +- 7.4 (n=29), difference 20.3 MOhm, t(48) = -1.99, p = 0.0528 last 50 ms, variant, all GH: GH 90.6 +- 4.6 MOhm (n=37), SI 118.0 +- 7.4 (n=29), difference 27.4 MOhm, t(64) = -3.25, p = 0.00182 isolated neurons include the single-sweep file: 29 values
Result: not reproduced, resting on the choice of group-housed neurons. With the 2022 cohort (Figure 2c's 21 neurons), isolated neurons have higher input resistance (118.0 against 97.6 MOhm) but the unpaired t-test gives p = 0.052 and 0.053 (last 100 and 50 ms). With all 37 group-housed neurons (90.6 MOhm) p = 0.002. Which neurons Supplementary Table 1 used is not stated, and its values are not in the text read.
ed2e-nonspecific-bla-excitability¶
Isolation also increases the excitability of nonspecific BLA neurons in males, a small but significant interaction, which the Results call minimal.
Criterion: M6, unlabeled neighbouring neurons of males; reproduced when the interaction has p < 0.05 with isolated neurons firing more, under both spike readings. The F and the size of the difference are reported beside those of fig2c.
nGH, nSI = ns[ns.housing == "GH"], ns[ns.housing == "SI"]
for thr in RULES:
A, B, t, ph = report_two(nGH, nSI, thr, "ed2e, nonspecific", ("GH", "SI"))
print(f" mean difference over steps {ph['diff'].mean():.2f} spikes, largest {ph['diff'].max():.2f} at {ph.current_pA[ph['diff'].idxmax()]} pA")
A2, B2, t2, ph2 = anova_two(mGH22, mSI, thr)
print(f" beside fig2c: F = {t2.loc['level:grp', 'F']:.2f}, mean difference {ph2['diff'].mean():.2f}, largest {ph2['diff'].max():.2f}")
GH mean spikes per step by mouse: [7.4, 8.0, 7.77, 4.97, 6.29, 6.13, 5.38, 4.99, 7.09, 5.54, 11.62] SI mean spikes per step by mouse: [6.93, 7.21, 7.25, 6.66, 9.3, 6.1, 7.02, 5.76, 6.91, 6.18, 6.69] ed2e, nonspecific, 0 mV: GH n=50 (11 mice), SI n=56 (11 mice) current x group F(25, 2600) = 1.66, p = 0.021; group F(1, 104) = 0.68, p = 0.41 steps where SI > GH: 17 of 26; Sidak p < 0.05 at (per-step t) [] pA, (pooled error) [] pA; smallest 0.921 and 0.734 mean difference over steps 0.42 spikes, largest 1.27 at 240 pA
beside fig2c: F = 4.70, mean difference 0.32, largest 2.63
GH mean spikes per step by mouse: [7.4, 8.0, 7.81, 4.97, 6.3, 6.16, 5.38, 5.0, 7.09, 5.55, 11.63] SI mean spikes per step by mouse: [6.93, 7.21, 7.26, 6.81, 9.3, 6.25, 7.02, 5.76, 6.91, 6.18, 6.27] ed2e, nonspecific, -20 mV: GH n=50 (11 mice), SI n=56 (11 mice) current x group F(25, 2600) = 1.99, p = 0.0024; group F(1, 104) = 0.68, p = 0.41 steps where SI > GH: 19 of 26; Sidak p < 0.05 at (per-step t) [] pA, (pooled error) [] pA; smallest 0.91 and 0.677 mean difference over steps 0.42 spikes, largest 1.31 at 240 pA
beside fig2c: F = 4.83, mean difference 0.25, largest 2.63
GH mean spikes per step by mouse: [7.4, 8.0, 7.77, 4.97, 6.29, 6.13, 5.38, 4.99, 7.09, 5.54, 11.62] SI mean spikes per step by mouse: [6.93, 7.21, 7.25, 6.66, 9.3, 6.1, 7.02, 5.76, 6.91, 6.18, 6.69] ed2e, nonspecific, 0 mV, no re-arm: GH n=50 (11 mice), SI n=56 (11 mice) current x group F(25, 2600) = 1.66, p = 0.021; group F(1, 104) = 0.68, p = 0.41 steps where SI > GH: 17 of 26; Sidak p < 0.05 at (per-step t) [] pA, (pooled error) [] pA; smallest 0.921 and 0.734 mean difference over steps 0.42 spikes, largest 1.27 at 240 pA
beside fig2c: F = 4.70, mean difference 0.32, largest 2.63
GH mean spikes per step by mouse: [7.4, 8.01, 8.04, 4.97, 6.3, 6.21, 5.38, 5.0, 7.1, 6.28, 11.63] SI mean spikes per step by mouse: [6.93, 7.21, 7.26, 6.87, 9.3, 6.49, 7.02, 5.76, 6.91, 6.18, 7.76] ed2e, nonspecific, -20 mV, no re-arm: GH n=50 (11 mice), SI n=56 (11 mice) current x group F(25, 2600) = 1.45, p = 0.07; group F(1, 104) = 1.01, p = 0.32 steps where SI > GH: 21 of 26; Sidak p < 0.05 at (per-step t) [] pA, (pooled error) [] pA; smallest 0.898 and 0.744 mean difference over steps 0.51 spikes, largest 1.36 at 240 pA
beside fig2c: F = 2.55, mean difference 0.43, largest 2.63
GH mean spikes per step by mouse: [7.4, 8.0, 7.77, 4.97, 6.29, 6.13, 5.38, 4.99, 7.09, 5.54, 11.62] SI mean spikes per step by mouse: [6.93, 7.21, 7.25, 6.66, 9.3, 6.1, 7.02, 5.76, 6.91, 6.18, 6.69] ed2e, nonspecific, 0 mV, 5 mV re-arm: GH n=50 (11 mice), SI n=56 (11 mice) current x group F(25, 2600) = 1.66, p = 0.021; group F(1, 104) = 0.68, p = 0.41 steps where SI > GH: 17 of 26; Sidak p < 0.05 at (per-step t) [] pA, (pooled error) [] pA; smallest 0.921 and 0.734 mean difference over steps 0.42 spikes, largest 1.27 at 240 pA
beside fig2c: F = 4.70, mean difference 0.32, largest 2.63
GH mean spikes per step by mouse: [7.4, 8.0, 7.81, 4.97, 6.3, 6.09, 5.38, 4.94, 7.09, 5.29, 11.63] SI mean spikes per step by mouse: [6.93, 7.21, 7.26, 6.73, 9.3, 6.15, 7.02, 5.76, 6.91, 6.18, 5.78] ed2e, nonspecific, -20 mV, 5 mV re-arm: GH n=50 (11 mice), SI n=56 (11 mice) current x group F(25, 2600) = 1.87, p = 0.0057; group F(1, 104) = 0.58, p = 0.45 steps where SI > GH: 17 of 26; Sidak p < 0.05 at (per-step t) [] pA, (pooled error) [] pA; smallest 0.91 and 0.764 mean difference over steps 0.39 spikes, largest 1.27 at 240 pA
beside fig2c: F = 5.38, mean difference 0.12, largest 2.63
Result: reproduced, resting on the spike rule's 1 mV re-arm. The current by housing interaction is significant for nonspecific neurons (F(25, 2600) = 1.66, p = 0.021, at 0 mV; F = 1.99, p = 0.0024, at -20 mV), and isolated neurons fire more at 17 and 19 of 26 steps (largest difference 1.27 and 1.31 spikes, at 240 pA), with no step significant after Sidak adjustment. The interaction F is smaller than for BLA-mPFC neurons (4.70 and 4.83). With the 5 mV re-arm the -20 mV interaction has p = 0.0057; without a re-arm, p = 0.07, a count that includes the noise on plateaus at -20 mV (see the data check).
ed2bcd-nonspecific-bla-no-rank¶
Nonspecific BLA neurons of males show no rank differences in excitability, group-housed or isolated, and isolation does not change their firing at 300 pA within any rank.
Criterion: a claim of absence; b and c by M6 with rank (1 to 3) as the group factor, d by a two-way ANOVA of rank by housing on spikes at 300 pA, each at p < 0.05. Reproduced when no rank main effect or interaction reaches p < 0.05 in b and c, and no housing effect or interaction in d. Neurons without a rank (the 2021 mice) are left out.
def rank_anova(d, thr):
d = d[d["rank"].notna()]
Y = P.curves(d, thr)
t = P.split_plot_anova(Y, pd.DataFrame({"rank": d["rank"].astype(int).astype(str).values}))
return d, Y, t
for thr in RULES:
for lab, d in [("b, group-housed", nGH), ("c, isolated", nSI)]:
dd, Y, t = rank_anova(d, thr)
means = {r: round(Y[dd["rank"].values == r].mean(), 2) for r in (1, 2, 3)}
print(f"{lab}, {LBL[thr]}: n per rank {dd['rank'].value_counts().sort_index().to_dict()}; "
f"rank F({t.loc['rank', 'df1']:.0f}, {t.loc['rank', 'df2']:.0f}) = {t.loc['rank', 'F']:.2f}, p = {t.loc['rank', 'p']:.3f}; "
f"current x rank F({t.loc['level:rank', 'df1']:.0f}, {t.loc['level:rank', 'df2']:.0f}) = {t.loc['level:rank', 'F']:.2f}, p = {t.loc['level:rank', 'p']:.3f}; mean spikes per step {means}")
d = ns[ns["rank"].notna()]
Y = P.curves(d, thr)
k300 = int(np.nonzero(P.EXCITABILITY_CURRENTS == 300)[0][0])
dd = pd.DataFrame({"y": Y[:, k300], "rank": d["rank"].astype(int).astype(str).values, "housing": d.housing.values})
a = anova_lm(smf.ols("y ~ C(rank, Sum) * C(housing, Sum)", dd).fit(), typ=3)
print(f"d, 300 pA, {LBL[thr]}: housing F = {a.loc['C(housing, Sum)', 'F']:.2f}, p = {a.loc['C(housing, Sum)', 'PR(>F)']:.3f}; "
f"rank x housing F = {a.loc['C(rank, Sum):C(housing, Sum)', 'F']:.2f}, p = {a.loc['C(rank, Sum):C(housing, Sum)', 'PR(>F)']:.3f}")
print(" mean spikes at 300 pA:", dd.groupby(["rank", "housing"]).y.mean().round(2).to_dict())
b, group-housed, 0 mV: n per rank {1.0: 10, 2.0: 9, 3.0: 16}; rank F(2, 32) = 1.40, p = 0.262; current x rank F(50, 800) = 1.15, p = 0.232; mean spikes per step {1: np.float64(6.22), 2: np.float64(8.36), 3: np.float64(6.9)}
c, isolated, 0 mV: n per rank {1.0: 17, 2.0: 14, 3.0: 11}; rank F(2, 39) = 0.76, p = 0.475; current x rank F(50, 975) = 0.55, p = 0.995; mean spikes per step {1: np.float64(7.55), 2: np.float64(6.45), 3: np.float64(7.01)}
d, 300 pA, 0 mV: housing F = 0.00, p = 0.980; rank x housing F = 2.12, p = 0.128
mean spikes at 300 pA: {('1', 'GH'): 8.2, ('1', 'SI'): 10.24, ('2', 'GH'): 11.22, ('2', 'SI'): 8.57, ('3', 'GH'): 9.0, ('3', 'SI'): 9.55}
b, group-housed, -20 mV: n per rank {1.0: 10, 2.0: 9, 3.0: 16}; rank F(2, 32) = 1.38, p = 0.267; current x rank F(50, 800) = 1.17, p = 0.204; mean spikes per step {1: np.float64(6.23), 2: np.float64(8.36), 3: np.float64(6.91)}
c, isolated, -20 mV: n per rank {1.0: 17, 2.0: 14, 3.0: 11}; rank F(2, 39) = 0.92, p = 0.406; current x rank F(50, 975) = 0.73, p = 0.919; mean spikes per step {1: np.float64(7.55), 2: np.float64(6.34), 3: np.float64(7.01)}
d, 300 pA, -20 mV: housing F = 0.00, p = 0.980; rank x housing F = 2.12, p = 0.128
mean spikes at 300 pA: {('1', 'GH'): 8.2, ('1', 'SI'): 10.24, ('2', 'GH'): 11.22, ('2', 'SI'): 8.57, ('3', 'GH'): 9.0, ('3', 'SI'): 9.55}
b, group-housed, 0 mV, no re-arm: n per rank {1.0: 10, 2.0: 9, 3.0: 16}; rank F(2, 32) = 1.40, p = 0.262; current x rank F(50, 800) = 1.15, p = 0.232; mean spikes per step {1: np.float64(6.22), 2: np.float64(8.36), 3: np.float64(6.9)}
c, isolated, 0 mV, no re-arm: n per rank {1.0: 17, 2.0: 14, 3.0: 11}; rank F(2, 39) = 0.76, p = 0.475; current x rank F(50, 975) = 0.55, p = 0.995; mean spikes per step {1: np.float64(7.55), 2: np.float64(6.45), 3: np.float64(7.01)}
d, 300 pA, 0 mV, no re-arm: housing F = 0.00, p = 0.980; rank x housing F = 2.12, p = 0.128
mean spikes at 300 pA: {('1', 'GH'): 8.2, ('1', 'SI'): 10.24, ('2', 'GH'): 11.22, ('2', 'SI'): 8.57, ('3', 'GH'): 9.0, ('3', 'SI'): 9.55}
b, group-housed, -20 mV, no re-arm: n per rank {1.0: 10, 2.0: 9, 3.0: 16}; rank F(2, 32) = 1.18, p = 0.322; current x rank F(50, 800) = 0.87, p = 0.734; mean spikes per step {1: np.float64(6.47), 2: np.float64(8.36), 3: np.float64(6.94)}
c, isolated, -20 mV, no re-arm: n per rank {1.0: 17, 2.0: 14, 3.0: 11}; rank F(2, 39) = 0.38, p = 0.686; current x rank F(50, 975) = 0.69, p = 0.950; mean spikes per step {1: np.float64(7.55), 2: np.float64(6.76), 3: np.float64(7.01)}
d, 300 pA, -20 mV, no re-arm: housing F = 0.01, p = 0.939; rank x housing F = 1.82, p = 0.169
mean spikes at 300 pA: {('1', 'GH'): 8.2, ('1', 'SI'): 10.24, ('2', 'GH'): 11.22, ('2', 'SI'): 8.86, ('3', 'GH'): 9.0, ('3', 'SI'): 9.55}
b, group-housed, 0 mV, 5 mV re-arm: n per rank {1.0: 10, 2.0: 9, 3.0: 16}; rank F(2, 32) = 1.40, p = 0.262; current x rank F(50, 800) = 1.15, p = 0.232; mean spikes per step {1: np.float64(6.22), 2: np.float64(8.36), 3: np.float64(6.9)}
c, isolated, 0 mV, 5 mV re-arm: n per rank {1.0: 17, 2.0: 14, 3.0: 11}; rank F(2, 39) = 0.76, p = 0.475; current x rank F(50, 975) = 0.55, p = 0.995; mean spikes per step {1: np.float64(7.55), 2: np.float64(6.45), 3: np.float64(7.01)}
d, 300 pA, 0 mV, 5 mV re-arm: housing F = 0.00, p = 0.980; rank x housing F = 2.12, p = 0.128
mean spikes at 300 pA: {('1', 'GH'): 8.2, ('1', 'SI'): 10.24, ('2', 'GH'): 11.22, ('2', 'SI'): 8.57, ('3', 'GH'): 9.0, ('3', 'SI'): 9.55}
b, group-housed, -20 mV, 5 mV re-arm: n per rank {1.0: 10, 2.0: 9, 3.0: 16}; rank F(2, 32) = 1.45, p = 0.249; current x rank F(50, 800) = 1.17, p = 0.204; mean spikes per step {1: np.float64(6.15), 2: np.float64(8.36), 3: np.float64(6.88)}
c, isolated, -20 mV, 5 mV re-arm: n per rank {1.0: 17, 2.0: 14, 3.0: 11}; rank F(2, 39) = 1.11, p = 0.339; current x rank F(50, 975) = 0.93, p = 0.609; mean spikes per step {1: np.float64(7.55), 2: np.float64(6.2), 3: np.float64(7.01)}
d, 300 pA, -20 mV, 5 mV re-arm: housing F = 0.00, p = 0.980; rank x housing F = 2.12, p = 0.128
mean spikes at 300 pA: {('1', 'GH'): 8.2, ('1', 'SI'): 10.24, ('2', 'GH'): 11.22, ('2', 'SI'): 8.57, ('3', 'GH'): 9.0, ('3', 'SI'): 9.55}
Result: reproduced. No rank effect reaches p < 0.05 among group-housed (rank p = 0.26 and 0.27, interaction p = 0.23 and 0.20) or isolated nonspecific neurons (rank p = 0.48 and 0.41, interaction p = 0.995 and 0.92). At 300 pA neither housing (p = 0.98) nor rank by housing (p = 0.13) is significant under either reading. The variants of the spike rule give no p under 0.05.
ed3c-male-rank-blampfc-excitability¶
Among group-housed males, dominant (rank 1) mice have less excitable BLA-mPFC neurons than intermediate (rank 2) and subordinate (rank 3) mice.
Criterion: M6 with rank (1 to 3) as the group factor, group-housed labeled male neurons (all 37, both cohorts, as the paper's 36 neurons from 13 mice imply). Reproduced when the interaction has p < 0.05, rank 1 fires least, and Tukey tests show rank 1 below both rank 2 and rank 3 at some step; partially when only one of the two differs.
for thr in RULES:
dd, Y, t = rank_anova(mGHall, thr)
rk = dd["rank"].values
means = {r: round(Y[rk == r].mean(), 2) for r in (1, 2, 3)}
print(f"{LBL[thr]}: neurons (mice) per rank", {r: f"{(rk == r).sum()} ({dd[rk == r].subject.nunique()})" for r in (1, 2, 3)})
print(f" current x rank F({t.loc['level:rank', 'df1']:.0f}, {t.loc['level:rank', 'df2']:.0f}) = {t.loc['level:rank', 'F']:.2f}, p = {t.loc['level:rank', 'p']:.2g}; "
f"rank F = {t.loc['rank', 'F']:.2f}, p = {t.loc['rank', 'p']:.3f}; mean spikes per step {means}")
below = {2: [], 3: []}
for j, cur in enumerate(P.EXCITABILITY_CURRENTS):
groups = [Y[rk == r][:, j] for r in (1, 2, 3)]
if np.all([g.std() == 0 for g in groups]):
continue
res = stats.tukey_hsd(*groups)
for r in (2, 3):
if res.pvalue[0, r - 1] < 0.05 and groups[r - 1].mean() > groups[0].mean():
below[r].append(int(cur))
print(" Tukey per step: steps where rank 1 is below rank 2:", below[2], "; below rank 3:", below[3])
Ys = [Y[rk == r] for r in (1, 2, 3)]
pp = P.tukey_pooled(Ys)
bp = {r: [int(c) for j, c in enumerate(P.EXCITABILITY_CURRENTS) if pp[j, r - 1] < 0.05 and Ys[r - 1][:, j].mean() > Ys[0][:, j].mean()] for r in (2, 3)}
print(" Tukey with pooled error: rank 1 below rank 2:", bp[2], "; below rank 3:", bp[3],
f"; smallest p, rank 1 against 2: per step {np.nanmin([stats.tukey_hsd(*[g[:, j] for g in Ys]).pvalue[0, 1] for j in range(1, 26)]):.3f}, pooled {pp[:, 1].min():.3f}")
print(" rank means at 100, 200, 300, 400, 500 pA:", {r: Y[rk == r][:, [5, 10, 15, 20, 25]].mean(0).round(1).tolist() for r in (1, 2, 3)})
0 mV: neurons (mice) per rank {1: '13 (4)', 2: '7 (3)', 3: '17 (5)'}
current x rank F(50, 850) = 3.46, p = 1e-13; rank F = 2.68, p = 0.083; mean spikes per step {1: np.float64(5.57), 2: np.float64(7.43), 3: np.float64(7.4)}
Tukey per step: steps where rank 1 is below rank 2: [] ; below rank 3: [360, 380, 400, 420, 440, 460, 480, 500]
Tukey with pooled error: rank 1 below rank 2: [] ; below rank 3: [300, 320, 340, 360, 380, 400, 420, 440, 460, 480, 500] ; smallest p, rank 1 against 2: per step 0.143, pooled 0.065
rank means at 100, 200, 300, 400, 500 pA: {1: [0.3, 2.8, 7.1, 10.8, 13.4], 2: [0.4, 5.3, 10.0, 13.7, 15.9], 3: [0.4, 3.6, 9.8, 14.3, 17.2]}
-20 mV: neurons (mice) per rank {1: '13 (4)', 2: '7 (3)', 3: '17 (5)'}
current x rank F(50, 850) = 3.46, p = 1e-13; rank F = 2.69, p = 0.082; mean spikes per step {1: np.float64(5.57), 2: np.float64(7.44), 3: np.float64(7.41)}
Tukey per step: steps where rank 1 is below rank 2: [] ; below rank 3: [360, 380, 400, 420, 440, 460, 480, 500]
Tukey with pooled error: rank 1 below rank 2: [] ; below rank 3: [300, 320, 340, 360, 380, 400, 420, 440, 460, 480, 500] ; smallest p, rank 1 against 2: per step 0.143, pooled 0.065
rank means at 100, 200, 300, 400, 500 pA: {1: [0.3, 2.8, 7.1, 10.8, 13.4], 2: [0.4, 5.3, 10.0, 13.9, 15.9], 3: [0.4, 3.6, 9.8, 14.3, 17.2]}
0 mV, no re-arm: neurons (mice) per rank {1: '13 (4)', 2: '7 (3)', 3: '17 (5)'}
current x rank F(50, 850) = 3.46, p = 1e-13; rank F = 2.68, p = 0.083; mean spikes per step {1: np.float64(5.57), 2: np.float64(7.43), 3: np.float64(7.4)}
Tukey per step: steps where rank 1 is below rank 2: [] ; below rank 3: [360, 380, 400, 420, 440, 460, 480, 500]
Tukey with pooled error: rank 1 below rank 2: [] ; below rank 3: [300, 320, 340, 360, 380, 400, 420, 440, 460, 480, 500] ; smallest p, rank 1 against 2: per step 0.143, pooled 0.065
rank means at 100, 200, 300, 400, 500 pA: {1: [0.3, 2.8, 7.1, 10.8, 13.4], 2: [0.4, 5.3, 10.0, 13.7, 15.9], 3: [0.4, 3.6, 9.8, 14.3, 17.2]}
-20 mV, no re-arm: neurons (mice) per rank {1: '13 (4)', 2: '7 (3)', 3: '17 (5)'}
current x rank F(50, 850) = 3.45, p = 1.3e-13; rank F = 2.70, p = 0.082; mean spikes per step {1: np.float64(5.57), 2: np.float64(7.45), 3: np.float64(7.41)}
Tukey per step: steps where rank 1 is below rank 2: [] ; below rank 3: [360, 380, 400, 420, 440, 460, 480, 500]
Tukey with pooled error: rank 1 below rank 2: [] ; below rank 3: [300, 320, 340, 360, 380, 400, 420, 440, 460, 480, 500] ; smallest p, rank 1 against 2: per step 0.143, pooled 0.065
rank means at 100, 200, 300, 400, 500 pA: {1: [0.3, 2.8, 7.1, 10.8, 13.4], 2: [0.4, 5.3, 10.0, 13.9, 16.1], 3: [0.4, 3.6, 9.8, 14.3, 17.2]}
0 mV, 5 mV re-arm: neurons (mice) per rank {1: '13 (4)', 2: '7 (3)', 3: '17 (5)'}
current x rank F(50, 850) = 3.46, p = 1e-13; rank F = 2.68, p = 0.083; mean spikes per step {1: np.float64(5.57), 2: np.float64(7.43), 3: np.float64(7.4)}
Tukey per step: steps where rank 1 is below rank 2: [] ; below rank 3: [360, 380, 400, 420, 440, 460, 480, 500]
Tukey with pooled error: rank 1 below rank 2: [] ; below rank 3: [300, 320, 340, 360, 380, 400, 420, 440, 460, 480, 500] ; smallest p, rank 1 against 2: per step 0.143, pooled 0.065
rank means at 100, 200, 300, 400, 500 pA: {1: [0.3, 2.8, 7.1, 10.8, 13.4], 2: [0.4, 5.3, 10.0, 13.7, 15.9], 3: [0.4, 3.6, 9.8, 14.3, 17.2]}
-20 mV, 5 mV re-arm: neurons (mice) per rank {1: '13 (4)', 2: '7 (3)', 3: '17 (5)'}
current x rank F(50, 850) = 3.46, p = 1e-13; rank F = 2.69, p = 0.082; mean spikes per step {1: np.float64(5.57), 2: np.float64(7.44), 3: np.float64(7.41)}
Tukey per step: steps where rank 1 is below rank 2: [] ; below rank 3: [360, 380, 400, 420, 440, 460, 480, 500]
Tukey with pooled error: rank 1 below rank 2: [] ; below rank 3: [300, 320, 340, 360, 380, 400, 420, 440, 460, 480, 500] ; smallest p, rank 1 against 2: per step 0.143, pooled 0.065
rank means at 100, 200, 300, 400, 500 pA: {1: [0.3, 2.8, 7.1, 10.8, 13.4], 2: [0.4, 5.3, 10.0, 13.9, 15.9], 3: [0.4, 3.6, 9.8, 14.3, 17.2]}
Result: partially reproduced. The current by rank interaction is significant (F(50, 850) = 3.46, p < 0.0001, under both readings), and rank 1 neurons fire least (5.57 spikes per step against 7.43 and 7.40). Tukey tests put rank 1 below rank 3 at 360 to 500 pA (per-step error) or 300 to 500 pA (pooled error), but below rank 2 at no step under either error term (smallest p for rank 1 against rank 2, 0.143 per step and 0.065 pooled). The variants of the spike rule give the same. Rank 2 holds 7 neurons from 3 mice here, against 9 from 4 in the paper.
ed3d-female-rank-blampfc-none¶
Group-housed females show no rank differences in BLA-mPFC excitability.
Criterion: a claim of absence; M6 with rank as the group factor at p < 0.05. Reproduced when neither the rank main effect nor the interaction reaches p < 0.05.
for thr in RULES:
dd, Y, t = rank_anova(fGH, thr)
rk = dd["rank"].values
print(f"{LBL[thr]}: neurons (mice) per rank", {r: f"{(rk == r).sum()} ({dd[rk == r].subject.nunique()})" for r in (1, 2, 3)},
f"rank F({t.loc['rank', 'df1']:.0f}, {t.loc['rank', 'df2']:.0f}) = {t.loc['rank', 'F']:.2f}, p = {t.loc['rank', 'p']:.3f}; "
f"current x rank F({t.loc['level:rank', 'df1']:.0f}, {t.loc['level:rank', 'df2']:.0f}) = {t.loc['level:rank', 'F']:.2f}, p = {t.loc['level:rank', 'p']:.3f}; "
"mean spikes per step", {r: round(Y[rk == r].mean(), 2) for r in (1, 2, 3)})
0 mV: neurons (mice) per rank {1: '5 (2)', 2: '6 (3)', 3: '5 (3)'} rank F(2, 13) = 1.08, p = 0.368; current x rank F(50, 325) = 0.53, p = 0.996; mean spikes per step {1: np.float64(6.28), 2: np.float64(8.37), 3: np.float64(9.15)}
-20 mV: neurons (mice) per rank {1: '5 (2)', 2: '6 (3)', 3: '5 (3)'} rank F(2, 13) = 0.19, p = 0.831; current x rank F(50, 325) = 0.59, p = 0.987; mean spikes per step {1: np.float64(6.42), 2: np.float64(6.08), 3: np.float64(7.25)}
0 mV, no re-arm: neurons (mice) per rank {1: '5 (2)', 2: '6 (3)', 3: '5 (3)'} rank F(2, 13) = 1.49, p = 0.261; current x rank F(50, 325) = 1.03, p = 0.424; mean spikes per step {1: np.float64(6.68), 2: np.float64(9.31), 3: np.float64(10.46)}
-20 mV, no re-arm: neurons (mice) per rank {1: '5 (2)', 2: '6 (3)', 3: '5 (3)'} rank F(2, 13) = 0.26, p = 0.773; current x rank F(50, 325) = 1.24, p = 0.141; mean spikes per step {1: np.float64(7.36), 2: np.float64(8.52), 3: np.float64(8.77)}
0 mV, 5 mV re-arm: neurons (mice) per rank {1: '5 (2)', 2: '6 (3)', 3: '5 (3)'} rank F(2, 13) = 0.91, p = 0.425; current x rank F(50, 325) = 0.36, p = 1.000; mean spikes per step {1: np.float64(6.19), 2: np.float64(7.96), 3: np.float64(8.78)}
-20 mV, 5 mV re-arm: neurons (mice) per rank {1: '5 (2)', 2: '6 (3)', 3: '5 (3)'} rank F(2, 13) = 0.19, p = 0.827; current x rank F(50, 325) = 0.47, p = 0.999; mean spikes per step {1: np.float64(6.19), 2: np.float64(5.58), 3: np.float64(6.79)}
Result: reproduced. Neither rank (p = 0.37 and 0.83) nor current by rank (p = 0.996 and 0.987) reaches p < 0.05 among the 16 recorded group-housed female neurons, and no variant of the spike rule gives p under 0.05 (smallest 0.14); rank 1 has 5 neurons from 2 mice, as 2 of the paper's 7 are in files without a recording.
Blocked: isolated females (fig2d, fig2-threeway, supt1-female)¶
These claims need isolated female BLA-mPFC neurons. Of the 14 files, 11 (5 mice) hold only the flat secondary channel (data check), so only 3 neurons from one mouse remain (paper 15 from 7). The numbers below are shown for completeness and decide no outcome.
fSI = fp[fp.housing == "SI"]
nall = int(((D.sex == "F") & (D.housing == "SI")).sum())
print(f"isolated female files: {nall}, recorded {len(fSI)}, mice with a recording {fSI.subject.unique().tolist()}")
for thr in RULES:
A, B, t, ph = anova_two(fGH, fSI, thr)
print(f"{LBL[thr]}: 16 GH against {len(B)} SI neurons, interaction F = {t.loc['level:grp', 'F']:.2f}, p = {t.loc['level:grp', 'p']:.3f}; SI below GH at {(ph['diff'] < 0).sum()} of 26 steps")
isolated female files: 14, recorded 3, mice with a recording ['2631_J9_female_2025-03-28']
0 mV: 16 GH against 3 SI neurons, interaction F = 0.82, p = 0.711; SI below GH at 25 of 26 steps
-20 mV: 16 GH against 3 SI neurons, interaction F = 0.23, p = 1.000; SI below GH at 22 of 26 steps
0 mV, no re-arm: 16 GH against 3 SI neurons, interaction F = 0.72, p = 0.841; SI below GH at 25 of 26 steps
-20 mV, no re-arm: 16 GH against 3 SI neurons, interaction F = 1.60, p = 0.036; SI below GH at 19 of 26 steps
0 mV, 5 mV re-arm: 16 GH against 3 SI neurons, interaction F = 0.50, p = 0.980; SI below GH at 25 of 26 steps
-20 mV, 5 mV re-arm: 16 GH against 3 SI neurons, interaction F = 0.16, p = 1.000; SI below GH at 21 of 26 steps
Summary¶
| Claim | Outcome |
|---|---|
| fig2c-male-blampfc-excitability-up | not reproduced (assumed: Figure 2c's group-housed neurons are the 2022 cohort; all 37 would pass) |
| fig2e-female-higher-baseline-excitability | reproduced (assumed: 2022 cohort males, 1 mV re-arm) |
| supt1-male-input-resistance-up | not reproduced (assumed, as fig2c; p = 0.052) |
| ed2e-nonspecific-bla-excitability | reproduced (assumed: 1 mV re-arm; without a re-arm p = 0.07 at -20 mV) |
| ed2bcd-nonspecific-bla-no-rank | reproduced |
| ed3c-male-rank-blampfc-excitability | partially reproduced |
| ed3d-female-rank-blampfc-none | reproduced |
| fig2d, fig2-threeway, supt1-female | blocked (data missing): 11 of 14 isolated female files hold only a flat secondary channel |
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.
How the analysis differs from the paper's: spikes are counted as threshold crossings (0 or -20 mV, with a 1 mV re-arm and a 1 ms dead time; variants without a re-arm and with 5 mV), not in Clampfit; the post hoc tests are Sidak-adjusted t-tests at each step, with the step's own variance or the error pooled over steps, not Prism's; the ANOVA is the sphericity-assumed univariate split-plot analysis; Figure 2c's group-housed males are taken to be the 2022 cohort, which matches the paper's 21 neurons from 7 mice.
What was found about the dataset: 13 of the 205 files (11 isolated and 2 group-housed female BLA-mPFC neurons, 6 mice) hold no recording: their only series are of the amplifier's secondary channel ("VmSec"), flat at about 0 or -209 mV with no step in the stimulus; one isolated male file holds only the -120 pA sweep; nothing marks which group-housed male neurons form Figure 2c; neuron counts per rank differ from the paper's in some groups (male BLA-mPFC rank 2 and 3, nonspecific isolated); 29 nonspecific neurons (15 group-housed and 14 isolated, from the four 2021 mice) carry no rank.
print(f"runtime {(time.time() - t_start) / 60:.1f} min")
runtime 3.0 min