Reproducing Kim et al. (2024) from dandiset 001544¶

Paper. Kim R, Ananth MR, Desai NS, Role LW, Talmage DA (2024). Distinct subpopulations of ventral pallidal cholinergic projection neurons encode valence of olfactory stimuli. Cell Reports 43(4), 114009. doi:10.1016/j.celrep.2024.114009. The claims file was written from the NIH author manuscript in PubMed Central (PMC11080946), main text, STAR Methods and figure legends; this attempt also read the supplement (Figures S1 to S14 and their legends), which is now in the paper's text. After a question from this attempt, a reader read the Figure S12 legend and amended figs12-other-features-shared and added figs12-app-differs-from-all; both are tested here as amended.

Dandiset. DANDI:001544, version 0.260827.1410. The paper cites no DANDI version (the dandiset was made after publication). This is the only published version, and the most recent; the draft has the same 44 assets and size, so nothing in the draft is missing from it.

What the dandiset holds. Whole-cell current-clamp recordings of 44 VP cholinergic neurons, one per file, each a family of 500 ms current steps: 12 neurons labelled as activated by the appetitive (APP) odor, 8 by the aversive (AV) odor, and 24 from home-cage ChAT-tau-eGFP mice (ALL). These are the data of Figure 6F to 6H and Figure S12. The behaviour, histology, fiber photometry, chirp currents and neuronal morphology of the paper are not in it.

Code. Features follow the STAR Methods, with the paper's code (nsdesai/patch_clamp_analysis at tag v1.0.0, commit 4ee1125) where the Methods are silent, as the claims file says; each parameter's source is in the docstring of vpchat.py.

Claim Tested here
fig6f-max-firing-rate tested
figs12a-sag-higher tested
figs12-other-features-shared tested
figs12-app-differs-from-all tested
fig6g-av-more-hyperpolarized tested
fig6h-av-smaller-ahp tested
fig6-app-less-excitable tested
fig1c, figs1, fig2c, fig2e, fig5c, fig5e (behaviour) blocked: data missing
fig1f, fig1g, fig3, fig4d, figs5, figs7, figs9, figs11, fig7d (histology) blocked: data missing
fig1k, fig1l, fig1mn (fiber photometry) blocked: data missing
fig6j, fig6kl, fig6m, fig6n, figs13 (morphology) blocked: data missing
In [1]:
import time
import warnings

import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
from scipy import stats

import vpchat as vc

pd.set_option("display.width", 250)
pd.set_option("display.max_columns", 60)
pd.set_option("display.max_rows", 200)
warnings.filterwarnings("ignore")

started = time.time()
cells = vc.load_all()
print(f"loaded {len(cells)} files from dandiset {vc.DANDISET_ID} version {vc.DANDISET_VERSION} "
      f"in {time.time() - started:.0f} s")
loaded 44 files from dandiset 001544 version 0.260827.1410 in 309 s

Data check¶

Each check of the metadata against the values is stated under its output.

In [2]:
meta = pd.DataFrame([c["meta"] for c in cells])
meta["file"] = meta.path.str.split("/").str[-1]
print("Cells (files) by group, as session_description gives it:")
print(meta.group.value_counts().to_string())
print("\nMice by group:", meta.groupby("group").subject.nunique().to_dict())
print("Paper (Figure 6 legend): APP 12 cells from 6 mice (3 male, 3 female), AV 8 cells from 4 mice "
      "(2 male, 2 female), ALL 21 cells from 8 mice.")
sex = meta.drop_duplicates("subject").groupby(["group", "sex"]).size().unstack(fill_value=0)
print("\nMice by group and sex:")
print(sex.to_string())
print("\nGenotype by group:")
print(meta.groupby(["group", "genotype"]).size().to_string())
print("\nAge by mouse:")
print(meta.drop_duplicates("subject")[["group", "subject", "sex", "age"]].to_string(index=False))
print("\nCells per mouse:")
print(meta.groupby(["group", "subject"]).size().to_string())
Cells (files) by group, as session_description gives it:
group
ALL    24
APP    12
AV      8

Mice by group: {'ALL': 11, 'APP': 6, 'AV': 4}
Paper (Figure 6 legend): APP 12 cells from 6 mice (3 male, 3 female), AV 8 cells from 4 mice (2 male, 2 female), ALL 21 cells from 8 mice.

Mice by group and sex:
sex    F  M
group      
ALL    4  7
APP    2  4
AV     2  2

Genotype by group:
group  genotype           
ALL    ChAt-tau-GFP mouse     24
APP    ChAT-IRES-Cre mouse    12
AV     ChAT-IRES-Cre mouse     8

Age by mouse:
group subject sex       age
  APP   CC328   M      P10W
  APP   CC330   M      P10W
  APP   CC331   F      P12W
  APP   CC356   M       P9W
  APP   CC357   M       P9W
  APP   CC396   F      P10W
   AV   CC317   F      P11W
   AV   CC318   M      P11W
   AV   CC319   F      P11W
   AV   CC399   M      P11W
  ALL   CG354   M  P6.4286W
  ALL   CG355   M  P6.5714W
  ALL   CG382   M  P5.7143W
  ALL   CG383   M P13.8571W
  ALL   CG398   F P10.2857W
  ALL   CG438   M       P9W
  ALL   CG439   M  P8.8571W
  ALL   CG440   M  P8.8571W
  ALL   CG463   F       P9W
  ALL   CG538   F       P6W
  ALL   CG539   F       P6W

Cells per mouse:
group  subject
ALL    CG354      1
       CG355      2
       CG382      2
       CG383      2
       CG398      4
       CG438      2
       CG439      4
       CG440      2
       CG463      1
       CG538      2
       CG539      2
APP    CC328      2
       CC330      2
       CC331      1
       CC356      3
       CC357      2
       CC396      2
AV     CC317      2
       CC318      4
       CC319      1
       CC399      1

The 12 APP cells from 6 mice and 8 AV cells from 4 mice match the Figure 6 legend; the AV mice are 2 male and 2 female, as stated, but the APP mice are 4 male and 2 female where the legend says 3 and 3. The dandiset holds 24 ALL cells from 11 mice, where the paper analysed 21 from 8; it does not say which three cells or three mice were left out of the paper. Five of the ALL mice are 5.7 to 6.6 weeks old, younger than the 8 to 12 weeks of the STAR Methods.

In [3]:
# Can the paper's 21 ALL cells from 8 mice be had by leaving out whole mice?
import itertools
all_mice = meta[meta.group == "ALL"].groupby("subject").size()
totals = [int(all_mice[list(c)].sum()) for c in itertools.combinations(all_mice.index, 8)]
print("ALL cells per mouse:", all_mice.to_dict())
print("Cells in any 8 of the 11 ALL mice:", min(totals), "to", max(totals),
      "; subsets of 8 mice holding 21 cells:", sum(t == 21 for t in totals))
ALL cells per mouse: {'CG354': 1, 'CG355': 2, 'CG382': 2, 'CG383': 2, 'CG398': 4, 'CG438': 2, 'CG439': 4, 'CG440': 2, 'CG463': 1, 'CG538': 2, 'CG539': 2}
Cells in any 8 of the 11 ALL mice: 14 to 20 ; subsets of 8 mice holding 21 cells: 0

No choice of 8 of the 11 ALL mice holds 21 cells: only two mice contribute a single cell, so leaving out three mice removes at least four cells (8 mice hold 14 to 20 cells). The paper's 21 cells from 8 mice therefore cannot be the dandiset's cells less some whole mice; either cells were left out within mice as well, or the counts of the legend differ from the deposit. The no_FL set used below (21 cells from 10 mice) matches the cell count only.

In [4]:
rows = []
for c in cells:
    m, I, V = c["meta"], c["I"], c["V"]
    start, stop, steps, order = vc.step_layout(c, use_all_steps=True)
    dt = 1000 / c["rate"]
    rows.append({
        "id": m["identifier"], "group": m["group"], "sweeps": m["n_sweeps"], "stim": m["n_stim"],
        "samples": V.shape[0], "rate_Hz": c["rate"], "stim_rate_Hz": m["stim_rates"][0],
        "sweep_starts": m["starting_times"], "V_unit": m["voltage_unit"], "I_unit": m["stimulus_unit"],
        "I_min": I.min(), "I_max": I.max(), "V_min_mV": round(float(np.nanmin(V)), 1),
        "V_max_mV": round(float(np.nanmax(V)), 1), "nan_samples": int(np.isnan(V).sum()),
        "step_on_ms": start * dt, "step_ms": (stop - start + 1) * dt,
        "steps_pA": ",".join(str(int(s)) for s in np.sort(steps)),
        "bias_A": m["bias_current"], "bridge_Ohm": m["bridge_balance"]})
info = pd.DataFrame(rows)
print(info.drop(columns="steps_pA").to_string(index=False))
print("\nStep families (pA):")
print(info.groupby("steps_pA").id.apply(list).to_string())
print("\nDistinct values over all files: bias_current", info.bias_A.unique().tolist(),
      "; bridge_balance", info.bridge_Ohm.unique().tolist())
print("Stimulus range over all files:", info.I_min.min(), "to", info.I_max.max(), "(unit stated:", info.I_unit.unique().tolist(), ")")
print("Voltage range over all files (mV):", info.V_min_mV.min(), "to", info.V_max_mV.max())
              id group  sweeps  stim  samples  rate_Hz  stim_rate_Hz sweep_starts V_unit  I_unit  I_min  I_max  V_min_mV  V_max_mV  nan_samples  step_on_ms  step_ms       bias_A  bridge_Ohm
    20221004_002   APP      16    16    20000  10000.0       10000.0        [0.0]  volts amperes  -60.0  200.0     -88.3      25.9            0       199.9    500.0 1.000000e-11  20000000.0
    20221004_001   APP      15    15    20000  10000.0       10000.0        [0.0]  volts amperes  -60.0  150.0    -105.6       5.3            0       199.9    500.0 1.000000e-11  20000000.0
    20221006_001   APP      16    16    20000  10000.0       10000.0        [0.0]  volts amperes  -60.0  200.0    -105.6      23.5            0       199.9    500.0 1.000000e-11  20000000.0
    20221006_002   APP      16    16    20000  10000.0       10000.0        [0.0]  volts amperes  -60.0  200.0    -105.6      16.1            0       199.9    500.0 1.000000e-11  20000000.0
    20221025_001   APP      16    16    20000  10000.0       10000.0        [0.0]  volts amperes  -60.0  200.0     -97.5      15.6            0       199.9    500.0 1.000000e-11  20000000.0
    20221101_003   APP      16    16    20000  10000.0       10000.0        [0.0]  volts amperes  -60.0  200.0     -82.3      23.9            0       199.9    500.0 1.000000e-11  20000000.0
    20221101_001   APP      16    16    20000  10000.0       10000.0        [0.0]  volts amperes  -60.0  200.0     -88.7      23.1            0       199.9    500.0 1.000000e-11  20000000.0
    20221101_002   APP      16    16    20000  10000.0       10000.0        [0.0]  volts amperes  -60.0  200.0     -89.9      14.2            0       199.9    500.0 1.000000e-11  20000000.0
    20221102_001   APP      16    16    20000  10000.0       10000.0        [0.0]  volts amperes  -60.0  200.0     -87.1      23.7            0       199.9    500.0 1.000000e-11  20000000.0
    20221102_002   APP      11    11    20000  10000.0       10000.0        [0.0]  volts amperes  -60.0   70.0    -105.6      -5.8            0       199.9    500.0 1.000000e-11  20000000.0
    20221214_002   APP      13    13    20000  10000.0       10000.0        [0.0]  volts amperes  -60.0  200.0     -99.0      26.1            0       199.9    500.0 1.000000e-11  20000000.0
    20221214_001   APP      15    15    20000  10000.0       10000.0        [0.0]  volts amperes  -60.0  300.0    -112.9      33.2            0       199.9    500.0 1.000000e-11  20000000.0
    20220913_002    AV      16    16    20000  10000.0       10000.0        [0.0]  volts amperes  -60.0  200.0     -83.9      23.6            0       199.9    500.0 1.000000e-11  20000000.0
    20220913_001    AV      16    16    20000  10000.0       10000.0        [0.0]  volts amperes  -60.0  200.0     -81.4      19.2            0       199.9    500.0 1.000000e-11  20000000.0
    20220914_001    AV      16    16    20000  10000.0       10000.0        [0.0]  volts amperes  -60.0  200.0    -102.5      16.0            0       199.9    500.0 1.000000e-11  20000000.0
    20220915_001    AV      17    17    20000  10000.0       10000.0        [0.0]  volts amperes  -60.0  250.0     -83.0      29.6            0       199.9    500.0 1.000000e-11  20000000.0
    20220915_003    AV      16    16    20000  10000.0       10000.0        [0.0]  volts amperes  -60.0  200.0     -96.4       4.3            0       199.9    500.0 1.000000e-11  20000000.0
    20220915_002    AV      16    16    20000  10000.0       10000.0        [0.0]  volts amperes  -60.0  200.0     -95.2      10.2            0       199.9    500.0 1.000000e-11  20000000.0
    20220915_004    AV      16    16    20000  10000.0       10000.0        [0.0]  volts amperes  -60.0  200.0     -84.5      21.2            0       199.9    500.0 1.000000e-11  20000000.0
    20221215_001    AV      13    13    20000  10000.0       10000.0        [0.0]  volts amperes  -60.0  200.0     -92.6      33.9            0       199.9    500.0 1.000000e-11  20000000.0
    20220316_002   ALL      14    14    20000  10000.0       10000.0        [0.0]  volts amperes  -60.0   80.0     -88.8       3.7            0       199.9    500.0 1.000000e-11  20000000.0
    20220317_003   ALL      12    12    20000  10000.0       10000.0        [0.0]  volts amperes  -60.0  150.0     -89.1      30.4            0       199.9    500.0 1.000000e-11  20000000.0
    20220317_005   ALL      20    20    20000  10000.0       10000.0        [0.0]  volts amperes  -60.0  200.0     -83.8      20.9            0       199.9    500.0 1.000000e-11  20000000.0
    20220406_001   ALL      16    16    20000  10000.0       10000.0        [0.0]  volts amperes  -60.0  200.0     -83.4      32.1            0       199.9    500.0 1.000000e-11  20000000.0
    20220406_004   ALL      18    18    20000  10000.0       10000.0        [0.0]  volts amperes  -60.0  300.0     -82.9      26.2            0       199.9    500.0 1.000000e-11  20000000.0
    20220602_001   ALL      16    16    20000  10000.0       10000.0        [0.0]  volts amperes  -60.0  300.0    -105.6      19.8            0       199.9    500.0 1.000000e-11  20000000.0
    20220602_002   ALL      16    16    20000  10000.0       10000.0        [0.0]  volts amperes  -60.0  300.0    -100.4      11.2            0       199.9    500.0 1.000000e-11  20000000.0
    20220607_005   ALL      18    18    20000  10000.0       10000.0        [0.0]  volts amperes  -60.0  300.0     -78.3      30.3            0       199.9    500.0 1.000000e-11  20000000.0
    20220607_001   ALL      33    33    20000  10000.0       10000.0        [0.0]  volts amperes  -60.0  500.0     -81.3      29.8            0       199.9    500.0 1.000000e-11  20000000.0
    20220607_003   ALL      31    31    20000  10000.0       10000.0        [0.0]  volts amperes  -60.0  500.0     -84.1      38.0            0       199.9    500.0 1.000000e-11  20000000.0
    20220607_002   ALL      24    24    20000  10000.0       10000.0        [0.0]  volts amperes  -60.0  200.0     -84.5      19.7         6000       199.9    500.0 1.000000e-11  20000000.0
    20220721_001   ALL      24    24    20000  10000.0       10000.0        [0.0]  volts amperes  -60.0  400.0     -84.2      32.1            0       199.9    500.0 1.000000e-11  20000000.0
    20220721_003   ALL      18    18    20000  10000.0       10000.0        [0.0]  volts amperes  -60.0  300.0     -80.4      25.4            0       199.9    500.0 1.000000e-11  20000000.0
    20220719_003   ALL      18    18    20000  10000.0       10000.0        [0.0]  volts amperes  -60.0  300.0     -83.0      25.4            0       199.9    500.0 1.000000e-11  20000000.0
    20220719_004   ALL      18    18    20000  10000.0       10000.0        [0.0]  volts amperes  -60.0  300.0     -80.0      27.6            0       199.9    500.0 1.000000e-11  20000000.0
    20220719_001   ALL      18    18    20000  10000.0       10000.0        [0.0]  volts amperes  -60.0  300.0     -79.1      34.5            0       199.9    500.0 1.000000e-11  20000000.0
    20220719_002   ALL      16    16    20000  10000.0       10000.0        [0.0]  volts amperes  -60.0  200.0     -89.9      15.1         6000       199.9    500.0 1.000000e-11  20000000.0
    20220720_003   ALL      16    16    20000  10000.0       10000.0        [0.0]  volts amperes  -60.0  200.0     -88.9      11.8            0       199.9    500.0 1.000000e-11  20000000.0
    20220720_001   ALL      22    22    20000  10000.0       10000.0        [0.0]  volts amperes  -60.0  500.0     -87.4      27.0            0       199.9    500.0 1.000000e-11  20000000.0
    20220727_001   ALL      16    16    20000  10000.0       10000.0        [0.0]  volts amperes  -60.0  200.0     -84.5      12.5            0       199.9    500.0 1.000000e-11  20000000.0
20230627_003_NSD   ALL      13    13    20000  10000.0       10000.0        [0.0]  volts amperes  -60.0  200.0     -77.5      21.6            0       199.9    500.0 1.000000e-11  20000000.0
 20230627_003_FL   ALL      15    15    50000  10000.0       10000.0        [0.0]  volts amperes  -60.0  200.0    -102.5      21.7         1000       999.9    500.0 1.000000e-11  20000000.0
 20230628_002_FL   ALL      15    15    50000  10000.0       10000.0        [0.0]  volts amperes  -60.0  200.0     -98.3      27.1            0       999.9    500.0 1.000000e-11  20000000.0
 20230628_003_FL   ALL      15    15    50000  10000.0       10000.0        [0.0]  volts amperes  -60.0  200.0     -94.3      23.7            0       999.9    500.0 1.000000e-11  20000000.0

Step families (pA):
steps_pA
-60,-40,-20,0,10,20,30,30,35,40,40,45,50,50,50,75,100,100,125,150,150,175,200,200                                                                                 [20220607_002]
-60,-40,-20,0,10,20,30,40,50,50,100,100,100,110,120,130,140,150,150,150,200,200,200,250,250,300,300,350,350,400,400,450,500                                       [20220607_001]
-60,-40,-20,0,10,20,30,40,50,50,100,150                                                                                                                           [20220317_003]
-60,-40,-20,0,10,20,30,40,50,50,100,150,175,175,200,200,200,225,225,250,250,300,300,350,350,400,400,450,450,500,500                                               [20220607_003]
-60,-40,-20,0,10,20,30,40,50,50,100,150,200                                                                                       [20221214_002, 20221215_001, 20230627_003_NSD]
-60,-40,-20,0,10,20,30,40,50,50,100,150,200,250,300                                                                                                               [20221214_001]
-60,-40,-20,0,10,20,30,40,50,60,70                                                                                                                                [20221102_002]
-60,-40,-20,0,10,20,30,40,50,60,70,80,100,150,200                                                                              [20230627_003_FL, 20230628_002_FL, 20230628_00...
-60,-40,-20,0,10,20,30,40,50,60,70,80,90,100,150                                                                                                                  [20221004_001]
-60,-40,-20,0,10,20,30,40,50,60,70,80,90,100,150,200                                                                           [20221004_002, 20221006_001, 20221006_002, 202...
-60,-40,-20,0,10,20,30,40,50,60,70,80,90,100,150,200,250,300                                                                   [20220406_004, 20220607_005, 20220721_003, 202...
-60,-40,-20,0,10,20,30,40,50,60,70,80,90,100,150,200,250,300,350,400,450,500                                                                                      [20220720_001]
-60,-40,-20,0,10,20,30,40,50,60,80,100,150,200,250,300                                                                                              [20220602_001, 20220602_002]
-60,-40,-20,0,10,30,50,70,90,110,130,150,170,190,210,230,250                                                                                                      [20220915_001]
-60,-40,-20,0,20,25,30,35,40,45,50,55,60,80                                                                                                                       [20220316_002]
-60,-40,-20,0,20,25,30,35,40,45,50,55,60,80,100,120,140,160,180,200                                                                                               [20220317_005]
-60,-40,-20,0,20,40,60,80,100,120,140,160,180,200,220,240,260,280,300,320,340,360,380,400                                                                         [20220721_001]

Distinct values over all files: bias_current [1e-11] ; bridge_balance [20000000.0]
Stimulus range over all files: -60.0 to 500.0 (unit stated: ['amperes'] )
Voltage range over all files (mV): -112.9 to 38.0
  • Units. The stimulus series are stated in amperes with conversion 1, but hold values from -60 to 500: they are picoamperes, the step amplitudes of the Methods. The voltage, stated in volts, ranges over values that are millivolts after conversion (resting near -65 mV, spike peaks near +25 mV), so its unit is right.
  • Sampling. Every series is at 10 kHz. In 40 files a sweep lasts 2 s and the step starts at 200 ms; in the three files whose identifier ends in _FL a sweep lasts 5 s and the step starts at 1000 ms. Every step lasts 500 ms, as the Methods say, and every sweep carries a -20 pA, 100 ms test pulse after the step.
  • Every sweep's starting_time is 0, so the 10 s between steps of the Methods cannot be checked.
  • bias_current is 1e-11 A (10 pA) and bridge_balance 2e7 Ohm in every file. A single DC current cannot hold 44 cells at -65 mV, so these look like placeholders; the holding current is not recorded, and no segment of any sweep is free of it. The Methods' membrane potential "measured in the absence of a current injection" (reading (b) of the claims file) cannot be measured; only the pre-step potential under the holding current (reading (a)) can.
  • The step families differ between cells: most run from -60 to 200 pA, some to 150 or 70 pA, and some ALL cells go to 300, 400 or 500 pA, with repeated families in three files. Only steps from -60 to 200 pA are used (Methods).
  • Three sweeps end early: their voltage is NaN for the last 0.1 to 0.6 s, after the step.
  • The voltage floor. Five files reach exactly -105.6 mV and stay there for 10 ms or more during the -60 pA step (see the sag claim): the recording saturates there, which truncates the response of cells with high input resistance.
In [5]:
# The injected current before the step, and the potential of the 0 pA sweep, per cell: is any
# segment free of the holding current?
rows = []
for c in cells:
    start, stop, steps, order = vc.step_layout(c, use_all_steps=True)
    j0 = [k for k in order if steps[k] == 0]
    rows.append({"id": c["meta"]["identifier"], "group": c["meta"]["group"],
                 "max |I| before step (pA)": float(np.abs(c["I"][:start, :]).max()),
                 "0 pA sweep, mean V (mV)": float(np.nanmean(c["V"][:, j0[0]])) if j0 else np.nan,
                 "0 pA sweep, pre-step V (mV)": float(c["V"][:start, j0[0]].mean()) if j0 else np.nan})
rest = pd.DataFrame(rows)
print(rest.round(2).to_string(index=False))
print("\nCells with a 0 pA sweep:", int(rest["0 pA sweep, mean V (mV)"].notna().sum()), "of", len(rest),
      "; nonzero stimulus before the step in", int((rest["max |I| before step (pA)"] > 0).sum()), "cells")
print("Mean V of the 0 pA sweep by group (mV):", rest.groupby("group")["0 pA sweep, mean V (mV)"].mean().round(2).to_dict(),
      "; range", round(rest["0 pA sweep, mean V (mV)"].min(), 2), "to", round(rest["0 pA sweep, mean V (mV)"].max(), 2))
              id group  max |I| before step (pA)  0 pA sweep, mean V (mV)  0 pA sweep, pre-step V (mV)
    20221004_002   APP                       0.0                   -66.64                       -66.07
    20221004_001   APP                       0.0                   -65.17                       -63.86
    20221006_001   APP                       0.0                   -66.57                       -67.32
    20221006_002   APP                       0.0                   -76.88                       -74.92
    20221025_001   APP                       0.0                   -64.61                       -64.39
    20221101_003   APP                       0.0                   -67.77                       -67.47
    20221101_001   APP                       0.0                   -65.84                       -65.64
    20221101_002   APP                       0.0                   -68.49                       -68.57
    20221102_001   APP                       0.0                   -62.66                       -62.11
    20221102_002   APP                       0.0                   -65.22                       -65.12
    20221214_002   APP                       0.0                   -68.30                       -68.08
    20221214_001   APP                       0.0                   -65.83                       -65.37
    20220913_002    AV                       0.0                   -66.04                       -65.50
    20220913_001    AV                       0.0                   -65.24                       -65.27
    20220914_001    AV                       0.0                   -71.40                       -70.34
    20220915_001    AV                       0.0                   -65.66                       -65.22
    20220915_003    AV                       0.0                   -71.38                       -71.13
    20220915_002    AV                       0.0                   -66.45                       -66.19
    20220915_004    AV                       0.0                   -66.28                       -66.02
    20221215_001    AV                       0.0                   -61.18                       -62.90
    20220316_002   ALL                       0.0                   -67.11                       -66.81
    20220317_003   ALL                       0.0                   -69.86                       -69.42
    20220317_005   ALL                       0.0                   -66.00                       -65.78
    20220406_001   ALL                       0.0                   -62.77                       -62.51
    20220406_004   ALL                       0.0                   -63.30                       -60.42
    20220602_001   ALL                       0.0                   -65.95                       -65.55
    20220602_002   ALL                       0.0                   -64.01                       -63.38
    20220607_005   ALL                       0.0                   -64.54                       -64.41
    20220607_001   ALL                       0.0                   -63.80                       -63.84
    20220607_003   ALL                       0.0                   -66.83                       -66.59
    20220607_002   ALL                       0.0                   -62.35                       -62.06
    20220721_001   ALL                       0.0                   -65.65                       -65.57
    20220721_003   ALL                       0.0                   -64.25                       -68.63
    20220719_003   ALL                       0.0                   -69.19                       -68.97
    20220719_004   ALL                       0.0                   -66.61                       -66.34
    20220719_001   ALL                       0.0                   -65.70                       -65.58
    20220719_002   ALL                       0.0                   -68.87                       -69.63
    20220720_003   ALL                       0.0                   -68.02                       -67.89
    20220720_001   ALL                       0.0                   -68.86                       -68.86
    20220727_001   ALL                       0.0                   -68.17                       -68.00
20230627_003_NSD   ALL                       0.0                   -67.93                       -67.68
 20230627_003_FL   ALL                       0.0                   -68.74                       -67.86
 20230628_002_FL   ALL                       0.0                   -67.29                       -67.05
 20230628_003_FL   ALL                       0.0                   -66.69                       -67.08

Cells with a 0 pA sweep: 44 of 44 ; nonzero stimulus before the step in 0 cells
Mean V of the 0 pA sweep by group (mV): {'ALL': -66.35, 'APP': -67.0, 'AV': -66.71} ; range -76.88 to -61.18

The stimulus series is 0 before the step in every cell, and the 0 pA sweep sits at the same potential as the pre-step baseline (-61.2 to -76.9 mV), so the DC holding current is not part of the recorded stimulus and is present throughout every sweep, the 0 pA sweep included. No segment of the files measures the potential "in the absence of a current injection".

In [6]:
# Duplicates: identical sweeps across files, and the two CG538 files that share recording number 003.
import hashlib
h = {}
for c in cells:
    for k in range(c["V"].shape[1]):
        h.setdefault(hashlib.md5(np.nan_to_num(c["V"][:, k]).tobytes()).hexdigest(), []).append((c["meta"]["identifier"], k))
dups = [v for v in h.values() if len(v) > 1]
print("Sweeps whose voltage trace is identical to another sweep:", dups if dups else "none")
feat = pd.DataFrame([{**vc.features(c), **vc.quality(c), **{k: c["meta"][k] for k in ["group", "subject", "identifier", "sex", "age"]}} for c in cells])
pair = feat[feat.identifier.str.startswith("20230627_003")]
print("\nThe two CG538 files with recording number 003:")
print(pair[["identifier", "vm", "rin", "tau", "sag", "rheobase", "max_rate", "threshold"]].round(2).to_string(index=False))
Sweeps whose voltage trace is identical to another sweep: none
The two CG538 files with recording number 003:
      identifier     vm    rin   tau  sag  rheobase  max_rate  threshold
20230627_003_NSD -65.46 192.19 16.91 0.86      50.0      18.0     -34.82
 20230627_003_FL -68.76 802.04 34.90 1.57      20.0       8.0     -28.09

No sweep appears twice. The two CG538 files that share recording number 003 (_NSD and _FL) differ in sweep length and in every feature (input resistance 192 and 802 MOhm), so they are two different cells, counted once each.

In [7]:
# Does the voltage share the clock of the injected current? Contrast windows at the true step onset
# with the same windows shifted 100 ms earlier, for the -60 pA step (hyperpolarization) and for
# spiking during positive steps.
rows = []
for c in cells:
    start, stop, steps, order = vc.step_layout(c)
    dt = 1000 / c["rate"]
    j = [k for k in order if steps[k] == -60][0]
    v = c["V"][:, j]
    def resp(s0):
        return v[s0 + round(20 / dt):s0 + round(80 / dt)].mean() - v[s0 - round(20 / dt):s0].mean()
    sh = round(100 / dt)
    pos = [k for k in order if steps[k] > 0]
    n_in = sum(len(vc.detect_peaks(c["V"][start:stop + 1, k], dt)) for k in pos)
    n_pre = sum(len(vc.detect_peaks(c["V"][start - round(190 / dt):start, k], dt)) for k in pos)
    rows.append({"id": c["meta"]["identifier"], "dV_at_onset": resp(start), "dV_shifted": resp(start - sh),
                 "spikes_in_step_per_s": n_in / (0.5 * len(pos)), "spikes_before_step_per_s": n_pre / (0.19 * len(pos))})
clk = pd.DataFrame(rows)
print(clk.describe().round(2).to_string())
print("\nCells with a hyperpolarization of more than 3 mV at the true onset:", int((clk.dV_at_onset < -3).sum()), "of", len(clk))
print("Cells with more than 1 mV change in the shifted window:", int((clk.dV_shifted.abs() > 1).sum()))
print("Spikes per second during positive steps, all cells:", round(clk.spikes_in_step_per_s.mean(), 2),
      "; in the 190 ms before them:", round(clk.spikes_before_step_per_s.mean(), 2))
       dV_at_onset  dV_shifted  spikes_in_step_per_s  spikes_before_step_per_s
count        44.00       44.00                 44.00                      44.0
mean        -20.01        0.18                 10.45                       0.0
std           9.16        0.64                 12.20                       0.0
min         -38.50       -0.96                  0.29                       0.0
25%         -25.42       -0.20                  2.12                       0.0
50%         -18.76        0.06                  5.69                       0.0
75%         -12.78        0.36                 12.42                       0.0
max          -4.83        1.98                 46.00                       0.0

Cells with a hyperpolarization of more than 3 mV at the true onset: 44 of 44
Cells with more than 1 mV change in the shifted window: 4
Spikes per second during positive steps, all cells: 10.45 ; in the 190 ms before them: 0.0

In every cell the -60 pA step hyperpolarizes the membrane by 4.8 to 38.5 mV within 20 to 80 ms of the onset given by the stimulus series, while the same window 100 ms earlier changes by at most 2.0 mV, and spikes occur during positive steps (10.45 per second on average) and never in the 190 ms before them. The voltage and the stimulus share one clock in every file.

Features and cell selection¶

The eighteen features of the STAR Methods are computed for every cell (vpchat.features). The Methods' exclusion rules are checked as far as the files allow (vpchat.quality): input resistance under 50 MOhm, resting potential above -50 mV (here the pre-step potential), and a change of more than 20% in these from the first sweep to the last (input resistance from the -20 pA test pulse in every sweep). Series resistance is not in the files and cannot be checked.

In [8]:
print(feat[["group", "subject", "identifier", "vm", "sag", "rin", "tau", "rheobase", "threshold", "amplitude", "width",
            "latency", "upstroke", "downstroke", "max_rate", "ahp_a", "ahp_b", "ahp_code", "ahp_latency", "ahp_width",
            "fi_slope", "adaptation", "cv_isi"]].round(2).to_string(index=False))
print("\nMissing values per feature:", feat.isna().sum()[lambda s: s > 0].to_dict())
q = feat[["group", "identifier", "rin", "vm_max", "rin_tp_first", "rin_tp_last", "rin_tp_change", "vm_first", "vm_last", "vm_change"]]
print("\nExclusion rules:")
print("input resistance (-20 pA step) under 50 MOhm:", int((feat.rin < 50).sum()), "cells; smallest", round(feat.rin.min(), 1))
print("pre-step potential above -50 mV in any sweep:", int((feat.vm_max > -50).sum()), "cells; highest", round(feat.vm_max.max(), 1))
print("test-pulse input resistance changed by more than 20%, first to last sweep:")
print(q[q.rin_tp_change > 0.2].round(2).to_string(index=False))
print("by group:", feat[feat.rin_tp_change > 0.2].group.value_counts().to_dict())
print("pre-step potential changed by more than 20%:", int((feat.vm_change > 0.2).sum()), "cells")
group subject       identifier     vm   sag    rin    tau  rheobase  threshold  amplitude  width  latency  upstroke  downstroke  max_rate  ahp_a  ahp_b  ahp_code  ahp_latency  ahp_width  fi_slope  adaptation  cv_isi
  APP   CC328     20221004_002 -67.06  4.16 361.58  21.97      70.0     -31.32      57.22   0.56   173.40    214.72     -125.88      72.0  17.78   7.29     17.78         6.20      59.34      0.51        1.00    0.18
  APP   CC328     20221004_001 -64.92 13.98 737.85  22.54      10.0     -44.43      49.18   0.62   423.11    181.03      -94.74     102.0  18.66    NaN     20.26         8.69      75.15      0.71        1.12    0.10
  APP   CC330     20221006_001 -67.59 16.76 777.18  27.26      20.0     -36.43      59.96   0.54   157.00    233.67     -141.38     106.0  23.48  12.92     23.48         2.60      98.80      0.56        1.04    0.06
  APP   CC330     20221006_002 -73.52  0.00 827.28  19.69      20.0     -39.42      54.39   0.80    82.60    157.24      -79.56      64.0  14.00   6.71     14.00        36.20      93.24      0.47        0.17    0.24
  APP   CC331     20221025_001 -64.83  2.75 534.23  24.14      60.0     -35.88      51.48   0.99    34.90    119.33      -57.35       4.0  12.63  -0.66      9.49         3.70      12.47      0.03        0.00    0.00
  APP   CC356     20221101_003 -68.61  3.35 282.62  18.80      70.0     -37.67      61.56   1.51    85.91    143.25      -36.17      18.0  14.49  11.60     10.29        48.19      90.04      0.13        0.29    0.80
  APP   CC356     20221101_001 -66.95 10.21 346.45  26.66      30.0     -37.84      60.95   1.16   195.80    171.46      -52.51      42.0   6.53   2.28      6.53        21.50      51.37      0.22        0.91    0.23
  APP   CC356     20221101_002 -68.24  6.45 328.02  21.10      40.0     -36.83      49.95   1.45   110.30    113.31      -37.30      28.0  15.65  15.05     10.72        62.30      95.11      0.16        0.40    0.79
  APP   CC357     20221102_001 -62.93  6.29 430.54  17.37      30.0     -39.77      63.48   1.08    56.90    168.82      -55.48      38.0  13.02   7.54     13.02        19.50      97.54      0.30        0.00    0.10
  APP   CC357     20221102_002 -62.50  1.18 800.71  30.71      30.0     -29.77      20.42   0.76   324.10     64.12      -28.01       2.0   9.78   6.69      7.83        53.40      33.55      0.20         NaN    0.00
  APP   CC396     20221214_002 -66.56  2.35 393.36  18.49      20.0     -36.36      62.15   0.79    96.50    189.54      -87.68      62.0  26.34  17.34     26.34        14.90      98.26      0.32        0.72    0.19
  APP   CC396     20221214_001 -65.40 12.73 755.93  25.52      20.0     -35.81      66.05   0.72    98.10    226.94     -100.25      68.0  27.63  17.21     27.63        21.30      98.29      0.35        0.70    0.21
   AV   CC317     20220913_002 -66.33  4.43 296.92  12.47      50.0     -36.99      60.55   1.44    87.51    132.00      -37.59      10.0  16.29  13.70      7.56        49.99      96.47      0.05        0.25    1.46
   AV   CC317     20220913_001 -64.93  3.44 265.48   9.00      50.0     -36.53      55.13   1.26   111.30    127.94      -41.55      16.0  16.64  16.09      0.71        74.50      81.31      0.09        0.33    0.94
   AV   CC318     20220914_001 -71.13  3.88 575.71  26.70      40.0     -34.03      48.08   0.92    91.11    133.20      -60.47      44.0  12.14   9.51      7.63        23.39      97.93      0.26        0.47    0.47
   AV   CC318     20220915_001 -66.19  0.89 182.41   7.03     150.0     -24.32      53.29   1.50    48.91    113.79      -36.26       4.0  10.96  10.87      1.89        94.79       0.29      0.06        0.00    0.00
   AV   CC318     20220915_003 -70.92  6.90 511.39  12.96      30.0     -41.33      44.19   0.77    55.40    131.58      -68.85      92.0  14.68  13.72      9.56        75.80       4.53      0.51        0.77    0.19
   AV   CC318     20220915_002 -66.00  7.94 501.73  13.69      20.0     -39.74      49.56   0.65    50.50    175.23      -96.19     118.0  16.24  14.43     14.55        81.80      67.49      0.63        0.84    0.12
   AV   CC319     20220915_004 -66.89  3.16 341.16  24.08      50.0     -36.55      57.70   1.46    85.90    143.51      -42.52      20.0  14.34  13.74     10.14        52.50      92.67      0.13        0.43    0.78
   AV   CC399     20221215_001 -65.64  8.57 636.62  27.59      20.0     -40.00      73.85   0.50    65.70    302.69     -171.49      90.0  23.60   8.61     23.60         1.90      76.74      0.48        0.88    0.10
  ALL   CG354     20220316_002 -66.77  2.45 390.81  20.43      80.0     -33.09      35.04   1.71    51.90     67.24      -21.24       4.0   7.08   4.28      5.20        20.60      95.26      0.20        0.00    0.00
  ALL   CG355     20220317_003 -69.31  5.50 299.83  14.27      40.0     -36.49      66.93   1.18    98.20    177.36      -48.19      12.0  12.48  12.46      6.90        99.90       0.23      0.09        0.00    0.71
  ALL   CG355     20220317_005 -67.02  0.49 316.72  46.28      60.0     -34.60      55.36   0.51   446.60    197.44     -126.97      46.0  18.77    NaN     15.33        37.00      52.14      0.32        1.09    0.08
  ALL   CG382     20220406_001 -63.59  3.85 307.51  15.59      50.0     -31.25      63.21   1.01   102.10    185.11      -58.46      10.0  19.55  18.21     11.73        43.60      97.70      0.06        0.00    0.68
  ALL   CG382     20220406_004 -61.96  3.57 175.04  14.13      60.0     -38.53      64.55   1.74   173.11    163.69      -30.31      10.0  11.09  10.62     11.82        66.39      92.75      0.06        0.67    0.67
  ALL   CG383     20220602_001 -64.34  3.49 953.60  38.44      20.0     -33.59      53.36   0.93    83.10    165.30      -63.73      14.0  28.12  18.95     28.12        22.70      97.98      0.08        0.25    1.64
  ALL   CG383     20220602_002 -63.17  2.29 709.24  25.86      20.0     -37.02      46.46   1.08   116.51    115.27      -55.51      16.0  26.00  18.04     25.79         4.79      97.76      0.11        0.00    0.37
  ALL   CG398     20220607_005 -64.36  1.21  75.02   9.49     150.0     -34.45      64.70   1.14   117.90    234.70      -45.58       8.0  14.75  14.74      7.54        99.90      94.45      0.08        0.33    0.71
  ALL   CG398     20220607_001 -65.09  3.45 110.81   5.14     150.0     -30.88      59.83   0.97    37.51    181.71      -55.61       8.0  15.21  12.11      6.59        35.89      97.71      0.13        0.00    0.00
  ALL   CG398     20220607_003 -67.67  1.63 113.16  85.72     200.0     -29.03      67.00   1.51   221.70    209.69      -35.36       2.0  19.92  18.79     19.16        44.00      93.76      0.08        0.00    0.00
  ALL   CG398     20220607_002 -65.20  3.89 355.02  22.20      40.0     -33.53      53.27   1.61    77.20    127.20      -31.01      18.0  15.94  12.71     13.87        33.10      94.51      0.16        0.14    1.49
  ALL   CG438     20220721_001 -67.91  1.34 123.41   9.10     160.0     -34.22      66.08   2.37   298.81    162.66      -20.92       4.0  16.84  16.16      9.68        48.29      87.41      0.06        1.00    0.00
  ALL   CG438     20220721_003 -65.01  4.19 373.97 197.75      50.0     -40.06      64.92   1.52   120.80    116.82      -38.55      22.0  10.53   6.79      8.71        16.10      96.37      0.14        0.10    0.43
  ALL   CG439     20220719_003 -69.54  3.12 247.05  13.32      70.0     -41.28      66.64   1.53    93.81    154.70      -35.20      10.0  10.72  10.61      7.59        97.49       3.30      0.07        0.00    0.45
  ALL   CG439     20220719_004 -67.01  1.61 222.64  53.87      60.0     -36.99      64.61   1.69   313.51    167.56      -31.98       8.0  19.44  18.38     17.71        49.49      87.66      0.07        0.00    0.64
  ALL   CG439     20220719_001 -67.05  2.92 167.25  15.98      90.0     -34.26      68.80   1.17    80.20    197.12      -50.13       6.0  15.74  15.42      8.77        67.70      97.22      0.08        0.00    0.07
  ALL   CG439     20220719_002 -69.06  3.82 351.97  54.70      30.0     -41.40      55.67   1.84   223.90    114.11      -28.01      16.0  17.09  15.05     13.01        56.60      90.97      0.28        0.00    0.13
  ALL   CG440     20220720_003 -67.08  4.38 322.33  14.84      50.0     -35.36      39.32   1.78    74.01     68.08      -24.60      10.0   7.20   6.00      5.05        32.59      95.28      0.09        0.00    0.11
  ALL   CG440     20220720_001 -69.57  1.55 279.81  45.33      50.0     -42.96      57.53   2.41   397.01    101.96      -28.33       4.0  39.76  39.14     32.19        68.29      92.04      0.02        1.00    0.00
  ALL   CG463     20220727_001 -67.21  2.50 263.94  12.12      60.0     -38.76      50.86   2.27   100.71     61.02      -22.95       6.0   6.96   5.49      4.44        44.79      94.44      0.05        0.00    0.11
  ALL   CG538 20230627_003_NSD -65.46  0.86 192.19  16.91      50.0     -34.82      56.42   1.28   270.20    143.03      -39.17      18.0  19.72  18.37     15.39        45.20      94.89      0.11        0.29    1.18
  ALL   CG538  20230627_003_FL -68.76  1.57 802.04  34.90      20.0     -28.09      42.76   1.47   263.90     72.75      -38.13       8.0  48.77  44.91     44.34        47.50      95.63      0.03        1.00    0.12
  ALL   CG539  20230628_002_FL -68.38 10.79 440.34  10.70      20.0     -33.00      60.08   1.96   243.70    102.82      -27.76      10.0  33.03  31.66     27.82        43.00      93.80      0.05        0.25    0.79
  ALL   CG539  20230628_003_FL -65.75  6.93 457.48   8.75      30.0     -33.48      57.20   1.82   136.50     93.90      -30.79      30.0  21.40  18.37     12.40        42.20      96.18      0.17        0.00    0.28

Missing values per feature: {'ahp_b': 2, 'adaptation': 1}

Exclusion rules:
input resistance (-20 pA step) under 50 MOhm: 0 cells; smallest 75.0
pre-step potential above -50 mV in any sweep: 0 cells; highest -53.9
test-pulse input resistance changed by more than 20%, first to last sweep:
group   identifier    rin  vm_max  rin_tp_first  rin_tp_last  rin_tp_change  vm_first  vm_last  vm_change
  APP 20221006_001 777.18  -58.32        914.33       700.47           0.23    -65.85   -72.71       0.10
  APP 20221101_002 328.02  -64.60        417.19       298.04           0.29    -67.13   -69.59       0.04
   AV 20220913_001 265.48  -63.53        285.33       372.66           0.31    -65.49   -64.17       0.02
   AV 20220915_001 182.41  -64.86        190.50       143.17           0.25    -64.86   -66.53       0.03
  ALL 20220406_001 307.51  -61.71        378.51       260.40           0.31    -62.03   -64.68       0.04
  ALL 20220406_004 175.04  -53.85         95.16       178.78           0.88    -63.41   -66.53       0.05
  ALL 20220607_005  75.02  -63.79         83.92        55.63           0.34    -65.87   -64.69       0.02
  ALL 20220607_001 110.81  -59.74        135.44       104.92           0.23    -64.12   -66.30       0.03
  ALL 20220607_003 113.16  -65.63        107.04        49.52           0.54    -66.12   -67.42       0.02
  ALL 20220721_001 123.41  -65.39        112.59        82.65           0.27    -66.39   -70.54       0.06
  ALL 20220721_003 373.97  -61.74        214.11       150.59           0.30    -63.51   -64.66       0.02
  ALL 20220719_003 247.05  -67.80        245.32       182.95           0.25    -70.03   -70.26       0.00
  ALL 20220720_003 322.33  -65.08        451.62       287.18           0.36    -66.84   -67.19       0.01
  ALL 20220720_001 279.81  -67.42        320.26       235.63           0.26    -67.42   -70.92       0.05
by group: {'ALL': 10, 'APP': 2, 'AV': 2}
pre-step potential changed by more than 20%: 0 cells
In [9]:
# Per-sweep test-pulse input resistance (MOhm) and pre-step potential (mV), in file order, for
# every cell; and the 20% rule read as the largest change from the first sweep over all sweeps.
pd.set_option("display.max_colwidth", 400)
print(feat[["group", "identifier", "rin_tp_sweeps", "vm_sweeps"]].to_string(index=False))
print("\nCells whose test-pulse resistance departs by more than 20% from the first sweep in any sweep:",
      feat[feat.rin_tp_maxdev > 0.2].groupby("group").size().to_dict(), "of", feat.groupby("group").size().to_dict())
cv = feat.rin_tp_sweeps.apply(lambda r: np.std(r, ddof=1) / np.mean(r))
print("Sweep-to-sweep CV of the test-pulse resistance within a cell: median", round(cv.median(), 3), "max", round(cv.max(), 3))
group       identifier                                                                                                                                                                                                                       rin_tp_sweeps                                                                                                                                                                                                                                                             vm_sweeps
  APP     20221004_002                                                                                                                    [395.4, 381.8, 403.2, 391.9, 411.7, 326.6, 324.1, 342.6, 408.4, 268.5, 369.6, 339.0, 342.4, 353.9, 339.7, 378.0]                                                                                                                                         [-67.04, -66.3, -65.82, -64.98, -66.6, -67.1, -66.43, -67.46, -66.84, -68.75, -68.22, -68.73, -68.48, -66.27, -67.12, -66.86]
  APP     20221004_001                                                                                                                           [698.8, 698.6, 674.9, 681.2, 678.7, 724.9, 702.6, 693.8, 703.8, 689.9, 684.9, 696.1, 763.7, 698.7, 689.4]                                                                                                                                                 [-65.5, -64.83, -64.15, -64.11, -63.9, -63.85, -64.55, -63.53, -65.03, -66.2, -66.67, -65.21, -65.13, -65.28, -65.85]
  APP     20221006_001                                                                                                                    [914.3, 794.9, 792.5, 732.7, 928.5, 647.5, 814.3, 631.8, 650.0, 791.5, 829.0, 783.1, 707.2, 970.0, 815.5, 700.5]                                                                                                                                      [-65.85, -64.24, -67.87, -67.49, -63.77, -69.43, -69.42, -71.09, -66.95, -71.07, -58.32, -70.04, -67.33, -70.64, -65.26, -72.71]
  APP     20221006_002                                                                                                                   [861.3, 771.4, 822.3, 887.8, 935.6, 871.8, 960.2, 854.7, 1245.5, 920.6, 855.2, 906.1, 942.2, 607.3, 899.5, 874.2]                                                                                                                                      [-68.21, -67.99, -81.11, -75.69, -80.56, -71.37, -72.62, -69.76, -73.73, -73.57, -75.03, -73.76, -72.84, -71.97, -74.03, -74.11]
  APP     20221025_001                                                                                                                    [485.0, 487.9, 421.9, 490.0, 500.8, 477.3, 481.6, 502.1, 494.6, 454.1, 511.7, 511.9, 461.6, 543.5, 495.0, 484.6]                                                                                                                                       [-66.12, -64.58, -64.36, -63.85, -64.02, -65.15, -63.69, -62.87, -65.75, -64.45, -64.96, -65.38, -65.8, -66.59, -65.92, -63.75]
  APP     20221101_003                                                                                                                    [291.4, 294.4, 293.5, 291.0, 268.2, 285.6, 262.8, 233.4, 250.5, 275.9, 280.1, 245.7, 262.9, 270.0, 238.2, 247.0]                                                                                                                                        [-66.1, -67.55, -67.36, -67.47, -68.35, -68.34, -68.62, -68.35, -68.88, -68.71, -69.37, -69.45, -69.19, -69.65, -70.11, -70.2]
  APP     20221101_001                                                                                                                    [404.8, 393.6, 367.5, 328.4, 399.9, 401.3, 381.6, 347.4, 349.7, 352.5, 400.4, 384.6, 333.3, 366.6, 316.6, 366.1]                                                                                                                                        [-66.81, -64.98, -65.38, -65.21, -65.35, -66.37, -66.04, -66.83, -67.88, -67.89, -67.83, -68.2, -68.55, -67.83, -67.6, -68.42]
  APP     20221101_002                                                                                                                    [417.2, 450.1, 431.6, 401.4, 365.8, 436.0, 369.6, 572.5, 400.3, 351.1, 377.5, 354.4, 383.7, 365.6, 343.5, 298.0]                                                                                                                                         [-67.13, -67.42, -67.64, -68.52, -68.44, -64.6, -69.17, -69.29, -69.06, -68.63, -69.11, -69.19, -68.8, -68.1, -67.22, -69.59]
  APP     20221102_001                                                                                                                    [437.3, 404.7, 411.4, 416.3, 418.2, 407.1, 435.3, 413.2, 411.2, 427.7, 397.2, 397.4, 386.2, 374.2, 399.6, 486.9]                                                                                                                                      [-62.79, -61.81, -61.78, -62.36, -62.77, -62.54, -63.31, -63.37, -61.25, -62.53, -63.77, -63.34, -63.23, -64.01, -63.68, -64.33]
  APP     20221102_002                                                                                                                                                       [738.5, 742.4, 780.8, 721.8, 741.4, 771.4, 733.1, 722.8, 735.8, 751.5, 754.9]                                                                                                                                                                                [-63.85, -63.76, -63.1, -65.02, -64.05, -65.24, -59.79, -60.05, -60.57, -60.83, -61.3]
  APP     20221214_002                                                                                                                                         [480.8, 536.6, 476.3, 512.9, 475.8, 446.9, 506.9, 486.6, 499.2, 605.9, 498.9, 411.0, 476.1]                                                                                                                                                                [-68.13, -67.5, -67.88, -68.6, -68.47, -64.37, -65.86, -65.04, -62.13, -63.98, -67.44, -67.93, -68.01]
  APP     20221214_001                                                                                                                           [782.1, 766.1, 755.1, 744.4, 780.0, 815.9, 741.7, 754.4, 774.8, 732.6, 719.4, 558.3, 709.4, 710.1, 633.2]                                                                                                                                                   [-66.98, -67.37, -63.5, -65.4, -67.12, -66.75, -65.12, -62.46, -65.3, -64.9, -64.98, -63.98, -66.6, -65.29, -65.25]
   AV     20220913_002                                                                                                                    [282.2, 287.1, 275.3, 333.2, 334.1, 291.6, 304.7, 303.5, 346.4, 398.2, 279.7, 269.8, 295.1, 280.6, 252.2, 243.9]                                                                                                                                        [-66.4, -66.3, -65.33, -64.38, -65.38, -65.85, -65.03, -66.48, -66.58, -66.05, -66.61, -66.74, -67.28, -67.59, -67.52, -67.72]
   AV     20220913_001                                                                                                                     [285.3, 281.7, 329.7, 332.9, 271.8, 295.6, 52.2, 344.6, 214.5, 349.1, 125.6, 198.8, 245.3, 228.9, 236.2, 372.7]                                                                                                                                        [-65.49, -63.64, -65.16, -65.4, -63.53, -63.66, -65.19, -64.28, -65.99, -65.37, -65.5, -65.77, -65.72, -64.73, -65.24, -64.17]
   AV     20220914_001                                                                                                                    [546.9, 559.7, 557.4, 500.2, 551.7, 532.5, 533.9, 572.8, 575.2, 605.7, 482.3, 524.3, 534.8, 617.8, 472.1, 521.6]                                                                                                                                        [-68.32, -68.46, -69.16, -70.4, -70.21, -70.72, -70.38, -70.98, -71.64, -73.38, -73.85, -75.02, -75.1, -71.29, -69.04, -70.18]
   AV     20220915_001                                                                                                             [190.5, 123.1, 183.5, 191.9, 190.9, 183.8, 181.8, 195.7, 181.7, 158.4, 159.5, 175.0, 181.9, 174.6, 169.8, 145.4, 143.2]                                                                                                                                [-64.86, -65.11, -65.14, -65.43, -65.61, -65.64, -66.0, -66.05, -66.31, -66.51, -66.9, -67.37, -67.43, -67.48, -66.48, -66.39, -66.53]
   AV     20220915_003                                                                                                                    [463.8, 830.5, 472.9, 507.0, 331.7, 468.0, 490.1, 496.2, 487.8, 425.8, 503.4, 274.1, 415.9, 487.1, 497.3, 422.3]                                                                                                                                         [-70.72, -69.96, -67.53, -71.78, -71.5, -71.48, -70.9, -68.37, -68.71, -70.83, -71.72, -72.32, -72.7, -71.41, -72.71, -72.12]
   AV     20220915_002                                                                                                                    [574.7, 576.0, 491.3, 564.7, 650.8, 547.7, 516.9, 611.2, 493.6, 509.2, 502.4, 557.8, 532.4, 476.7, 494.7, 489.9]                                                                                                                                       [-68.92, -67.35, -65.7, -67.22, -67.28, -65.45, -66.33, -63.79, -66.48, -66.99, -65.79, -65.66, -65.94, -65.91, -61.02, -66.15]
   AV     20220915_004                                                                                                                    [336.5, 322.1, 348.3, 335.9, 339.1, 338.0, 344.6, 338.6, 317.1, 321.8, 299.8, 329.1, 303.1, 308.0, 303.3, 305.8]                                                                                                                                         [-65.65, -65.86, -65.42, -65.86, -66.1, -66.24, -65.98, -66.73, -66.15, -67.4, -67.73, -68.02, -68.16, -68.3, -68.28, -68.41]
   AV     20221215_001                                                                                                                                         [408.5, 455.6, 320.4, 471.4, 462.7, 449.6, 368.7, 456.8, 292.4, 559.1, 420.2, 496.3, 456.4]                                                                                                                                                                 [-60.66, -61.29, -62.16, -61.6, -67.45, -59.74, -69.09, -69.23, -66.3, -69.78, -70.32, -69.33, -66.4]
  ALL     20220316_002                                                                                                                                  [421.9, 407.5, 370.7, 395.7, 351.9, 372.2, 388.7, 328.4, 396.1, 368.7, 408.8, 363.1, 369.8, 368.5]                                                                                                                                                       [-66.1, -66.49, -66.25, -66.68, -66.38, -66.71, -66.12, -67.28, -66.55, -67.06, -67.22, -67.52, -67.23, -67.19]
  ALL     20220317_003                                                                                                                                                [399.6, 395.4, 382.2, 394.6, 386.3, 386.3, 355.4, 392.1, 387.6, 406.9, 330.0, 350.8]                                                                                                                                                                      [-69.11, -69.18, -69.38, -69.16, -70.18, -69.64, -69.39, -68.89, -69.29, -68.68, -69.29, -69.55]
  ALL     20220317_005                                                                                        [249.7, 262.6, 284.9, 281.1, 241.4, 274.1, 251.8, 229.1, 279.1, 223.4, 230.2, 271.5, 241.5, 201.8, 246.5, 240.6, 242.9, 251.9, 260.9, 228.1]                                                                                                       [-66.29, -61.07, -66.14, -66.16, -65.54, -66.37, -66.48, -66.01, -66.72, -66.41, -67.07, -67.93, -67.91, -68.06, -68.6, -68.59, -68.47, -68.93, -68.85, -68.72]
  ALL     20220406_001                                                                                                                    [378.5, 355.9, 381.0, 364.2, 400.9, 395.8, 367.2, 354.6, 369.5, 347.9, 351.0, 335.7, 333.8, 314.2, 268.9, 260.4]                                                                                                                                         [-62.03, -62.23, -62.3, -62.28, -61.71, -62.7, -63.94, -64.08, -64.4, -63.98, -64.53, -64.74, -64.79, -65.05, -63.95, -64.68]
  ALL     20220406_004                                                                                                       [95.2, 250.5, 171.2, 155.9, 223.6, 147.6, 218.5, 231.9, 185.4, 168.5, 207.6, 201.9, 276.4, 107.2, 168.4, 217.7, 168.2, 178.8]                                                                                                                       [-63.41, -62.6, -53.85, -60.09, -62.14, -60.72, -61.94, -61.99, -62.17, -59.71, -59.66, -59.41, -62.39, -62.94, -63.96, -65.15, -66.56, -66.53]
  ALL     20220602_001                                                                                                                    [784.8, 852.3, 798.7, 595.8, 901.9, 714.3, 888.0, 793.0, 900.0, 855.0, 872.6, 743.4, 824.8, 782.7, 597.5, 839.8]                                                                                                                                       [-67.3, -65.47, -65.22, -66.28, -61.36, -63.57, -65.06, -64.27, -65.48, -62.62, -64.43, -62.98, -63.72, -63.92, -64.36, -63.42]
  ALL     20220602_002                                                                                                                    [633.0, 626.5, 648.6, 717.9, 592.5, 598.9, 677.4, 698.3, 619.7, 681.9, 648.2, 614.7, 576.4, 503.2, 696.7, 535.0]                                                                                                                                        [-63.43, -63.9, -63.13, -62.97, -62.92, -63.42, -62.97, -62.93, -63.06, -62.79, -62.4, -63.52, -63.38, -62.86, -63.58, -63.53]
  ALL     20220607_005                                                                                                                        [83.9, 76.7, 83.7, 87.8, 79.6, 79.2, 81.7, 93.6, 87.2, 84.8, 68.9, 82.1, 78.3, 86.6, 79.8, 72.6, 79.9, 55.6]                                                                                                                        [-65.87, -64.74, -64.41, -64.43, -64.26, -64.26, -64.01, -63.95, -64.22, -64.29, -64.33, -63.79, -63.96, -64.18, -64.26, -64.0, -64.9, -64.69]
  ALL     20220607_001 [135.4, 132.3, 141.8, 102.4, 117.4, 160.5, 32.8, 120.3, 111.2, 141.4, 107.2, 113.5, 126.1, 116.2, 106.0, 119.1, 110.7, 102.3, 120.0, 109.4, 112.0, 133.4, 128.5, 124.9, 112.6, 128.3, 89.6, 78.6, 119.1, 111.7, 91.6, 104.6, 104.9] [-64.12, -63.86, -64.21, -63.69, -63.84, -63.8, -59.74, -62.58, -64.43, -64.31, -63.83, -64.55, -65.38, -65.06, -65.12, -65.14, -65.82, -65.68, -65.25, -65.01, -65.27, -65.21, -66.02, -66.21, -66.52, -66.7, -66.73, -66.84, -66.91, -66.68, -66.79, -66.46, -66.3]
  ALL     20220607_003                               [107.0, 113.8, 108.5, 128.0, 106.5, 115.2, 108.2, 106.9, 99.4, 82.9, 98.1, 93.8, 86.8, 72.8, 102.6, 109.4, 88.1, 76.9, 76.6, 68.2, 56.6, 70.8, 106.5, 99.4, 77.9, 81.0, 78.5, 77.6, 92.2, 80.5, 49.5]               [-66.12, -65.63, -66.61, -66.75, -67.01, -67.22, -67.45, -67.86, -67.72, -67.31, -67.15, -67.06, -67.65, -67.53, -67.94, -68.04, -68.54, -69.2, -69.35, -69.79, -70.33, -70.95, -66.16, -66.53, -66.96, -67.43, -67.57, -67.63, -67.35, -67.45, -67.42]
  ALL     20220607_002                                                                   [371.1, 327.9, 361.1, 325.7, 367.7, 419.8, 362.0, 378.0, 339.4, 367.4, 358.7, 344.5, 346.8, 375.4, 384.8, 371.1, 363.7, 359.5, 369.7, 362.5, 449.9, 336.1, 316.0]                                                                               [-64.59, -62.93, -62.65, -62.95, -62.27, -61.87, -62.92, -62.8, -62.52, -66.75, -66.53, -66.93, -66.81, -65.49, -67.03, -67.13, -66.56, -64.75, -66.66, -67.48, -67.55, -66.86, -64.99]
  ALL     20220721_001                                                                 [112.6, 112.4, 110.9, 136.6, 137.3, 117.7, 116.7, 127.2, 104.3, 118.9, 121.6, 100.2, 106.0, 122.9, 135.4, 93.3, 100.1, 90.6, 121.4, 101.3, 99.5, 94.8, 104.4, 82.7]                                                                        [-66.39, -66.16, -65.8, -65.39, -65.8, -65.57, -65.98, -66.92, -67.09, -66.25, -66.72, -67.38, -67.66, -68.18, -68.54, -69.39, -69.26, -69.63, -69.78, -70.06, -70.45, -70.43, -70.52, -70.54]
  ALL     20220721_003                                                                                                      [214.1, 279.4, 174.0, 279.4, 355.1, 324.8, 370.7, 283.2, 351.3, 173.1, 354.8, 134.7, 212.3, 296.6, 238.5, 234.4, 128.7, 150.6]                                                                                                                         [-63.51, -65.27, -61.74, -67.97, -65.45, -65.99, -62.05, -63.29, -63.6, -66.19, -63.6, -65.38, -66.74, -66.33, -67.34, -65.6, -65.48, -64.66]
  ALL     20220719_003                                                                                                      [245.3, 234.0, 236.4, 240.3, 228.0, 236.9, 249.0, 239.6, 214.9, 260.9, 241.2, 198.5, 189.5, 183.0, 211.5, 172.9, 167.6, 183.0]                                                                                                                           [-70.03, -68.36, -67.8, -68.87, -68.69, -69.2, -69.3, -69.33, -69.48, -69.8, -69.94, -70.4, -69.66, -69.93, -70.35, -69.68, -70.56, -70.26]
  ALL     20220719_004                                                                                                      [198.0, 205.6, 193.1, 216.9, 203.0, 202.3, 200.4, 210.0, 202.5, 188.7, 205.9, 178.8, 181.6, 202.3, 168.0, 163.9, 155.8, 168.2]                                                                                                                        [-66.44, -66.36, -66.73, -66.35, -66.13, -66.34, -66.62, -66.96, -66.24, -66.68, -67.76, -67.53, -67.82, -67.71, -67.19, -67.5, -67.64, -68.2]
  ALL     20220719_001                                                                                                      [197.4, 183.9, 229.3, 209.3, 180.3, 184.9, 200.8, 156.1, 189.9, 176.0, 166.9, 175.3, 147.9, 173.4, 167.5, 170.0, 168.6, 166.2]                                                                                                                        [-65.58, -65.91, -65.68, -65.43, -65.63, -66.03, -66.44, -66.4, -66.77, -67.03, -67.7, -67.43, -67.65, -68.21, -68.31, -68.73, -68.79, -69.13]
  ALL     20220719_002                                                                                                                           [375.6, 366.9, 379.1, 362.0, 384.5, 368.0, 368.5, 376.0, 364.2, 324.4, 331.2, 350.9, 329.4, 332.9, 351.1]                                                                                                                                                  [-70.02, -69.03, -69.69, -67.5, -69.49, -69.32, -69.7, -69.53, -69.5, -69.77, -69.9, -69.91, -67.08, -69.26, -64.65]
  ALL     20220720_003                                                                                                                    [451.6, 427.2, 429.5, 368.4, 424.1, 395.9, 373.4, 397.5, 368.7, 391.7, 316.9, 377.0, 364.8, 341.4, 265.3, 287.2]                                                                                                                                       [-66.84, -67.31, -67.73, -67.83, -65.08, -66.18, -67.75, -68.91, -66.5, -66.61, -65.87, -68.33, -67.97, -66.34, -66.78, -67.19]
  ALL     20220720_001                                                                          [320.3, 249.9, 208.3, 238.8, 194.2, 223.9, 289.6, 234.4, 213.2, 240.3, 272.7, 226.8, 258.4, 216.5, 230.8, 249.9, 257.4, 234.7, 197.4, 243.7, 222.8, 235.6]                                                                                         [-67.42, -68.54, -68.62, -68.57, -68.12, -68.83, -69.06, -70.13, -70.6, -69.98, -70.01, -69.53, -68.67, -71.05, -71.11, -68.3, -69.96, -70.57, -70.7, -69.07, -70.84, -70.92]
  ALL     20220727_001                                                                                                                    [312.0, 264.2, 284.8, 324.6, 295.0, 357.9, 322.1, 322.6, 294.6, 262.1, 226.7, 245.3, 292.4, 235.8, 324.9, 280.0]                                                                                                                                      [-65.83, -66.98, -67.94, -68.24, -66.95, -64.31, -64.52, -66.08, -66.65, -67.46, -69.39, -68.77, -67.85, -67.76, -68.19, -68.35]
  ALL 20230627_003_NSD                                                                                                                                         [185.1, 185.8, 193.2, 223.9, 221.1, 207.0, 229.7, 234.5, 306.5, 283.8, 275.3, 277.1, 221.4]                                                                                                                                                               [-66.24, -66.2, -68.24, -67.43, -67.28, -68.07, -67.93, -66.67, -65.97, -64.14, -61.86, -61.06, -59.85]
  ALL  20230627_003_FL                                                                                                                           [718.3, 785.9, 787.8, 729.1, 758.8, 701.5, 688.0, 789.2, 663.0, 706.0, 782.3, 746.0, 755.4, 765.3, 832.9]                                                                                                                                              [-68.96, -67.99, -68.83, -67.81, -67.56, -68.67, -69.39, -70.11, -68.86, -69.16, -67.02, -71.12, -68.76, -68.17, -68.98]
  ALL  20230628_002_FL                                                                                                                           [479.2, 534.2, 545.8, 525.1, 459.2, 511.5, 476.3, 416.6, 447.9, 525.6, 389.4, 527.1, 451.8, 441.3, 450.7]                                                                                                                                                [-69.19, -66.86, -67.1, -67.38, -67.83, -67.6, -66.46, -67.75, -68.59, -68.86, -69.71, -69.95, -69.61, -69.33, -69.51]
  ALL  20230628_003_FL                                                                                                                           [471.4, 454.2, 479.4, 482.8, 482.8, 530.5, 517.0, 479.0, 471.0, 427.7, 459.4, 417.4, 433.6, 452.4, 403.1]                                                                                                                                               [-66.48, -67.1, -65.14, -66.63, -62.73, -65.27, -66.72, -67.77, -66.71, -66.91, -64.69, -67.04, -66.77, -64.16, -62.16]

Cells whose test-pulse resistance departs by more than 20% from the first sweep in any sweep: {'ALL': 18, 'APP': 7, 'AV': 5} of {'ALL': 24, 'APP': 12, 'AV': 8}
Sweep-to-sweep CV of the test-pulse resistance within a cell: median 0.106 max 0.328

No cell breaks the input resistance or resting potential rules. Under the 20% change rule as read here (the test pulse, first sweep against last), 2 APP, 2 AV and 10 ALL cells would go. That the APP and AV counts in the dandiset already equal the paper's (12 and 8) suggests the deposited cells are the ones the paper kept, and that the paper did not apply the change rule this way. The analysis is therefore run on three cell sets, and each claim reports all three:

  • all: every cell in the dandiset (24 ALL, 12 APP, 8 AV), the main set;
  • no_FL: without the three _FL files, which leaves 21 ALL cells, the paper's count (from 10 mice, not 8); that these are the cells the paper left out is a guess;
  • change20: without the cells whose test-pulse input resistance changed by more than 20%.

The single-sweep test pulse is noisy (the per-sweep table above): read as the largest departure from the first sweep, the 20% rule would remove 30 of 44 cells, which cannot be the paper's rule. The first-against-last reading is kept for change20, and stays a variant.

Each set is tested by the two readings of the claims file: (a) a cell-level one-way ANOVA and uncorrected two-tailed Student t-tests for each pair, and (b) the nested design the Methods name (cells nested in mice nested in group), fitted as a linear mixed model with a random intercept per mouse, with Wald tests for the group effect and each pair, and the classical nested ANOVA F (group mean square over mouse-within-group mean square) beside it. In the tables, a pair "X-Y" is Y minus X, and t is positive when Y is larger. The tables also give (b) p_t, the same Wald contrasts referred to t on the number of mice minus 3 degrees of freedom ((b) df_t), since the normal reference is anticonservative with 4 to 11 mice per group. The STAR Methods (Quantification and statistical analysis) say "Shapiro-Wilk and Smirnov-Kolmogorov tests were used to assess normality of the data. Non-parametric tests were conducted if the data failed these tests." The claims file's readings do not include this rule (a question for a reader, questions/001544.yaml), so the outcomes follow readings (a) and (b), and the tables give beside them the smallest Shapiro-Wilk p over groups, the Kruskal-Wallis p and two-sided Mann-Whitney U p for each pair (MW p). Each conclusion says whether the non-parametric tests agree.

In [10]:
sets = {
    "all": feat,
    "no_FL": feat[~feat.identifier.str.endswith("_FL")],
    "change20": feat[~(feat.rin_tp_change > 0.2)],
}
def show(col, sets=sets, **kw):
    t = vc.readings_table(sets, col, **kw)
    print(t.T.to_string(float_format=lambda x: f"{x:.4g}"))
    return t
for k, d in sets.items():
    print(k, d.groupby("group").size().to_dict(), "mice", d.groupby("group").subject.nunique().to_dict())
all {'ALL': 24, 'APP': 12, 'AV': 8} mice {'ALL': 11, 'APP': 6, 'AV': 4}
no_FL {'ALL': 21, 'APP': 12, 'AV': 8} mice {'ALL': 10, 'APP': 6, 'AV': 4}
change20 {'ALL': 14, 'APP': 10, 'AV': 6} mice {'ALL': 8, 'APP': 6, 'AV': 4}

fig6f-max-firing-rate¶

APP- and AV-odor-activated VP cholinergic neurons both have a higher maximum firing rate than home-cage VP cholinergic neurons.

Paper: F(2, 38) = 10.71; ALL vs. APP t(31) = 5.36, p < 0.01; ALL vs. AV t(27) = 2.80, p < 0.05. Max firing rate is the largest spike count over the 500 ms of any step from 0 to 200 pA, over 0.5 s (Methods item 16). Reproduced when both pairwise comparisons give p < 0.05 with APP and AV above ALL, under both test readings.

In [11]:
t = show("max_rate")
print("\nPer mouse:")
print(vc.per_mouse(feat, "max_rate").to_string(index=False))
print("\nRange over cells (Hz):", feat.max_rate.min(), "to", feat.max_rate.max())
cells                 all     no_FL change20
n                 24/12/8   21/12/8  14/10/6
mean ALL             12.5        12    15.14
mean APP             50.5      50.5     47.2
mean AV             49.25     49.25    62.33
(a) F               10.83     9.796    7.508
(a) df               2,41      2,38     2,27
(a) p            0.000167 0.0003706 0.002555
(a) t ALL-APP       5.075     4.851    3.455
(a) p ALL-APP   1.374e-05 3.294e-05 0.002254
(a) t ALL-AV        3.908     3.732    3.871
(a) p ALL-AV     0.000492 0.0008955 0.001119
(a) t APP-AV     -0.07083  -0.07083   0.7947
(a) p APP-AV       0.9443    0.9443     0.44
(b) p group     0.0009466  0.002034  0.01598
(b) p ALL-APP   0.0008492  0.001521  0.02368
(b) p ALL-AV     0.009783   0.01338  0.01317
(b) p APP-AV       0.8254    0.8313   0.5906
(b) p_t ALL-APP  0.003675  0.005589  0.03895
(b) p_t ALL-AV    0.01874   0.02422  0.02554
(b) p_t APP-AV     0.8279    0.8338   0.5984
(b) df_t               18        17       15
(b) nested F        7.744     7.087    5.541
(b) nested p     0.003746  0.005776  0.01578
Kruskal p        0.002985  0.003468  0.01364
MW p ALL-APP     0.002317  0.002524  0.02999
MW p ALL-AV       0.02158   0.02118  0.01317
MW p APP-AV        0.9385    0.9385   0.4278
Shapiro min p   0.0002293 0.0001913 0.006691

Per mouse:
group subject  count  mean  min   max
  ALL   CG354      1  4.00  4.0   4.0
  ALL   CG355      2 29.00 12.0  46.0
  ALL   CG382      2 10.00 10.0  10.0
  ALL   CG383      2 15.00 14.0  16.0
  ALL   CG398      4  9.00  2.0  18.0
  ALL   CG438      2 13.00  4.0  22.0
  ALL   CG439      4 10.00  6.0  16.0
  ALL   CG440      2  7.00  4.0  10.0
  ALL   CG463      1  6.00  6.0   6.0
  ALL   CG538      2 13.00  8.0  18.0
  ALL   CG539      2 20.00 10.0  30.0
  APP   CC328      2 87.00 72.0 102.0
  APP   CC330      2 85.00 64.0 106.0
  APP   CC331      1  4.00  4.0   4.0
  APP   CC356      3 29.33 18.0  42.0
  APP   CC357      2 20.00  2.0  38.0
  APP   CC396      2 65.00 62.0  68.0
   AV   CC317      2 13.00 10.0  16.0
   AV   CC318      4 64.50  4.0 118.0
   AV   CC319      1 20.00 20.0  20.0
   AV   CC399      1 90.00 90.0  90.0

Range over cells (Hz): 2.0 to 118.0
In [12]:
# Variant: every step in the file, as the code takes them (some ALL cells have steps to 500 pA).
feat_all_steps = pd.DataFrame([{**vc.features(c, use_all_steps=True), **{k: c["meta"][k] for k in ["group", "subject", "identifier"]}} for c in cells])
print("Variant, all steps in the file:")
vc_t = show("max_rate", sets={"all, all steps": feat_all_steps})
fig, ax = plt.subplots(figsize=(4, 3))
for i, g in enumerate(["ALL", "APP", "AV"]):
    y = feat.loc[feat.group == g, "max_rate"]
    ax.plot(np.full(len(y), i) + np.random.default_rng(6).uniform(-0.15, 0.15, len(y)), y, "o", ms=4)
    ax.hlines(y.mean(), i - 0.3, i + 0.3, color="k")
ax.set_xticks([0, 1, 2], ["ALL", "APP", "AV"]); ax.set_ylabel("max firing rate (Hz)")
plt.tight_layout(); plt.show()
print("All points are inside the axes.")
Variant, all steps in the file:
cells           all, all steps
n                      24/12/8
mean ALL                  16.5
mean APP                 53.33
mean AV                  49.75
(a) F                    8.993
(a) df                    2,41
(a) p                0.0005778
(a) t ALL-APP            4.545
(a) p ALL-APP        6.619e-05
(a) t ALL-AV             3.534
(a) p ALL-AV          0.001349
(a) t APP-AV           -0.1962
(a) p APP-AV            0.8466
(b) p group           0.002924
(b) p ALL-APP         0.001764
(b) p ALL-AV           0.02532
(b) p APP-AV            0.7074
(b) p_t ALL-APP       0.005821
(b) p_t ALL-AV         0.03821
(b) p_t APP-AV          0.7118
(b) df_t                    18
(b) nested F             6.312
(b) nested p          0.008375
Kruskal p              0.01152
MW p ALL-APP          0.005539
MW p ALL-AV             0.0664
MW p APP-AV              0.847
Shapiro min p         0.002779
No description has been provided for this image
All points are inside the axes.

Result: reproduced. On all 44 cells, the maximum firing rate is 12.5 Hz in ALL, 50.5 in APP and 49.25 in AV. Reading (a): F(2, 41) = 10.83 (paper 10.71), ALL against APP t(34) = 5.07, p = 1.4e-05 (paper 5.36), ALL against AV t(30) = 3.91, p = 0.00049 (paper 2.80). Reading (b), the mixed model with mice: ALL against APP p = 0.00085, ALL against AV p = 0.0098. Both pairs stay below 0.05 without the _FL cells (21 ALL cells; F(2, 38) = 9.80), without the cells whose test-pulse resistance changed by more than 20% (p 0.0011 to 0.024), and with every step in the file as the code takes them (p 6.6e-05 to 0.025). Per mouse, the means range from 4 to 87 Hz in APP and 13 to 90 Hz in AV, against 4 to 29 Hz in ALL; 4 of 6 APP mice (CC328, CC330, CC356, CC396) and 2 of 4 AV mice (CC318, CC399) are above every ALL mouse, the highest being CG355 at 29.00 Hz. With the mixed-model contrasts referred to t on 18 df, p = 0.0037 and 0.019. The non-parametric tests the Methods prescribe when normality fails agree (Shapiro-Wilk p = 0.00023; Kruskal-Wallis p = 0.0030; Mann-Whitney ALL against APP p = 0.0023, ALL against AV p = 0.022).

figs12a-sag-higher¶

APP- and AV-odor-activated VP cholinergic neurons both have a larger sag potential than home-cage VP cholinergic neurons.

Sag from the -60 pA step, as in the code (20 ms median filter, maximum of the second half of the step minus the minimum of the first half). Reproduced when APP and AV each exceed ALL at p < 0.05, under the two test readings.

In [13]:
t = show("sag")
print("\nSag step used:", feat.sag_step.unique().tolist(), "pA")
print("\nPer mouse:")
print(vc.per_mouse(feat, "sag").to_string(index=False))
print("\nRange over cells (mV):", round(feat.sag.min(), 2), "to", round(feat.sag.max(), 2), "; cells with sag 0:", int((feat.sag == 0).sum()))
cells                all     no_FL change20
n                24/12/8   21/12/8  14/10/6
mean ALL           3.225     2.767    3.507
mean APP           6.684     6.684    5.699
mean AV            4.903     4.903    5.815
(a) F              4.053     5.509    1.476
(a) df              2,41      2,38     2,27
(a) p            0.02476  0.007926   0.2464
(a) t ALL-APP      2.707      3.15    1.397
(a) p ALL-APP    0.01054  0.003604   0.1762
(a) t ALL-AV       1.767     2.907    1.815
(a) p ALL-AV     0.08744  0.007207  0.08628
(a) t APP-AV      -0.849    -0.849  0.05382
(a) p APP-AV      0.4071    0.4071   0.9578
(b) p group      0.01518  0.004518   0.2402
(b) p ALL-APP    0.00408  0.001183    0.145
(b) p ALL-AV      0.2372    0.1233   0.1854
(b) p APP-AV      0.2572     0.243   0.9497
(b) p_t ALL-APP  0.01014  0.004785   0.1656
(b) p_t ALL-AV    0.2526    0.1417   0.2052
(b) p_t APP-AV    0.2721    0.2591   0.9505
(b) df_t              18        17       15
(b) nested F       5.999     13.47    1.641
(b) nested p     0.01008 0.0003126   0.2267
Kruskal p         0.1163     0.056   0.1537
MW p ALL-APP      0.1036   0.06396   0.3641
MW p ALL-AV      0.09431    0.0411  0.04076
MW p APP-AV       0.8506    0.8506   0.5622
Shapiro min p   0.001558    0.2532  0.02568

Sag step used: [-60.0] pA

Per mouse:
group subject  count  mean  min   max
  ALL   CG354      1  2.45 2.45  2.45
  ALL   CG355      2  2.99 0.49  5.50
  ALL   CG382      2  3.71 3.57  3.85
  ALL   CG383      2  2.89 2.29  3.49
  ALL   CG398      4  2.54 1.21  3.89
  ALL   CG438      2  2.77 1.34  4.19
  ALL   CG439      4  2.87 1.61  3.82
  ALL   CG440      2  2.96 1.55  4.38
  ALL   CG463      1  2.50 2.50  2.50
  ALL   CG538      2  1.22 0.86  1.57
  ALL   CG539      2  8.86 6.93 10.79
  APP   CC328      2  9.07 4.16 13.98
  APP   CC330      2  8.38 0.00 16.76
  APP   CC331      1  2.75 2.75  2.75
  APP   CC356      3  6.67 3.35 10.21
  APP   CC357      2  3.73 1.18  6.29
  APP   CC396      2  7.54 2.35 12.73
   AV   CC317      2  3.94 3.44  4.43
   AV   CC318      4  4.90 0.89  7.94
   AV   CC319      1  3.16 3.16  3.16
   AV   CC399      1  8.57 8.57  8.57

Range over cells (mV): 0.0 to 16.76 ; cells with sag 0: 1
In [14]:
# The -60 pA response reaches the recording floor (-105.6 mV) for 10 ms or more in five cells, which
# truncates its minimum. Variant: the code's intended rule, the next step up that is not saturated.
print("Cells whose -60 pA response is saturated:")
print(feat.loc[feat.sag_saturated, ["group", "identifier", "sag"]].round(2).to_string(index=False))
feat_sat = pd.DataFrame([{**vc.features(c, skip_saturated_sag=True), **{k: c["meta"][k] for k in ["group", "subject", "identifier"]}} for c in cells])
print("\nThe same cells with the next unsaturated step:")
print(feat_sat.loc[feat_sat.sag_saturated, ["group", "identifier", "sag", "sag_step"]].round(2).to_string(index=False))
print()
_ = show("sag", sets={"all, unsaturated step": feat_sat, "no_FL, unsaturated step": feat_sat[~feat_sat.identifier.str.endswith("_FL")]})

# The code's saturation test (sagpotential.m) on the -60 pA sweep of every cell.
rows = []
for c in cells:
    start, stop, steps, order = vc.step_layout(c)
    j = [k for k in order if steps[k] == -60][0]
    v = c["V"][start:stop + 1, j]
    rows.append({"id": c["meta"]["identifier"], "group": c["meta"]["group"], **vc.code_saturation_test(v),
                 "min (mV)": float(np.nanmin(v)), "samples at -105.62 mV": int((np.abs(v + 105.62) < 0.01).sum()),
                 "saturated (10 ms at min)": vc.saturated(v)})
sat = pd.DataFrame(rows)
print("\nThe code's test: largest mode count", sat.mode_count.max(), "; fires in", int(sat.code_fires.sum()), "cells")
print("Counting unchanged samples against 1000 (what the test seems meant to do) fires in",
      int(sat.intended_fires.sum()), "cells:")
print(sat[sat.intended_fires | sat["saturated (10 ms at min)"]].round(2).to_string(index=False))
print("\nIs -105.62 mV a floor over all files? Global minimum over every sweep of every cell:",
      round(min(float(np.nanmin(c["V"])) for c in cells), 2), "mV; cells with samples at -105.62 mV:",
      {c["meta"]["identifier"]: int((np.abs(c["V"] + 105.62) < 0.01).sum()) for c in cells if (np.abs(c["V"] + 105.62) < 0.01).any()})

# Samples below the -105.62 mV floor, per file, and how many sit at the global minimum.
gmin = min(float(np.nanmin(c["V"])) for c in cells)
below = {c["meta"]["identifier"]: int((c["V"] < -105.7).sum()) for c in cells if (c["V"] < -105.7).any()}
print("Samples below -105.7 mV, per cell:", below)
print("Samples within 0.01 mV of the global minimum", round(gmin, 2), "mV, per cell:",
      {c["meta"]["identifier"]: int((np.abs(c["V"] - gmin) < 0.01).sum()) for c in cells if (np.abs(c["V"] - gmin) < 0.01).any()})
Cells whose -60 pA response is saturated:
group   identifier   sag
  APP 20221004_001 13.98
  APP 20221006_001 16.76
  APP 20221006_002  0.00
  APP 20221102_002  1.18
  ALL 20220602_001  3.49
The same cells with the next unsaturated step:
group   identifier  sag  sag_step
  APP 20221004_001 2.38     -40.0
  APP 20221006_001 2.64     -40.0
  APP 20221006_002 6.05     -20.0
  APP 20221102_002 1.88     -40.0
  ALL 20220602_001 3.14     -40.0

cells           all, unsaturated step no_FL, unsaturated step
n                             24/12/8                 21/12/8
mean ALL                         3.21                   2.751
mean APP                        5.103                   5.103
mean AV                         4.903                   4.903
(a) F                           2.533                   4.728
(a) df                           2,41                    2,38
(a) p                         0.09178                 0.01467
(a) t ALL-APP                   2.005                   2.825
(a) p ALL-APP                   0.053                0.008192
(a) t ALL-AV                    1.782                   2.936
(a) p ALL-AV                  0.08483                0.006716
(a) t APP-AV                   -0.139                  -0.139
(a) p APP-AV                    0.891                   0.891
(b) p group                   0.08647                0.008424
(b) p ALL-APP                 0.05124                 0.00507
(b) p ALL-AV                     0.12                 0.02776
(b) p APP-AV                   0.8717                   0.848
(b) p_t ALL-APP               0.06699                 0.01224
(b) p_t ALL-AV                 0.1374                 0.04187
(b) p_t APP-AV                 0.8735                  0.8503
(b) df_t                           18                      17
(b) nested F                    2.499                   7.628
(b) nested p                   0.1102                0.004322
Kruskal p                     0.09337                  0.0372
MW p ALL-APP                  0.09669                 0.04944
MW p ALL-AV                   0.07775                 0.03171
MW p APP-AV                    0.6784                  0.6784
Shapiro min p                 0.00146                   0.027
The code's test: largest mode count 1 ; fires in 0 cells
Counting unchanged samples against 1000 (what the test seems meant to do) fires in 6 cells:
          id group  mode_count  code_fires  zero_diffs  intended_fires  min (mV)  samples at -105.62 mV  saturated (10 ms at min)
20221004_001   APP           1       False         762           False   -105.62                    451                      True
20221006_001   APP           1       False        2993            True   -105.62                   2960                      True
20221006_002   APP           1       False        4631            True   -105.62                   4632                      True
20221102_002   APP           1       False        2579            True   -105.62                   2410                      True
20221214_002   APP           1       False        1350            True    -98.96                      0                     False
20221214_001   APP           1       False        1298            True   -112.88                      7                     False
20221215_001    AV           1       False        1221            True    -92.64                      0                     False
20220602_001   ALL           1       False         799           False   -105.62                    576                      True

Is -105.62 mV a floor over all files? Global minimum over every sweep of every cell: -112.88 mV; cells with samples at -105.62 mV: {'20221004_001': 451, '20221006_001': 2973, '20221006_002': 5615, '20221102_002': 2410, '20221214_001': 7, '20220602_001': 576}
Samples below -105.7 mV, per cell: {'20221214_001': 1735}
Samples within 0.01 mV of the global minimum -112.88 mV, per cell: {'20221214_001': 1}
In [15]:
# The -60 pA sweeps of the five saturated cells.
fig, axs = plt.subplots(1, 5, figsize=(14, 2.6), sharey=True)
for ax, (_, r) in zip(axs, feat[feat.sag_saturated].iterrows()):
    c = next(c for c in cells if c["meta"]["identifier"] == r.identifier)
    start, stop, steps, order = vc.step_layout(c)
    j = [k for k in order if steps[k] == -60][0]
    t = np.arange(c["V"].shape[0]) / c["rate"] * 1000 - start / c["rate"] * 1000
    ax.plot(t, c["V"][:, j], lw=0.6)
    ax.axhline(-105.62, color="k", ls=":", lw=0.8)
    ax.set_xlim(-100, 700)
    ax.set_title(f"{r.group} {r.identifier}", fontsize=8)
    ax.set_xlabel("ms from step onset")
axs[0].set_ylabel("mV")
plt.tight_layout(); plt.show()
print("Axes: -100 to 700 ms; y spans each trace's range (shared). Sweep minima (mV):",
      {r.identifier: round(float(np.nanmin(next(c for c in cells if c["meta"]["identifier"] == r.identifier)["V"])), 2)
       for _, r in feat[feat.sag_saturated].iterrows()})
No description has been provided for this image
Axes: -100 to 700 ms; y spans each trace's range (shared). Sweep minima (mV): {'20221004_001': -105.62, '20221006_001': -105.62, '20221006_002': -105.62, '20221102_002': -105.62, '20220602_001': -105.62}
In [16]:
# Variant: leave out the five cells whose -60 pA response is saturated, since their sag is measured
# on a clipped trace and a smaller step gives a smaller sag by construction.
_ = show("sag", sets={k + ", without saturated": d[~d.sag_saturated] for k, d in sets.items()})
cells           all, without saturated no_FL, without saturated change20, without saturated
n                               23/8/8                   20/8/8                      13/7/6
mean ALL                         3.213                    2.731                       3.509
mean APP                         6.035                    6.035                       5.976
mean AV                          4.903                    4.903                       5.815
(a) F                             3.68                    6.525                       1.953
(a) df                            2,36                     2,33                        2,23
(a) p                          0.03514                 0.004094                      0.1647
(a) t ALL-APP                    2.551                    3.502                       1.604
(a) p ALL-APP                   0.0163                 0.001687                       0.126
(a) t ALL-AV                      1.74                     2.89                       1.742
(a) p ALL-AV                   0.09248                 0.007667                     0.09949
(a) t APP-AV                   -0.6992                  -0.6992                    -0.08623
(a) p APP-AV                    0.4959                   0.4959                      0.9328
(b) p group                    0.03518                 0.001382                      0.1465
(b) p ALL-APP                  0.01665                0.0006458                     0.09134
(b) p ALL-AV                    0.1255                   0.0265                      0.1315
(b) p APP-AV                    0.4204                   0.3246                      0.9256
(b) p_t ALL-APP                0.02845                 0.003572                      0.1135
(b) p_t ALL-AV                  0.1439                  0.04131                      0.1538
(b) p_t APP-AV                  0.4316                   0.3392                      0.9269
(b) df_t                            17                       16                          14
(b) nested F                     3.911                    12.83                       2.359
(b) nested p                   0.04007                0.0004733                       0.131
Kruskal p                      0.05444                  0.01921                      0.0757
MW p ALL-APP                   0.03813                   0.0157                      0.1146
MW p ALL-AV                     0.0908                  0.03752                     0.04622
MW p APP-AV                     0.8785                   0.8785                      0.7308
Shapiro min p                 0.001984                   0.2182                     0.03151

Result: not reproduced. On all 44 cells, sag is 3.22 mV in ALL, 6.68 in APP and 4.90 in AV. AV does not exceed ALL under either reading (t = 1.77, p = 0.087; mixed model p = 0.24, 0.25 with t on 18 df), so the criterion, which needs both groups, fails. APP exceeds ALL by both parametric readings (p = 0.011; mixed model p = 0.0041, 0.010 with t on 18 df), but not by the non-parametric tests the Methods prescribe when normality fails (Shapiro-Wilk p = 0.0016; Kruskal-Wallis p = 0.12; Mann-Whitney ALL against APP p = 0.10, ALL against AV p = 0.094). The outcome depends on the cell set. Without the three _FL cells, reading (a) gives both pairs (p = 0.0036 and 0.0072) while reading (b) misses AV (p = 0.12); without the cells whose test-pulse resistance changed by more than 20%, neither pair is significant (p = 0.18 and 0.086). Five cells (four APP, one ALL) sit at -105.62 mV for 45 to 463 ms of the -60 pA step, which clips their minimum, so their sag is underestimated; they are flat at that value. It is not a floor in every file: one other APP cell (20221214_001) has 7 samples at -105.62 mV and 1735 below -105.7 mV, down to -112.88 mV (a single sample at the minimum). The code's saturation test never fires (its mode count is 1 in every cell); counting unchanged samples against 1000 would fire in six cells, three of them not saturated, and miss two of the five saturated ones, so the test as it seems meant would not separate them either. With the next unsaturated step for the five cells, neither pair is significant on all cells (p = 0.053 and 0.085). Leaving the five cells out, APP exceeds ALL on all cells (p = 0.016; mixed model p = 0.017) and AV still does not (p = 0.092; mixed model p = 0.13). The outcome follows readings (a) and (b): in the main set neither gives AV above ALL, and the criterion needs both groups, so the outcome is not reproduced. The rank tests and the unsaturated-step variant do not decide it; they show that the APP half is not robust either. The outcome rests on the dandiset's 24 ALL cells, since without the _FL cells reading (a) would give both pairs.

fig6g-av-more-hyperpolarized¶

AV-odor-activated VP cholinergic neurons have a more hyperpolarized membrane potential than APP-odor-activated ones.

Paper: F(2, 38) = 11.39, p < 0.001; APP vs. AV t(18) = 2.72, p < 0.05. Membrane potential reading (a), the code's baselineVm (mean over sweeps of the voltage 10 to 1 ms before the step). Reading (b), a segment with no injected current, does not exist in the files (Data check). Reproduced when the ANOVA and the APP against AV comparison give p < 0.05 with AV more negative under every reading run.

In [17]:
t = show("vm")
print("\nPer mouse:")
print(vc.per_mouse(feat, "vm").to_string(index=False))
print("\nRange over cells (mV):", round(feat.vm.min(), 2), "to", round(feat.vm.max(), 2))
print("Spread of the pre-step potential across sweeps within a cell (SD, mV): median",
      round(feat.vm_sweep_sd.median(), 2), "max", round(feat.vm_sweep_sd.max(), 2))
cells                all    no_FL change20
n                24/12/8  21/12/8  14/10/6
mean ALL          -66.51   -66.35   -66.75
mean APP          -66.59   -66.59   -66.33
mean AV           -67.25   -67.25   -67.82
(a) F             0.2943   0.3943      0.7
(a) df              2,41     2,38     2,27
(a) p             0.7466   0.6768   0.5054
(a) t ALL-APP   -0.09666  -0.2722   0.4152
(a) p ALL-APP     0.9236   0.7873   0.6821
(a) t ALL-AV     -0.8314  -0.9751   -1.079
(a) p ALL-AV      0.4123   0.3382   0.2949
(a) t APP-AV     -0.5313  -0.5313  -0.9826
(a) p APP-AV      0.6017   0.6017   0.3425
(b) p group       0.9465   0.9105   0.8906
(b) p ALL-APP     0.9746   0.8861   0.9592
(b) p ALL-AV        0.76    0.665   0.6675
(b) p APP-AV      0.7628   0.7745   0.6561
(b) p_t ALL-APP    0.975   0.8878   0.9599
(b) p_t ALL-AV    0.7635   0.6705   0.6736
(b) p_t APP-AV    0.7662    0.778   0.6624
(b) df_t              18       17       15
(b) nested F      0.1947   0.2562   0.4998
(b) nested p      0.8248   0.7769   0.6164
Kruskal p         0.8926   0.9082    0.459
MW p ALL-APP      0.6996   0.8958   0.3055
MW p ALL-AV       0.7816   0.6844    0.659
MW p APP-AV       0.7921   0.7921   0.3676
Shapiro min p    0.01608  0.01608  0.03507

Per mouse:
group subject  count   mean    min    max
  ALL   CG354      1 -66.77 -66.77 -66.77
  ALL   CG355      2 -68.16 -69.31 -67.02
  ALL   CG382      2 -62.77 -63.59 -61.96
  ALL   CG383      2 -63.76 -64.34 -63.17
  ALL   CG398      4 -65.58 -67.67 -64.36
  ALL   CG438      2 -66.46 -67.91 -65.01
  ALL   CG439      4 -68.16 -69.54 -67.01
  ALL   CG440      2 -68.32 -69.57 -67.08
  ALL   CG463      1 -67.21 -67.21 -67.21
  ALL   CG538      2 -67.11 -68.76 -65.46
  ALL   CG539      2 -67.07 -68.38 -65.75
  APP   CC328      2 -65.99 -67.06 -64.92
  APP   CC330      2 -70.56 -73.52 -67.59
  APP   CC331      1 -64.83 -64.83 -64.83
  APP   CC356      3 -67.93 -68.61 -66.95
  APP   CC357      2 -62.72 -62.93 -62.50
  APP   CC396      2 -65.98 -66.56 -65.40
   AV   CC317      2 -65.63 -66.33 -64.93
   AV   CC318      4 -68.56 -71.13 -66.00
   AV   CC319      1 -66.89 -66.89 -66.89
   AV   CC399      1 -65.64 -65.64 -65.64

Range over cells (mV): -73.52 to -61.96
Spread of the pre-step potential across sweeps within a cell (SD, mV): median 1.2 max 3.81

Result: not reproduced. The pre-step membrane potential (the code's baselineVm) is -66.51 mV in ALL, -66.59 in APP and -67.25 in AV: AV is 0.66 mV more negative than APP, but the APP against AV comparison gives t(18) = -0.53, p = 0.60 (paper t(18) = 2.72, p < 0.05), and the ANOVA F(2, 41) = 0.29, p = 0.75 (paper F = 11.39, p < 0.001). The mixed model gives p = 0.76 for the pair and 0.95 for the group, and the APP against AV p is 0.34 or more in every cell set and reading. Cell values range from -73.5 to -62.0 mV. Reading (b), the potential without injected current, cannot be run: the files hold no segment without the DC holding current, which keeps every cell near -65 mV, so this measure cannot show differences in resting potential. Reading (a) is what the claims file defines from the code, and the outcome follows its criterion; but a potential measured under a DC injection meant to hold every cell at -65 mV can hardly differ by group, so it may not be what Figure 6G plots, and the failure here says little about the paper's resting potential. The 0 pA sweeps, also under the holding current, give no other measure (Data check). The non-parametric tests agree (Kruskal-Wallis p = 0.89; Mann-Whitney APP against AV p = 0.79).

fig6h-av-smaller-ahp¶

AV-odor-activated VP cholinergic neurons have a smaller afterhyperpolarization amplitude than APP-odor-activated ones.

Paper: F(2, 38) = 4.53, p < 0.05; APP vs. AV t = 2.74, p < 0.05. AHP amplitude after the first spike at rheobase, threshold at dV/dt 20 mV/ms, readings (a) threshold minus the minimum within 100 ms and (b) threshold minus the voltage 100 ms after threshold; the code's definition is a variant. Reproduced when the ANOVA and the APP against AV comparison give p < 0.05 with AV smaller under every Methods reading.

In [18]:
print("Reading (a), minimum within 100 ms:")
ta = show("ahp_a")
print("\nReading (b), voltage at 100 ms (cells whose first spike is less than 100 ms before the end of the step have none):")
tb = show("ahp_b")
print("cells without a value:", feat[feat.ahp_b.isna()].groupby("group").size().to_dict())
print("Reading (a) window cut short by the end of the step (under 100 ms):")
print(feat.loc[feat.ahp_window_ms < 100, ["group", "identifier", "latency", "ahp_window_ms", "ahp_a", "ahp_latency"]].round(2).to_string(index=False))
print("\nVariant, the code's definition (afterhyperpolarization.m):")
tc = show("ahp_code")
print("\nPer mouse, reading (a):")
print(vc.per_mouse(feat, "ahp_a").to_string(index=False))
Reading (a), minimum within 100 ms:
cells                all    no_FL change20
n                24/12/8  21/12/8  14/10/6
mean ALL              19    16.81    20.75
mean APP           16.67    16.67    16.09
mean AV            15.61    15.61    16.21
(a) F              0.616   0.0928    1.067
(a) df              2,41     2,38     2,27
(a) p              0.545   0.9116   0.3581
(a) t ALL-APP    -0.7235 -0.05302   -1.201
(a) p ALL-APP     0.4743   0.9581   0.2426
(a) t ALL-AV     -0.9129  -0.4148  -0.9838
(a) p ALL-AV      0.3686   0.6816   0.3382
(a) t APP-AV     -0.4144  -0.4144  0.04225
(a) p APP-AV      0.6835   0.6835   0.9669
(b) p group       0.6911   0.9735   0.5911
(b) p ALL-APP     0.5069   0.9928   0.3287
(b) p ALL-AV      0.4729   0.8294   0.5143
(b) p APP-AV      0.8857   0.8354   0.8663
(b) p_t ALL-APP   0.5154   0.9929   0.3442
(b) p_t ALL-AV    0.4821    0.832   0.5242
(b) p_t APP-AV    0.8873   0.8379   0.8685
(b) df_t              18       17       15
(b) nested F      0.4761  0.07493   0.8238
(b) nested p      0.6288   0.9281   0.4577
Kruskal p         0.6555   0.9337   0.3228
MW p ALL-APP      0.5347   0.8958   0.2081
MW p ALL-AV       0.4284   0.7199    0.274
MW p APP-AV       0.9101   0.9101   0.7925
Shapiro min p    0.00623  0.02924   0.1149

Reading (b), voltage at 100 ms (cells whose first spike is less than 100 ms before the end of the step have none):
cells                all    no_FL change20
n                23/11/8  20/11/8   13/9/6
mean ALL           16.84    14.62    18.01
mean APP           9.453    9.453    8.446
mean AV            12.58    12.58    12.29
(a) F               3.25    2.334    3.783
(a) df              2,39     2,36     2,25
(a) p            0.04948   0.1114  0.03671
(a) t ALL-APP     -2.269    -1.97   -2.446
(a) p ALL-APP    0.03014  0.05841  0.02383
(a) t ALL-AV      -1.184  -0.7427   -1.295
(a) p ALL-AV       0.246   0.4643   0.2126
(a) t APP-AV       1.397    1.397    1.452
(a) p APP-AV      0.1805   0.1805   0.1702
(b) p group      0.04149   0.1046  0.06483
(b) p ALL-APP    0.01416  0.03365  0.02005
(b) p ALL-AV      0.2042   0.4518   0.2692
(b) p APP-AV      0.4098   0.2848   0.3893
(b) p_t ALL-APP  0.02458  0.04862  0.03448
(b) p_t ALL-AV    0.2204   0.4621   0.2867
(b) p_t APP-AV    0.4206   0.2997   0.4029
(b) df_t              18       17       15
(b) nested F       2.914     2.46    3.265
(b) nested p     0.08011   0.1153  0.06649
Kruskal p        0.04641   0.1318  0.02222
MW p ALL-APP     0.02473  0.06618  0.01622
MW p ALL-AV       0.1869   0.3811   0.1061
MW p APP-AV       0.2375   0.2375   0.1447
Shapiro min p   0.001557 0.002954  0.02452
cells without a value: {'ALL': 1, 'APP': 1}
Reading (a) window cut short by the end of the step (under 100 ms):
group   identifier  latency  ahp_window_ms  ahp_a  ahp_latency
  APP 20221004_001   423.11          76.79  18.66         8.69
  ALL 20220317_005   446.60          53.30  18.77        37.00

Variant, the code's definition (afterhyperpolarization.m):
cells                all    no_FL change20
n                24/12/8  21/12/8  14/10/6
mean ALL           14.96    13.08    17.08
mean APP           15.61    15.61    15.32
mean AV            9.455    9.455    12.17
(a) F              1.361    1.591   0.6022
(a) df              2,41     2,38     2,27
(a) p             0.2678    0.217   0.5548
(a) t ALL-APP     0.1978   0.9181  -0.4367
(a) p ALL-APP     0.8444   0.3656   0.6666
(a) t ALL-AV      -1.424   -1.138   -1.012
(a) p ALL-AV      0.1647   0.2653   0.3248
(a) t APP-AV      -1.851   -1.851  -0.8655
(a) p APP-AV     0.08072  0.08072   0.4013
(b) p group       0.4958     0.47   0.7546
(b) p ALL-APP     0.8507   0.4183   0.7416
(b) p ALL-AV      0.2883   0.5402   0.4544
(b) p APP-AV      0.2675     0.23   0.6546
(b) p_t ALL-APP   0.8528   0.4294   0.7462
(b) p_t ALL-AV    0.3023   0.5483    0.466
(b) p_t APP-AV    0.2821   0.2464    0.661
(b) df_t              18       17       15
(b) nested F      0.9842    1.089   0.4729
(b) nested p       0.393    0.359   0.6322
Kruskal p         0.2136   0.1879   0.6131
MW p ALL-APP      0.5129   0.2537     0.93
MW p ALL-AV       0.2036   0.3487    0.397
MW p APP-AV       0.0825   0.0825   0.4278
Shapiro min p   0.002749    0.014  0.06039

Per mouse, reading (a):
group subject  count  mean   min   max
  ALL   CG354      1  7.08  7.08  7.08
  ALL   CG355      2 15.62 12.48 18.77
  ALL   CG382      2 15.32 11.09 19.55
  ALL   CG383      2 27.06 26.00 28.12
  ALL   CG398      4 16.45 14.75 19.92
  ALL   CG438      2 13.69 10.53 16.84
  ALL   CG439      4 15.75 10.72 19.44
  ALL   CG440      2 23.48  7.20 39.76
  ALL   CG463      1  6.96  6.96  6.96
  ALL   CG538      2 34.25 19.72 48.77
  ALL   CG539      2 27.22 21.40 33.03
  APP   CC328      2 18.22 17.78 18.66
  APP   CC330      2 18.74 14.00 23.48
  APP   CC331      1 12.63 12.63 12.63
  APP   CC356      3 12.22  6.53 15.65
  APP   CC357      2 11.40  9.78 13.02
  APP   CC396      2 26.98 26.34 27.63
   AV   CC317      2 16.47 16.29 16.64
   AV   CC318      4 13.50 10.96 16.24
   AV   CC319      1 14.34 14.34 14.34
   AV   CC399      1 23.60 23.60 23.60
In [19]:
# Threshold at the code's 10 mV/ms in place of the Methods' 20 mV/ms.
feat10 = pd.DataFrame([{**vc.features(c, dvdt_threshold=vc.CODE_DVDT), **{k: c["meta"][k] for k in ["group", "subject", "identifier"]}} for c in cells])
print("Threshold at 10 mV/ms, reading (a):")
_ = show("ahp_a", sets={"all, 10 mV/ms": feat10})
print("\nThreshold at 10 mV/ms, reading (b):")
_ = show("ahp_b", sets={"all, 10 mV/ms": feat10})
Threshold at 10 mV/ms, reading (a):
cells           all, 10 mV/ms
n                     24/12/8
mean ALL                18.29
mean APP                16.03
mean AV                 14.76
(a) F                  0.6554
(a) df                   2,41
(a) p                  0.5246
(a) t ALL-APP         -0.7097
(a) p ALL-APP          0.4827
(a) t ALL-AV          -0.9773
(a) p ALL-AV           0.3362
(a) t APP-AV          -0.4792
(a) p APP-AV           0.6376
(b) p group            0.6825
(b) p ALL-APP           0.521
(b) p ALL-AV           0.4494
(b) p APP-AV           0.8447
(b) p_t ALL-APP        0.5291
(b) p_t ALL-AV         0.4592
(b) p_t APP-AV         0.8469
(b) df_t                   18
(b) nested F           0.5024
(b) nested p           0.6133
Kruskal p              0.6443
MW p ALL-APP           0.5798
MW p ALL-AV            0.3797
MW p APP-AV            0.9101
Shapiro min p         0.01269

Threshold at 10 mV/ms, reading (b):
cells           all, 10 mV/ms
n                     23/11/8
mean ALL                16.15
mean APP                8.786
mean AV                 11.73
(a) F                   3.395
(a) df                   2,39
(a) p                 0.04374
(a) t ALL-APP          -2.304
(a) p ALL-APP         0.02785
(a) t ALL-AV           -1.268
(a) p ALL-AV            0.215
(a) t APP-AV            1.273
(a) p APP-AV           0.2203
(b) p group           0.03521
(b) p ALL-APP         0.01236
(b) p ALL-AV           0.1765
(b) p APP-AV           0.4277
(b) p_t ALL-APP       0.02223
(b) p_t ALL-AV         0.1932
(b) p_t APP-AV         0.4381
(b) df_t                   18
(b) nested F            3.049
(b) nested p          0.07238
Kruskal p             0.04284
MW p ALL-APP          0.02473
MW p ALL-AV             0.158
MW p APP-AV            0.2375
Shapiro min p        0.004129

Result: not reproduced. Reading (a), threshold minus the minimum within 100 ms: APP 16.67 and AV 15.61 mV, APP against AV p = 0.68, ANOVA p = 0.55. Reading (b), threshold minus the voltage at 100 ms: AV is larger than APP (12.58 against 9.45 mV, p = 0.18), the opposite direction, and the ANOVA (p = 0.049) comes from ALL being larger than APP. The mixed model gives p = 0.89 and 0.41 for the APP against AV pair. The code's definition gives AV smaller than APP (9.45 against 15.61 mV) without significance (t = -1.85, p = 0.081; mixed model p = 0.27; ANOVA p = 0.27). Threshold at 10 mV/ms changes none of this (reading (a) pair p = 0.64). In the same two cells (one APP, one ALL) the window of reading (a) is cut by the end of the step to 76.8 and 53.3 ms; their minima fall at 8.7 and 37.0 ms, inside the cut window, so the truncation does not change their values. The non-parametric tests agree (APP against AV Mann-Whitney p = 0.91 for reading (a), 0.24 for reading (b), 0.083 for the code's definition).

fig6-app-less-excitable¶

APP-odor-activated VP cholinergic neurons are less excitable than AV-odor-activated ones, with different action potential profiles.

Readings of excitability from the claims file: (a) spike latency at rheobase (Methods item 9, step onset to threshold) longer in APP, and (b) rheobase (item 5) higher in APP, each by the two test readings at p < 0.05. Reproduced when every reading gives a significant difference in that direction, not reproduced when none does.

In [20]:
print("Spike latency at rheobase (ms), step onset to threshold:")
tl = show("latency")
print("\nRheobase (pA):")
tr = show("rheobase")
print("\nVariant, latency to the peak (code):")
_ = show("latency_peak")
print("\nVariant, latency with threshold at 10 mV/ms:")
_ = show("latency", sets={"all, 10 mV/ms": feat10})
print("\nPer mouse, latency:")
print(vc.per_mouse(feat, "latency").to_string(index=False))
print("\nPer mouse, rheobase:")
print(vc.per_mouse(feat, "rheobase").to_string(index=False))
Spike latency at rheobase (ms), step onset to threshold:
cells                all    no_FL change20
n                24/12/8  21/12/8  14/10/6
mean ALL           172.6    166.6      179
mean APP           153.2    153.2    157.1
mean AV            74.54    74.54    72.69
(a) F              2.711    2.262    2.031
(a) df              2,41     2,38     2,27
(a) p            0.07837    0.118   0.1507
(a) t ALL-APP    -0.4854  -0.3183  -0.4392
(a) p ALL-APP     0.6305   0.7524   0.6648
(a) t ALL-AV      -2.431   -2.186   -2.198
(a) p ALL-AV     0.02124  0.03769  0.04125
(a) t APP-AV      -1.896   -1.896   -1.608
(a) p APP-AV     0.07413  0.07413   0.1301
(b) p group      0.06659   0.1045   0.1473
(b) p ALL-APP     0.5973   0.7279   0.6282
(b) p ALL-AV     0.02015   0.0357   0.0519
(b) p APP-AV      0.0969   0.1045   0.1392
(b) p_t ALL-APP   0.6037   0.7322   0.6352
(b) p_t ALL-AV   0.03206  0.05093   0.0709
(b) p_t APP-AV    0.1142   0.1229   0.1599
(b) df_t              18       17       15
(b) nested F       3.125    2.721    2.385
(b) nested p     0.06839  0.09433    0.126
Kruskal p        0.02503  0.04497  0.06513
MW p ALL-APP       0.557   0.7504   0.5007
MW p ALL-AV     0.005584  0.01342  0.02002
MW p APP-AV      0.05738  0.05738   0.1179
Shapiro min p    0.01082 0.004308  0.03819

Rheobase (pA):
cells                 all     no_FL change20
n                 24/12/8   21/12/8  14/10/6
mean ALL            67.08     73.33    44.29
mean APP               35        35       36
mean AV             51.25     51.25       35
(a) F               2.378     3.361   0.6172
(a) df               2,41      2,38     2,27
(a) p              0.1054    0.0453   0.5469
(a) t ALL-APP      -2.157    -2.548  -0.8798
(a) p ALL-APP     0.03819     0.016   0.3885
(a) t ALL-AV      -0.8159    -1.117  -0.9088
(a) p ALL-AV        0.421    0.2739   0.3755
(a) t APP-AV        1.159     1.159 -0.09869
(a) p APP-AV       0.2616    0.2616   0.9228
(b) p group        0.2143   0.09329   0.5709
(b) p ALL-APP     0.08293   0.03281   0.3649
(b) p ALL-AV       0.4432    0.2735   0.4049
(b) p APP-AV       0.5218    0.4966   0.9474
(b) p_t ALL-APP       0.1   0.04767   0.3793
(b) p_t ALL-AV     0.4532    0.2888   0.4179
(b) p_t APP-AV     0.5299    0.5057   0.9483
(b) df_t               18        17       15
(b) nested F        2.076     3.266   0.6013
(b) nested p       0.1544   0.06304   0.5608
Kruskal p         0.06945   0.01741   0.6069
MW p ALL-APP      0.03138  0.009247   0.4032
MW p ALL-AV        0.2338   0.08776   0.4747
MW p APP-AV        0.3656    0.3656   0.9115
Shapiro min p   0.0003333 0.0009715  0.03264

Variant, latency to the peak (code):
cells                all    no_FL change20
n                24/12/8  21/12/8  14/10/6
mean ALL           173.4    167.4    179.8
mean APP           153.8    153.8    157.7
mean AV            75.24    75.24    73.32
(a) F              2.718    2.267    2.039
(a) df              2,41     2,38     2,27
(a) p            0.07789   0.1175   0.1497
(a) t ALL-APP    -0.4908  -0.3227  -0.4439
(a) p ALL-APP     0.6267   0.7491   0.6615
(a) t ALL-AV      -2.434   -2.188   -2.203
(a) p ALL-AV      0.0211  0.03749  0.04085
(a) t APP-AV      -1.895   -1.895   -1.608
(a) p APP-AV      0.0743   0.0743   0.1301
(b) p group      0.06612    0.104   0.1462
(b) p ALL-APP     0.5932   0.7243   0.6245
(b) p ALL-AV     0.01997  0.03546  0.05139
(b) p APP-AV     0.09721   0.1048   0.1392
(b) p_t ALL-APP   0.5998   0.7286   0.6316
(b) p_t ALL-AV   0.03185  0.05066  0.07035
(b) p_t APP-AV    0.1145   0.1232   0.1599
(b) df_t              18       17       15
(b) nested F       3.133    2.727    2.396
(b) nested p     0.06802  0.09396    0.125
Kruskal p        0.02546  0.04614  0.06828
MW p ALL-APP      0.5347   0.7222   0.5007
MW p ALL-AV     0.005584  0.01342  0.02002
MW p APP-AV      0.06398  0.06398   0.1286
Shapiro min p    0.01086  0.00431  0.03801

Variant, latency with threshold at 10 mV/ms:
cells           all, 10 mV/ms
n                     24/12/8
mean ALL                172.6
mean APP                153.2
mean AV                 74.48
(a) F                   2.712
(a) df                   2,41
(a) p                  0.0783
(a) t ALL-APP         -0.4855
(a) p ALL-APP          0.6305
(a) t ALL-AV           -2.432
(a) p ALL-AV          0.02122
(a) t APP-AV           -1.896
(a) p APP-AV          0.07407
(b) p group           0.06652
(b) p ALL-APP          0.5972
(b) p ALL-AV          0.02013
(b) p APP-AV          0.09681
(b) p_t ALL-APP        0.6037
(b) p_t ALL-AV        0.03203
(b) p_t APP-AV         0.1141
(b) df_t                   18
(b) nested F            3.126
(b) nested p          0.06834
Kruskal p             0.02503
MW p ALL-APP            0.557
MW p ALL-AV          0.005584
MW p APP-AV           0.05738
Shapiro min p         0.01086

Per mouse, latency:
group subject  count   mean    min    max
  ALL   CG354      1  51.90  51.90  51.90
  ALL   CG355      2 272.40  98.20 446.60
  ALL   CG382      2 137.61 102.10 173.11
  ALL   CG383      2  99.80  83.10 116.51
  ALL   CG398      4 113.58  37.51 221.70
  ALL   CG438      2 209.80 120.80 298.81
  ALL   CG439      4 177.86  80.20 313.51
  ALL   CG440      2 235.51  74.01 397.01
  ALL   CG463      1 100.71 100.71 100.71
  ALL   CG538      2 267.05 263.90 270.20
  ALL   CG539      2 190.10 136.50 243.70
  APP   CC328      2 298.26 173.40 423.11
  APP   CC330      2 119.80  82.60 157.00
  APP   CC331      1  34.90  34.90  34.90
  APP   CC356      3 130.67  85.91 195.80
  APP   CC357      2 190.50  56.90 324.10
  APP   CC396      2  97.30  96.50  98.10
   AV   CC317      2  99.40  87.51 111.30
   AV   CC318      4  61.48  48.91  91.11
   AV   CC319      1  85.90  85.90  85.90
   AV   CC399      1  65.70  65.70  65.70

Per mouse, rheobase:
group subject  count   mean  min   max
  ALL   CG354      1  80.00 80.0  80.0
  ALL   CG355      2  50.00 40.0  60.0
  ALL   CG382      2  55.00 50.0  60.0
  ALL   CG383      2  20.00 20.0  20.0
  ALL   CG398      4 135.00 40.0 200.0
  ALL   CG438      2 105.00 50.0 160.0
  ALL   CG439      4  62.50 30.0  90.0
  ALL   CG440      2  50.00 50.0  50.0
  ALL   CG463      1  60.00 60.0  60.0
  ALL   CG538      2  35.00 20.0  50.0
  ALL   CG539      2  25.00 20.0  30.0
  APP   CC328      2  40.00 10.0  70.0
  APP   CC330      2  20.00 20.0  20.0
  APP   CC331      1  60.00 60.0  60.0
  APP   CC356      3  46.67 30.0  70.0
  APP   CC357      2  30.00 30.0  30.0
  APP   CC396      2  20.00 20.0  20.0
   AV   CC317      2  50.00 50.0  50.0
   AV   CC318      4  60.00 20.0 150.0
   AV   CC319      1  50.00 50.0  50.0
   AV   CC399      1  20.00 20.0  20.0

Result: not reproduced. Latency to the first spike at rheobase is longer in APP than in AV (153.2 against 74.5 ms), but not significantly (t(18) = -1.90, p = 0.074; mixed model p = 0.097); measured to the peak or with threshold at 10 mV/ms it is the same (p = 0.074). Rheobase goes the other way: APP 35.0 against AV 51.25 pA (p = 0.26; mixed model p = 0.52). No reading gives a significant difference in the stated direction, in any cell set (latency p 0.074 or more; rheobase is higher in APP only without the changed cells, 36 against 35 pA, p = 0.92). The non-parametric tests agree for the APP against AV pair (Mann-Whitney p = 0.057 for latency, 0.37 for rheobase).

figs12-other-features-shared¶

Most other passive and active electrophysiological features do not differ between home-cage and odor-activated VP cholinergic neurons; the Figure S12 legend names ten that are similar across ALL, APP and AV (threshold, upstroke, spike amplitude, spike latency, AHP latency, AHP width, CV of ISIs, rheobase, tau, adaptation index).

The claim was amended in answer to a question from this attempt (questions/001544.yaml): it was first judged on fourteen features (the eighteen of the Methods less max firing rate, sag, membrane potential and AHP amplitude), and is now judged on the ten the Figure S12 legend names as similar (panels F to O). Each is tested by the cell-level one-way ANOVA over the three groups at alpha 0.05 (reading (a)). Reproduced when more than half (six or more) show no difference. The other four of the fourteen (input resistance, spike width, downstroke, f-I slope) are now the claim figs12-app-differs-from-all, below; the earlier count over fourteen is shown as a variant.

In [21]:
s12 = ["threshold", "upstroke", "amplitude", "latency", "ahp_latency", "ahp_width", "cv_isi", "rheobase", "tau",
       "adaptation"]
def feature_table(features):
    rows = []
    for name, d in sets.items():
        for col in features:
            a = vc.cell_tests(d, col)
            b = vc.nested_tests(d, col)
            x = d.dropna(subset=[col])
            ssb = sum(len(g) * (g[col].mean() - x[col].mean()) ** 2 for _, g in x.groupby("group"))
            rows.append({"cells": name, "feature": col, **{f"mean {k}": a["mean"][k] for k in ["ALL", "APP", "AV"]},
                         "n": "/".join(str(a["n"][k]) for k in ["ALL", "APP", "AV"]),
                         "F": a["F"], "p": a["p_anova"], "eta2": ssb / ((x[col] - x[col].mean()) ** 2).sum(),
                         "p ALL-APP": a["ALL-APP"]["p"], "p ALL-AV": a["ALL-AV"]["p"],
                         "mixed p": b["p_group"], "Kruskal p": a["p_kruskal"]})
    return pd.DataFrame(rows)
oth = feature_table(s12)
print(oth.to_string(index=False, float_format=lambda v: f"{v:.4g}"))
print("\nFeatures with no difference, of 10 (one-way ANOVA p >= 0.05; nested reading (b), mixed model p >= 0.05):")
for name in sets:
    sub = oth[oth.cells == name]
    print(f"{name:9s} ANOVA {int((sub.p >= 0.05).sum())}, mixed model {int((sub['mixed p'] >= 0.05).sum())};"
          f" differ by ANOVA: {sub.loc[sub.p < 0.05, 'feature'].tolist()}")
print("\nNon-parametric (Kruskal-Wallis p >= 0.05), the Methods' rule when normality fails:")
for name in sets:
    sub = oth[oth.cells == name]
    print(f"{name:9s} {int((sub['Kruskal p'] >= 0.05).sum())} of 10; differ: {sub.loc[sub['Kruskal p'] < 0.05, 'feature'].tolist()}")
   cells     feature  mean ALL  mean APP  mean AV       n       F       p     eta2  p ALL-APP  p ALL-AV  mixed p  Kruskal p
     all   threshold     -35.3    -36.79   -36.18 24/12/8  0.5608  0.5751  0.02663     0.2732    0.6103   0.5708     0.3528
     all    upstroke     140.9     165.3    157.5 24/12/8  0.9744   0.386  0.04537     0.1735    0.4445   0.2636     0.3863
     all   amplitude     57.52     54.73    55.29 24/12/8  0.3592  0.7004  0.01722     0.4481    0.5593   0.8547     0.4943
     all     latency     172.6     153.2    74.54 24/12/8   2.711 0.07837   0.1168     0.6305   0.02124  0.06659    0.02503
     all ahp_latency     48.63     24.87    56.83 24/12/8   4.961 0.01176   0.1948   0.007168    0.4544  0.01642    0.01574
     all   ahp_width     84.98     75.26    64.68 24/12/8   1.448  0.2467  0.06599     0.3325    0.1147   0.4021     0.3351
     all      cv_isi    0.4457    0.2411   0.5086 24/12/8   1.165  0.3221  0.05376     0.1784    0.7531   0.3115     0.5629
     all    rheobase     67.08        35    51.25 24/12/8   2.378  0.1054   0.1039    0.03819     0.421   0.2143    0.06945
     all         tau     32.74     22.85    16.69 24/12/8       1  0.3765  0.04653     0.4049     0.276   0.4004     0.2361
     all  adaptation     0.255    0.5777   0.4958 24/11/8     3.1   0.056   0.1342    0.03256     0.121  0.05747    0.03213
   no_FL   threshold    -35.84    -36.79   -36.18 21/12/8  0.2131   0.809  0.01109     0.4799    0.8419   0.8089     0.6055
   no_FL    upstroke     148.2     165.3    157.5 21/12/8  0.4333  0.6515   0.0223      0.342    0.6704   0.4412     0.5784
   no_FL   amplitude     58.12     54.73    55.29 21/12/8  0.4997  0.6107  0.02562     0.3758    0.4708   0.8209     0.3578
   no_FL     latency     166.6     153.2    74.54 21/12/8   2.262   0.118   0.1064     0.7524   0.03769   0.1045    0.04497
   no_FL ahp_latency     49.26     24.87    56.83 21/12/8   4.661 0.01548    0.197   0.009954    0.5189   0.0217    0.01848
   no_FL   ahp_width     83.52     75.26    64.68 21/12/8   1.088  0.3472  0.05416     0.4387    0.1686   0.5154     0.3959
   no_FL      cv_isi    0.4525    0.2411   0.5086 21/12/8   1.134  0.3324  0.05631      0.186    0.7901   0.3164     0.5866
   no_FL    rheobase     73.33        35    51.25 21/12/8   3.361  0.0453   0.1503      0.016    0.2739  0.09329    0.01741
   no_FL         tau     34.83     22.85    16.69 21/12/8   1.201  0.3121  0.05944     0.3405    0.2454  0.04422     0.2134
   no_FL  adaptation    0.2319    0.5777   0.4958 21/11/8   3.515 0.04003   0.1597    0.02391   0.08761  0.04244    0.02367
change20   threshold    -34.94    -36.83   -38.11 14/10/6   2.014  0.1529   0.1298      0.218   0.04578   0.1405     0.1161
change20    upstroke     128.7     163.6    169.7 14/10/6   1.984   0.157   0.1282    0.08647    0.1328   0.1421     0.1502
change20   amplitude     54.77     54.69    55.65 14/10/6 0.01691  0.9832 0.001251     0.9854     0.854   0.8903      0.804
change20     latency       179     157.1    72.69 14/10/6   2.031  0.1507   0.1308     0.6648   0.04125   0.1473    0.06513
change20 ahp_latency      43.9     23.36    47.56 14/10/6   3.077 0.06254   0.1856    0.02443    0.7674   0.1013    0.06554
change20   ahp_width     84.91     70.92    72.64 14/10/6  0.7473  0.4832  0.05245     0.2492     0.407   0.5359     0.5826
change20      cv_isi    0.5455    0.2048   0.5212 14/10/6   1.714  0.1991   0.1127    0.08114    0.9286   0.1975     0.3459
change20    rheobase     44.29        36       35 14/10/6  0.6172  0.5469  0.04372     0.3885    0.3755   0.5709     0.6069
change20         tau     26.82     22.59    19.58 14/10/6  0.8924  0.4214  0.06201     0.4262    0.3077   0.4911     0.7856
change20  adaptation    0.2157    0.5462   0.6055  14/9/6   3.301  0.0528   0.2025    0.06431   0.03103   0.1097    0.03942

Features with no difference, of 10 (one-way ANOVA p >= 0.05; nested reading (b), mixed model p >= 0.05):
all       ANOVA 9, mixed model 9; differ by ANOVA: ['ahp_latency']
no_FL     ANOVA 7, mixed model 7; differ by ANOVA: ['ahp_latency', 'rheobase', 'adaptation']
change20  ANOVA 10, mixed model 10; differ by ANOVA: []

Non-parametric (Kruskal-Wallis p >= 0.05), the Methods' rule when normality fails:
all       7 of 10; differ: ['latency', 'ahp_latency', 'adaptation']
no_FL     6 of 10; differ: ['latency', 'ahp_latency', 'rheobase', 'adaptation']
change20  9 of 10; differ: ['adaptation']
In [22]:
# Variant: the fourteen features of the claim before it was amended (the ten above, with input resistance,
# spike width, downstroke and f-I slope), for comparison with the earlier outcome.
oth14 = pd.concat([oth, feature_table(["rin", "width", "downstroke", "fi_slope"])])
for name in sets:
    sub = oth14[oth14.cells == name]
    print(f"{name:9s} no difference in {int((sub.p >= 0.05).sum())} of 14 by ANOVA, "
          f"{int((sub['mixed p'] >= 0.05).sum())} of 14 by the mixed model")
all       no difference in 9 of 14 by ANOVA, 10 of 14 by the mixed model
no_FL     no difference in 7 of 14 by ANOVA, 8 of 14 by the mixed model
change20  no difference in 12 of 14 by ANOVA, 12 of 14 by the mixed model

Result: reproduced. On all 44 cells, 9 of the ten features the Figure S12 legend names as similar show no difference by the one-way ANOVA (p >= 0.05): threshold, upstroke, spike amplitude, spike latency, AHP width, CV of ISIs, rheobase, tau and adaptation index. AHP latency differs (p = 0.012; APP 24.9 ms against ALL 48.6 and AV 56.8). The count is 7 of 10 without the _FL cells (rheobase p = 0.045 and adaptation index p = 0.040 also differ) and 10 of 10 without the cells whose resistance changed by more than 20%; the mixed model gives 9, 7 and 10. Every cell set and both tests give more than half, so the outcome does not rest on which ALL cells are used. By the Kruskal-Wallis test, the non-parametric reading the Methods prescribe when normality fails, the count is 7 of 10 on all cells (spike latency p = 0.025, AHP latency 0.016 and adaptation index 0.032 differ), 6 of 10 without the _FL cells and 9 of 10 without the changed cells, still more than half in each. Adaptation index, marked with an asterisk in the figure, is near the threshold on all cells (p = 0.056). Before the claim was amended, the count over fourteen features was 9 of 14 on all cells and 7 of 14 without the _FL cells, so the earlier outcome depended on the cell set.

figs12-app-differs-from-all¶

APP-odor-activated VP cholinergic neurons differ from home-cage VP cholinergic neurons in input resistance, action potential width, action potential downstroke and f-I slope.

A claim added to the claims file in answer to this attempt's question. The four features by the Methods definitions (input resistance from the -20 pA step), with the two test readings of fig6f-max-firing-rate; ALL against APP is judged at p < 0.05 and its direction reported. Reproduced when all four differ under both readings, partially reproduced when some do, not reproduced when none does; blocked as methods_underspecified when the readings disagree.

In [23]:
units = {"rin": "MOhm", "width": "ms", "downstroke": "mV/ms", "fi_slope": "Hz/pA"}
app = {}
for col, u in units.items():
    print(f"{col} ({u}):")
    app[col] = show(col)
    print()
summary = pd.DataFrame([{"cells": name, "feature": col,
                         "APP - ALL": app[col].at[name, "mean APP"] - app[col].at[name, "mean ALL"],
                         "(a) p": app[col].at[name, "(a) p ALL-APP"], "(b) p": app[col].at[name, "(b) p ALL-APP"],
                         "(b) p_t": app[col].at[name, "(b) p_t ALL-APP"], "MW p": app[col].at[name, "MW p ALL-APP"]}
                        for name in sets for col in units])
summary["differs (a)"] = summary["(a) p"] < 0.05
summary["differs (b)"] = summary["(b) p"] < 0.05
summary["differs (b) t df"] = summary["(b) p_t"] < 0.05
summary["differs MW"] = summary["MW p"] < 0.05
print(summary.to_string(index=False, float_format=lambda v: f"{v:.4g}"))
print("\nFeatures where ALL against APP gives p < 0.05, of 4:")
print(summary.groupby("cells")[["differs (a)", "differs (b)", "differs (b) t df", "differs MW"]].sum().to_string())
rin (MOhm):
cells                all     no_FL change20
n                24/12/8   21/12/8  14/10/6
mean ALL           335.5     302.4    423.1
mean APP             548       548    547.1
mean AV            413.9     413.9    477.3
(a) F              4.159      5.81   0.9903
(a) df              2,41      2,38     2,27
(a) p            0.02266  0.006289   0.3845
(a) t ALL-APP      2.775     3.278    1.318
(a) p ALL-APP     0.0089  0.002584   0.2009
(a) t ALL-AV      0.9316     1.387   0.5209
(a) p ALL-AV       0.359    0.1767   0.6088
(a) t APP-AV      -1.496    -1.496  -0.7205
(a) p APP-AV      0.1519    0.1519   0.4831
(b) p group      0.07331   0.03104   0.4191
(b) p ALL-APP    0.02235  0.008434   0.1889
(b) p ALL-AV      0.5518    0.3531   0.7192
(b) p APP-AV      0.2232    0.2217   0.4754
(b) p_t ALL-APP   0.0347    0.0174   0.2086
(b) p_t ALL-AV    0.5592    0.3661   0.7242
(b) p_t APP-AV    0.2389    0.2383   0.4863
(b) df_t              18        17       15
(b) nested F       2.818     3.667   0.8643
(b) nested p     0.08613   0.04743   0.4413
Kruskal p         0.0127  0.002491   0.2554
MW p ALL-APP    0.005077 0.0009262   0.1354
MW p ALL-AV       0.2036     0.103    0.353
MW p APP-AV       0.1569    0.1569   0.5622
Shapiro min p   0.002388 0.0005057  0.03115

width (ms):
cells                 all    no_FL change20
n                 24/12/8  21/12/8  14/10/6
mean ALL            1.521    1.488    1.466
mean APP            0.915    0.915    0.899
mean AV             1.062    1.062   0.9567
(a) F               9.177    7.407    6.823
(a) df               2,41     2,38     2,27
(a) p           0.0005086 0.001922 0.003997
(a) t ALL-APP       -3.95   -3.573   -3.389
(a) p ALL-APP   0.0003732 0.001177  0.00264
(a) t ALL-AV       -2.442   -2.167   -2.312
(a) p ALL-AV      0.02073  0.03926  0.03285
(a) t APP-AV       0.9038   0.9038    0.333
(a) p APP-AV        0.378    0.378    0.744
(b) p group      0.001997 0.006309  0.01143
(b) p ALL-APP   0.0008164 0.002271 0.004601
(b) p ALL-AV      0.03922  0.06472  0.05265
(b) p APP-AV       0.4737   0.4792   0.6211
(b) p_t ALL-APP  0.003587 0.007204  0.01257
(b) p_t ALL-AV    0.05396   0.0822  0.07171
(b) p_t APP-AV     0.4829   0.4888   0.6283
(b) df_t               18       17       15
(b) nested F        5.709    4.754    4.462
(b) nested p      0.01202  0.02291  0.03017
Kruskal p       0.0006292 0.002013 0.006328
MW p ALL-APP    0.0005134 0.001205 0.004108
MW p ALL-AV       0.01173  0.02415  0.02564
MW p APP-AV        0.5208   0.5208        1
Shapiro min p      0.1842   0.1842   0.2673

downstroke (mV/ms):
cells                 all    no_FL  change20
n                 24/12/8  21/12/8   14/10/6
mean ALL           -41.19   -42.47    -43.97
mean APP           -74.69   -74.69    -71.76
mean AV            -69.37   -69.37    -79.52
(a) F                 5.5    4.449     3.222
(a) df               2,41     2,38      2,27
(a) p            0.007658  0.01837   0.05561
(a) t ALL-APP      -3.446   -3.112    -2.341
(a) p ALL-APP     0.00153 0.003968   0.02872
(a) t ALL-AV       -2.345     -2.1    -2.092
(a) p ALL-AV      0.02585  0.04521   0.05087
(a) t APP-AV       0.2889   0.2889   -0.3883
(a) p APP-AV        0.776    0.776    0.7036
(b) p group       0.03541  0.06206    0.1069
(b) p ALL-APP     0.02634  0.04118    0.1058
(b) p ALL-AV      0.05373  0.07521   0.06226
(b) p APP-AV       0.9739   0.9776    0.6568
(b) p_t ALL-APP   0.03941  0.05701    0.1266
(b) p_t ALL-AV    0.06965   0.0931   0.08194
(b) p_t APP-AV     0.9743   0.9779    0.6632
(b) df_t               18       17        15
(b) nested F        3.124    2.581     2.158
(b) nested p      0.06847    0.105    0.1501
Kruskal p        0.004577  0.01084   0.02539
MW p ALL-APP     0.004573  0.00833   0.02418
MW p ALL-AV       0.01763  0.03171   0.03256
MW p APP-AV        0.7921   0.7921    0.8749
Shapiro min p   2.282e-05 0.000114 0.0006277

fi_slope (Hz/pA):
cells                 all     no_FL change20
n                 24/12/8   21/12/8  14/10/6
mean ALL           0.1082    0.1114   0.1297
mean APP           0.3289    0.3289   0.3226
mean AV            0.2769    0.2769   0.3435
(a) F               9.799     8.402    5.672
(a) df               2,41      2,38     2,27
(a) p           0.0003325 0.0009518 0.008778
(a) t ALL-APP        4.83     4.495    3.238
(a) p ALL-APP   2.849e-05 9.089e-05 0.003776
(a) t ALL-AV        3.206     2.973     3.08
(a) p ALL-AV     0.003189  0.006145 0.006454
(a) t APP-AV      -0.5367   -0.5367   0.1918
(a) p APP-AV       0.5981    0.5981   0.8506
(b) p group      0.003263  0.007863  0.04922
(b) p ALL-APP    0.001244   0.00278  0.02526
(b) p ALL-AV      0.05393   0.07423  0.07824
(b) p APP-AV       0.4597    0.4764   0.8915
(b) p_t ALL-APP  0.004661  0.008209  0.04087
(b) p_t ALL-AV    0.06986   0.09208  0.09861
(b) p_t APP-AV     0.4692     0.486   0.8933
(b) df_t               18        17       15
(b) nested F        6.395     5.529    4.074
(b) nested p     0.007976   0.01414  0.03863
Kruskal p        0.002648  0.004702  0.02068
MW p ALL-APP    0.0006589 0.0009262  0.01086
MW p ALL-AV       0.09815    0.1432  0.06218
MW p APP-AV        0.5208    0.5208   0.8749
Shapiro min p    0.001293 0.0008936  0.04919

   cells    feature  APP - ALL     (a) p     (b) p  (b) p_t      MW p  differs (a)  differs (b)  differs (b) t df  differs MW
     all        rin      212.5    0.0089   0.02235   0.0347  0.005077         True         True              True        True
     all      width    -0.6058 0.0003732 0.0008164 0.003587 0.0005134         True         True              True        True
     all downstroke      -33.5   0.00153   0.02634  0.03941  0.004573         True         True              True        True
     all   fi_slope     0.2208 2.849e-05  0.001244 0.004661 0.0006589         True         True              True        True
   no_FL        rin      245.5  0.002584  0.008434   0.0174 0.0009262         True         True              True        True
   no_FL      width    -0.5731  0.001177  0.002271 0.007204  0.001205         True         True              True        True
   no_FL downstroke     -32.22  0.003968   0.04118  0.05701   0.00833         True         True             False        True
   no_FL   fi_slope     0.2175 9.089e-05   0.00278 0.008209 0.0009262         True         True              True        True
change20        rin        124    0.2009    0.1889   0.2086    0.1354        False        False             False       False
change20      width    -0.5667   0.00264  0.004601  0.01257  0.004108         True         True              True        True
change20 downstroke     -27.79   0.02872    0.1058   0.1266   0.02418         True        False             False        True
change20   fi_slope     0.1929  0.003776   0.02526  0.04087   0.01086         True         True              True        True

Features where ALL against APP gives p < 0.05, of 4:
          differs (a)  differs (b)  differs (b) t df  differs MW
cells                                                           
all                 4            4                 4           4
change20            3            2                 2           3
no_FL               4            4                 3           4
In [24]:
print("Per mouse (mean of each mouse's cells):")
for col, u in units.items():
    pm = vc.per_mouse(feat, col)
    print(f"{col} ({u}):", {g: f"{s['mean'].min():.3g} to {s['mean'].max():.3g}" for g, s in pm.groupby("group")})
print("\nRange over cells:", {col: (round(feat[col].min(), 3), round(feat[col].max(), 3)) for col in units})
print("Missing values:", {col: int(feat[col].isna().sum()) for col in units})
Per mouse (mean of each mouse's cells):
rin (MOhm): {'ALL': '164 to 831', 'APP': '319 to 802', 'AV': '281 to 637'}
width (ms): {'ALL': '0.84 to 2.27', 'APP': '0.59 to 1.37', 'AV': '0.5 to 1.46'}
downstroke (mV/ms): {'ALL': '-87.6 to -21.2', 'APP': '-110 to -41.7', 'AV': '-171 to -39.6'}
fi_slope (Hz/pA): {'ALL': '0.05 to 0.21', 'APP': '0.03 to 0.61', 'AV': '0.07 to 0.48'}

Range over cells: {'rin': (np.float64(75.017), np.float64(953.601)), 'width': (np.float64(0.5), np.float64(2.41)), 'downstroke': (np.float64(-171.491), np.float64(-20.921)), 'fi_slope': (np.float64(0.015), np.float64(0.706))}
Missing values: {'rin': 0, 'width': 0, 'downstroke': 0, 'fi_slope': 0}

Result: reproduced. On all 44 cells, APP differs from ALL in each of the four features under both test readings. Input resistance is higher in APP (548 against 335.5 MOhm; t = 2.78, p = 0.0089; mixed model p = 0.022), spike width is shorter (0.915 against 1.52 ms; p = 0.00037; mixed model p = 0.00082), the downstroke is steeper (-74.7 against -41.2 mV/ms; p = 0.0015; mixed model p = 0.026) and the f-I slope is larger (0.329 against 0.108 Hz/pA; p = 2.8e-05; mixed model p = 0.0012). The same holds without the _FL cells (p from 9.1e-05 to 0.041). Without the cells whose resistance changed by more than 20%, input resistance no longer differs (p = 0.20 and 0.19) and the downstroke differs only by the cell-level test (p = 0.029; mixed model p = 0.11), so on that set the claim would be partially reproduced; the outcome stated rests on the dandiset's 24 ALL cells. With the mixed-model contrasts referred to t on the number of mice minus 3 df, the downstroke p rises to 0.039 on all cells and 0.057 without the _FL cells, so that feature is marginal; the other three stay below 0.05 in both sets. The non-parametric tests agree on all cells (Mann-Whitney ALL against APP p = 0.0051, 0.00051, 0.0046 and 0.00066).

Claims not tested¶

The dandiset holds only the patch-clamp recordings. The claims below need data it does not hold: Y-maze tracking (fig1c-app-approach, fig1c-av-avoidance, figs1-locomotion-unchanged, fig2c-hm4di-app-reversal, fig2e-hm4di-av-unchanged, fig5c-adcd-app-reversal, fig5e-adcd-av-unchanged), cell counts from immunohistochemistry (fig1f-cfos-total, fig1g-chat-cfos, fig3-same-odor-reactivation, fig4d-different-odor-no-reactivation, figs5-activation-counts, figs7-ram-replication, figs9-valence-specific, figs11-intermingled, fig7d-bla-projecting-av), fiber photometry (fig1k-app-calcium-auc, fig1l-av-calcium-auc, fig1mn-calcium-max-z) and the Imaris reconstructions of neurobiotin-filled cells (fig6j-convex-hull-area, fig6kl-dendrite-area-volume, fig6m-sholl-proximal, fig6n-sholl-reach, figs13-other-morphometrics). The paper's data statement says "All data reported in this paper will be shared by the lead contact upon request" and names only its two code repositories; a search of DANDI for the paper's title and senior author finds no other dandiset of this paper.

In [25]:
print(f"notebook ran in {time.time() - started:.0f} s")
notebook ran in 318 s

Summary¶

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.

Claim Outcome
fig6f-max-firing-rate reproduced
figs12a-sag-higher not reproduced (assumed)
figs12-other-features-shared reproduced
figs12-app-differs-from-all reproduced (assumed)
fig6g-av-more-hyperpolarized not reproduced
fig6h-av-smaller-ahp not reproduced
fig6-app-less-excitable not reproduced
24 other claims (behaviour, histology, photometry, morphology) blocked: data missing

How the analysis differs from the paper's: The features follow the STAR Methods, with the paper's code (v1.0.0) where the Methods are silent; the code's own definitions of threshold (10 mV/ms), latency (to the peak) and AHP amplitude are shown as variants. The paper analysed 21 ALL cells from 8 mice; the dandiset holds 24 from 11 and does not say which were left out, so all 24 are used, with the 21 cells left when the _FL files are set aside as a variant. The exclusion rule on a 20% change could only be read through the test pulse, and is a variant. The nested ANOVA of the Methods is fitted as a mixed model with a random intercept per mouse, with Wald tests against the normal and against t on the number of mice minus 3 df. The Methods' switch to non-parametric tests when normality fails is not in the claims file's readings; Kruskal-Wallis and Mann-Whitney results are shown beside them; every outcome follows the claims file's readings, and the rank tests would change none of them. Membrane potential can only be read under the DC holding current.

What was found about the dataset: The stimulus is in picoamperes though stated in amperes. bias_current and bridge_balance hold the same value in every file, and the holding current is not recorded. The ALL group has 24 cells from 11 mice where the paper has 21 from 8, and five of its mice are younger than the 8 to 12 weeks of the Methods. The APP mice are 4 male and 2 female where the legend says 3 and 3. Five recordings saturate at -105.6 mV during the -60 pA step, and the code's saturation test cannot detect it. Every sweep starts at time 0, so the interval between steps is not recorded. Only the patch-clamp data are in the dandiset; the paper deposits none of its other data.