Reproducing Doherty et al. (2025) from dandiset 001444¶
Paper. Doherty DW, Chen L, Smith Y, Wichmann T, Chu H-Y, Lytton WW (2025). Enhanced beta power emerges from simulated parkinsonian primary motor cortex. npj Parkinson's Disease 11, 230. doi:10.1038/s41531-025-01070-4.
Claims. claims/001444/10.1038-s41531-025-01070-4.yaml, written from the version of record
(Europe PMC, PMC12325672: main text, legends and Methods; the supplement was not available) and
checked by a second reader. The claims file decides what is tested and how.
Dandiset. DANDI:001444, version 0.250805.2002. The paper's data statement names the dandiset without a version. This is the only published version, and the draft holds the same 17 assets with the same blobs (data check), so the pinned version holds what the paper deposited.
What the dandiset holds. Four sets of four NetPyNE simulations of a 10,073-cell model of mouse
M1, 4.3 s each: control and parkinsonian, rest and activated, per set. The paper's results come
from set sM1_12-12-2023 (Methods, paragraph 2), files sub-001_ses-sM1-12-12-2023-01 to -04.
Each file holds spike times of the cells that fired, one LFP trace and somatic potentials of 20
(paper's set) or 400 (other sets) PT5B cells. One asset, sub-001/sub-001.nwb, is a second copy
of sub-001_ses-sM1-04-22-2024-01.nwb.
Outside inputs. None. The spectrogram of reading S1 is a copy of NetPyNE 1.0.5's Morlet method in the helper; it is software the Methods name, not data.
| Claim | Tested |
|---|---|
| fig1-network-size | tested |
| model-pt5b-excitability-decrease | blocked: data_missing (no current-injection simulations) |
| robustness-four-sets | blocked: methods_underspecified (measures reported per set) |
| fig2-control-rest-beta, fig2-control-activated-gamma, fig5-pd-rest-beta, fig5-pd-activated-gamma | tested |
| fig2c-control-pt5b-rate-activated, fig2c-control-it23-rate-activated, fig2c-control-it6-rate-activated | tested |
| control-it5-silenced-activated, control-it4-rate-activated, pt5b-highest-rate | tested |
| control-cv-isi, pd-cv-isi | tested |
| control-subthreshold-oscillations, pd-no-subthreshold-oscillations | blocked: methods_underspecified (no detection rule) |
| control-duty-cycle, pd-duty-cycle | tested |
| fig3a, fig3b, fig6a, fig6b spectrogram claims | tested |
| control-coincident-spikes, pd-coincident-spikes | tested |
| fig4-control-unitary-events, fig7-pd-unitary-events, rest-synchrony-increase | tested |
| fig5c-pd-pt5b-rate-activated, fig5c-pd-it23-rate-activated, pd-it5-silenced-activated, pd-it6-rate-unchanged | tested |
| pd-activated-vm-more-negative | tested |
| rest-pt5b-rate-pd-vs-control, rest-it4-rate-pd-vs-control, rest-it5a-rate-pd-vs-control | tested |
| activated-pt5b-rate-pd-vs-control, activated-it6-rate-pd-vs-control | tested |
| rest-beta-power-order-of-magnitude, activated-20-35hz-power-pd-vs-control | tested |
import time
import warnings
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import requests
import m1sim as m
warnings.filterwarnings("ignore", category=RuntimeWarning)
pd.set_option("display.width", 200)
pd.set_option("display.max_columns", 30)
pd.set_option("display.max_rows", 200)
started = time.time()
D = {c: m.load_file(m.PAPER_SET, c) for c in m.CONDITIONS}
OTHER = {(s, c): m.load_file(s, c, vm=False) for s in m.SETS[1:] for c in m.CONDITIONS}
print(f"loaded {len(D) + len(OTHER)} files of dandiset {m.DANDISET_ID} version {m.DANDISET_VERSION} "
f"in {time.time() - started:.0f} s")
BLOCKS = m.population_blocks([d["pop"] for d in list(D.values()) + list(OTHER.values())])
loaded 16 files of dandiset 001444 version 0.250805.2002 in 171 s
Data check¶
Each check of the description against the values is stated under its output. The archive's description of the dandiset says each file holds "a local field potential trace, spike train data from all 10,073 neurons, and membrane potential traces from 400 of the layer 5B pyramidal tract (PT5B) neurons", and that simulations last 4.3 s.
A = m.assets()
listing = pd.DataFrame([{"path": p, "size_MB": round(v[2] / 1e6, 1), "blob": v[1]} for p, v in sorted(A.items())])
print(listing.to_string(index=False))
dup = listing[listing.duplicated("blob", keep=False)]
print("\nAssets sharing one blob (byte-identical files):")
print(dup.to_string(index=False))
draft = requests.get(f"{m.API}/dandisets/{m.DANDISET_ID}/versions/draft/assets/", params={"page_size": 200}).json()["results"]
same = sorted((a["path"], a["blob"]) for a in draft) == sorted((p, v[1]) for p, v in A.items())
print("\nDraft holds the same paths and blobs as the pinned version:", same)
versions = requests.get(f"{m.API}/dandisets/{m.DANDISET_ID}/versions/").json()["results"]
print("Versions on the archive:", [v["version"] for v in versions])
meta = requests.get(f"{m.API}/dandisets/{m.DANDISET_ID}/versions/{m.DANDISET_VERSION}/").json()
print("relatedResource:", meta.get("relatedResource"))
print("assetsSummary measurementTechnique:", [t["name"] for t in meta["assetsSummary"].get("measurementTechnique", [])])
path size_MB blob
sub-001/sub-001.nwb 556.5 8125364f-e0cb-4584-aeb1-14d505e18d09
sub-001/sub-001_ses-sM1-04-22-2024-01.nwb 556.5 8125364f-e0cb-4584-aeb1-14d505e18d09
sub-001/sub-001_ses-sM1-04-22-2024-02.nwb 556.6 d0e92d4e-ce77-42ce-9876-a11663d27840
sub-001/sub-001_ses-sM1-04-22-2024-03.nwb 557.8 944813cb-df12-47bc-9991-743c723042af
sub-001/sub-001_ses-sM1-04-22-2024-04.nwb 557.8 ae4f13b6-9a5e-4ced-b49a-60dbfac10321
sub-001/sub-001_ses-sM1-04-25-2024-01.nwb 556.7 f5039f11-0d99-43e7-b254-7f4dd7177a0f
sub-001/sub-001_ses-sM1-04-25-2024-02.nwb 556.9 6c934e64-5133-4e4b-9513-93e46fd20c20
sub-001/sub-001_ses-sM1-04-25-2024-03.nwb 557.8 c8d09983-a7c5-4ebc-b00c-e06881a3dd6d
sub-001/sub-001_ses-sM1-04-25-2024-04.nwb 557.9 2af975f3-d0ae-47b0-ac51-5c8dda9f460e
sub-001/sub-001_ses-sM1-04-26-2024-01.nwb 556.8 d4c1a688-fe85-45ab-80a6-eb5dcf5fd652
sub-001/sub-001_ses-sM1-04-26-2024-02.nwb 556.9 b4a799af-402b-44bc-9c89-20e003abaf10
sub-001/sub-001_ses-sM1-04-26-2024-03.nwb 557.7 235430d3-bde8-468c-8251-a53321d7323f
sub-001/sub-001_ses-sM1-04-26-2024-04.nwb 557.8 94944c71-c9de-4f2e-83b3-62f9a96f3834
sub-001/sub-001_ses-sM1-12-12-2023-01.nwb 32.6 e87d848d-916d-47b3-beba-93d07c0e2d6f
sub-001/sub-001_ses-sM1-12-12-2023-02.nwb 32.4 595d2a83-24d6-4aa1-bb1f-6d9554ca5fdf
sub-001/sub-001_ses-sM1-12-12-2023-03.nwb 33.8 7ebd3d49-072a-41f1-9e9b-1a973c09cbfb
sub-001/sub-001_ses-sM1-12-12-2023-04.nwb 33.8 2e65e938-ed36-48c6-90f6-c069396aa742
Assets sharing one blob (byte-identical files):
path size_MB blob
sub-001/sub-001.nwb 556.5 8125364f-e0cb-4584-aeb1-14d505e18d09
sub-001/sub-001_ses-sM1-04-22-2024-01.nwb 556.5 8125364f-e0cb-4584-aeb1-14d505e18d09
Draft holds the same paths and blobs as the pinned version: True
Versions on the archive: ['draft', '0.250805.2002'] relatedResource: [] assetsSummary measurementTechnique: ['spike sorting technique']
The version holds 17 assets: four sets of four simulations, named by set and number, and
sub-001/sub-001.nwb, which is the same blob as sub-001_ses-sM1-04-22-2024-01.nwb (a recording
deposited twice; it is counted once and not read again). The archive lists no related resource,
and its summary gives "spike sorting technique" as the measurement technique of a simulation.
rows = []
for (s, c), d in [((m.PAPER_SET, c), d) for c, d in D.items()] + list(OTHER.items()):
m1 = [g for g in d["pop"] if g < m.FIRST_INPUT_GID]
rows.append({"set": s, "file": c, "session_id": d["session_id"], "description": d["description"],
"start": d["start"][:19], "units": len(d["pop"]), "M1 units": len(m1),
"input units": len(d["pop"]) - len(m1),
"spikes": sum(len(t) for t in d["trains"].values()),
"first spike": min(t[0] for t in d["trains"].values() if len(t)),
"last spike": max(t[-1] for t in d["trains"].values() if len(t)),
"silent units": sum(len(t) == 0 for t in d["trains"].values()),
"unsorted trains": d["unsorted"], "obs_intervals": d["obs_intervals"].tolist(),
"Vm traces": len(d["vm_gids"]), "LFP samples": len(d["lfp"]), "LFP Hz": d["lfp_rate"],
"LFP unit": d["lfp_unit"]})
info = pd.DataFrame(rows)
print(info.drop(columns=["obs_intervals"]).to_string(index=False))
print("\nobs_intervals in every file:", {str(x) for x in info.obs_intervals})
print("Expected order of the numbered files (claims file): ", m.CONDITIONS)
set file session_id description start units M1 units input units spikes first spike last spike silent units unsorted trains Vm traces LFP samples LFP Hz LFP unit
sM1-12-12-2023 01 sM1_12-12-2023_01 control, quiet wakefulness 2023-12-12T15:23:00 10996 4480 6516 213007 0.000023 4.299900 0 0 20 172000 40000.0 mV
sM1-12-12-2023 02 sM1_12-12-2023_02 parkinsonian, quiet wakefulness 2023-12-12T15:25:00 9747 3231 6516 208550 0.000023 4.299975 0 0 20 172000 40000.0 mV
sM1-12-12-2023 03 sM1_12-12-2023_03 control, movement 2023-12-12T15:29:00 9536 2919 6617 385529 0.000010 4.299975 0 0 20 172000 40000.0 mV
sM1-12-12-2023 04 sM1_12-12-2023_04 parkinsonian, movement 2023-12-12T15:31:00 9534 2917 6617 388355 0.000010 4.299975 0 0 20 172000 40000.0 mV
sM1-04-22-2024 01 sM1_04-22-2024_01 control, quiet wakefulness 2024-04-22T11:09:00 11228 4714 6514 212347 0.000201 4.299975 0 0 400 172000 40000.0 mV
sM1-04-22-2024 02 sM1_04-22-2024_02 parkinsonian, quiet wakefulness 2024-04-22T11:17:00 10306 3792 6514 242831 0.000201 4.299975 0 0 400 172000 40000.0 mV
sM1-04-22-2024 03 sM1_04-22-2024_03 control, movement 2024-04-22T11:26:00 10332 3725 6607 393444 0.000105 4.299975 0 0 400 172000 40000.0 mV
sM1-04-22-2024 04 sM1_04-22-2024_04 parkinsonian, movement 2024-04-22T11:36:00 10213 3606 6607 390429 0.000105 4.299975 0 0 400 172000 40000.0 mV
sM1-04-25-2024 01 sM1_04-25-2024_01 control, quiet wakefulness 2024-04-25T08:20:00 10341 3826 6515 250158 0.000029 4.299969 0 0 400 172000 40000.0 mV
sM1-04-25-2024 02 sM1_04-25-2024_02 parkinsonian, quiet wakefulness 2024-04-25T08:23:00 9663 3148 6515 293774 0.000029 4.299969 0 0 400 172000 40000.0 mV
sM1-04-25-2024 03 sM1_04-25-2024_03 control, movement 2024-04-25T08:27:00 9660 3060 6600 409246 0.000029 4.299975 0 0 400 172000 40000.0 mV
sM1-04-25-2024 04 sM1_04-25-2024_04 parkinsonian, movement 2024-04-25T08:30:00 9713 3113 6600 409133 0.000029 4.299975 0 0 400 172000 40000.0 mV
sM1-04-26-2024 01 sM1_04-26-2024_01 control, quiet wakefulness 2024-04-26T09:03:00 10444 3979 6465 263720 0.000047 4.299975 0 0 400 172000 40000.0 mV
sM1-04-26-2024 02 sM1_04-26-2024_02 parkinsonian, quiet wakefulness 2024-04-26T09:06:00 9586 3121 6465 295477 0.000047 4.299975 0 0 400 172000 40000.0 mV
sM1-04-26-2024 03 sM1_04-26-2024_03 control, movement 2024-04-26T09:08:00 9432 2848 6584 399894 0.000024 4.299960 0 0 400 172000 40000.0 mV
sM1-04-26-2024 04 sM1_04-26-2024_04 parkinsonian, movement 2024-04-26T09:11:00 9349 2765 6584 404006 0.000024 4.299975 0 0 400 172000 40000.0 mV
obs_intervals in every file: {'[[0.0, 4.3]]'}
Expected order of the numbered files (claims file): {'01': 'control rest', '02': 'parkinsonian rest', '03': 'control activated', '04': 'parkinsonian activated'}
The session descriptions confirm the numbering of the claims file: -01 control rest ("quiet wakefulness"), -02 parkinsonian rest, -03 control activated ("movement"), -04 parkinsonian activated, in every set. Spike times run from 0 to 4.3 s and are in seconds; no unit has zero spikes, and every train is sorted. The LFP has 172,000 samples at 40 kHz, 4.3 s. The files of the paper's set (sM1-12-12-2023) hold 20 PT5B membrane potentials, not 400 as the description says; the other sets hold 400. Each file holds one LFP trace, "LFP 0", where the model records 11 electrodes (claims file, cfg.recordLFP); no file says at which depth it was taken.
print("Units in the paper's set, by population (M1 populations, then inputs):")
pops = sorted({p for d in D.values() for p in d["pop"].values()},
key=lambda p: min(g for d in D.values() for g, q in d["pop"].items() if q == p))
tab = pd.DataFrame({m.CONDITIONS[c]: pd.Series(list(d["pop"].values())).value_counts() for c, d in D.items()}).reindex(pops).fillna(0).astype(int)
print(tab.to_string())
print("\nM1 units per file:", {c: int(tab.loc[m.M1_POPS, m.CONDITIONS[c]].sum()) for c in D})
print("Lowest input gid:", min(g for d in D.values() for g in d["pop"] if g >= m.FIRST_INPUT_GID),
"; highest M1 gid:", max(g for d in D.values() for g in d["pop"] if g < m.FIRST_INPUT_GID))
print("\nPopulation gid blocks bounded from the gids seen in all 16 files "
"(start in [low, high], end in [low, high], size min and max):")
bl = pd.DataFrame(BLOCKS, index=["start_low", "start_high", "end_low", "end_high", "n_min", "n_max"]).T
print(bl.to_string())
unseen = sum(BLOCKS[b][1] - BLOCKS[a][2] - 1 for a, b in zip(m.M1_POPS, m.M1_POPS[1:])) + BLOCKS["IT2"][1] + (m.FIRST_INPUT_GID - 1 - BLOCKS["PV6"][2])
print("Observed gid ranges of the populations overlap nowhere:",
all(BLOCKS[a][2] < BLOCKS[b][1] for a, b in zip(m.M1_POPS, m.M1_POPS[1:])),
"; gids never seen, between blocks:", unseen, "; sum of smallest sizes + unseen gids:", int(bl.n_min.sum()) + unseen)
same_map = all(D[c]["pop"].get(g, p) == p for c in D for g, p in D["01"]["pop"].items())
print("A gid has the same population in all four files of the set:", same_map)
Units in the paper's set, by population (M1 populations, then inputs):
control rest parkinsonian rest control activated parkinsonian activated
IT2 137 55 68 66
SOM2 125 125 127 127
PV2 13 12 35 34
IT4 11 2 95 97
IT5A 239 140 1 1
SOM5A 40 40 37 37
PV5A 89 81 93 82
IT5B 816 541 2 11
PT5B 1435 1435 1435 1435
SOM5B 66 80 94 113
PV5B 445 341 472 443
IT6 914 275 341 359
CT6 53 13 18 14
SOM6 89 89 89 88
PV6 8 2 12 10
TPO 953 953 975 975
TVL 894 894 973 973
S1 951 951 951 951
S2 937 937 937 937
cM1 897 897 897 897
M2 929 929 929 929
OC 955 955 955 955
M1 units per file: {'01': 4480, '02': 3231, '03': 2919, '04': 2917}
Lowest input gid: 10073 ; highest M1 gid: 10064
Population gid blocks bounded from the gids seen in all 16 files (start in [low, high], end in [low, high], size min and max):
start_low start_high end_low end_high n_min n_max
IT2 0 1 1729 1729 1729 1730
SOM2 1730 1730 1856 1856 127 127
PV2 1857 1857 2113 2113 257 257
IT4 2114 2114 2880 2881 767 768
IT5A 2881 2882 3524 3524 643 644
SOM5A 3525 3525 3580 3580 56 56
PV5A 3581 3581 3694 3694 114 114
IT5B 3695 3695 5129 5129 1435 1435
PT5B 5130 5130 6564 6564 1435 1435
SOM5B 6565 6565 6815 6815 251 251
PV5B 6816 6816 7326 7326 511 511
IT6 7327 7327 8562 8570 1236 1244
CT6 8563 8571 9796 9798 1226 1236
SOM6 9797 9799 9888 9892 90 96
PV6 9889 9893 10064 10072 172 184
Observed gid ranges of the populations overlap nowhere: True ; gids never seen, between blocks: 24 ; sum of smallest sizes + unseen gids: 10073
A gid has the same population in all four files of the set: True
The units table holds only cells that fired: 2,917 to 4,480 M1 units per file of the paper's set, not 10,073, and input generators that did not fire are missing too (fewer than 1,000 per input region). The cell names carry NetPyNE's gids, numbered in one block per population; the inputs start at gid 10073, so the M1 cells are gids 0 to 10072, which is consistent with 10,073 cells. The size of each population is bounded from the gids seen in any of the 16 files; for the populations the claims use the bounds differ by at most 8 cells (IT6; IT2, IT4 and IT5A by 1), and the rates under both bounds are shown below. PT5B has 1,435 cells and all fired in every file.
# Clock and labels: upward 0 mV crossings of each membrane potential trace against the spike
# times of the unit with the same gid: the share of unit spikes with a crossing within 0.5 ms, by
# span of time. The paper's set (20 traces per file) and, for comparison, the first 20 traces of
# each file of set sM1-04-22-2024.
rows = []
for c, d in D.items():
for r in m.vm_match(d["vm"], d["trains"]):
rows.append({"set": m.PAPER_SET, "file": c, "pop": d["pop"].get(r["gid"]), **r,
"Vm min": d["vm"][r["gid"]].min(), "Vm max": d["vm"][r["gid"]].max()})
VM_OTHER = {c: m.load_vm_subset("sM1-04-22-2024", c, 20) for c in m.CONDITIONS}
for c, vmd in VM_OTHER.items():
d = OTHER[("sM1-04-22-2024", c)]
for r in m.vm_match(vmd, d["trains"]):
rows.append({"set": "sM1-04-22-2024", "file": c, "pop": d["pop"].get(r["gid"]), **r,
"Vm min": vmd[r["gid"]].min(), "Vm max": vmd[r["gid"]].max()})
vmchk = pd.DataFrame(rows)
print(vmchk.groupby(["set", "file"]).agg(traces=("gid", "size"), all_PT5B=("pop", lambda s: bool((s == "PT5B").all())),
Vm_spikes=("Vm spikes", "sum"), unit_spikes=("unit spikes", "sum"),
matched_0_05s=("0-0.5 s", "mean"), matched_05_2s=("0.5-2.0 s", "mean"), matched_2_43s=("2.0-4.3 s", "mean"),
vm_min=("Vm min", "min"), vm_max=("Vm max", "max")).round(3).to_string())
print("PT5B gids with Vm in the paper's set, same in all four files:", all(D[c]["vm_gids"] == D["01"]["vm_gids"] for c in D),
D["01"]["vm_gids"])
print("Per-trace share matched in W, paper's set, range:", vmchk[vmchk.set == m.PAPER_SET]["2.0-4.3 s"].min(),
"to", vmchk[vmchk.set == m.PAPER_SET]["2.0-4.3 s"].max())
traces all_PT5B Vm_spikes unit_spikes matched_0_05s matched_05_2s matched_2_43s vm_min vm_max
set file
sM1-04-22-2024 01 20 True 1064 1064 1.000 1.000 1.000 -80.591 27.187
02 20 True 1530 1530 1.000 1.000 1.000 -86.646 32.775
03 20 True 2700 2700 1.000 1.000 1.000 -79.751 27.612
04 20 True 2667 2667 1.000 1.000 1.000 -87.411 32.826
sM1-12-12-2023 01 20 True 1112 1123 1.000 0.350 0.015 -80.204 27.262
02 20 True 1241 1228 1.000 0.849 0.037 -88.744 32.672
03 20 True 3123 3092 1.000 0.563 0.056 -79.685 27.652
04 20 True 2777 2812 0.948 0.058 0.039 -87.750 32.771
PT5B gids with Vm in the paper's set, same in all four files: True [5201, 5202, 5301, 5302, 5401, 5402, 5501, 5502, 5601, 5602, 5701, 5702, 5801, 5802, 6201, 6202, 6301, 6302, 6501, 6502]
Per-trace share matched in W, paper's set, range: 0.0 to 0.11811023622047244
Every trace belongs to a PT5B unit of the same gid. In set sM1-04-22-2024 the trace's 0 mV crossings fall on that unit's spike times throughout the 4.3 s, so there the potentials and the spikes share one clock and one labelling. In the paper's set they do only at the start: the crossings match the unit's spikes in the first 0.5 s, less from 0.5 to 2 s, and hardly at all in W (shares printed above), while the numbers of spikes stay similar. The potentials of the paper's set therefore come from a run that diverged from the one whose spikes are stored, with the same cells and the same start; that cannot be established from the files and is recorded as a finding. The potentials range over the values printed, in mV.
# LFP against the PT5B spike count histogram: the Results say the LFP and the PT5B SCH oscillate in
# antiphase. Correlation at lags from -50 to 50 ms (2 ms bins) in W; a shared clock puts the
# extreme near lag 0, and the contrast between rest (beta) and activated (gamma) shows in the lag
# of the next opposite extreme.
lags = np.arange(-25, 26)
rows = []
for c, d in D.items():
_, cnt = m.sch(m.pop_spikes(d, "PT5B"))
x = d["lfp"][int(m.WINDOW[0] * m.FS):int(m.WINDOW[1] * m.FS)]
lfp2 = x[: len(cnt) * 80].reshape(len(cnt), 80).mean(axis=1)
a, b = (cnt - cnt.mean()) / cnt.std(), (lfp2 - lfp2.mean()) / lfp2.std()
r = np.array([np.mean(a[max(0, -k):len(a) - max(0, k)] * b[max(0, k):len(b) - max(0, -k)]) for k in lags])
i = np.argmin(r)
rows.append({"file": m.CONDITIONS[c], "r at lag 0": r[25], "most negative r": r[i], "its lag ms": lags[i] * 2,
"most positive r": r.max(), "its lag ms ": lags[np.argmax(r)] * 2})
# shifted control: LFP shifted by 1 s
sh = np.roll(b, 500)
rows[-1]["r at lag 0, LFP shifted 1 s"] = np.mean(a * sh)
print(pd.DataFrame(rows).round(3).to_string(index=False))
file r at lag 0 most negative r its lag ms most positive r its lag ms r at lag 0, LFP shifted 1 s
control rest -0.465 -0.489 2 -0.162 28 0.031
parkinsonian rest -0.906 -0.914 2 0.805 -32 -0.073
control activated -0.183 -0.309 2 0.138 -34 -0.031
parkinsonian activated -0.501 -0.501 2 0.229 20 -0.008
In every file the LFP and the PT5B SCH are most strongly anticorrelated at a lag of a few ms, and the correlation is near zero when the LFP is shifted by 1 s, consistent with the antiphase the Results describe and with one clock for the LFP and the spikes in W.
# Metadata of the series and tables used: the time of the first sample and the rate of the LFP and
# potential series (the notebook slices them at sample 2.0 s x 40 kHz, which assumes a start at 0),
# every attribute that could name the LFP electrode, and every column of the units table (whether
# any lists silent cells or electrodes).
for c in D:
f = m.open_nwb(m.path_of(m.PAPER_SET, c))
lfp = f["acquisition/Segment 0 LFP 0"]
vms = [f["acquisition"][n] for n in m.vm_names(f)]
print(f"{m.CONDITIONS[c]}: LFP starting_time {lfp['starting_time'][()]} s at {lfp['starting_time'].attrs['rate']} Hz; "
f"potentials starting_time {sorted({float(v['starting_time'][()]) for v in vms})} s at "
f"{sorted({float(v['starting_time'].attrs['rate']) for v in vms})} Hz")
if c == "01":
print(" LFP series attributes:", {k: str(v) for k, v in lfp.attrs.items() if k != "object_id"})
print(" LFP series members:", list(lfp.keys()), "; data attributes:", {k: str(v) for k, v in lfp["data"].attrs.items()})
print(" general/:", list(f["general"].keys()), "; extracellular_ephys present:", "extracellular_ephys" in f["general"])
print(" analysis/, processing/, stimulus/ members:", list(f["analysis"].keys()), list(f["processing"].keys()),
list(f["stimulus"].keys()) if "stimulus" in f else None)
print(" units columns:", list(f["units"].attrs["colnames"]), "; units rows:", len(f["units/id"]))
print(" units 'segment' and 'block' values:", sorted(set(f["units/segment"][:].astype(str))),
sorted(set(f["units/block"][:].astype(str))))
control rest: LFP starting_time 0.0 s at 40000.0 Hz; potentials starting_time [0.0] s at [40000.0] Hz
LFP series attributes: {'comments': '{"block": "block0", "segment": "Segment 0"}', 'description': 'no description', 'namespace': 'core', 'neurodata_type': 'TimeSeries'}
LFP series members: ['data', 'starting_time'] ; data attributes: {'conversion': '1.0', 'offset': '0.0', 'resolution': '-1.0', 'unit': 'mV'}
general/: ['experiment_description', 'experimenter', 'institution', 'keywords', 'lab', 'related_publications', 'session_id', 'subject'] ; extracellular_ephys present: False
analysis/, processing/, stimulus/ members: [] [] ['presentation', 'templates']
units columns: ['_name', 'segment', 'block', 'spike_times', 'obs_intervals'] ; units rows: 10996
units 'segment' and 'block' values: [np.str_('Segment 0')] [np.str_('block0')]
parkinsonian rest: LFP starting_time 0.0 s at 40000.0 Hz; potentials starting_time [0.0] s at [40000.0] Hz
control activated: LFP starting_time 0.0 s at 40000.0 Hz; potentials starting_time [0.0] s at [40000.0] Hz
parkinsonian activated: LFP starting_time 0.0 s at 40000.0 Hz; potentials starting_time [0.0] s at [40000.0] Hz
The LFP and every potential series start at 0 s and are sampled at 40 kHz, so slicing at sample 2.0 s x 40 kHz takes W. "LFP 0" has no electrode, position or depth in any attribute, and the files have no extracellular electrodes table, so which of the 11 electrodes it is cannot be told (it is taken as electrode 0, reading E1, as before). The units table has only the name, segment, block, spike times and observation intervals of each unit, and no row for a cell that did not fire, so the silent cells cannot be listed from the files; R1 and the fig1 count rest on the gid blocks.
EXP = {} # expected values of each claim, from the claims file, as (value, tolerance)
def within(x, e):
return abs(x - e[0]) <= e[1] + 1e-9
def rate_rows(pop, conds):
"""Mean, sd and n of a population's rates in W under R1 (largest and smallest block), R2 and R3."""
rows = []
for c in conds:
r = m.rates(D[c], pop, BLOCKS)
rmin = m.rates(D[c], pop, BLOCKS, size="min")
for name, x in [("R1", r["R1"]), ("R1 (smallest block)", rmin["R1"]), ("R2", r["R1"][r["R2_mask"]]),
("R3", r["R1"][r["R3_mask"]])]:
mu, sd, n = m.summary(x)
rows.append({"file": c, "condition": m.CONDITIONS[c], "pop": pop, "reading": name,
"mean": mu, "sd": sd, "n": n})
return pd.DataFrame(rows)
def compare(pop, c1, c2):
"""p-values of T1 to T4 for rates of `pop` in files c1 and c2, under R1, R2 and R3. Cells are paired
by gid (same network in all four files of a set). Under R2 and R3 the unpaired tests use the cells
kept in each file, and the paired tests are run with two pairings: the cells kept in both files
(rows "R2", "R3"), and the cells kept in either, at 0 in the file where they are not kept (rows
"R2 union", "R3 union", whose unpaired tests are those of R2 and R3)."""
a, b = m.rates(D[c1], pop, BLOCKS), m.rates(D[c2], pop, BLOCKS)
out = []
for name, ka, kb in [("R1", np.ones(len(a["R1"]), bool), np.ones(len(b["R1"]), bool)),
("R2", a["R2_mask"], b["R2_mask"]), ("R3", a["R3_mask"], b["R3_mask"])]:
both = ka & kb
row = {"reading": name, "mean 1": a["R1"][ka].mean() if ka.any() else np.nan,
"mean 2": b["R1"][kb].mean() if kb.any() else np.nan, "n paired": int(both.sum())}
if both.sum() > 1:
p = m.tests(a["R1"][both], b["R1"][both])
row.update({k: p[k] for k in ["T1 Wilcoxon", "T2 paired t"]})
if ka.sum() > 1 and kb.sum() > 1:
p = m.tests(a["R1"][ka], b["R1"][kb], paired_ok=False)
row.update(p)
out.append(row)
if name != "R1":
either = ka | kb
urow = dict(row, reading=name + " union", **{"n paired": int(either.sum())})
if either.sum() > 1:
p = m.tests(a["R1"][either], b["R1"][either])
urow.update({k: p[k] for k in ["T1 Wilcoxon", "T2 paired t"]})
out.append(urow)
return pd.DataFrame(out)
def check_rates(cid, pop, conds, keys, stat=("mean", "sd")):
t = rate_rows(pop, conds)
print(t.round(3).to_string(index=False))
print()
for reading in ["R1", "R1 (smallest block)", "R2", "R3"]:
sub = t[t.reading == reading].set_index("file")
vals, ok = [], []
for (c, s), e in zip(keys, EXP[cid]):
v = sub.loc[c, s]
vals.append(round(float(v), 3))
ok.append(bool(within(v, e)) if np.isfinite(v) else False)
print(f"{reading:22s} values {vals} expected {[e[0] for e in EXP[cid]]} within tolerance {ok} all: {all(ok)}")
Claims¶
Rates are spikes in W (2.0 to 4.3 s) over 2.3 s. The claims file's rate readings are R1 (all cells of the population, silent ones at 0), R2 (cells with a spike in W) and R3 (cells with a spike in the 4.3 s simulation, those silent in W at 0). R3 was added to the claims file in answer to a question (questions/001444.yaml); since the files hold exactly the cells that fired, R3 is the cells the file holds. The paper does not say which cells enter a mean, so an outcome that holds only under R3 rests on that reading as an assumption. Test readings T1 to T4 are two-sided. Under R2 and R3 the paired tests are run with two pairings, since the claims file does not say which: the cells kept in both files, and the cells kept in either file with 0 where a cell is not kept ("union" rows). The first keeps every paired value inside the group whose mean is reported; the second adds, for each file, cells outside its group at 0 spikes/s. Where the two give different outcomes, the cells kept in both files are adopted, for that reason, and the outcome is marked as assumed.
fig1-network-size¶
The simulated M1 network is composed of 10,073 neurons of seven excitatory pyramidal cell types (IT, PT5B, CT) and two interneuron cell types (PV, SOM).
Criterion: count the units of the 15 M1 populations in each file of set sM1_12-12-2023; reproduced when the count is 10,073 in each.
counts = {m.CONDITIONS[c]: sum(1 for g, p in d["pop"].items() if p in m.M1_POPS) for c, d in D.items()}
print("M1 units per file:", counts, "; expected 10073 in each:", all(v == 10073 for v in counts.values()))
print("Variant, gid range: lowest input gid", min(g for d in D.values() for g in d["pop"] if g >= m.FIRST_INPUT_GID),
"so M1 gids are 0 to", m.FIRST_INPUT_GID - 1, "=", m.FIRST_INPUT_GID, "cells; sum of block sizes", int(bl.n_max.sum()))
print("Populations present:", [p for p in m.M1_POPS if p in tab.index], len([p for p in m.M1_POPS if p in tab.index]))
print("Stored M1 units with no spike in 0 to 4.3 s:",
{m.CONDITIONS[c]: sum(1 for g, t in d["trains"].items() if d["pop"][g] in m.M1_POPS and len(t) == 0) for c, d in D.items()},
"; M1 cells of the gid range without a row (10073 minus units):", {k: 10073 - v for k, v in counts.items()})
M1 units per file: {'control rest': 4480, 'parkinsonian rest': 3231, 'control activated': 2919, 'parkinsonian activated': 2917} ; expected 10073 in each: False
Variant, gid range: lowest input gid 10073 so M1 gids are 0 to 10072 = 10073 cells; sum of block sizes 10088
Populations present: ['IT2', 'SOM2', 'PV2', 'IT4', 'IT5A', 'SOM5A', 'PV5A', 'IT5B', 'PT5B', 'SOM5B', 'PV5B', 'IT6', 'CT6', 'SOM6', 'PV6'] 15
Stored M1 units with no spike in 0 to 4.3 s: {'control rest': 0, 'parkinsonian rest': 0, 'control activated': 0, 'parkinsonian activated': 0} ; M1 cells of the gid range without a row (10073 minus units): {'control rest': 5593, 'parkinsonian rest': 6842, 'control activated': 7154, 'parkinsonian activated': 7156}
Result: blocked (data_missing). The files of set sM1_12-12-2023 hold 4,480, 3,231, 2,919 and 2,917 M1 units, not 10,073, because only cells that fired are stored: no stored M1 unit is silent, and 5,593 to 7,156 of the gids 0 to 10072 have no row (printed above). The gids are consistent with the paper: the input generators start at gid 10073, all 15 M1 populations are present, and the gid blocks of the data check support 10,073 cells. The units table has no row or column for a cell that did not fire (data check), so the silent cells the criterion counts are not in the dataset, and the claim cannot be tested from these files. The data do not contradict the paper's 10,073. The outcome was not reproduced until the third verification round, which agreed with the change to blocked.
model-pt5b-excitability-decrease (blocked)¶
In the parkinsonian condition the PT5B neuron model was changed (BK and NaT conductances) so that its spike count across current injections fell by 64%, as in 6-OHDA mouse slices.
The dandiset holds only the 16 network simulations (data check); there are no single-cell current-injection simulations, so the claim is not tested.
print("Acquisition series in the files: LFP 0 and PT5B membrane potentials only;",
"files:", len(A), "; any asset outside the four sets:", [p for p in A if "ses-sM1" not in p])
Acquisition series in the files: LFP 0 and PT5B membrane potentials only; files: 17 ; any asset outside the four sets: ['sub-001/sub-001.nwb']
robustness-four-sets (blocked, measures reported)¶
The results hold across four sets of four simulations with different random seeds; set sM1_12-12-2023 is a typical example and the other three sets are analysed in Supplementary Table 2.
The claims file gives no measures or values for this claim (Supplementary Table 2 was not available), so it is blocked. As the criterion allows, the measures of the claims below are reported for each set, without an outcome.
rows = []
for s in m.SETS:
for c in m.CONDITIONS:
d = D[c] if s == m.PAPER_SET else OTHER[(s, c)]
pt = [t for g, t in d["trains"].items() if d["pop"][g] == "PT5B"]
r = np.array([np.count_nonzero((t >= 2.0) & (t < 4.3)) / 2.3 for t in pt])
cv = m.cv_isi([t[(t >= 2.0) & (t < 4.3)] for t in pt], 1)
_, cnt = m.sch(m.pop_spikes(d, "PT5B"))
x = d["lfp"][int(2.0 * m.FS):int(4.3 * m.FS)]
f1, t1, s1 = m.morlet_spec(x, m.FS)
rows.append({"set": s, "cond": m.CONDITIONS[c], "PT5B n": len(pt), "PT5B rate": r.mean(), "sd": r.std(ddof=1),
"CV mean": cv.mean(), "CV<=0.5 %": 100 * np.mean(cv <= 0.5),
"SCH peak Hz": m.welch_peak(cnt, 1 / m.SCH_BIN, 0)[0],
"LFP Morlet 14-16 Hz power": m.band_power(f1, s1, (14, 16)).mean()})
rob = pd.DataFrame(rows)
print(rob.round(4).to_string(index=False))
r15 = rob.pivot(index="set", columns="cond", values="LFP Morlet 14-16 Hz power")
print("\nParkinsonian over control 14-16 Hz LFP power at rest, per set:")
print((r15["parkinsonian rest"] / r15["control rest"]).round(1).to_string())
set cond PT5B n PT5B rate sd CV mean CV<=0.5 % SCH peak Hz LFP Morlet 14-16 Hz power sM1-12-12-2023 control rest 1435 11.6922 9.3972 0.5897 47.8261 19.0 0.0000 sM1-12-12-2023 parkinsonian rest 1435 14.2391 7.1306 0.3393 80.6190 15.0 0.0009 sM1-12-12-2023 control activated 1435 26.7590 18.1727 0.6102 25.6724 44.0 0.0000 sM1-12-12-2023 parkinsonian activated 1435 29.6770 12.6698 0.1837 93.8495 27.0 0.0000 sM1-04-22-2024 control rest 1435 11.3453 8.0417 0.6635 37.2932 18.0 0.0000 sM1-04-22-2024 parkinsonian rest 1435 19.1450 9.5004 0.3480 85.8177 15.0 0.0006 sM1-04-22-2024 control activated 1435 25.7249 18.3605 0.5914 30.4020 42.0 0.0000 sM1-04-22-2024 parkinsonian activated 1435 29.1447 11.7484 0.2076 92.0000 31.0 0.0000 sM1-04-25-2024 control rest 1435 12.4115 10.1786 0.5334 54.9194 17.0 0.0000 sM1-04-25-2024 parkinsonian rest 1435 22.7902 11.9330 0.2873 86.9408 16.0 0.0002 sM1-04-25-2024 control activated 1435 26.4148 18.2745 0.5737 35.5666 40.0 0.0000 sM1-04-25-2024 parkinsonian activated 1435 30.1136 12.5263 0.1995 92.2143 28.0 0.0000 sM1-04-26-2024 control rest 1435 13.4398 10.3409 0.4940 59.7922 19.0 0.0000 sM1-04-26-2024 parkinsonian rest 1435 24.6472 12.2008 0.2437 90.8567 16.0 0.0002 sM1-04-26-2024 control activated 1435 26.6296 18.3187 0.5954 32.0513 42.0 0.0000 sM1-04-26-2024 parkinsonian activated 1435 30.7481 12.4126 0.1821 93.6246 30.0 0.0000 Parkinsonian over control 14-16 Hz LFP power at rest, per set: set sM1-04-22-2024 65.5 sM1-04-25-2024 11.5 sM1-04-26-2024 7.0 sM1-12-12-2023 111.0
Dominant frequencies: fig2-control-rest-beta, fig2-control-activated-gamma, fig5-pd-rest-beta, fig5-pd-activated-gamma¶
fig2-control-rest-beta: In the control condition at rest, M1 activity is dominated by beta-band activity of about 20 Hz, particularly clear in the PT5B spike count histogram.
fig2-control-activated-gamma: In the control condition, the activated state shifts M1 activity to gamma-band activity of about 44 Hz.
fig5-pd-rest-beta: In the parkinsonian condition at rest, M1 activity shows focused beta-band activity at 15 Hz.
fig5-pd-activated-gamma: In the parkinsonian condition the activated state shifts M1 activity to gamma-band activity of about 43 Hz.
Criterion: the frequency of the largest peak of the Welch spectrum (1 s segments) in W of the PT5B SCH (2 ms bins), searched above 0 Hz and above 5 Hz; the LFP is a variant. The claims file's electrode readings are E1 (electrode 0) and E2 (mean of 11 electrodes); the files hold one trace, "LFP 0", taken here as E1, and E2 cannot be computed.
EXP_PEAK = {"01": (20, 2), "03": (44, 4.4), "02": (15, 1.5), "04": (43, 4.3)}
ID = {"01": "fig2-control-rest-beta", "03": "fig2-control-activated-gamma", "02": "fig5-pd-rest-beta", "04": "fig5-pd-activated-gamma"}
SPEC = {}
rows = []
for c, d in D.items():
_, cnt = m.sch(m.pop_spikes(d, "PT5B"))
x = d["lfp"][int(2.0 * m.FS):int(4.3 * m.FS)]
row = {"claim": ID[c], "condition": m.CONDITIONS[c], "expected": f"{EXP_PEAK[c][0]} +/- {EXP_PEAK[c][1]}"}
for lo in (0, 5):
pk, f, p = m.welch_peak(cnt, 1 / m.SCH_BIN, lo)
row[f"SCH peak >{lo} Hz"] = pk
row[f"SCH ok >{lo}"] = within(pk, EXP_PEAK[c])
SPEC[c] = (f, p)
pk2, f2, p2 = m.welch_peak(x, m.FS, lo)
row[f"LFP E1 peak >{lo} Hz (variant)"] = pk2
# the three largest local maxima of the SCH spectrum above 5 Hz, for context
f, p = SPEC[c]
sel = (f > 5) & (f <= 100)
fi, pi = f[sel], p[sel]
loc = [i for i in range(1, len(pi) - 1) if pi[i] > pi[i - 1] and pi[i] > pi[i + 1]]
top = sorted(loc, key=lambda i: -pi[i])[:3]
row["SCH top local maxima Hz (power ratio to largest)"] = [(float(fi[i]), round(float(pi[i] / pi[top[0]]), 2)) for i in top]
rows.append(row)
peaks = pd.DataFrame(rows)
print(peaks.to_string(index=False))
fig, ax = plt.subplots(1, 4, figsize=(14, 3))
for k, c in enumerate(D):
f, p = SPEC[c]
ax[k].semilogy(f[(f > 0) & (f <= 100)], p[(f > 0) & (f <= 100)])
ax[k].set_title(m.CONDITIONS[c]); ax[k].set_xlabel("Hz")
print(m.CONDITIONS[c], "plotted SCH power range", p[(f > 0) & (f <= 100)].min(), p[(f > 0) & (f <= 100)].max())
plt.tight_layout(); plt.show()
claim condition expected SCH peak >0 Hz SCH ok >0 LFP E1 peak >0 Hz (variant) SCH peak >5 Hz SCH ok >5 LFP E1 peak >5 Hz (variant) SCH top local maxima Hz (power ratio to largest)
fig2-control-rest-beta control rest 20 +/- 2 19.0 True 1.0 19.0 True 19.0 [(19.0, 1.0), (15.0, 0.28), (11.0, 0.12)]
fig5-pd-rest-beta parkinsonian rest 15 +/- 1.5 15.0 True 15.0 15.0 True 15.0 [(15.0, 1.0), (30.0, 0.03), (26.0, 0.01)]
fig2-control-activated-gamma control activated 44 +/- 4.4 44.0 True 1.0 44.0 True 13.0 [(44.0, 1.0), (39.0, 0.9), (49.0, 0.69)]
fig5-pd-activated-gamma parkinsonian activated 43 +/- 4.3 27.0 False 27.0 27.0 False 27.0 [(27.0, 1.0), (30.0, 0.43), (21.0, 0.39)]
control rest plotted SCH power range 0.009376147556782963 12.310310378088223
parkinsonian rest plotted SCH power range 0.016244611697052564 387.20441321957964
control activated plotted SCH power range 0.02859980546495509 3.916349862191525
parkinsonian activated plotted SCH power range 0.024814584462879086 9.545778285305857
Result: reproduced. The largest peak of the control rest PT5B SCH spectrum is at 19 Hz searched above 0 Hz and above 5 Hz, within 18 to 22 Hz. The LFP variant peaks at 1 Hz above 0 Hz and at 19 Hz above 5 Hz.
Result: reproduced. The control activated PT5B SCH spectrum peaks at 44 Hz under both search ranges, within 39.6 to 48.4 Hz. The LFP variant peaks at 1 Hz and 13 Hz.
Result: reproduced. The parkinsonian rest PT5B SCH spectrum peaks at 15 Hz under both search ranges, within 13.5 to 16.5 Hz; the LFP variant also peaks at 15 Hz.
Result: not reproduced. The parkinsonian activated PT5B SCH spectrum peaks at 27 Hz under both search ranges, outside 38.7 to 47.3 Hz; its next local maxima are at 30 and 21 Hz. The LFP variant also peaks at 27 Hz.
fig2c-control-pt5b-rate-activated¶
In the control condition PT5B neurons fire more in the activated state than at rest (11.7 +/- 9.4 against 26.8 +/- 18.2 spikes/s, p < 0.001).
Criterion: files -01 and -03, R1, R2 and R3; reproduced when under one rate reading all four values are within tolerance and the activated rates are higher with p < 0.001 under every test reading.
EXP["fig2c-control-pt5b-rate-activated"] = [(11.7, 1.17), (9.4, 0.94), (26.8, 2.68), (18.2, 1.82)]
check_rates("fig2c-control-pt5b-rate-activated", "PT5B", ['01', '03'], [('01', 'mean'), ('01', 'sd'), ('03', 'mean'), ('03', 'sd')])
cmpt = compare("PT5B", "01", "03")
print()
print(cmpt.to_string(index=False))
ps = cmpt.set_index("reading")[["T1 Wilcoxon", "T2 paired t", "T3 Mann-Whitney", "T4 Welch t"]]
print("\nAll four tests below p = 0.001, per reading:", (ps < 0.001).all(axis=1).to_dict())
file condition pop reading mean sd n
01 control rest PT5B R1 11.692 9.397 1435
01 control rest PT5B R1 (smallest block) 11.692 9.397 1435
01 control rest PT5B R2 12.606 9.148 1331
01 control rest PT5B R3 11.692 9.397 1435
03 control activated PT5B R1 26.759 18.173 1435
03 control activated PT5B R1 (smallest block) 26.759 18.173 1435
03 control activated PT5B R2 30.597 16.128 1255
03 control activated PT5B R3 26.759 18.173 1435
R1 values [11.692, 9.397, 26.759, 18.173] expected [11.7, 9.4, 26.8, 18.2] within tolerance [True, True, True, True] all: True
R1 (smallest block) values [11.692, 9.397, 26.759, 18.173] expected [11.7, 9.4, 26.8, 18.2] within tolerance [True, True, True, True] all: True
R2 values [12.606, 9.148, 30.597, 16.128] expected [11.7, 9.4, 26.8, 18.2] within tolerance [True, True, False, False] all: False
R3 values [11.692, 9.397, 26.759, 18.173] expected [11.7, 9.4, 26.8, 18.2] within tolerance [True, True, True, True] all: True
reading mean 1 mean 2 n paired T1 Wilcoxon T2 paired t T3 Mann-Whitney T4 Welch t
R1 11.692168 26.758976 1435 2.653077e-116 5.367850e-147 2.248819e-99 1.932554e-146
R2 12.605756 30.596917 1163 1.059205e-121 8.264591e-164 8.014171e-168 2.681193e-205
R2 union 12.605756 30.596917 1423 2.653077e-116 2.488838e-147 8.014171e-168 2.681193e-205
R3 11.692168 26.758976 1435 2.653077e-116 5.367850e-147 2.248819e-99 1.932554e-146
R3 union 11.692168 26.758976 1435 2.653077e-116 5.367850e-147 2.248819e-99 1.932554e-146
All four tests below p = 0.001, per reading: {'R1': True, 'R2': True, 'R2 union': True, 'R3': True, 'R3 union': True}
Result: reproduced. Under R1, PT5B rates are 11.69 +/- 9.40 spikes/s at rest and 26.76 +/- 18.17 activated, all four within tolerance, and all four tests give p below 1e-98. R3 is the same, every PT5B cell being in both files; R2 gives 30.60 +/- 16.13 activated, outside tolerance.
fig2c-control-it23-rate-activated¶
In the control condition IT2/3 neurons fire more in the activated state than at rest (1.2 +/- 1.6 against 6.7 +/- 8.9 spikes/s, p < 0.001).
Criterion: files -01 and -03, population IT2, R1, R2 and R3; as above, p < 0.001.
EXP["fig2c-control-it23-rate-activated"] = [(1.2, 0.12), (1.6, 0.16), (6.7, 0.67), (8.9, 0.89)]
check_rates("fig2c-control-it23-rate-activated", "IT2", ['01', '03'], [('01', 'mean'), ('01', 'sd'), ('03', 'mean'), ('03', 'sd')])
cmpt = compare("IT2", "01", "03")
print()
print(cmpt.to_string(index=False))
ps = cmpt.set_index("reading")[["T1 Wilcoxon", "T2 paired t", "T3 Mann-Whitney", "T4 Welch t"]]
print("\nAll four tests below p = 0.001, per reading:", (ps < 0.001).all(axis=1).to_dict())
file condition pop reading mean sd n
01 control rest IT2 R1 0.095 0.565 1730
01 control rest IT2 R1 (smallest block) 0.095 0.565 1729
01 control rest IT2 R2 1.555 1.723 106
01 control rest IT2 R3 1.203 1.649 137
03 control activated IT2 R1 0.262 2.172 1730
03 control activated IT2 R1 (smallest block) 0.262 2.173 1729
03 control activated IT2 R2 8.883 9.220 51
03 control activated IT2 R3 6.662 8.858 68
R1 values [0.095, 0.565, 0.262, 2.172] expected [1.2, 1.6, 6.7, 8.9] within tolerance [False, False, False, False] all: False
R1 (smallest block) values [0.095, 0.565, 0.262, 2.173] expected [1.2, 1.6, 6.7, 8.9] within tolerance [False, False, False, False] all: False
R2 values [1.555, 1.723, 8.883, 9.22] expected [1.2, 1.6, 6.7, 8.9] within tolerance [False, True, False, True] all: False
R3 values [1.203, 1.649, 6.662, 8.858] expected [1.2, 1.6, 6.7, 8.9] within tolerance [True, True, True, True] all: True
reading mean 1 mean 2 n paired T1 Wilcoxon T2 paired t T3 Mann-Whitney T4 Welch t
R1 0.095250 0.261875 1730 0.685435 0.001412 1.521689e-05 2.043308e-03
R2 1.554553 8.883205 12 0.016113 0.018481 3.306900e-11 7.489509e-07
R2 union 1.554553 8.883205 145 0.685435 0.001237 3.306900e-11 7.489509e-07
R3 1.202793 6.662404 25 0.016271 0.011411 3.467948e-05 3.562771e-06
R3 union 1.202793 6.662404 180 0.685435 0.001274 3.467948e-05 3.562771e-06
All four tests below p = 0.001, per reading: {'R1': False, 'R2': False, 'R2 union': False, 'R3': False, 'R3 union': False}
Result: partially reproduced (under R3, pairing the cells kept in both files). Under R3, IT2 rates are 1.203 +/- 1.649 spikes/s at rest and 6.662 +/- 8.858 activated, all four within tolerance, and the unpaired tests find the increase at p below 0.001 (Mann-Whitney 3.5e-05, Welch 3.6e-06). On the 25 cells kept in both files, the pairing adopted for pd-it6-rate-unchanged and fig5c-pd-it23-rate-activated, the paired tests find it at 0.016 (Wilcoxon) and 0.011 (paired t). So every test finds the increase, and two of four miss the criterion's p < 0.001. That is the pattern graded partially reproduced for activated-pt5b-rate-pd-vs-control, though weaker here: two tests miss the bound, not one, and the paired p-values come from 25 cells. On the 180 cells kept in either file, with 0 where a cell is absent, the paired tests give 0.69 (Wilcoxon) and 0.0013 (paired t), so the outcome rests on the pairing as well as on R3. The outcome was not reproduced until the third verification round, which agreed with the change. Under R1 (0.095 +/- 0.565 and 0.262 +/- 2.172) and R2 (1.555 +/- 1.723 and 8.883 +/- 9.220) the values are outside tolerance.
fig2c-control-it6-rate-activated¶
In the control condition IT6 neurons fire less in the activated state than at rest (5.8 +/- 5.8 against 3.5 +/- 5.2 spikes/s, p < 0.001).
Criterion: files -01 and -03, R1, R2 and R3; reproduced when under one reading all four values are within tolerance and the activated rates are lower with p < 0.001 under every test.
EXP["fig2c-control-it6-rate-activated"] = [(5.8, 0.58), (5.8, 0.58), (3.5, 0.35), (5.2, 0.52)]
check_rates("fig2c-control-it6-rate-activated", "IT6", ['01', '03'], [('01', 'mean'), ('01', 'sd'), ('03', 'mean'), ('03', 'sd')])
cmpt = compare("IT6", "01", "03")
print()
print(cmpt.to_string(index=False))
ps = cmpt.set_index("reading")[["T1 Wilcoxon", "T2 paired t", "T3 Mann-Whitney", "T4 Welch t"]]
print("\nAll four tests below p = 0.001, per reading:", (ps < 0.001).all(axis=1).to_dict())
file condition pop reading mean sd n
01 control rest IT6 R1 4.276 5.577 1244
01 control rest IT6 R1 (smallest block) 4.304 5.584 1236
01 control rest IT6 R2 6.273 5.754 848
01 control rest IT6 R3 5.820 5.775 914
03 control activated IT6 R1 0.952 3.126 1244
03 control activated IT6 R1 (smallest block) 0.958 3.136 1236
03 control activated IT6 R2 4.874 5.569 243
03 control activated IT6 R3 3.473 5.192 341
R1 values [4.276, 5.577, 0.952, 3.126] expected [5.8, 5.8, 3.5, 5.2] within tolerance [False, True, False, False] all: False
R1 (smallest block) values [4.304, 5.584, 0.958, 3.136] expected [5.8, 5.8, 3.5, 5.2] within tolerance [False, True, False, False] all: False
R2 values [6.273, 5.754, 4.874, 5.569] expected [5.8, 5.8, 3.5, 5.2] within tolerance [True, True, False, True] all: False
R3 values [5.82, 5.775, 3.473, 5.192] expected [5.8, 5.8, 3.5, 5.2] within tolerance [True, True, True, True] all: True
reading mean 1 mean 2 n paired T1 Wilcoxon T2 paired t T3 Mann-Whitney T4 Welch t
R1 4.276178 0.952048 1244 5.616273e-87 1.743140e-69 1.835687e-131 1.985172e-69
R2 6.273072 4.873859 181 2.961563e-08 6.238354e-07 3.219929e-06 6.725076e-04
R2 union 6.273072 4.873859 910 5.616273e-87 4.440329e-73 3.219929e-06 6.725076e-04
R3 5.820093 3.473161 291 1.106999e-19 1.155367e-18 4.556974e-21 1.165733e-11
R3 union 5.820093 3.473161 964 5.616273e-87 2.758934e-72 4.556974e-21 1.165733e-11
All four tests below p = 0.001, per reading: {'R1': True, 'R2': True, 'R2 union': True, 'R3': True, 'R3 union': True}
Result: reproduced. Under R3, IT6 rates are 5.82 +/- 5.78 at rest and 3.47 +/- 5.19 activated, all four within tolerance, and every test finds the decrease at p below 1e-10, under both pairings (largest 1.2e-11, Welch; the union pairing gives 5.6e-87 and 2.8e-72). The outcome rests on R3: under R1 (4.28 +/- 5.58 and 0.95 +/- 3.13) and R2 (6.27 +/- 5.75 and 4.87 +/- 5.57) some values are outside tolerance, though every test gives p below 0.001 under both.
control-it5-silenced-activated¶
In the control condition IT5A and IT5B neurons fire at about 3 spikes/s at rest (3.3 and 3.1 spikes/s) and stop firing (0 spikes/s) in the activated state.
Criterion: files -01 and -03, readings R1 and R3; R2 a variant where defined. Tolerance 0.05 spikes/s for the zero rates.
def it5(cid, rest, act, exp):
EXP[cid] = exp
t = pd.concat([rate_rows("IT5A", [rest, act]), rate_rows("IT5B", [rest, act])])
print(t.round(3).to_string(index=False))
for reading in ["R1", "R1 (smallest block)", "R2", "R3"]:
s = t[t.reading == reading].set_index(["pop", "file"])["mean"]
vals = [s[("IT5A", rest)], s[("IT5B", rest)], s[("IT5A", act)], s[("IT5B", act)]]
ok = [bool(within(v, e)) if np.isfinite(v) else False for v, e in zip(vals, exp)]
print(f"{reading:22s} values {np.round(vals, 3).tolist()} expected {[e[0] for e in exp]} within {ok} all: {all(ok)}")
for c in (act,):
for p in ("IT5A", "IT5B"):
n = sum(1 for g, q in D[c]["pop"].items() if q == p)
sp = sum(len(t) for g, t in D[c]["trains"].items() if D[c]["pop"][g] == p)
last = max((t[-1] for g, t in D[c]["trains"].items() if D[c]["pop"][g] == p), default=np.nan)
print(f"{m.CONDITIONS[c]}: {p} units in the file {n}, spikes in 0-4.3 s {sp}, last spike at {last:.3f} s")
it5("control-it5-silenced-activated", "01", "03", [(3.3, 0.33), (3.1, 0.31), (0, 0.05), (0, 0.05)])
file condition pop reading mean sd n 01 control rest IT5A R1 1.208 2.881 644 01 control rest IT5A R1 (smallest block) 1.210 2.883 643 01 control rest IT5A R2 3.568 4.017 218 01 control rest IT5A R3 3.255 3.967 239 03 control activated IT5A R1 0.000 0.000 644 03 control activated IT5A R1 (smallest block) 0.000 0.000 643 03 control activated IT5A R2 NaN NaN 0 03 control activated IT5A R3 0.000 NaN 1 01 control rest IT5B R1 1.749 3.296 1435 01 control rest IT5B R1 (smallest block) 1.749 3.296 1435 01 control rest IT5B R2 3.584 3.962 700 01 control rest IT5B R3 3.075 3.877 816 03 control activated IT5B R1 0.000 0.000 1435 03 control activated IT5B R1 (smallest block) 0.000 0.000 1435 03 control activated IT5B R2 NaN NaN 0 03 control activated IT5B R3 0.000 0.000 2 R1 values [1.208, 1.749, 0.0, 0.0] expected [3.3, 3.1, 0, 0] within [False, False, True, True] all: False R1 (smallest block) values [1.21, 1.749, 0.0, 0.0] expected [3.3, 3.1, 0, 0] within [False, False, True, True] all: False R2 values [3.568, 3.584, nan, nan] expected [3.3, 3.1, 0, 0] within [True, False, False, False] all: False R3 values [3.255, 3.075, 0.0, 0.0] expected [3.3, 3.1, 0, 0] within [True, True, True, True] all: True control activated: IT5A units in the file 1, spikes in 0-4.3 s 1, last spike at 0.041 s control activated: IT5B units in the file 2, spikes in 0-4.3 s 2, last spike at 0.040 s
Result: reproduced. Under R3 the rest rates are 3.25 (IT5A) and 3.08 spikes/s (IT5B), within tolerance of 3.3 and 3.1, and the activated rates are 0, since the one IT5A and two IT5B units of the activated file fired before 0.05 s and none in W. The outcome rests on R3: under R1 the zeros hold but the rest rates are 1.21 and 1.75, and under R2 3.57 and 3.58 with the activated means undefined.
control-it4-rate-activated¶
In the control condition the IT4 population rate rises from 2.6 spikes/s at rest to 4.7 spikes/s in the activated state.
Criterion: files -01 and -03, R1, R2 and R3; reproduced when under one reading both means are within tolerance. The paper reports no test.
EXP["control-it4-rate-activated"] = [(2.6, 0.26), (4.7, 0.47)]
check_rates("control-it4-rate-activated", "IT4", ['01', '03'], [('01', 'mean'), ('03', 'mean')])
file condition pop reading mean sd n 01 control rest IT4 R1 0.037 0.626 768 01 control rest IT4 R1 (smallest block) 0.037 0.626 767 01 control rest IT4 R2 3.140 5.157 9 01 control rest IT4 R3 2.569 4.784 11 03 control activated IT4 R1 0.586 3.612 768 03 control activated IT4 R1 (smallest block) 0.587 3.614 767 03 control activated IT4 R2 8.182 11.044 55 03 control activated IT4 R3 4.737 9.304 95 R1 values [0.037, 0.586] expected [2.6, 4.7] within tolerance [False, False] all: False R1 (smallest block) values [0.037, 0.587] expected [2.6, 4.7] within tolerance [False, False] all: False R2 values [3.14, 8.182] expected [2.6, 4.7] within tolerance [False, False] all: False R3 values [2.569, 4.737] expected [2.6, 4.7] within tolerance [True, True] all: True
Result: reproduced. Under R3 the IT4 rates are 2.57 (11 cells) at rest and 4.74 spikes/s (95 cells) activated, within tolerance of 2.6 and 4.7. The outcome rests on R3: R1 gives 0.037 and 0.586 and R2 3.14 and 8.18.
pt5b-highest-rate¶
PT5B neurons have the highest mean spike rate of any population in the control rest state and in both the parkinsonian rest and activated states.
Criterion: files -01, -02 and -04, mean rates in W of every M1 population, population readings (a) all 15 and (b) the seven excitatory types; reproduced when PT5B is highest in all three under one rate reading and both population readings; blocked as methods_underspecified when the population readings disagree.
rows = []
for c in ["01", "02", "04"]:
for pop in m.M1_POPS:
r = m.rates(D[c], pop, BLOCKS)
rows.append({"file": c, "pop": pop, "R1": r["R1"].mean(), "R2": r["R1"][r["R2_mask"]].mean() if r["R2_mask"].any() else np.nan,
"R3": r["R1"][r["R3_mask"]].mean() if r["R3_mask"].any() else np.nan})
hr = pd.DataFrame(rows)
for reading in ["R1", "R2", "R3"]:
piv = hr.pivot(index="pop", columns="file", values=reading).reindex(m.M1_POPS)
print(f"\n{reading} mean rates (spikes/s):")
print(piv.round(2).T.to_string())
for label, popset in [("(a) all 15", m.M1_POPS), ("(b) excitatory", m.EXCITATORY)]:
top = {m.CONDITIONS[c]: piv.loc[popset, c].idxmax() for c in piv.columns}
print(f" {label}: highest {top}; PT5B highest in all three: {all(v == 'PT5B' for v in top.values())}")
R1 mean rates (spikes/s):
pop IT2 SOM2 PV2 IT4 IT5A SOM5A PV5A IT5B PT5B SOM5B PV5B IT6 CT6 SOM6 PV6
file
01 0.10 6.79 0.28 0.04 1.21 0.0 22.51 1.75 11.69 0.0 16.66 4.28 0.06 8.01 0.34
02 0.02 7.30 0.45 0.04 0.47 0.0 22.79 0.47 14.24 0.0 17.37 1.33 0.01 6.77 0.01
04 0.16 12.22 2.58 0.50 0.00 0.0 42.10 0.00 29.68 0.0 36.16 1.73 0.00 10.16 1.02
(a) all 15: highest {'control rest': 'PV5A', 'parkinsonian rest': 'PV5A', 'parkinsonian activated': 'PV5A'}; PT5B highest in all three: False
(b) excitatory: highest {'control rest': 'PT5B', 'parkinsonian rest': 'PT5B', 'parkinsonian activated': 'PT5B'}; PT5B highest in all three: True
R2 mean rates (spikes/s):
pop IT2 SOM2 PV2 IT4 IT5A SOM5A PV5A IT5B PT5B SOM5B PV5B IT6 CT6 SOM6 PV6
file
01 1.55 11.34 6.44 3.14 3.57 NaN 45.02 3.58 12.61 NaN 32.24 6.27 1.65 15.37 9.01
02 1.16 13.24 11.52 14.13 2.57 NaN 47.24 2.19 14.70 NaN 36.08 6.79 1.74 12.75 1.30
04 6.16 35.28 39.00 5.46 NaN NaN 95.98 NaN 30.57 NaN 78.29 6.64 0.68 22.17 18.70
(a) all 15: highest {'control rest': 'PV5A', 'parkinsonian rest': 'PV5A', 'parkinsonian activated': 'PV5A'}; PT5B highest in all three: False
(b) excitatory: highest {'control rest': 'PT5B', 'parkinsonian rest': 'PT5B', 'parkinsonian activated': 'PT5B'}; PT5B highest in all three: True
R3 mean rates (spikes/s):
pop IT2 SOM2 PV2 IT4 IT5A SOM5A PV5A IT5B PT5B SOM5B PV5B IT6 CT6 SOM6 PV6
file
01 1.20 6.90 5.45 2.57 3.25 0.0 28.83 3.07 11.69 0.0 19.13 5.82 1.34 8.64 7.88
02 0.78 7.42 9.60 14.13 2.16 0.0 32.08 1.25 14.24 0.0 26.03 6.00 1.07 7.30 0.65
04 4.30 12.22 19.50 3.99 0.00 0.0 58.53 0.00 29.68 0.0 41.71 5.99 0.43 11.09 18.70
(a) all 15: highest {'control rest': 'PV5A', 'parkinsonian rest': 'PV5A', 'parkinsonian activated': 'PV5A'}; PT5B highest in all three: False
(b) excitatory: highest {'control rest': 'PT5B', 'parkinsonian rest': 'PT5B', 'parkinsonian activated': 'PT5B'}; PT5B highest in all three: True
Result: blocked (methods_underspecified), as the criterion directs when the population readings disagree. Among the seven excitatory types PT5B has the highest mean rate in all three files under R1, R2 and R3. Among all 15 populations PV5A is higher in all three under every reading (R1 22.51, 22.79 and 42.10 against PT5B 11.69, 14.24 and 29.68 spikes/s; R3 28.83, 32.08 and 58.53, PT5B the same as under R1), and PV5B too under R1 and R3.
control-cv-isi and pd-cv-isi¶
control-cv-isi: In the control condition PT5B interspike-interval CV is highly variable at rest (0.59 +/- 0.37; 47.8% regular with CV <= 0.5, 52.2% irregular) and mainly irregular in the activated state (0.61 +/- 0.30; 25.7% regular, 74.3% irregular).
pd-cv-isi: In the parkinsonian condition PT5B spiking is mainly regular at rest (CV 0.34 +/- 0.27; 80.6% with CV <= 0.5) and more regular in the activated state (CV 0.18 +/- 0.19; 93.8% regular).
Criterion: CV of each PT5B cell's ISIs; mean and standard deviation over cells, share with CV <= 0.5; readings window (a) W or (b) 0 to 4.3 s, cells (i) with at least two ISIs or (ii) at least one. The ISI-CV statistic of NetPyNE 1.0.5 (plotSpikeStats, cells with more than 10 spikes in the time range) is shown as a variant (iii).
EXP["control-cv-isi"] = [(0.59, 0.059), (0.37, 0.037), (47.8, 4.78), (0.61, 0.061), (0.30, 0.030), (25.7, 2.57)]
EXP["pd-cv-isi"] = [(0.34, 0.034), (0.27, 0.027), (80.6, 8.06), (0.18, 0.018), (0.19, 0.019), (93.8, 9.38)]
CV = {}
for cid, (rest, act) in {"control-cv-isi": ("01", "03"), "pd-cv-isi": ("02", "04")}.items():
print(cid)
for wname, w in [("(a) W", m.WINDOW), ("(b) 0-4.3 s", (0.0, 4.3))]:
for cname, k in [("(i) >=2 ISIs", 2), ("(ii) >=1 ISI", 1), ("(iii) >10 spikes, variant", 10)]:
vals = []
for c in (rest, act):
pt = [t[(t >= w[0]) & (t < w[1])] for g, t in D[c]["trains"].items() if D[c]["pop"][g] == "PT5B"]
cv = m.cv_isi(pt, k)
vals += [cv.mean(), cv.std(ddof=1), 100 * np.mean(cv <= 0.5)]
n = len(cv)
ok = [bool(within(v, e)) for v, e in zip(vals, EXP[cid])]
CV[(cid, wname, cname)] = vals
print(f" {wname:12s} {cname:26s} {np.round(vals, 3).tolist()} within {ok} all: {all(ok)} (n cells activated {n})")
print(" expected", [e[0] for e in EXP[cid]])
control-cv-isi
(a) W (i) >=2 ISIs [0.611, 0.354, 45.946, 0.618, 0.295, 24.69] within [True, True, True, True, True, True] all: True (n cells activated 1211)
(a) W (ii) >=1 ISI [0.59, 0.365, 47.826, 0.61, 0.301, 25.672] within [True, True, True, True, True, True] all: True (n cells activated 1227)
(a) W (iii) >10 spikes, variant [0.556, 0.339, 54.357, 0.606, 0.28, 24.358] within [True, True, False, True, True, True] all: False (n cells activated 1129)
(b) 0-4.3 s (i) >=2 ISIs [0.797, 0.48, 37.042, 0.818, 0.634, 17.143] within [False, False, False, False, False, False] all: False (n cells activated 1435)
(b) 0-4.3 s (ii) >=1 ISI [0.788, 0.485, 37.7, 0.818, 0.634, 17.143] within [False, False, False, False, False, False] all: False (n cells activated 1435)
(b) 0-4.3 s (iii) >10 spikes, variant [0.751, 0.459, 40.559, 0.82, 0.636, 17.241] within [False, False, False, False, False, False] all: False (n cells activated 1421) expected [0.59, 0.37, 47.8, 0.61, 0.3, 25.7] pd-cv-isi
(a) W (i) >=2 ISIs [0.343, 0.267, 80.402, 0.185, 0.191, 93.818] within [True, True, True, True, True, True] all: True (n cells activated 1375)
(a) W (ii) >=1 ISI [0.339, 0.267, 80.619, 0.184, 0.191, 93.849] within [True, True, True, True, True, True] all: True (n cells activated 1382) (a) W (iii) >10 spikes, variant [0.31, 0.229, 84.924, 0.173, 0.165, 95.182] within [True, False, True, True, False, True] all: False (n cells activated 1349)
(b) 0-4.3 s (i) >=2 ISIs [0.483, 0.389, 66.457, 0.298, 0.316, 89.617] within [False, False, False, False, False, True] all: False (n cells activated 1435)
(b) 0-4.3 s (ii) >=1 ISI [0.481, 0.39, 66.551, 0.298, 0.316, 89.617] within [False, False, False, False, False, True] all: False (n cells activated 1435)
(b) 0-4.3 s (iii) >10 spikes, variant [0.446, 0.352, 69.601, 0.279, 0.282, 90.889] within [False, False, False, False, False, True] all: False (n cells activated 1383) expected [0.34, 0.27, 80.6, 0.18, 0.19, 93.8]
Result: reproduced. In W with cells of at least one ISI, the PT5B CV is 0.590 +/- 0.365 with 47.8% at or below 0.5 at rest and 0.610 +/- 0.301 with 25.7% activated; with at least two ISIs, 0.611 +/- 0.354 (45.9%) and 0.618 +/- 0.295 (24.7%). All six values are within tolerance under both. Over the whole 4.3 s no value is within tolerance.
Result: reproduced. In W with cells of at least one ISI, the parkinsonian PT5B CV is 0.339 +/- 0.267 with 80.6% at or below 0.5 at rest and 0.184 +/- 0.191 with 93.8% activated; with at least two ISIs, 0.343 +/- 0.267 (80.4%) and 0.185 +/- 0.191 (93.8%). All six are within tolerance under both readings in W.
control-subthreshold-oscillations and pd-no-subthreshold-oscillations (blocked)¶
control-subthreshold-oscillations: In the control condition subthreshold membrane-potential oscillations appear in 57.4% of PT5B neurons in the activated state and not at rest.
pd-no-subthreshold-oscillations: No subthreshold membrane-potential oscillations are seen in PT5B neurons in the parkinsonian rest or activated states.
The claims file finds no detection rule in the paper or its code and blocks both claims as methods_underspecified; it asks for the number of PT5B cells with a recorded potential.
for c, d in D.items():
print(m.CONDITIONS[c], ": PT5B cells with a membrane potential", len(d["vm_gids"]), "of", BLOCKS["PT5B"][5])
print("57.4% of 20 cells would be", 0.574 * 20, "cells; of 1435,", round(0.574 * 1435, 1))
control rest : PT5B cells with a membrane potential 20 of 1435 parkinsonian rest : PT5B cells with a membrane potential 20 of 1435 control activated : PT5B cells with a membrane potential 20 of 1435 parkinsonian activated : PT5B cells with a membrane potential 20 of 1435 57.4% of 20 cells would be 11.479999999999999 cells; of 1435, 823.7
pd-activated-vm-more-negative¶
In the activated state, PT5B membrane potential is on average more negative in the parkinsonian than in the control condition, which the paper gives as the reason the EPSPs look larger.
Criterion: files -03 and -04, the PT5B cells recorded in both, in W; readings (a) the mean of each trace and (b) its median; reproduced when the mean over cells is lower in the parkinsonian file under both.
rows = []
a, b = int(2.0 * m.FS), int(4.3 * m.FS)
for g in D["03"]["vm_gids"]:
if g in D["04"]["vm"]:
v3, v4 = D["03"]["vm"][g][a:b], D["04"]["vm"][g][a:b]
rows.append({"gid": g, "ctrl mean": v3.mean(), "pd mean": v4.mean(), "ctrl median": np.median(v3), "pd median": np.median(v4),
"ctrl spikes": len(m.vm_spikes(v3)), "pd spikes": len(m.vm_spikes(v4))})
vm = pd.DataFrame(rows)
vm["diff mean"] = vm["pd mean"] - vm["ctrl mean"]
vm["diff median"] = vm["pd median"] - vm["ctrl median"]
print(vm.round(2).to_string(index=False))
from scipy import stats
# Variant: the first 40 PT5B traces of files -03 and -04 of the other three sets, whose potentials
# match their spikes (data check); not the paper's set.
var = []
for s_ in m.SETS[1:]:
v3 = m.load_vm_subset(s_, "03", 40, m.WINDOW)
v4 = m.load_vm_subset(s_, "04", 40, m.WINDOW)
g = [k for k in v3 if k in v4]
dmean = np.array([v4[k].mean() - v3[k].mean() for k in g])
dmed = np.array([np.median(v4[k]) - np.median(v3[k]) for k in g])
var.append({"set": s_, "cells": len(g), "mean diff mV": dmean.mean(), "lower (mean)": int((dmean < 0).sum()),
"median diff mV": dmed.mean(), "lower (median)": int((dmed < 0).sum())})
print("\nVariant, other sets:")
print(pd.DataFrame(var).round(2).to_string(index=False))
for k in ["mean", "median"]:
print(f"({'a' if k == 'mean' else 'b'}) {k}: control {vm['ctrl ' + k].mean():.2f} mV, parkinsonian {vm['pd ' + k].mean():.2f} mV, "
f"difference {vm['diff ' + k].mean():.2f} mV; cells lower in parkinsonian {(vm['diff ' + k] < 0).sum()} of {len(vm)}; "
f"Wilcoxon p = {stats.wilcoxon(vm['diff ' + k]).pvalue:.3g}")
gid ctrl mean pd mean ctrl median pd median ctrl spikes pd spikes diff mean diff median 5201 -62.30 -67.46 -66.40 -71.78 107 60 -5.17 -5.38 5202 -59.65 -66.36 -65.31 -71.78 142 86 -6.72 -6.48 5301 -62.66 -67.73 -65.95 -71.53 94 47 -5.06 -5.59 5302 -59.93 -66.10 -62.79 -72.54 86 96 -6.18 -9.75 5401 -58.29 -65.61 -61.52 -71.60 80 99 -7.33 -10.09 5402 -62.87 -67.70 -64.42 -69.99 58 10 -4.84 -5.57 5501 -57.36 -64.74 -61.10 -69.08 95 96 -7.38 -7.98 5502 -61.30 -67.44 -66.19 -71.88 121 65 -6.14 -5.69 5601 -58.61 -66.01 -61.26 -71.62 65 92 -7.40 -10.36 5602 -62.95 -67.74 -66.26 -72.38 92 67 -4.79 -6.12 5701 -63.40 -67.86 -67.25 -72.35 95 75 -4.46 -5.10 5702 -61.06 -65.14 -61.50 -70.53 3 91 -4.08 -9.03 5801 -57.45 -64.95 -61.00 -68.83 90 97 -7.50 -7.84 5802 -64.83 -66.33 -64.87 -69.72 0 50 -1.49 -4.85 6201 -60.26 -66.85 -65.41 -71.17 121 65 -6.59 -5.76 6202 -61.35 -64.95 -61.43 -69.17 0 74 -3.60 -7.74 6301 -57.97 -65.69 -60.52 -71.69 70 99 -7.71 -11.17 6302 -60.62 -66.40 -64.82 -71.69 107 83 -5.79 -6.86 6501 -63.78 -67.50 -65.37 -70.77 60 36 -3.72 -5.40 6502 -60.16 -66.71 -66.23 -72.06 153 95 -6.55 -5.83
Variant, other sets:
set cells mean diff mV lower (mean) median diff mV lower (median)
sM1-04-22-2024 40 -4.98 39 -7.19 40
sM1-04-25-2024 40 -5.09 39 -7.70 40
sM1-04-26-2024 40 -5.67 40 -7.56 40
(a) mean: control -60.84 mV, parkinsonian -66.46 mV, difference -5.62 mV; cells lower in parkinsonian 20 of 20; Wilcoxon p = 1.91e-06
(b) median: control -63.98 mV, parkinsonian -71.11 mV, difference -7.13 mV; cells lower in parkinsonian 20 of 20; Wilcoxon p = 1.91e-06
Result: reproduced. In W the mean PT5B potential over the 20 recorded cells is -60.84 mV in the control and -66.46 mV in the parkinsonian activated file (difference -5.62 mV), and the median -63.98 against -71.11 mV; every one of the 20 cells is lower in the parkinsonian file under both readings. The potentials of this set do not match its stored spikes in W (data check); in the other three sets, whose potentials do, the parkinsonian potential is lower in 39, 39 and 40 of 40 cells by the mean (by 4.98 to 5.67 mV) and in 40 of 40 by the median.
control-duty-cycle and pd-duty-cycle¶
control-duty-cycle: In the control condition the PT5B duty cycle, the share of each oscillation period with activity above half-height, is 31% at rest and 48% in the activated state.
pd-duty-cycle: In the parkinsonian condition the PT5B duty cycle is 29% at rest and 25% in the activated state.
Criterion: PT5B SCH, 2 ms bins, unsmoothed; periods from one rising crossing of half-height to the next; readings half-height (a) halfway between the minimum and maximum of the window or (b) of each period; window (i) 2.0 to 2.25 s or (ii) W; summary (x) mean of per-period duty cycles or (y) total time above over total time of complete periods. Reproduced when under one combination both values of a claim are within tolerance.
EXP["control-duty-cycle"] = [(31, 3.1), (48, 4.8)]
EXP["pd-duty-cycle"] = [(29, 2.9), (25, 2.5)]
DUTY = {}
for cid, (rest, act) in {"control-duty-cycle": ("01", "03"), "pd-duty-cycle": ("02", "04")}.items():
print(cid, "expected", [e[0] for e in EXP[cid]])
for hname, local in [("(a) window", False), ("(b) period", True)]:
for wname, w in [("(i) 2.0-2.25 s", (2.0, 2.25)), ("(ii) W", m.WINDOW)]:
res = [m.duty_cycles(m.sch(m.pop_spikes(D[c], "PT5B"), w)[1], local) for c in (rest, act)]
for sname, key in [("(x) mean", "mean"), ("(y) total", "total")]:
vals = [r[key] for r in res]
ok = [bool(within(v, e)) for v, e in zip(vals, EXP[cid])]
DUTY[(cid, hname, wname, sname)] = vals
print(f" {hname:11s} {wname:15s} {sname:10s} {np.round(vals, 2).tolist()} within {ok} both: {all(ok)}"
f" periods {[r['n_periods'] for r in res]}, median period ms {[r['median_period_ms'] for r in res]}")
control-duty-cycle expected [31, 48] (a) window (i) 2.0-2.25 s (x) mean [37.53, 44.99] within [False, True] both: False periods [7, 17], median period ms [34.0, 12.0] (a) window (i) 2.0-2.25 s (y) total [27.88, 46.49] within [False, True] both: False periods [7, 17], median period ms [34.0, 12.0] (a) window (ii) W (x) mean [40.57, 33.99] within [False, False] both: False periods [101, 194], median period ms [10.0, 10.0] (a) window (ii) W (y) total [24.09, 29.81] within [False, False] both: False periods [101, 194], median period ms [10.0, 10.0] (b) period (i) 2.0-2.25 s (x) mean [41.49, 42.56] within [False, False] both: False periods [7, 17], median period ms [34.0, 12.0] (b) period (i) 2.0-2.25 s (y) total [36.54, 40.35] within [False, False] both: False periods [7, 17], median period ms [34.0, 12.0] (b) period (ii) W (x) mean [45.5, 44.07] within [False, True] both: False periods [101, 194], median period ms [10.0, 10.0] (b) period (ii) W (y) total [39.61, 42.68] within [False, False] both: False periods [101, 194], median period ms [10.0, 10.0] pd-duty-cycle expected [29, 25] (a) window (i) 2.0-2.25 s (x) mean [48.53, 41.51] within [False, False] both: False periods [8, 16], median period ms [17.0, 12.0] (a) window (i) 2.0-2.25 s (y) total [26.42, 36.45] within [True, False] both: False periods [8, 16], median period ms [17.0, 12.0] (a) window (ii) W (x) mean [38.24, 42.65] within [False, False] both: False periods [63, 200], median period ms [48.0, 10.0] (a) window (ii) W (y) total [22.26, 39.13] within [False, False] both: False periods [63, 200], median period ms [48.0, 10.0] (b) period (i) 2.0-2.25 s (x) mean [42.27, 47.13] within [False, False] both: False periods [8, 16], median period ms [17.0, 12.0] (b) period (i) 2.0-2.25 s (y) total [34.91, 42.99] within [False, False] both: False periods [8, 16], median period ms [17.0, 12.0] (b) period (ii) W (x) mean [42.1, 45.69] within [False, False] both: False periods [63, 200], median period ms [48.0, 10.0] (b) period (ii) W (y) total [34.02, 44.9] within [False, False] both: False periods [63, 200], median period ms [48.0, 10.0]
Result: not reproduced. No combination of readings puts both control values within tolerance. The closest, global half-height in 2.0 to 2.25 s with the total summary, gives 27.88% at rest (tolerance 27.9 to 34.1) and 46.49% activated (within). Over W the unsmoothed 2 ms SCH crosses half-height every 10 ms (median period), far shorter than the beta and gamma periods.
Result: not reproduced. No combination puts both parkinsonian values within tolerance; global half-height in 2.0 to 2.25 s with the total summary gives 26.42% at rest (within 26.1 to 31.9) but 36.45% activated (tolerance 22.5 to 27.5), and every other combination gives 34% or more for the activated state.
LFP spectrograms: fig3a, fig3b, fig6a, fig6b¶
fig3a-control-rest-spectrogram: In the control rest state the LFP spectrogram shows virtually continuous power around 2 Hz and 15 to 25 Hz beta bursts recurring every 600 ms (1.7 Hz).
fig3b-control-activated-spectrogram: In the control activated state the 2 Hz activity disappears, 15 to 20 Hz power is no longer visible except 15 Hz bursts of about 100 to 500 ms at about 1.5 Hz, and brief (about 50 ms) 25 to 35 Hz bursts occur at about 1 Hz.
fig6a-pd-rest-spectrogram: In the parkinsonian rest state the LFP spectrogram shows continuous high-power 15 Hz beta with 25 to 35 Hz bursts of about 50 to 250 ms recurring about every 200 ms (about 5 Hz).
fig6b-pd-activated-spectrogram: In the parkinsonian activated state the LFP spectrogram shows 20 to 35 Hz bursts of about 25 to 100 ms recurring every 50 to 100 ms (about 10 to 20 Hz).
Readings S1 (NetPyNE 1.0.5 Morlet spectrogram, its defaults) and S2 (short-time Fourier transform), on "LFP 0" (E1; E2 cannot be computed). NetPyNE's own fft option with its defaults (256 samples at 40 kHz) has a frequency step of 156 Hz, printed below, so S2 uses a 250 ms Hann window with 90% overlap (4 Hz steps), a standard choice. That window has no bin between 1 and 3 Hz, so the 2 Hz test of S2 is also run with 1 s and 2 s windows. Burst rates are bursts per 2.3 s, the length of W. Bursts are epochs where the band's power is above halfway between its minimum and maximum in W (claims file). "Power around 2 Hz" is a local maximum of the time-averaged spectrum within 1 to 3 Hz.
import scipy.signal as sps
f_default = sps.spectrogram(np.zeros(92000), fs=m.FS, nperseg=256, noverlap=128, nfft=256)[0]
print("NetPyNE fft defaults: frequency step", f_default[1], "Hz; bins below 100 Hz:", f_default[f_default < 100].tolist())
TF = {}
for c, d in D.items():
x = d["lfp"][int(2.0 * m.FS):int(4.3 * m.FS)]
f1, t1, s1 = m.morlet_spec(x, m.FS)
f2, t2, s2 = m.stft_spec(x, m.FS)
TF[(c, "S1")] = (f1, t1, s1, 1 / m.FS)
TF[(c, "S2")] = (f2, t2, s2, t2[1] - t2[0])
def low_max(f, S):
"""Frequencies in 1 to 3 Hz where the time-averaged spectrum has a local maximum."""
tm = S.mean(axis=1)
return [float(f[i]) for i in range(1, len(f) - 1) if tm[i] > tm[i - 1] and tm[i] > tm[i + 1] and 1 <= f[i] <= 3]
# A 250 ms window has 4 Hz steps and no bin between 1 and 3 Hz, so for the 2 Hz test S2 is also run
# with 1 s (1 Hz steps, 14 frames) and 2 s windows (0.5 Hz steps, 2 frames); bursts use 250 ms.
LOWMAX = {}
for c, d in D.items():
x = d["lfp"][int(2.0 * m.FS):int(4.3 * m.FS)]
for w in (1.0, 2.0):
fw, tw, sw = m.stft_spec(x, m.FS, win_s=w)
LOWMAX[(c, w)] = (low_max(fw, sw), len(tw))
def spec_row(c, s, bands):
f, t, S, dt = TF[(c, s)]
row = {"file": m.CONDITIONS[c], "reading": s, "local max 1-3 Hz": low_max(f, S),
"mean 15-20 Hz power": m.band_power(f, S, (15, 20)).mean()}
if s == "S2":
row["local max 1-3 Hz, 1 s / 2 s windows"] = (LOWMAX[(c, 1.0)][0], LOWMAX[(c, 2.0)][0])
for band in bands:
b = m.band_bursts(t, m.band_power(f, S, band), dt, span=m.WINDOW[1] - m.WINDOW[0])
row[f"{band} n"] = b["n"]
row[f"{band} rate Hz"] = round(b["rate"], 2)
row[f"{band} median ms"] = round(b["median_ms"], 1)
row[f"{band} min-max ms"] = (round(b["durations"].min() * 1e3), round(b["durations"].max() * 1e3)) if b["n"] else None
row[f"{band} frac above"] = round(b["frac_above"], 2)
return row
fig, ax = plt.subplots(1, 4, figsize=(16, 3))
for k, c in enumerate(D):
f, t, S, dt = TF[(c, "S1")]
ax[k].imshow(S[:, ::400], aspect="auto", origin="lower", extent=[2.0, 4.3, f[0], f[-1]], cmap="jet")
ax[k].set_title(m.CONDITIONS[c] + " (S1)"); ax[k].set_xlabel("s"); ax[k].set_ylabel("Hz")
print(m.CONDITIONS[c], "S1 plotted power range", S.min(), S.max())
plt.tight_layout(); plt.show()
NetPyNE fft defaults: frequency step 156.25 Hz; bins below 100 Hz: [0.0]
control rest S1 plotted power range 1.5499717961097598e-13 7.103104031596163e-05 parkinsonian rest S1 plotted power range 3.85716268900455e-12 0.0015064329252595938 control activated S1 plotted power range 7.278238690010815e-14 0.00011990437400532284 parkinsonian activated S1 plotted power range 3.786339406283898e-13 0.00021896484578175237
fig3a-control-rest-spectrogram¶
Reproduced when the 2 Hz peak is present and the 15 to 25 Hz burst rate is within 1.7 +/- 0.17 Hz under every reading.
t3a = pd.DataFrame([spec_row("01", s, [(15, 25)]) for s in ("S1", "S2")])
print(t3a.to_string(index=False))
for _, r in t3a.iterrows():
print(r["reading"], "2 Hz peak present:", len(r["local max 1-3 Hz"]) > 0, "; burst rate within 1.53-1.87:", within(r["(15, 25) rate Hz"], (1.7, 0.17)))
print("S2 2 Hz peak present with 1 s and 2 s windows:", [len(LOWMAX[("01", w)][0]) > 0 for w in (1.0, 2.0)])
file reading local max 1-3 Hz mean 15-20 Hz power (15, 25) n (15, 25) rate Hz (15, 25) median ms (15, 25) min-max ms (15, 25) frac above local max 1-3 Hz, 1 s / 2 s windows control rest S1 [] 0.000014 3 1.30 122.6 (67, 151) 0.15 NaN control rest S2 [] 0.000001 2 0.87 150.0 (125, 175) 0.14 ([1.0], [2.0]) S1 2 Hz peak present: False ; burst rate within 1.53-1.87: False S2 2 Hz peak present: False ; burst rate within 1.53-1.87: False S2 2 Hz peak present with 1 s and 2 s windows: [True, True]
Result: not reproduced. Under S1 the time-averaged power has no local maximum within 1 to 3 Hz (it decreases from 1 Hz), and the 15 to 25 Hz burst rate is 1.30 Hz under S1 and 0.87 Hz under S2, outside 1.53 to 1.87 Hz. S2 with its 250 ms window has no bin between 1 and 3 Hz and so no maximum there; with 1 s and 2 s windows S2 has one (at 1 and 2 Hz), so the 2 Hz part holds under S2 with a long window. The outcome is the same under every reading, since S1 fails both parts and the burst rate fails under both.
fig3b-control-activated-spectrogram¶
Reproduced when, under every reading, the activated spectrum has no local maximum within 1 to 3 Hz, mean 15 to 20 Hz power is lower than at rest, the 14 to 16 Hz burst rate is 1.5 +/- 0.15 Hz, the 25 to 35 Hz burst rate 1.0 +/- 0.1 Hz, its median duration 50 +/- 5 ms, and the 14 to 16 Hz burst durations fall within 90 to 550 ms.
t3b = pd.DataFrame([spec_row("03", s, [(14, 16), (25, 35)]) for s in ("S1", "S2")])
print(t3b.to_string(index=False))
for _, r in t3b.iterrows():
s = r["reading"]
rest15 = spec_row("01", s, [])["mean 15-20 Hz power"]
f, t, S, dt = TF[("03", s)]
d15 = m.band_bursts(t, m.band_power(f, S, (14, 16)), dt, span=2.3)["durations"] * 1e3
parts = {"no 1-3 Hz max": len(r["local max 1-3 Hz"]) == 0, "15-20 Hz lower than rest": r["mean 15-20 Hz power"] < rest15,
"15 Hz burst rate": within(r["(14, 16) rate Hz"], (1.5, 0.15)), "25-35 Hz burst rate": within(r["(25, 35) rate Hz"], (1.0, 0.1)),
"25-35 Hz median duration": within(r["(25, 35) median ms"], (50, 5)),
"15 Hz durations in 90-550 ms": bool(np.all((d15 >= 90) & (d15 <= 550)))}
print(s, f"15-20 Hz power activated/rest = {r['mean 15-20 Hz power'] / rest15:.2f};", parts)
print("S2 no 1-3 Hz maximum with 1 s and 2 s windows:", [len(LOWMAX[("03", w)][0]) == 0 for w in (1.0, 2.0)])
file reading local max 1-3 Hz mean 15-20 Hz power (14, 16) n (14, 16) rate Hz (14, 16) median ms (14, 16) min-max ms (14, 16) frac above (25, 35) n (25, 35) rate Hz (25, 35) median ms (25, 35) min-max ms (25, 35) frac above local max 1-3 Hz, 1 s / 2 s windows
control activated S1 [] 5.706032e-06 3 1.30 332.2 (155, 557) 0.45 3 1.30 66.9 (25, 87) 0.08 NaN
control activated S2 [] 7.758106e-07 6 2.61 125.0 (50, 300) 0.39 2 0.87 100.0 (100, 100) 0.10 ([1.0], [])
S1 15-20 Hz power activated/rest = 0.42; {'no 1-3 Hz max': True, '15-20 Hz lower than rest': np.True_, '15 Hz burst rate': False, '25-35 Hz burst rate': False, '25-35 Hz median duration': False, '15 Hz durations in 90-550 ms': False}
S2 15-20 Hz power activated/rest = 0.57; {'no 1-3 Hz max': True, '15-20 Hz lower than rest': np.True_, '15 Hz burst rate': False, '25-35 Hz burst rate': False, '25-35 Hz median duration': False, '15 Hz durations in 90-550 ms': False}
S2 no 1-3 Hz maximum with 1 s and 2 s windows: [False, True]
Result: not reproduced. Two parts hold under both readings with their burst windows: no 1 to 3 Hz maximum, and 15 to 20 Hz power lower than at rest (ratio 0.42 under S1, 0.57 under S2). With a 1 s window S2 has a maximum at 1 Hz, and with a 2 s window none. The 14 to 16 Hz burst rate is 1.30 Hz (S1) and 2.61 Hz (S2) against 1.5 +/- 0.15, the 25 to 35 Hz burst rate 1.30 and 0.87 Hz against 1.0 +/- 0.1, its median duration 66.9 and 100 ms against 50 +/- 5, and the 14 to 16 Hz bursts last 155 to 557 ms under S1 and 50 to 300 ms under S2, each outside 90 to 550 ms at one end. Burst rates are bursts per 2.3 s under both readings.
fig6a-pd-rest-spectrogram¶
Reproduced when the 25 to 35 Hz burst rate is 5.0 +/- 0.5 Hz and the burst durations fall within 45 to 275 ms under every reading; the share of time the 14 to 16 Hz power is above half-height is reported.
t6a = pd.DataFrame([spec_row("02", s, [(25, 35), (14, 16)]) for s in ("S1", "S2")])
print(t6a.to_string(index=False))
for _, r in t6a.iterrows():
s = r["reading"]
f, t, S, dt = TF[("02", s)]
d = m.band_bursts(t, m.band_power(f, S, (25, 35)), dt, span=2.3)["durations"] * 1e3
print(s, "rate within 4.5-5.5:", within(r["(25, 35) rate Hz"], (5.0, 0.5)), "; durations in 45-275 ms:", bool(np.all((d >= 45) & (d <= 275))),
"; 14-16 Hz above half-height for", r["(14, 16) frac above"])
file reading local max 1-3 Hz mean 15-20 Hz power (25, 35) n (25, 35) rate Hz (25, 35) median ms (25, 35) min-max ms (25, 35) frac above (14, 16) n (14, 16) rate Hz (14, 16) median ms (14, 16) min-max ms (14, 16) frac above local max 1-3 Hz, 1 s / 2 s windows parkinsonian rest S1 [2.0] 0.000483 4 1.74 83.6 (42, 160) 0.16 3 1.30 678.2 (311, 913) 0.83 NaN parkinsonian rest S2 [] 0.000049 3 1.30 75.0 (50, 425) 0.27 5 2.17 100.0 (75, 325) 0.36 ([1.0], [2.0]) S1 rate within 4.5-5.5: False ; durations in 45-275 ms: False ; 14-16 Hz above half-height for 0.83 S2 rate within 4.5-5.5: False ; durations in 45-275 ms: False ; 14-16 Hz above half-height for 0.36
Result: not reproduced. The 25 to 35 Hz burst rate is 1.74 Hz (S1) and 1.30 Hz (S2), against 4.5 to 5.5 Hz, and burst durations reach outside 45 to 275 ms (42 ms under S1, 425 ms under S2). The 14 to 16 Hz power is above its half-height 83% of the time under S1 and 36% under S2.
fig6b-pd-activated-spectrogram¶
Reproduced when, under every reading, the 20 to 35 Hz burst rate is within 9 to 22 Hz and the median burst duration within 22.5 to 110 ms.
t6b = pd.DataFrame([spec_row("04", s, [(20, 35)]) for s in ("S1", "S2")])
print(t6b.to_string(index=False))
for _, r in t6b.iterrows():
print(r["reading"], "rate in 9-22 Hz:", 9 <= r["(20, 35) rate Hz"] <= 22, "; median in 22.5-110 ms:", 22.5 <= r["(20, 35) median ms"] <= 110)
file reading local max 1-3 Hz mean 15-20 Hz power (20, 35) n (20, 35) rate Hz (20, 35) median ms (20, 35) min-max ms (20, 35) frac above local max 1-3 Hz, 1 s / 2 s windows parkinsonian activated S1 [2.0] 0.000008 6 2.61 65.1 (56, 193) 0.23 NaN parkinsonian activated S2 [] 0.000001 6 2.61 75.0 (50, 225) 0.28 ([1.0], [2.0, 3.0]) S1 rate in 9-22 Hz: False ; median in 22.5-110 ms: True S2 rate in 9-22 Hz: False ; median in 22.5-110 ms: True
Result: not reproduced. The 20 to 35 Hz burst rate is 2.61 Hz under both S1 and S2, outside 9 to 22 Hz; the median burst duration, 65.1 and 75 ms, is within 22.5 to 110 ms.
control-coincident-spikes and pd-coincident-spikes¶
control-coincident-spikes: In the control condition 1% of PT5B spikes are coincident with another PT5B spike within 1 ms at rest, and 3% in the activated state.
pd-coincident-spikes: In the parkinsonian condition 2% of PT5B spikes are coincident (2 or more spikes in 1 ms) at rest and 3% in the activated state.
Readings (a) a spike of another PT5B cell within 1 ms either side or (b) in the same 1 ms bin; windows (i) W, (ii) 0.3 to 4.3 s, (iii) 0 to 4.0 s. Reproduced when under one combination both values are within tolerance. As a variant, not a reading of the claims file, the same share among the 20 PT5B cells whose potentials are recorded.
EXP["control-coincident-spikes"] = [(1, 0.1), (3, 0.3)]
EXP["pd-coincident-spikes"] = [(2, 0.2), (3, 0.3)]
COINC = {}
for cid, (rest, act) in {"control-coincident-spikes": ("01", "03"), "pd-coincident-spikes": ("02", "04")}.items():
print(cid, "expected", [e[0] for e in EXP[cid]])
for rd in "ab":
for wn, w in [("(i) W", m.WINDOW), ("(ii) 0.3-4.3 s", (0.3, 4.3)), ("(iii) 0-4.0 s", (0.0, 4.0))]:
res = [m.coincident_fraction(D[c], "PT5B", w, rd) for c in (rest, act)]
vals = [r[0] for r in res]
COINC[(cid, rd, wn)] = vals
print(f" ({rd}) {wn:15s} {np.round(vals, 3).tolist()} % spikes {[r[1] for r in res]} within {[bool(within(v, e)) for v, e in zip(vals, EXP[cid])]}")
for c in (rest, act):
sub = dict(D[c]); sub["pop"] = {g: ("SUB" if g in D[c]["vm_gids"] else p) for g, p in D[c]["pop"].items()}
print(f" variant, the 20 recorded cells, {m.CONDITIONS[c]}: (a) W {m.coincident_fraction(sub, 'SUB', m.WINDOW, 'a')[0]:.2f}%, "
f"(b) W {m.coincident_fraction(sub, 'SUB', m.WINDOW, 'b')[0]:.2f}%")
rate_ms = {m.CONDITIONS[c]: round(len(m.pop_spikes(D[c], 'PT5B')) / 4300, 1) for c in D}
print("PT5B spikes per ms over the whole population:", rate_ms)
control-coincident-spikes expected [1, 3]
(a) (i) W [100.0, 100.0] % spikes [38590, 88318] within [False, False]
(a) (ii) 0.3-4.3 s [100.0, 100.0] % spikes [66392, 166294] within [False, False]
(a) (iii) 0-4.0 s [99.996, 99.999] % spikes [69061, 170646] within [False, False] (b) (i) W [100.0, 100.0] % spikes [38590, 88318] within [False, False] (b) (ii) 0.3-4.3 s [100.0, 100.0] % spikes [66392, 166294] within [False, False] (b) (iii) 0-4.0 s [99.993, 99.995] % spikes [69061, 170646] within [False, False] variant, the 20 recorded cells, control rest: (a) W 40.86%, (b) W 24.83% variant, the 20 recorded cells, control activated: (a) W 72.75%, (b) W 48.62% pd-coincident-spikes expected [2, 3]
(a) (i) W [100.0, 100.0] % spikes [46996, 97949] within [False, False]
(a) (ii) 0.3-4.3 s [99.999, 100.0] % spikes [79862, 171332] within [False, False]
(a) (iii) 0-4.0 s [99.99, 99.999] % spikes [80297, 169770] within [False, False] (b) (i) W [99.953, 100.0] % spikes [46996, 97949] within [False, False] (b) (ii) 0.3-4.3 s [99.961, 100.0] % spikes [79862, 171332] within [False, False] (b) (iii) 0-4.0 s [99.954, 99.996] % spikes [80297, 169770] within [False, False] variant, the 20 recorded cells, parkinsonian rest: (a) W 50.07%, (b) W 26.97%
variant, the 20 recorded cells, parkinsonian activated: (a) W 72.20%, (b) W 48.11%
PT5B spikes per ms over the whole population: {'control rest': 17.0, 'parkinsonian rest': 19.9, 'control activated': 42.3, 'parkinsonian activated': 42.5}
Result: not reproduced. Under every reading 99.99% to 100% of control PT5B spikes have a spike of another PT5B cell within 1 ms, against 1% and 3%: the 1,435 PT5B cells fire 17 to 42 spikes per ms together. Among only the 20 recorded cells the share is still 24.8% to 72.8%. The paper's 1% to 3% cannot come from all PT5B cells with this definition; whether the claims file reads the paper's measure correctly is asked of a reader (questions/001444.yaml).
Result: not reproduced. Under every reading 99.95% to 100% of parkinsonian PT5B spikes are coincident, against 2% and 3%; among the 20 recorded cells, 27.0% to 72.2%. The reading is asked of a reader, as for the control files.
Unitary events: fig4-control-unitary-events, fig7-pd-unitary-events, rest-synchrony-increase¶
fig4-control-unitary-events: In the control condition, PT5B coincident firing above that expected from rate-matched Poisson processes occurs at rest in 100 to 275 ms clusters with 15 to 24 Hz periodicity (mean 19 Hz), totalling 0.7 of 4.0 s (17.5%), and in the activated state in more frequent 125 to 250 ms clusters totalling 1.1 of 4.0 s (27.5%).
fig7-pd-unitary-events: In the parkinsonian condition, significant PT5B coincident firing occurs at rest in 400 to 1100 ms clusters of 6 to 16 periods at 14 to 15 Hz (mean 15 Hz), totalling 3.1 of 4.0 s (77.5%), and in the activated state in 100 to 350 ms epochs totalling 1.4 of 4.0 s (35.0%).
rest-synchrony-increase: At rest, PT5B spike synchrony is substantially larger in the parkinsonian than in the control condition (significant synchrony 3.1 against 0.7 of 4.0 s).
Method of the claims file: coincidences are 2 or more PT5B spikes within 1 ms; expected count from Poisson cells at their rates in the 100 ms window; a window is significant when the joint-surprise p < 0.05; significant periods are the union of significant windows. Readings: windows (a) slid in 1 ms steps or (b) non-overlapping; span (i) 0.3 to 4.3 s or (ii) 0 to 4.0 s; periodicity (x) SCH spectral peak or (y) inverse mean interval between SCH peaks.
The claims file does not say how a window's coincidences are counted, and the paper says only that
it found "synchronous spikes significantly above the expected number of synchronous spikes for the
neuron population size and firing rates" (Methods, Identifying synchronous spiking). Four counts
are run (helper, unitary_events): (1) bins, the number of 1 ms bins where 2 or more PT5B cells
fire, with a Poisson joint-surprise test; (2) spikes, the spikes in such bins; (3) pairs, the
number of pairs of cells firing in the same bin (Grun's coincidence count summed over all pairs of
PT5B cells), against independent cells at the window's rates; (4) the same pair count against a
null that keeps each cell's number of active bins in the window and places them at random. Counts
(3) and (4) take the normal tail with the exact mean and variance of their null. The chance level
of each is measured first, on independent Poisson cells.
# Chance level and sensitivity of the four counts on synthetic spike trains (seeded): (1) 1,435
# independent Poisson cells at 15 and 30 spikes/s, the PT5B population at rest and activated, so
# every significant window is a false positive; (2) 100 cells at 10 spikes/s with 20 pair
# coincidences added in 1.0 to 1.1 s; (3) 20 cells at 2 spikes/s all firing together 11 times.
rng_ue = np.random.default_rng(1444)
COUNTS = ["bins", "spikes", "pairs (rate null)", "pairs (count null)"]
def poisson_pop(n, rate, span=(0.3, 4.3)):
return {"trains": {g: np.sort(rng_ue.uniform(*span, rng_ue.poisson(rate * (span[1] - span[0])))) for g in range(n)},
"pop": {g: "X" for g in range(n)}}
rows = []
for rate in (15, 30):
null = poisson_pop(1435, rate)
for cnt in COUNTS:
for sname, step in [("(a) 1 ms steps", 0.001), ("(b) non-overlapping", 0.1)]:
u = m.unitary_events(null, "X", (0.3, 4.3), step, count=cnt)
rows.append({"case": f"null, 1435 cells at {rate}/s", "count": cnt, "windows": sname,
"significant windows": f"{u['n_sig_windows']}/{u['n_windows']}", "significant s": round(u["total_s"], 3)})
inj = poisson_pop(100, 10)
for e in rng_ue.uniform(1.0, 1.1, 20):
a_, b_ = rng_ue.choice(100, 2, replace=False)
inj["trains"][a_] = np.sort(np.r_[inj["trains"][a_], e]); inj["trains"][b_] = np.sort(np.r_[inj["trains"][b_], e + 0.0002])
syn = poisson_pop(20, 2)
ev = rng_ue.uniform(0.5, 4.2, 11)
for g in syn["trains"]:
syn["trains"][g] = np.sort(np.r_[syn["trains"][g], ev])
for name, d_, truth in [("100 cells, 20 pairs added in 1.0-1.1 s", inj, "window 1.0-1.1 s"),
("20 cells firing together 11 times", syn, f"{len(set(np.floor((ev - 0.3) / 0.1).astype(int)))} windows hold an event")]:
for cnt in COUNTS:
u = m.unitary_events(d_, "X", (0.3, 4.3), 0.1, count=cnt)
rows.append({"case": name, "count": cnt, "windows": "(b) non-overlapping",
"significant windows": f"{u['n_sig_windows']}/{u['n_windows']}",
"significant s": round(u["total_s"], 3), "where": [round(0.3 + 0.1 * j, 1) for j in range(40) if u["sig"][j * 100]], "truth": truth})
print(pd.DataFrame(rows).to_string(index=False))
case count windows significant windows significant s where truth
null, 1435 cells at 15/s bins (a) 1 ms steps 0/3901 0.000 NaN NaN
null, 1435 cells at 15/s bins (b) non-overlapping 0/40 0.000 NaN NaN
null, 1435 cells at 15/s spikes (a) 1 ms steps 0/3901 0.000 NaN NaN
null, 1435 cells at 15/s spikes (b) non-overlapping 0/40 0.000 NaN NaN
null, 1435 cells at 15/s pairs (rate null) (a) 1 ms steps 0/3901 0.000 NaN NaN
null, 1435 cells at 15/s pairs (rate null) (b) non-overlapping 0/40 0.000 NaN NaN
null, 1435 cells at 15/s pairs (count null) (a) 1 ms steps 127/3901 0.638 NaN NaN
null, 1435 cells at 15/s pairs (count null) (b) non-overlapping 1/40 0.100 NaN NaN
null, 1435 cells at 30/s bins (a) 1 ms steps 0/3901 0.000 NaN NaN
null, 1435 cells at 30/s bins (b) non-overlapping 0/40 0.000 NaN NaN
null, 1435 cells at 30/s spikes (a) 1 ms steps 0/3901 0.000 NaN NaN
null, 1435 cells at 30/s spikes (b) non-overlapping 0/40 0.000 NaN NaN
null, 1435 cells at 30/s pairs (rate null) (a) 1 ms steps 0/3901 0.000 NaN NaN
null, 1435 cells at 30/s pairs (rate null) (b) non-overlapping 0/40 0.000 NaN NaN
null, 1435 cells at 30/s pairs (count null) (a) 1 ms steps 177/3901 0.747 NaN NaN
null, 1435 cells at 30/s pairs (count null) (b) non-overlapping 2/40 0.200 NaN NaN
100 cells, 20 pairs added in 1.0-1.1 s bins (b) non-overlapping 0/40 0.000 [] window 1.0-1.1 s
100 cells, 20 pairs added in 1.0-1.1 s spikes (b) non-overlapping 0/40 0.000 [] window 1.0-1.1 s
100 cells, 20 pairs added in 1.0-1.1 s pairs (rate null) (b) non-overlapping 0/40 0.000 [] window 1.0-1.1 s
100 cells, 20 pairs added in 1.0-1.1 s pairs (count null) (b) non-overlapping 3/40 0.300 [0.3, 1.0, 4.0] window 1.0-1.1 s
20 cells firing together 11 times bins (b) non-overlapping 0/40 0.000 [] 10 windows hold an event
20 cells firing together 11 times spikes (b) non-overlapping 13/40 1.300 [0.5, 0.6, 1.0, 1.1, 2.1, 2.5, 3.0, 3.2, 3.7, 3.8, 3.9, 4.1, 4.2] 10 windows hold an event
20 cells firing together 11 times pairs (rate null) (b) non-overlapping 13/40 1.300 [0.5, 0.6, 1.0, 1.1, 2.1, 2.5, 3.0, 3.2, 3.7, 3.8, 3.9, 4.1, 4.2] 10 windows hold an event
20 cells firing together 11 times pairs (count null) (b) non-overlapping 13/40 1.300 [0.5, 0.6, 1.0, 1.1, 2.1, 2.5, 3.0, 3.2, 3.7, 3.8, 3.9, 4.1, 4.2] 10 windows hold an event
EXP["fig4-control-unitary-events"] = [(0.7, 0.07), (1.1, 0.11), (19, 1.9)]
EXP["fig7-pd-unitary-events"] = [(3.1, 0.31), (1.4, 0.14), (15, 1.5)]
RANGES = {"fig4-control-unitary-events": ((90, 302.5), (112.5, 275)), "fig7-pd-unitary-events": ((360, 1210), (90, 385))}
UE = {}
for c in D:
for cnt in COUNTS:
for sname, step in [("(a) 1 ms steps", 0.001), ("(b) non-overlapping", 0.1)]:
for spname, span in [("(i) 0.3-4.3 s", (0.3, 4.3)), ("(ii) 0-4.0 s", (0.0, 4.0))]:
u = m.unitary_events(D[c], "PT5B", span, step, count=cnt)
per = {r: m.periodicity(m.pop_spikes(D[c], "PT5B"), u["runs"], span, reading=r) for r in "xy"}
UE[(c, cnt, sname, spname)] = (u, per)
rows = []
for (c, cnt, sname, spname), (u, per) in UE.items():
rows.append({"file": m.CONDITIONS[c], "count": cnt, "windows": sname, "span": spname, "significant s": round(u["total_s"], 3),
"clusters": len(u["clusters_ms"]), "cluster ms min-max": (int(u["clusters_ms"].min()), int(u["clusters_ms"].max())) if len(u["clusters_ms"]) else None,
"significant windows": f"{u['n_sig_windows']}/{u['n_windows']}",
"median observed / expected": round(float(np.median(u["obs"] / u["exp"])), 3),
"windows at the maximum count (100 bins)": round(u["share_windows_full"], 3) if cnt == "bins" else None,
"periodicity x": round(np.mean(per["x"]), 1) if per["x"] else np.nan, "periodicity y": round(np.mean(per["y"]), 1) if per["y"] else np.nan})
uet = pd.DataFrame(rows)
print(uet.to_string(index=False))
print("\nShare of 1 ms bins with 2 or more PT5B cells firing, (i) 0.3-4.3 s:",
{m.CONDITIONS[c]: round(UE[(c, "bins", "(b) non-overlapping", "(i) 0.3-4.3 s")][0]["coinc_share_bins"], 3) for c in D})
UEOK = {}
for cid, (rest, act) in {"fig4-control-unitary-events": ("01", "03"), "fig7-pd-unitary-events": ("02", "04")}.items():
print("\n" + cid, "expected", [e[0] for e in EXP[cid]], "cluster ranges ms", RANGES[cid])
for cnt in COUNTS:
for sname in ["(a) 1 ms steps", "(b) non-overlapping"]:
for spname in ["(i) 0.3-4.3 s", "(ii) 0-4.0 s"]:
for pr in "xy":
ur, pr_r = UE[(rest, cnt, sname, spname)]
ua, _ = UE[(act, cnt, sname, spname)]
vals = [round(ur["total_s"], 3), round(ua["total_s"], 3), round(float(np.mean(pr_r[pr])), 1) if pr_r[pr] else np.nan]
ok = [bool(within(v, e)) if np.isfinite(v) else False for v, e in zip(vals, EXP[cid])]
rng_ok = [bool(len(u_["clusters_ms"]) and np.all((u_["clusters_ms"] >= lo) & (u_["clusters_ms"] <= hi)))
for u_, (lo, hi) in zip((ur, ua), RANGES[cid])]
more = len(ua["clusters_ms"]) > len(ur["clusters_ms"])
UEOK[(cid, cnt, sname, spname, pr)] = all(ok) and all(rng_ok) and (more or cid != "fig4-control-unitary-events")
print(f" {cnt:18s} {sname:20s} {spname:14s} ({pr}) {vals} within {ok} clusters in range {rng_ok}"
+ (f" activated more periods {more}" if cid == "fig4-control-unitary-events" else ""))
print(" any combination meets the criterion:", any(v for k_, v in UEOK.items() if k_[0] == cid))
file count windows span significant s clusters cluster ms min-max significant windows median observed / expected windows at the maximum count (100 bins) periodicity x periodicity y
control rest bins (a) 1 ms steps (i) 0.3-4.3 s 0.000 0 None 0/3901 1.000 1.000 NaN NaN
control rest bins (a) 1 ms steps (ii) 0-4.0 s 0.000 0 None 0/3901 1.000 0.943 NaN NaN
control rest bins (b) non-overlapping (i) 0.3-4.3 s 0.000 0 None 0/40 1.000 1.000 NaN NaN
control rest bins (b) non-overlapping (ii) 0-4.0 s 0.000 0 None 0/40 1.000 0.925 NaN NaN
control rest spikes (a) 1 ms steps (i) 0.3-4.3 s 0.000 0 None 0/3901 1.000 NaN NaN NaN
control rest spikes (a) 1 ms steps (ii) 0-4.0 s 0.000 0 None 0/3901 1.000 NaN NaN NaN
control rest spikes (b) non-overlapping (i) 0.3-4.3 s 0.000 0 None 0/40 1.000 NaN NaN NaN
control rest spikes (b) non-overlapping (ii) 0-4.0 s 0.000 0 None 0/40 1.000 NaN NaN NaN
control rest pairs (rate null) (a) 1 ms steps (i) 0.3-4.3 s 1.308 4 (197, 551) 763/3901 1.044 NaN 19.8 38.1
control rest pairs (rate null) (a) 1 ms steps (ii) 0-4.0 s 1.646 5 (197, 552) 1002/3901 1.046 NaN 18.6 34.6
control rest pairs (rate null) (b) non-overlapping (i) 0.3-4.3 s 0.800 3 (100, 500) 8/40 1.046 NaN 19.3 33.9
control rest pairs (rate null) (b) non-overlapping (ii) 0-4.0 s 1.100 4 (100, 500) 11/40 1.049 NaN 18.0 30.3
control rest pairs (count null) (a) 1 ms steps (i) 0.3-4.3 s 3.980 2 (1015, 2965) 3340/3901 1.044 NaN 17.7 37.0
control rest pairs (count null) (a) 1 ms steps (ii) 0-4.0 s 3.985 2 (1320, 2665) 3338/3901 1.046 NaN 16.4 34.9
control rest pairs (count null) (b) non-overlapping (i) 0.3-4.3 s 3.200 7 (100, 1200) 32/40 1.046 NaN 18.0 39.3
control rest pairs (count null) (b) non-overlapping (ii) 0-4.0 s 3.200 8 (100, 1200) 32/40 1.049 NaN 17.2 36.9
parkinsonian rest bins (a) 1 ms steps (i) 0.3-4.3 s 0.000 0 None 0/3901 1.000 0.519 NaN NaN
parkinsonian rest bins (a) 1 ms steps (ii) 0-4.0 s 0.000 0 None 0/3901 1.000 0.513 NaN NaN
parkinsonian rest bins (b) non-overlapping (i) 0.3-4.3 s 0.000 0 None 0/40 0.995 0.500 NaN NaN
parkinsonian rest bins (b) non-overlapping (ii) 0-4.0 s 0.000 0 None 0/40 0.995 0.500 NaN NaN
parkinsonian rest spikes (a) 1 ms steps (i) 0.3-4.3 s 0.000 0 None 0/3901 1.000 NaN NaN NaN
parkinsonian rest spikes (a) 1 ms steps (ii) 0-4.0 s 0.000 0 None 0/3901 1.000 NaN NaN NaN
parkinsonian rest spikes (b) non-overlapping (i) 0.3-4.3 s 0.000 0 None 0/40 1.000 NaN NaN NaN
parkinsonian rest spikes (b) non-overlapping (ii) 0-4.0 s 0.000 0 None 0/40 1.000 NaN NaN NaN
parkinsonian rest pairs (rate null) (a) 1 ms steps (i) 0.3-4.3 s 3.978 2 (1599, 2379) 3780/3901 1.377 NaN 15.4 36.6
parkinsonian rest pairs (rate null) (a) 1 ms steps (ii) 0-4.0 s 3.978 2 (1899, 2079) 3780/3901 1.376 NaN 15.4 35.7
parkinsonian rest pairs (rate null) (b) non-overlapping (i) 0.3-4.3 s 3.800 2 (1500, 2300) 38/40 1.407 NaN 15.1 37.4
parkinsonian rest pairs (rate null) (b) non-overlapping (ii) 0-4.0 s 3.800 2 (1800, 2000) 38/40 1.407 NaN 15.3 36.5
parkinsonian rest pairs (count null) (a) 1 ms steps (i) 0.3-4.3 s 4.000 1 (4000, 4000) 3901/3901 1.377 NaN 15.0 37.1
parkinsonian rest pairs (count null) (a) 1 ms steps (ii) 0-4.0 s 4.000 1 (4000, 4000) 3901/3901 1.376 NaN 15.0 36.7
parkinsonian rest pairs (count null) (b) non-overlapping (i) 0.3-4.3 s 4.000 1 (4000, 4000) 40/40 1.407 NaN 15.0 37.1
parkinsonian rest pairs (count null) (b) non-overlapping (ii) 0-4.0 s 4.000 1 (4000, 4000) 40/40 1.407 NaN 15.0 36.7
control activated bins (a) 1 ms steps (i) 0.3-4.3 s 0.000 0 None 0/3901 1.000 1.000 NaN NaN
control activated bins (a) 1 ms steps (ii) 0-4.0 s 0.000 0 None 0/3901 1.000 0.958 NaN NaN
control activated bins (b) non-overlapping (i) 0.3-4.3 s 0.000 0 None 0/40 1.000 1.000 NaN NaN
control activated bins (b) non-overlapping (ii) 0-4.0 s 0.000 0 None 0/40 1.000 0.950 NaN NaN
control activated spikes (a) 1 ms steps (i) 0.3-4.3 s 0.000 0 None 0/3901 1.000 NaN NaN NaN
control activated spikes (a) 1 ms steps (ii) 0-4.0 s 0.000 0 None 0/3901 1.000 NaN NaN NaN
control activated spikes (b) non-overlapping (i) 0.3-4.3 s 0.000 0 None 0/40 1.000 NaN NaN NaN
control activated spikes (b) non-overlapping (ii) 0-4.0 s 0.000 0 None 0/40 1.000 NaN NaN NaN
control activated pairs (rate null) (a) 1 ms steps (i) 0.3-4.3 s 1.130 3 (136, 752) 832/3901 1.016 NaN 47.3 39.5
control activated pairs (rate null) (a) 1 ms steps (ii) 0-4.0 s 1.430 3 (242, 752) 1132/3901 1.020 NaN 36.0 36.6
control activated pairs (rate null) (b) non-overlapping (i) 0.3-4.3 s 1.000 3 (100, 700) 10/40 1.016 NaN 48.0 39.1
control activated pairs (rate null) (b) non-overlapping (ii) 0-4.0 s 1.300 3 (200, 700) 13/40 1.019 NaN 36.3 36.6
control activated pairs (count null) (a) 1 ms steps (i) 0.3-4.3 s 3.992 3 (582, 2513) 3530/3901 1.016 NaN 42.7 38.5
control activated pairs (count null) (a) 1 ms steps (ii) 0-4.0 s 3.992 3 (582, 2813) 3581/3901 1.020 NaN 44.3 38.1
control activated pairs (count null) (b) non-overlapping (i) 0.3-4.3 s 3.700 3 (400, 2500) 37/40 1.016 NaN 46.5 38.2
control activated pairs (count null) (b) non-overlapping (ii) 0-4.0 s 3.700 3 (400, 2800) 37/40 1.019 NaN 46.1 38.1
parkinsonian activated bins (a) 1 ms steps (i) 0.3-4.3 s 0.000 0 None 0/3901 1.000 1.000 NaN NaN
parkinsonian activated bins (a) 1 ms steps (ii) 0-4.0 s 0.000 0 None 0/3901 1.000 0.962 NaN NaN
parkinsonian activated bins (b) non-overlapping (i) 0.3-4.3 s 0.000 0 None 0/40 1.000 1.000 NaN NaN
parkinsonian activated bins (b) non-overlapping (ii) 0-4.0 s 0.000 0 None 0/40 1.000 0.950 NaN NaN
parkinsonian activated spikes (a) 1 ms steps (i) 0.3-4.3 s 0.000 0 None 0/3901 1.000 NaN NaN NaN
parkinsonian activated spikes (a) 1 ms steps (ii) 0-4.0 s 0.000 0 None 0/3901 1.000 NaN NaN NaN
parkinsonian activated spikes (b) non-overlapping (i) 0.3-4.3 s 0.000 0 None 0/40 1.000 NaN NaN NaN
parkinsonian activated spikes (b) non-overlapping (ii) 0-4.0 s 0.000 0 None 0/40 1.000 NaN NaN NaN
parkinsonian activated pairs (rate null) (a) 1 ms steps (i) 0.3-4.3 s 0.123 1 (123, 123) 23/3901 1.012 NaN 26.0 28.3
parkinsonian activated pairs (rate null) (a) 1 ms steps (ii) 0-4.0 s 0.431 2 (123, 308) 232/3901 1.013 NaN 20.5 28.5
parkinsonian activated pairs (rate null) (b) non-overlapping (i) 0.3-4.3 s 0.000 0 None 0/40 1.012 NaN NaN NaN
parkinsonian activated pairs (rate null) (b) non-overlapping (ii) 0-4.0 s 0.300 1 (300, 300) 3/40 1.013 NaN 15.0 27.1
parkinsonian activated pairs (count null) (a) 1 ms steps (i) 0.3-4.3 s 3.964 2 (232, 3732) 3463/3901 1.012 NaN 31.2 33.2
parkinsonian activated pairs (count null) (a) 1 ms steps (ii) 0-4.0 s 4.000 1 (4000, 4000) 3590/3901 1.013 NaN 22.5 34.0
parkinsonian activated pairs (count null) (b) non-overlapping (i) 0.3-4.3 s 3.700 4 (200, 1600) 37/40 1.012 NaN 29.9 34.1
parkinsonian activated pairs (count null) (b) non-overlapping (ii) 0-4.0 s 3.800 3 (700, 1900) 38/40 1.013 NaN 23.2 34.5
Share of 1 ms bins with 2 or more PT5B cells firing, (i) 0.3-4.3 s: {'control rest': 1.0, 'parkinsonian rest': 0.991, 'control activated': 1.0, 'parkinsonian activated': 1.0}
fig4-control-unitary-events expected [0.7, 1.1, 19] cluster ranges ms ((90, 302.5), (112.5, 275))
bins (a) 1 ms steps (i) 0.3-4.3 s (x) [0.0, 0.0, nan] within [False, False, False] clusters in range [False, False] activated more periods False
bins (a) 1 ms steps (i) 0.3-4.3 s (y) [0.0, 0.0, nan] within [False, False, False] clusters in range [False, False] activated more periods False
bins (a) 1 ms steps (ii) 0-4.0 s (x) [0.0, 0.0, nan] within [False, False, False] clusters in range [False, False] activated more periods False
bins (a) 1 ms steps (ii) 0-4.0 s (y) [0.0, 0.0, nan] within [False, False, False] clusters in range [False, False] activated more periods False
bins (b) non-overlapping (i) 0.3-4.3 s (x) [0.0, 0.0, nan] within [False, False, False] clusters in range [False, False] activated more periods False
bins (b) non-overlapping (i) 0.3-4.3 s (y) [0.0, 0.0, nan] within [False, False, False] clusters in range [False, False] activated more periods False
bins (b) non-overlapping (ii) 0-4.0 s (x) [0.0, 0.0, nan] within [False, False, False] clusters in range [False, False] activated more periods False
bins (b) non-overlapping (ii) 0-4.0 s (y) [0.0, 0.0, nan] within [False, False, False] clusters in range [False, False] activated more periods False
spikes (a) 1 ms steps (i) 0.3-4.3 s (x) [0.0, 0.0, nan] within [False, False, False] clusters in range [False, False] activated more periods False
spikes (a) 1 ms steps (i) 0.3-4.3 s (y) [0.0, 0.0, nan] within [False, False, False] clusters in range [False, False] activated more periods False
spikes (a) 1 ms steps (ii) 0-4.0 s (x) [0.0, 0.0, nan] within [False, False, False] clusters in range [False, False] activated more periods False
spikes (a) 1 ms steps (ii) 0-4.0 s (y) [0.0, 0.0, nan] within [False, False, False] clusters in range [False, False] activated more periods False
spikes (b) non-overlapping (i) 0.3-4.3 s (x) [0.0, 0.0, nan] within [False, False, False] clusters in range [False, False] activated more periods False
spikes (b) non-overlapping (i) 0.3-4.3 s (y) [0.0, 0.0, nan] within [False, False, False] clusters in range [False, False] activated more periods False
spikes (b) non-overlapping (ii) 0-4.0 s (x) [0.0, 0.0, nan] within [False, False, False] clusters in range [False, False] activated more periods False
spikes (b) non-overlapping (ii) 0-4.0 s (y) [0.0, 0.0, nan] within [False, False, False] clusters in range [False, False] activated more periods False
pairs (rate null) (a) 1 ms steps (i) 0.3-4.3 s (x) [1.308, 1.13, 19.8] within [False, True, True] clusters in range [False, False] activated more periods False
pairs (rate null) (a) 1 ms steps (i) 0.3-4.3 s (y) [1.308, 1.13, 38.1] within [False, True, False] clusters in range [False, False] activated more periods False
pairs (rate null) (a) 1 ms steps (ii) 0-4.0 s (x) [1.646, 1.43, 18.6] within [False, False, True] clusters in range [False, False] activated more periods False
pairs (rate null) (a) 1 ms steps (ii) 0-4.0 s (y) [1.646, 1.43, 34.6] within [False, False, False] clusters in range [False, False] activated more periods False
pairs (rate null) (b) non-overlapping (i) 0.3-4.3 s (x) [0.8, 1.0, 19.3] within [False, True, True] clusters in range [False, False] activated more periods False
pairs (rate null) (b) non-overlapping (i) 0.3-4.3 s (y) [0.8, 1.0, 33.9] within [False, True, False] clusters in range [False, False] activated more periods False
pairs (rate null) (b) non-overlapping (ii) 0-4.0 s (x) [1.1, 1.3, 18.0] within [False, False, True] clusters in range [False, False] activated more periods False
pairs (rate null) (b) non-overlapping (ii) 0-4.0 s (y) [1.1, 1.3, 30.3] within [False, False, False] clusters in range [False, False] activated more periods False
pairs (count null) (a) 1 ms steps (i) 0.3-4.3 s (x) [3.98, 3.992, 17.7] within [False, False, True] clusters in range [False, False] activated more periods True
pairs (count null) (a) 1 ms steps (i) 0.3-4.3 s (y) [3.98, 3.992, 37.0] within [False, False, False] clusters in range [False, False] activated more periods True
pairs (count null) (a) 1 ms steps (ii) 0-4.0 s (x) [3.985, 3.992, 16.4] within [False, False, False] clusters in range [False, False] activated more periods True
pairs (count null) (a) 1 ms steps (ii) 0-4.0 s (y) [3.985, 3.992, 34.9] within [False, False, False] clusters in range [False, False] activated more periods True
pairs (count null) (b) non-overlapping (i) 0.3-4.3 s (x) [3.2, 3.7, 18.0] within [False, False, True] clusters in range [False, False] activated more periods False
pairs (count null) (b) non-overlapping (i) 0.3-4.3 s (y) [3.2, 3.7, 39.3] within [False, False, False] clusters in range [False, False] activated more periods False
pairs (count null) (b) non-overlapping (ii) 0-4.0 s (x) [3.2, 3.7, 17.2] within [False, False, True] clusters in range [False, False] activated more periods False
pairs (count null) (b) non-overlapping (ii) 0-4.0 s (y) [3.2, 3.7, 36.9] within [False, False, False] clusters in range [False, False] activated more periods False
any combination meets the criterion: False
fig7-pd-unitary-events expected [3.1, 1.4, 15] cluster ranges ms ((360, 1210), (90, 385))
bins (a) 1 ms steps (i) 0.3-4.3 s (x) [0.0, 0.0, nan] within [False, False, False] clusters in range [False, False]
bins (a) 1 ms steps (i) 0.3-4.3 s (y) [0.0, 0.0, nan] within [False, False, False] clusters in range [False, False]
bins (a) 1 ms steps (ii) 0-4.0 s (x) [0.0, 0.0, nan] within [False, False, False] clusters in range [False, False]
bins (a) 1 ms steps (ii) 0-4.0 s (y) [0.0, 0.0, nan] within [False, False, False] clusters in range [False, False]
bins (b) non-overlapping (i) 0.3-4.3 s (x) [0.0, 0.0, nan] within [False, False, False] clusters in range [False, False]
bins (b) non-overlapping (i) 0.3-4.3 s (y) [0.0, 0.0, nan] within [False, False, False] clusters in range [False, False]
bins (b) non-overlapping (ii) 0-4.0 s (x) [0.0, 0.0, nan] within [False, False, False] clusters in range [False, False]
bins (b) non-overlapping (ii) 0-4.0 s (y) [0.0, 0.0, nan] within [False, False, False] clusters in range [False, False]
spikes (a) 1 ms steps (i) 0.3-4.3 s (x) [0.0, 0.0, nan] within [False, False, False] clusters in range [False, False]
spikes (a) 1 ms steps (i) 0.3-4.3 s (y) [0.0, 0.0, nan] within [False, False, False] clusters in range [False, False]
spikes (a) 1 ms steps (ii) 0-4.0 s (x) [0.0, 0.0, nan] within [False, False, False] clusters in range [False, False]
spikes (a) 1 ms steps (ii) 0-4.0 s (y) [0.0, 0.0, nan] within [False, False, False] clusters in range [False, False]
spikes (b) non-overlapping (i) 0.3-4.3 s (x) [0.0, 0.0, nan] within [False, False, False] clusters in range [False, False]
spikes (b) non-overlapping (i) 0.3-4.3 s (y) [0.0, 0.0, nan] within [False, False, False] clusters in range [False, False]
spikes (b) non-overlapping (ii) 0-4.0 s (x) [0.0, 0.0, nan] within [False, False, False] clusters in range [False, False]
spikes (b) non-overlapping (ii) 0-4.0 s (y) [0.0, 0.0, nan] within [False, False, False] clusters in range [False, False]
pairs (rate null) (a) 1 ms steps (i) 0.3-4.3 s (x) [3.978, 0.123, 15.4] within [False, False, True] clusters in range [False, True]
pairs (rate null) (a) 1 ms steps (i) 0.3-4.3 s (y) [3.978, 0.123, 36.6] within [False, False, False] clusters in range [False, True]
pairs (rate null) (a) 1 ms steps (ii) 0-4.0 s (x) [3.978, 0.431, 15.4] within [False, False, True] clusters in range [False, True]
pairs (rate null) (a) 1 ms steps (ii) 0-4.0 s (y) [3.978, 0.431, 35.7] within [False, False, False] clusters in range [False, True]
pairs (rate null) (b) non-overlapping (i) 0.3-4.3 s (x) [3.8, 0.0, 15.1] within [False, False, True] clusters in range [False, False]
pairs (rate null) (b) non-overlapping (i) 0.3-4.3 s (y) [3.8, 0.0, 37.4] within [False, False, False] clusters in range [False, False]
pairs (rate null) (b) non-overlapping (ii) 0-4.0 s (x) [3.8, 0.3, 15.3] within [False, False, True] clusters in range [False, True]
pairs (rate null) (b) non-overlapping (ii) 0-4.0 s (y) [3.8, 0.3, 36.5] within [False, False, False] clusters in range [False, True]
pairs (count null) (a) 1 ms steps (i) 0.3-4.3 s (x) [4.0, 3.964, 15.0] within [False, False, True] clusters in range [False, False]
pairs (count null) (a) 1 ms steps (i) 0.3-4.3 s (y) [4.0, 3.964, 37.1] within [False, False, False] clusters in range [False, False]
pairs (count null) (a) 1 ms steps (ii) 0-4.0 s (x) [4.0, 4.0, 15.0] within [False, False, True] clusters in range [False, False]
pairs (count null) (a) 1 ms steps (ii) 0-4.0 s (y) [4.0, 4.0, 36.7] within [False, False, False] clusters in range [False, False]
pairs (count null) (b) non-overlapping (i) 0.3-4.3 s (x) [4.0, 3.7, 15.0] within [False, False, True] clusters in range [False, False]
pairs (count null) (b) non-overlapping (i) 0.3-4.3 s (y) [4.0, 3.7, 37.1] within [False, False, False] clusters in range [False, False]
pairs (count null) (b) non-overlapping (ii) 0-4.0 s (x) [4.0, 3.8, 15.0] within [False, False, True] clusters in range [False, False]
pairs (count null) (b) non-overlapping (ii) 0-4.0 s (y) [4.0, 3.8, 36.7] within [False, False, False] clusters in range [False, False]
any combination meets the criterion: False
Result: not reproduced. No combination of count, window placement, span and periodicity reading meets the criterion. Counting coincident bins or the spikes in them, no window is significant (0 of 3,901 slid and 0 of 40 non-overlapping windows), since two or more PT5B cells fire in every 1 ms bin of 0.3 to 4.3 s and the bin count is at its maximum of 100 in 92% to 100% of control windows; these counts cannot exceed their expectation. Counting pairs of cells against independent cells at the window's rates, the significant duration is 0.8 to 1.65 s at rest against 0.63 to 0.77 s, and 1.0 to 1.43 s activated, within 0.99 to 1.21 s for two of four combinations; rest clusters last up to 552 ms, outside 90 to 302.5 ms, and the activated state does not have more significant periods. The periodicity reading (x) gives 18.0 to 19.8 Hz at rest, within 17.1 to 20.9 Hz. On independent Poisson cells this count finds no significant window, and it misses 20 added pair coincidences, so it is conservative. Counting pairs against a null that keeps each cell's active bins, 3.2 to 3.99 s are significant at rest and 3.7 to 3.99 s activated; on independent cells this count finds 1 or 2 of 40 windows, but its slid windows cover 0.64 to 0.75 s by chance alone.
Result: not reproduced. No combination meets the criterion. Counting bins or spikes, no window is significant (0 s against 3.1 and 1.4 s), with two or more PT5B cells firing in 99.1% (rest) and 100% (activated) of 1 ms bins. Counting pairs against independent cells, 3.8 to 3.98 s are significant at rest against 2.79 to 3.41 s, in two clusters of 1,500 to 2,379 ms (outside 360 to 1,210 ms), and 0 to 0.43 s activated against 1.26 to 1.54 s; reading (x) gives a rest periodicity of 15.1 to 15.4 Hz, within 13.5 to 16.5 Hz. Against the null that keeps each cell's active bins, all 4.0 s at rest and 3.7 to 4.0 s activated are significant.
rest-synchrony-increase¶
Reproduced when the total duration of significant synchrony at rest is larger in the parkinsonian file under every reading.
for cnt in COUNTS:
for sname in ["(a) 1 ms steps", "(b) non-overlapping"]:
for spname in ["(i) 0.3-4.3 s", "(ii) 0-4.0 s"]:
a, b = UE[("01", cnt, sname, spname)][0]["total_s"], UE[("02", cnt, sname, spname)][0]["total_s"]
print(f"{cnt:18s} {sname:20s} {spname:14s} control {a:.3f} s, parkinsonian {b:.3f} s, parkinsonian larger: {b > a}")
# Both pair nulls take each cell's spikes as spread evenly over its 100 ms window, so the excess also
# tracks how strongly the population rhythm modulates firing within a window.
print("\nMedian observed / expected per window at rest, (a)(i), (a)(ii), (b)(i), (b)(ii):")
for cnt in ["pairs (rate null)", "pairs (count null)"]:
print(" ", cnt, {m.CONDITIONS[c]: [round(float(np.median(UE[(c, cnt, s, sp)][0]["obs"] / UE[(c, cnt, s, sp)][0]["exp"])), 3)
for s in ["(a) 1 ms steps", "(b) non-overlapping"] for sp in ["(i) 0.3-4.3 s", "(ii) 0-4.0 s"]] for c in ("01", "02")})
(f1, p1), (f2, p2) = SPEC["01"], SPEC["02"]
sel = (f1 > 5) & (f1 <= 100)
print("Largest PT5B SCH spectral power above 5 Hz in W: control rest", f"{p1[sel].max():.3g}", "parkinsonian rest", f"{p2[sel].max():.3g}",
"ratio", round(float(p2[sel].max() / p1[sel].max()), 1))
bins (a) 1 ms steps (i) 0.3-4.3 s control 0.000 s, parkinsonian 0.000 s, parkinsonian larger: False
bins (a) 1 ms steps (ii) 0-4.0 s control 0.000 s, parkinsonian 0.000 s, parkinsonian larger: False
bins (b) non-overlapping (i) 0.3-4.3 s control 0.000 s, parkinsonian 0.000 s, parkinsonian larger: False
bins (b) non-overlapping (ii) 0-4.0 s control 0.000 s, parkinsonian 0.000 s, parkinsonian larger: False
spikes (a) 1 ms steps (i) 0.3-4.3 s control 0.000 s, parkinsonian 0.000 s, parkinsonian larger: False
spikes (a) 1 ms steps (ii) 0-4.0 s control 0.000 s, parkinsonian 0.000 s, parkinsonian larger: False
spikes (b) non-overlapping (i) 0.3-4.3 s control 0.000 s, parkinsonian 0.000 s, parkinsonian larger: False
spikes (b) non-overlapping (ii) 0-4.0 s control 0.000 s, parkinsonian 0.000 s, parkinsonian larger: False
pairs (rate null) (a) 1 ms steps (i) 0.3-4.3 s control 1.308 s, parkinsonian 3.978 s, parkinsonian larger: True
pairs (rate null) (a) 1 ms steps (ii) 0-4.0 s control 1.646 s, parkinsonian 3.978 s, parkinsonian larger: True
pairs (rate null) (b) non-overlapping (i) 0.3-4.3 s control 0.800 s, parkinsonian 3.800 s, parkinsonian larger: True
pairs (rate null) (b) non-overlapping (ii) 0-4.0 s control 1.100 s, parkinsonian 3.800 s, parkinsonian larger: True
pairs (count null) (a) 1 ms steps (i) 0.3-4.3 s control 3.980 s, parkinsonian 4.000 s, parkinsonian larger: True
pairs (count null) (a) 1 ms steps (ii) 0-4.0 s control 3.985 s, parkinsonian 4.000 s, parkinsonian larger: True
pairs (count null) (b) non-overlapping (i) 0.3-4.3 s control 3.200 s, parkinsonian 4.000 s, parkinsonian larger: True
pairs (count null) (b) non-overlapping (ii) 0-4.0 s control 3.200 s, parkinsonian 4.000 s, parkinsonian larger: True
Median observed / expected per window at rest, (a)(i), (a)(ii), (b)(i), (b)(ii):
pairs (rate null) {'control rest': [1.044, 1.046, 1.046, 1.049], 'parkinsonian rest': [1.377, 1.376, 1.407, 1.407]}
pairs (count null) {'control rest': [1.044, 1.046, 1.046, 1.049], 'parkinsonian rest': [1.377, 1.376, 1.407, 1.407]}
Largest PT5B SCH spectral power above 5 Hz in W: control rest 12.3 parkinsonian rest 387 ratio 31.5
Result: reproduced, under the pair count. Counting coincident bins or spikes, the significant synchrony at rest is 0 s in both files under every reading, but those counts are at their ceiling in every file and cannot find synchrony at all (the bin count also misses both synthetic cases above). Counting pairs of coincident cells, the one count that can exceed its expectation here, the parkinsonian rest file has more significant synchrony under every window reading: 3.8 to 3.98 s against 0.8 to 1.65 s against independent cells, and 4.0 s against 3.2 to 3.99 s against the null that keeps each cell's active bins. The outcome rests on the pair count as an assumption, with two caveats. Under the count-preserving null the comparison is at its ceiling (4.0 against 3.98 and 3.99 s for slid windows), and on independent cells that null's slid windows already cover 0.64 to 0.75 s by chance, so the comparison rests in effect on the rate null, which is conservative. Both pair nulls take each cell's spikes as spread evenly over its 100 ms window, so the excess partly measures how strongly the population rhythm modulates firing within a window: the median observed over expected pair count is higher at parkinsonian rest than at control rest (printed above), and the largest PT5B SCH spectral power is many times higher (ratio printed above). The paper's own Poisson window null probably shares this property.
fig5c-pd-pt5b-rate-activated¶
In the parkinsonian condition PT5B neurons fire more in the activated state than at rest (14.2 +/- 7.1 against 29.7 +/- 12.7 spikes/s, p < 0.001).
Criterion: files -02 and -04, R1, R2 and R3; as fig2c-control-pt5b-rate-activated.
EXP["fig5c-pd-pt5b-rate-activated"] = [(14.2, 1.42), (7.1, 0.71), (29.7, 2.97), (12.7, 1.27)]
check_rates("fig5c-pd-pt5b-rate-activated", "PT5B", ['02', '04'], [('02', 'mean'), ('02', 'sd'), ('04', 'mean'), ('04', 'sd')])
cmpt = compare("PT5B", "02", "04")
print()
print(cmpt.to_string(index=False))
ps = cmpt.set_index("reading")[["T1 Wilcoxon", "T2 paired t", "T3 Mann-Whitney", "T4 Welch t"]]
print("\nAll four tests below p = 0.001, per reading:", (ps < 0.001).all(axis=1).to_dict())
file condition pop reading mean sd n
02 parkinsonian rest PT5B R1 14.239 7.131 1435
02 parkinsonian rest PT5B R1 (smallest block) 14.239 7.131 1435
02 parkinsonian rest PT5B R2 14.700 6.761 1390
02 parkinsonian rest PT5B R3 14.239 7.131 1435
04 parkinsonian activated PT5B R1 29.677 12.670 1435
04 parkinsonian activated PT5B R1 (smallest block) 29.677 12.670 1435
04 parkinsonian activated PT5B R2 30.572 11.747 1393
04 parkinsonian activated PT5B R3 29.677 12.670 1435
R1 values [14.239, 7.131, 29.677, 12.67] expected [14.2, 7.1, 29.7, 12.7] within tolerance [True, True, True, True] all: True
R1 (smallest block) values [14.239, 7.131, 29.677, 12.67] expected [14.2, 7.1, 29.7, 12.7] within tolerance [True, True, True, True] all: True
R2 values [14.7, 6.761, 30.572, 11.747] expected [14.2, 7.1, 29.7, 12.7] within tolerance [True, True, True, True] all: True
R3 values [14.239, 7.131, 29.677, 12.67] expected [14.2, 7.1, 29.7, 12.7] within tolerance [True, True, True, True] all: True
reading mean 1 mean 2 n paired T1 Wilcoxon T2 paired t T3 Mann-Whitney T4 Welch t
R1 14.239055 29.677019 1435 1.832007e-221 0.0 5.991333e-236 2.715003e-267
R2 14.700031 30.571803 1359 5.727976e-216 0.0 4.756919e-257 1.252258e-301
R2 union 14.700031 30.571803 1424 1.832007e-221 0.0 4.756919e-257 1.252258e-301
R3 14.239055 29.677019 1435 1.832007e-221 0.0 5.991333e-236 2.715003e-267
R3 union 14.239055 29.677019 1435 1.832007e-221 0.0 5.991333e-236 2.715003e-267
All four tests below p = 0.001, per reading: {'R1': True, 'R2': True, 'R2 union': True, 'R3': True, 'R3 union': True}
Result: reproduced. Under R1 parkinsonian PT5B rates are 14.24 +/- 7.13 at rest and 29.68 +/- 12.67 spikes/s activated, and under R2 14.70 +/- 6.76 and 30.57 +/- 11.75; R3 equals R1. All four are within tolerance under every reading, and every test gives p below 1e-200.
fig5c-pd-it23-rate-activated¶
In the parkinsonian condition IT2/3 neurons fire more in the activated state than at rest (0.78 +/- 1.1 against 4.3 +/- 7.1 spikes/s, p < 0.001).
Criterion: files -02 and -04, population IT2, R1, R2 and R3; p < 0.001.
EXP["fig5c-pd-it23-rate-activated"] = [(0.78, 0.078), (1.1, 0.11), (4.3, 0.43), (7.1, 0.71)]
check_rates("fig5c-pd-it23-rate-activated", "IT2", ['02', '04'], [('02', 'mean'), ('02', 'sd'), ('04', 'mean'), ('04', 'sd')])
cmpt = compare("IT2", "02", "04")
print()
print(cmpt.to_string(index=False))
ps = cmpt.set_index("reading")[["T1 Wilcoxon", "T2 paired t", "T3 Mann-Whitney", "T4 Welch t"]]
print("\nAll four tests below p = 0.001, per reading:", (ps < 0.001).all(axis=1).to_dict())
file condition pop reading mean sd n
02 parkinsonian rest IT2 R1 0.025 0.239 1730
02 parkinsonian rest IT2 R1 (smallest block) 0.025 0.239 1729
02 parkinsonian rest IT2 R2 1.163 1.173 37
02 parkinsonian rest IT2 R3 0.783 1.105 55
04 parkinsonian activated IT2 R1 0.164 1.598 1730
04 parkinsonian activated IT2 R1 (smallest block) 0.164 1.599 1729
04 parkinsonian activated IT2 R2 6.163 7.769 46
04 parkinsonian activated IT2 R3 4.295 7.066 66
R1 values [0.025, 0.239, 0.164, 1.598] expected [0.78, 1.1, 4.3, 7.1] within tolerance [False, False, False, False] all: False
R1 (smallest block) values [0.025, 0.239, 0.164, 1.599] expected [0.78, 1.1, 4.3, 7.1] within tolerance [False, False, False, False] all: False
R2 values [1.163, 1.173, 6.163, 7.769] expected [0.78, 1.1, 4.3, 7.1] within tolerance [False, True, False, True] all: False
R3 values [0.783, 1.105, 4.295, 7.066] expected [0.78, 1.1, 4.3, 7.1] within tolerance [True, True, True, True] all: True
reading mean 1 mean 2 n paired T1 Wilcoxon T2 paired t T3 Mann-Whitney T4 Welch t
R1 0.024881 0.163860 1730 0.000239 0.000314 2.847880e-01 0.000357
R2 1.163337 6.162571 12 0.263672 0.176699 4.694667e-07 0.000083
R2 union 1.163337 6.162571 71 0.000239 0.000184 4.694667e-07 0.000083
R3 0.782609 4.295125 22 0.600609 0.213966 1.795000e-03 0.000168
R3 union 0.782609 4.295125 99 0.000239 0.000219 1.795000e-03 0.000168
All four tests below p = 0.001, per reading: {'R1': False, 'R2': False, 'R2 union': True, 'R3': False, 'R3 union': False}
Result: not reproduced. Under R3 parkinsonian IT2 rates are 0.783 +/- 1.105 at rest and 4.295 +/- 7.066 activated, all four within tolerance, and the Welch test finds the increase at p = 1.7e-04. The Mann-Whitney test gives 0.0018, above 0.001. On the 22 cells kept in both files the paired tests give 0.60 (Wilcoxon) and 0.21 (paired t), and on the 99 cells kept in either file 2.4e-04 and 2.2e-04. Under neither pairing do all four tests reach p < 0.001. The pairings grade differently: with the cells kept in both files the paired tests find no increase, while with the cells kept in either every test finds the increase at p < 0.01 and only Mann-Whitney misses 0.001, the pattern graded partially reproduced for activated-pt5b-rate-pd-vs-control. The outcome rests on pairing the cells kept in both files, the choice adopted for pd-it6-rate-unchanged. Under R1 (0.025 +/- 0.239 and 0.164 +/- 1.598) and R2 (1.163 +/- 1.173 and 6.163 +/- 7.769) the values are outside tolerance.
pd-it5-silenced-activated¶
In the parkinsonian condition IT5A and IT5B neurons fire at 2.2 and 1.2 spikes/s at rest and stop firing (0 spikes/s) in the activated state.
Criterion: files -02 and -04, as control-it5-silenced-activated.
it5("pd-it5-silenced-activated", "02", "04", [(2.2, 0.22), (1.2, 0.12), (0, 0.05), (0, 0.05)])
file condition pop reading mean sd n 02 parkinsonian rest IT5A R1 0.471 1.657 644 02 parkinsonian rest IT5A R1 (smallest block) 0.471 1.658 643 02 parkinsonian rest IT5A R2 2.568 3.108 118 02 parkinsonian rest IT5A R3 2.165 3.002 140 04 parkinsonian activated IT5A R1 0.000 0.000 644 04 parkinsonian activated IT5A R1 (smallest block) 0.000 0.000 643 04 parkinsonian activated IT5A R2 NaN NaN 0 04 parkinsonian activated IT5A R3 0.000 NaN 1 02 parkinsonian rest IT5B R1 0.470 1.532 1435 02 parkinsonian rest IT5B R1 (smallest block) 0.470 1.532 1435 02 parkinsonian rest IT5B R2 2.188 2.681 308 02 parkinsonian rest IT5B R3 1.246 2.294 541 04 parkinsonian activated IT5B R1 0.000 0.000 1435 04 parkinsonian activated IT5B R1 (smallest block) 0.000 0.000 1435 04 parkinsonian activated IT5B R2 NaN NaN 0 04 parkinsonian activated IT5B R3 0.000 0.000 11 R1 values [0.471, 0.47, 0.0, 0.0] expected [2.2, 1.2, 0, 0] within [False, False, True, True] all: False R1 (smallest block) values [0.471, 0.47, 0.0, 0.0] expected [2.2, 1.2, 0, 0] within [False, False, True, True] all: False R2 values [2.568, 2.188, nan, nan] expected [2.2, 1.2, 0, 0] within [False, False, False, False] all: False R3 values [2.165, 1.246, 0.0, 0.0] expected [2.2, 1.2, 0, 0] within [True, True, True, True] all: True parkinsonian activated: IT5A units in the file 1, spikes in 0-4.3 s 1, last spike at 0.041 s parkinsonian activated: IT5B units in the file 11, spikes in 0-4.3 s 11, last spike at 0.044 s
Result: reproduced. Under R3 the parkinsonian rest rates are 2.17 (IT5A) and 1.25 spikes/s (IT5B), within tolerance of 2.2 and 1.2, and the activated rates are 0 (one IT5A and eleven IT5B units, all firing before 0.05 s). The outcome rests on R3: under R1 the rest rates are 0.47 and 0.47, and under R2 2.57 and 2.19 with the activated means undefined.
pd-it6-rate-unchanged¶
In the parkinsonian condition the IT6 firing rate does not change with activation (6.0 spikes/s at rest and in the activated state).
A claim of absence. Criterion: files -02 and -04, R1, R2 and R3; reproduced when both means are within tolerance under one rate reading and no test reading finds a difference at p < 0.05; not reproduced when a test does.
EXP["pd-it6-rate-unchanged"] = [(6.0, 0.6), (6.0, 0.6)]
check_rates("pd-it6-rate-unchanged", "IT6", ["02", "04"], [("02", "mean"), ("04", "mean")])
cmpt = compare("IT6", "02", "04")
print(); print(cmpt.to_string(index=False))
ps = cmpt.set_index("reading")[["T1 Wilcoxon", "T2 paired t", "T3 Mann-Whitney", "T4 Welch t"]]
print("\nAny test finds a difference at p < 0.05, per reading:", (ps < 0.05).any(axis=1).to_dict())
print("Difference of means (activated - rest), per reading:", (cmpt["mean 2"] - cmpt["mean 1"]).round(3).tolist())
file condition pop reading mean sd n
02 parkinsonian rest IT6 R1 1.327 4.010 1244
02 parkinsonian rest IT6 R1 (smallest block) 1.335 4.021 1236
02 parkinsonian rest IT6 R2 6.792 6.731 243
02 parkinsonian rest IT6 R3 6.002 6.691 275
04 parkinsonian activated IT6 R1 1.729 4.493 1244
04 parkinsonian activated IT6 R1 (smallest block) 1.740 4.506 1236
04 parkinsonian activated IT6 R2 6.637 6.710 324
04 parkinsonian activated IT6 R3 5.990 6.671 359
R1 values [1.327, 1.729] expected [6.0, 6.0] within tolerance [False, False] all: False
R1 (smallest block) values [1.335, 1.74] expected [6.0, 6.0] within tolerance [False, False] all: False
R2 values [6.792, 6.637] expected [6.0, 6.0] within tolerance [False, False] all: False
R3 values [6.002, 5.99] expected [6.0, 6.0] within tolerance [True, True] all: True
reading mean 1 mean 2 n paired T1 Wilcoxon T2 paired t T3 Mann-Whitney T4 Welch t
R1 1.326716 1.728645 1244 0.002497 0.002185 0.000172 0.018653
R2 6.791913 6.637144 126 0.884203 0.926040 0.624164 0.786253
R2 union 6.791913 6.637144 441 0.002497 0.002132 0.624164 0.786253
R3 6.001581 5.990069 148 0.605208 0.487498 0.995801 0.982857
R3 union 6.001581 5.990069 486 0.002497 0.002140 0.995801 0.982857
Any test finds a difference at p < 0.05, per reading: {'R1': True, 'R2': False, 'R2 union': True, 'R3': False, 'R3 union': True}
Difference of means (activated - rest), per reading: [0.402, -0.155, -0.155, -0.012, -0.012]
Result: reproduced, with the paired tests on the cells kept in both files. Under R3 the IT6 rates are 6.00 at rest and 5.99 spikes/s activated, within tolerance of 6.0. On the 148 cells kept in both files no test finds a difference at p < 0.05 (smallest p 0.49, difference -0.012 spikes/s). On the 486 cells kept in either file, at 0 where absent, the paired tests do (Wilcoxon 0.0025, paired t 0.0021), and the outcome would be not reproduced. The outcome rests on R3 and on pairing the cells kept in both files, which keeps each paired rate inside the group whose mean is tested (section opening). Under R1 the means, 1.33 and 1.73, are outside tolerance and every test finds a difference (p 0.00017 to 0.019), and under R2 no test does with the cells kept in both, but the means, 6.79 and 6.64, are outside 5.4 to 6.6.
rest-pt5b-rate-pd-vs-control¶
At rest, PT5B firing rate is higher and less variable in the parkinsonian than in the control condition (14.2 +/- 7.1 against 11.7 +/- 9.4 spikes/s, p < 0.001), a paradoxical increase given the reduced PT5B excitability.
Criterion: files -01 and -02, R1, R2 and R3; reproduced when under one reading the four rest values are within tolerance, the parkinsonian mean is higher with p < 0.001 under every test (paired by gid), and the parkinsonian standard deviation is lower.
EXP["rest-pt5b-rate-pd-vs-control"] = [(11.7, 1.17), (9.4, 0.94), (14.2, 1.42), (7.1, 0.71)]
check_rates("rest-pt5b-rate-pd-vs-control", "PT5B", ["01", "02"], [("01", "mean"), ("01", "sd"), ("02", "mean"), ("02", "sd")])
cmpt = compare("PT5B", "01", "02")
print(); print(cmpt.to_string(index=False))
ps = cmpt.set_index("reading")[["T1 Wilcoxon", "T2 paired t", "T3 Mann-Whitney", "T4 Welch t"]]
print("\nAll four tests below p = 0.001, per reading:", (ps < 0.001).all(axis=1).to_dict())
t = rate_rows("PT5B", ["01", "02"]).set_index(["reading", "file"])
print("Parkinsonian sd lower, per reading:", {r: bool(t.loc[(r, "02"), "sd"] < t.loc[(r, "01"), "sd"]) for r in ["R1", "R2", "R3"]})
file condition pop reading mean sd n
01 control rest PT5B R1 11.692 9.397 1435
01 control rest PT5B R1 (smallest block) 11.692 9.397 1435
01 control rest PT5B R2 12.606 9.148 1331
01 control rest PT5B R3 11.692 9.397 1435
02 parkinsonian rest PT5B R1 14.239 7.131 1435
02 parkinsonian rest PT5B R1 (smallest block) 14.239 7.131 1435
02 parkinsonian rest PT5B R2 14.700 6.761 1390
02 parkinsonian rest PT5B R3 14.239 7.131 1435
R1 values [11.692, 9.397, 14.239, 7.131] expected [11.7, 9.4, 14.2, 7.1] within tolerance [True, True, True, True] all: True
R1 (smallest block) values [11.692, 9.397, 14.239, 7.131] expected [11.7, 9.4, 14.2, 7.1] within tolerance [True, True, True, True] all: True
R2 values [12.606, 9.148, 14.7, 6.761] expected [11.7, 9.4, 14.2, 7.1] within tolerance [True, True, True, True] all: True
R3 values [11.692, 9.397, 14.239, 7.131] expected [11.7, 9.4, 14.2, 7.1] within tolerance [True, True, True, True] all: True
reading mean 1 mean 2 n paired T1 Wilcoxon T2 paired t T3 Mann-Whitney T4 Welch t
R1 11.692168 14.239055 1435 2.531998e-65 9.059072e-77 4.272582e-18 4.378427e-16
R2 12.605756 14.700031 1318 1.593782e-59 6.341163e-70 2.334374e-13 1.632362e-11
R2 union 12.605756 14.700031 1403 2.531998e-65 5.440584e-77 2.334374e-13 1.632362e-11
R3 11.692168 14.239055 1435 2.531998e-65 9.059072e-77 4.272582e-18 4.378427e-16
R3 union 11.692168 14.239055 1435 2.531998e-65 9.059072e-77 4.272582e-18 4.378427e-16
All four tests below p = 0.001, per reading: {'R1': True, 'R2': True, 'R2 union': True, 'R3': True, 'R3 union': True}
Parkinsonian sd lower, per reading: {'R1': True, 'R2': True, 'R3': True}
Result: reproduced. Under R1 the rest PT5B rate is 11.69 +/- 9.40 in the control and 14.24 +/- 7.13 spikes/s in the parkinsonian file, all four within tolerance; every test gives p below 1e-15, and the standard deviation is lower in the parkinsonian file. R2 and R3 also meet the criterion (R3 equals R1).
rest-it4-rate-pd-vs-control¶
At rest, IT4 firing rate is higher in the parkinsonian than in the control condition (14.1 against 2.6 spikes/s, p < 0.05).
Criterion: files -01 and -02, R1, R2 and R3; reproduced when under one reading both means are within tolerance and the parkinsonian rate is higher with p < 0.05 under every test.
EXP["rest-it4-rate-pd-vs-control"] = [(2.6, 0.26), (14.1, 1.41)]
check_rates("rest-it4-rate-pd-vs-control", "IT4", ['01', '02'], [('01', 'mean'), ('02', 'mean')])
cmpt = compare("IT4", "01", "02")
print()
print(cmpt.to_string(index=False))
ps = cmpt.set_index("reading")[["T1 Wilcoxon", "T2 paired t", "T3 Mann-Whitney", "T4 Welch t"]]
print("\nAll four tests below p = 0.05, per reading:", (ps < 0.05).all(axis=1).to_dict())
file condition pop reading mean sd n 01 control rest IT4 R1 0.037 0.626 768 01 control rest IT4 R1 (smallest block) 0.037 0.626 767 01 control rest IT4 R2 3.140 5.157 9 01 control rest IT4 R3 2.569 4.784 11 02 parkinsonian rest IT4 R1 0.037 0.789 768 02 parkinsonian rest IT4 R1 (smallest block) 0.037 0.790 767 02 parkinsonian rest IT4 R2 14.130 8.916 2 02 parkinsonian rest IT4 R3 14.130 8.916 2 R1 values [0.037, 0.037] expected [2.6, 14.1] within tolerance [False, False] all: False R1 (smallest block) values [0.037, 0.037] expected [2.6, 14.1] within tolerance [False, False] all: False R2 values [3.14, 14.13] expected [2.6, 14.1] within tolerance [False, True] all: False R3 values [2.569, 14.13] expected [2.6, 14.1] within tolerance [True, True] all: True
reading mean 1 mean 2 n paired T1 Wilcoxon T2 paired t T3 Mann-Whitney T4 Welch t
R1 0.036798 0.036798 768 0.098774 1.000000 0.034724 1.000000
R2 3.140097 14.130435 2 1.000000 0.677171 0.094778 0.316143
R2 union 3.140097 14.130435 9 0.097656 1.000000 0.094778 0.316143
R3 2.569170 14.130435 2 1.000000 0.677171 0.077152 0.306040
R3 union 2.569170 14.130435 11 0.097656 1.000000 0.077152 0.306040
All four tests below p = 0.05, per reading: {'R1': False, 'R2': False, 'R2 union': False, 'R3': False, 'R3 union': False}
Result: not reproduced. Under R3 the IT4 means are 2.57 (11 cells) in the control and 14.13 spikes/s (2 cells) in the parkinsonian file, both within tolerance, but no test finds the increase at p < 0.05 (Mann-Whitney 0.077, Welch 0.31, paired tests 1.0 and 0.68 on the 2 cells kept in both files, 0.098 and 1.0 on the 11 kept in either). Under R1 both means are 0.037 spikes/s, and under R2 3.14 and 14.13, the control one outside tolerance, with no test below 0.05 either. No reading meets the criterion.
rest-it5a-rate-pd-vs-control¶
At rest, IT5A firing rate is lower in the parkinsonian than in the control condition (2.2 against 3.3 spikes/s, p < 0.01).
Criterion: files -01 and -02, R1, R2 and R3; reproduced when under one reading both means are within tolerance and the parkinsonian rate is lower with p < 0.01 under every test.
EXP["rest-it5a-rate-pd-vs-control"] = [(3.3, 0.33), (2.2, 0.22)]
check_rates("rest-it5a-rate-pd-vs-control", "IT5A", ['01', '02'], [('01', 'mean'), ('02', 'mean')])
cmpt = compare("IT5A", "01", "02")
print()
print(cmpt.to_string(index=False))
ps = cmpt.set_index("reading")[["T1 Wilcoxon", "T2 paired t", "T3 Mann-Whitney", "T4 Welch t"]]
print("\nAll four tests below p = 0.01, per reading:", (ps < 0.01).all(axis=1).to_dict())
file condition pop reading mean sd n
01 control rest IT5A R1 1.208 2.881 644
01 control rest IT5A R1 (smallest block) 1.210 2.883 643
01 control rest IT5A R2 3.568 4.017 218
01 control rest IT5A R3 3.255 3.967 239
02 parkinsonian rest IT5A R1 0.471 1.657 644
02 parkinsonian rest IT5A R1 (smallest block) 0.471 1.658 643
02 parkinsonian rest IT5A R2 2.568 3.108 118
02 parkinsonian rest IT5A R3 2.165 3.002 140
R1 values [1.208, 0.471] expected [3.3, 2.2] within tolerance [False, False] all: False
R1 (smallest block) values [1.21, 0.471] expected [3.3, 2.2] within tolerance [False, False] all: False
R2 values [3.568, 2.568] expected [3.3, 2.2] within tolerance [True, False] all: False
R3 values [3.255, 2.165] expected [3.3, 2.2] within tolerance [True, True] all: True
reading mean 1 mean 2 n paired T1 Wilcoxon T2 paired t T3 Mann-Whitney T4 Welch t
R1 1.207804 0.470564 644 5.683002e-33 6.975306e-26 3.149798e-11 2.340198e-08
R2 3.568010 2.568165 109 8.126468e-17 1.544074e-20 1.704168e-02 1.185273e-02
R2 union 3.568010 2.568165 227 5.683002e-33 4.509823e-31 1.704168e-02 1.185273e-02
R3 3.254502 2.164596 124 6.935017e-19 1.977925e-22 1.934286e-03 2.709347e-03
R3 union 3.254502 2.164596 255 5.683002e-33 5.702655e-30 1.934286e-03 2.709347e-03
All four tests below p = 0.01, per reading: {'R1': True, 'R2': False, 'R2 union': False, 'R3': True, 'R3 union': True}
Result: reproduced. Under R3 the rest IT5A rates are 3.25 in the control and 2.16 spikes/s in the parkinsonian file, within tolerance of 3.3 and 2.2, and every test finds the decrease at p below 0.01 (largest 0.0027, Welch), under both pairings. The outcome rests on R3: R1 gives 1.21 and 0.47, outside tolerance, and R2 3.57 and 2.57, the parkinsonian value outside 1.98 to 2.42, with unpaired tests 0.017 and 0.012.
activated-pt5b-rate-pd-vs-control¶
In the activated state, PT5B firing rate is higher and less variable in the parkinsonian than in the control condition (29.7 +/- 12.7 against 26.8 +/- 18.2 spikes/s, p < 0.001).
Criterion: files -03 and -04, as rest-pt5b-rate-pd-vs-control. The Discussion says there was no significant change in the activated state; the outcome under every test is reported for both.
EXP["activated-pt5b-rate-pd-vs-control"] = [(26.8, 2.68), (18.2, 1.82), (29.7, 2.97), (12.7, 1.27)]
check_rates("activated-pt5b-rate-pd-vs-control", "PT5B", ["03", "04"], [("03", "mean"), ("03", "sd"), ("04", "mean"), ("04", "sd")])
cmpt = compare("PT5B", "03", "04")
print(); print(cmpt.to_string(index=False))
ps = cmpt.set_index("reading")[["T1 Wilcoxon", "T2 paired t", "T3 Mann-Whitney", "T4 Welch t"]]
print("\nAll four tests below p = 0.001, per reading:", (ps < 0.001).all(axis=1).to_dict())
print("Any test at p < 0.05 (the Discussion's 'no significant change'), per reading:", (ps < 0.05).any(axis=1).to_dict())
t = rate_rows("PT5B", ["03", "04"]).set_index(["reading", "file"])
print("Parkinsonian sd lower, per reading:", {r: bool(t.loc[(r, "04"), "sd"] < t.loc[(r, "03"), "sd"]) for r in ["R1", "R2", "R3"]})
file condition pop reading mean sd n
03 control activated PT5B R1 26.759 18.173 1435
03 control activated PT5B R1 (smallest block) 26.759 18.173 1435
03 control activated PT5B R2 30.597 16.128 1255
03 control activated PT5B R3 26.759 18.173 1435
04 parkinsonian activated PT5B R1 29.677 12.670 1435
04 parkinsonian activated PT5B R1 (smallest block) 29.677 12.670 1435
04 parkinsonian activated PT5B R2 30.572 11.747 1393
04 parkinsonian activated PT5B R3 29.677 12.670 1435
R1 values [26.759, 18.173, 29.677, 12.67] expected [26.8, 18.2, 29.7, 12.7] within tolerance [True, True, True, True] all: True
R1 (smallest block) values [26.759, 18.173, 29.677, 12.67] expected [26.8, 18.2, 29.7, 12.7] within tolerance [True, True, True, True] all: True
R2 values [30.597, 16.128, 30.572, 11.747] expected [26.8, 18.2, 29.7, 12.7] within tolerance [False, False, True, True] all: False
R3 values [26.759, 18.173, 29.677, 12.67] expected [26.8, 18.2, 29.7, 12.7] within tolerance [True, True, True, True] all: True
reading mean 1 mean 2 n paired T1 Wilcoxon T2 paired t T3 Mann-Whitney T4 Welch t
R1 26.758976 29.677019 1435 3.205924e-07 1.598057e-08 0.005187 6.450915e-07
R2 30.596917 30.571803 1218 9.927334e-01 3.579458e-01 0.059701 9.638129e-01
R2 union 30.596917 30.571803 1430 3.205924e-07 1.597122e-08 0.059701 9.638129e-01
R3 26.758976 29.677019 1435 3.205924e-07 1.598057e-08 0.005187 6.450915e-07
R3 union 26.758976 29.677019 1435 3.205924e-07 1.598057e-08 0.005187 6.450915e-07
All four tests below p = 0.001, per reading: {'R1': False, 'R2': False, 'R2 union': False, 'R3': False, 'R3 union': False}
Any test at p < 0.05 (the Discussion's 'no significant change'), per reading: {'R1': True, 'R2': False, 'R2 union': True, 'R3': True, 'R3 union': True}
Parkinsonian sd lower, per reading: {'R1': True, 'R2': True, 'R3': True}
Result: partially reproduced. Under R1 (and R3, which equals it) the activated PT5B rate is 26.76 +/- 18.17 in the control and 29.68 +/- 12.67 spikes/s in the parkinsonian file, all four within tolerance, and the standard deviation is lower; the Wilcoxon, paired t and Welch tests give p from 1.6e-08 to 6.5e-07, but the Mann-Whitney test gives 0.0052, above 0.001. Under R2 the means are 30.60 and 30.57 and no test is below 0.05. The Discussion's statement of no significant change in the activated state holds under R2 and not under R1 or R3.
activated-it6-rate-pd-vs-control¶
In the activated state, IT6 firing rate is higher in the parkinsonian than in the control condition (6.0 against 3.5 spikes/s, p < 0.001).
Criterion: files -03 and -04, R1, R2 and R3; reproduced when under one reading both means are within tolerance and the parkinsonian rate is higher with p < 0.001 under every test.
EXP["activated-it6-rate-pd-vs-control"] = [(3.5, 0.35), (6.0, 0.6)]
check_rates("activated-it6-rate-pd-vs-control", "IT6", ['03', '04'], [('03', 'mean'), ('04', 'mean')])
cmpt = compare("IT6", "03", "04")
print()
print(cmpt.to_string(index=False))
ps = cmpt.set_index("reading")[["T1 Wilcoxon", "T2 paired t", "T3 Mann-Whitney", "T4 Welch t"]]
print("\nAll four tests below p = 0.001, per reading:", (ps < 0.001).all(axis=1).to_dict())
file condition pop reading mean sd n
03 control activated IT6 R1 0.952 3.126 1244
03 control activated IT6 R1 (smallest block) 0.958 3.136 1236
03 control activated IT6 R2 4.874 5.569 243
03 control activated IT6 R3 3.473 5.192 341
04 parkinsonian activated IT6 R1 1.729 4.493 1244
04 parkinsonian activated IT6 R1 (smallest block) 1.740 4.506 1236
04 parkinsonian activated IT6 R2 6.637 6.710 324
04 parkinsonian activated IT6 R3 5.990 6.671 359
R1 values [0.952, 1.729] expected [3.5, 6.0] within tolerance [False, False] all: False
R1 (smallest block) values [0.958, 1.74] expected [3.5, 6.0] within tolerance [False, False] all: False
R2 values [4.874, 6.637] expected [3.5, 6.0] within tolerance [False, False] all: False
R3 values [3.473, 5.99] expected [3.5, 6.0] within tolerance [True, True] all: True
reading mean 1 mean 2 n paired T1 Wilcoxon T2 paired t T3 Mann-Whitney T4 Welch t
R1 0.952048 1.728645 1244 1.448811e-11 1.437015e-08 2.339530e-05 6.066664e-07
R2 4.873859 6.637144 124 6.730538e-09 1.001209e-08 6.007919e-03 6.839243e-04
R2 union 4.873859 6.637144 443 1.448811e-11 9.966652e-09 6.007919e-03 6.839243e-04
R3 3.473161 5.990069 228 6.422049e-18 2.020966e-16 2.066608e-10 3.377545e-08
R3 union 3.473161 5.990069 472 1.448811e-11 1.033167e-08 2.066608e-10 3.377545e-08
All four tests below p = 0.001, per reading: {'R1': True, 'R2': False, 'R2 union': False, 'R3': True, 'R3 union': True}
Result: reproduced. Under R3 the activated IT6 rates are 3.47 in the control and 5.99 spikes/s in the parkinsonian file, within tolerance of 3.5 and 6.0, and every test finds the increase at p below 1e-07 under both pairings (largest 3.4e-08, Welch). The outcome rests on R3: R1 gives 0.95 and 1.73 and R2 4.87 and 6.64, outside tolerance, though the parkinsonian rate is higher under both.
rest-beta-power-order-of-magnitude¶
At rest, LFP beta power around 15 Hz is an order of magnitude larger in the parkinsonian than in the control condition.
Criterion: files -01 and -02, LFP in W, readings S1, S2 (E1 only); power (a) at 15 Hz and (b) mean over 14 to 16 Hz; ratio of time-averaged parkinsonian to control power; reproduced when the ratio is in 3.16 to 31.6 under every reading, not reproduced when below 3.16 under every reading. As a variant, the ratio of the spectrograms' maxima (the colour bars of Figs. 3 and 6 are x 10^-5 and x 10^-4).
rows = []
for s in ("S1", "S2"):
f1, _, S1c, _ = TF[("01", s)]
f2, _, S2p, _ = TF[("02", s)]
at15 = lambda f, S: S[np.argmin(np.abs(f - 15))].mean()
for name, fn in [("(a) at 15 Hz", at15), ("(b) 14-16 Hz", lambda f, S: m.band_power(f, S, (14, 16)).mean())]:
a, b = fn(f1, S1c), fn(f2, S2p)
rows.append({"reading": s, "measure": name, "control": a, "parkinsonian": b, "ratio": b / a,
"log10 ratio": np.log10(b / a), "in 3.16-31.6": 10 ** 0.5 <= b / a <= 10 ** 1.5})
rows.append({"reading": s, "measure": "variant, max over the spectrogram", "control": S1c.max(), "parkinsonian": S2p.max(),
"ratio": S2p.max() / S1c.max(), "log10 ratio": np.log10(S2p.max() / S1c.max()),
"in 3.16-31.6": 10 ** 0.5 <= S2p.max() / S1c.max() <= 10 ** 1.5})
print(pd.DataFrame(rows).to_string(index=False))
reading measure control parkinsonian ratio log10 ratio in 3.16-31.6
S1 (a) at 15 Hz 0.000008 0.001038 129.004845 2.110606 False
S1 (b) 14-16 Hz 0.000008 0.000915 110.964864 2.045185 False
S1 variant, max over the spectrogram 0.000071 0.001506 21.208093 1.326502 True
S2 (a) at 15 Hz 0.000001 0.000087 65.478883 1.816101 False
S2 (b) 14-16 Hz 0.000001 0.000087 65.478883 1.816101 False
S2 variant, max over the spectrogram 0.000045 0.000135 2.993552 0.476187 False
Result: partially reproduced. Parkinsonian rest LFP power around 15 Hz is far larger than control under every reading, but by more than the criterion's order of magnitude: the ratio is 129 (S1, at 15 Hz), 111 (S1, 14 to 16 Hz) and 65 (S2, both), above 31.6, so neither the criterion's reproduced range (3.16 to 31.6) nor its not-reproduced range (below 3.16) applies. The ratio of the spectrograms' maxima, a variant, is 21.2 under S1 and 3.0 under S2.
activated-20-35hz-power-pd-vs-control¶
In the activated state, the parkinsonian condition shows more power at 20 to 35 Hz than the control condition.
Criterion: files -03 and -04, LFP readings S1, S2 (E1) and the PT5B SCH spectrum; reproduced when mean 20 to 35 Hz power is higher in the parkinsonian file under every reading.
rows = []
for s in ("S1", "S2"):
a = m.band_power(TF[("03", s)][0], TF[("03", s)][2], (20, 35)).mean()
b = m.band_power(TF[("04", s)][0], TF[("04", s)][2], (20, 35)).mean()
rows.append({"reading": f"LFP {s}", "control": a, "parkinsonian": b, "ratio": b / a, "higher": b > a})
f, p3 = SPEC["03"]; _, p4 = SPEC["04"]
sel = (f >= 20) & (f <= 35)
rows.append({"reading": "PT5B SCH (Welch)", "control": p3[sel].mean(), "parkinsonian": p4[sel].mean(), "ratio": p4[sel].mean() / p3[sel].mean(), "higher": p4[sel].mean() > p3[sel].mean()})
print(pd.DataFrame(rows).to_string(index=False))
reading control parkinsonian ratio higher
LFP S1 6.279969e-06 0.000029 4.553450 True
LFP S2 4.486304e-07 0.000002 4.714321 True
PT5B SCH (Welch) 2.913851e-01 3.434692 11.787467 True
Result: reproduced. Mean 20 to 35 Hz power is higher in the parkinsonian activated file under every reading: by a factor 4.55 for the LFP under S1, 4.71 under S2, and 11.8 for the PT5B SCH spectrum.
print(f"notebook ran in {time.time() - started:.0f} s")
notebook ran in 379 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 |
|---|---|
| fig1-network-size | blocked: data_missing (only cells that fired are stored) |
| model-pt5b-excitability-decrease | blocked: data_missing |
| robustness-four-sets | blocked: methods_underspecified |
| fig2-control-rest-beta | reproduced |
| fig2-control-activated-gamma | reproduced |
| fig2c-control-pt5b-rate-activated | reproduced |
| fig2c-control-it23-rate-activated | partially reproduced (under R3, pairing the cells kept in both files; two tests of four above 0.001) |
| fig2c-control-it6-rate-activated | reproduced (under R3) |
| control-it5-silenced-activated | reproduced (under R3) |
| control-it4-rate-activated | reproduced (under R3) |
| pt5b-highest-rate | blocked: methods_underspecified (population readings disagree) |
| control-cv-isi | reproduced |
| control-subthreshold-oscillations | blocked: methods_underspecified |
| control-duty-cycle | not reproduced |
| fig3a-control-rest-spectrogram | not reproduced |
| fig3b-control-activated-spectrogram | not reproduced |
| control-coincident-spikes | not reproduced |
| fig4-control-unitary-events | not reproduced (under every count of coincidences) |
| fig5-pd-rest-beta | reproduced |
| fig5-pd-activated-gamma | not reproduced |
| fig5c-pd-pt5b-rate-activated | reproduced |
| fig5c-pd-it23-rate-activated | not reproduced (under R3, pairing the cells kept in both files; no pairing has every test below 0.001) |
| pd-it5-silenced-activated | reproduced (under R3) |
| pd-it6-rate-unchanged | reproduced (under R3, pairing the cells kept in both files) |
| pd-cv-isi | reproduced |
| pd-no-subthreshold-oscillations | blocked: methods_underspecified |
| pd-activated-vm-more-negative | reproduced |
| pd-duty-cycle | not reproduced |
| fig6a-pd-rest-spectrogram | not reproduced |
| fig6b-pd-activated-spectrogram | not reproduced |
| pd-coincident-spikes | not reproduced |
| fig7-pd-unitary-events | not reproduced (under every count of coincidences) |
| rest-pt5b-rate-pd-vs-control | reproduced |
| rest-it4-rate-pd-vs-control | not reproduced (values match under R3, no test below 0.05) |
| rest-it5a-rate-pd-vs-control | reproduced (under R3) |
| activated-pt5b-rate-pd-vs-control | partially reproduced |
| activated-it6-rate-pd-vs-control | reproduced (under R3) |
| rest-beta-power-order-of-magnitude | partially reproduced |
| activated-20-35hz-power-pd-vs-control | reproduced |
| rest-synchrony-increase | reproduced (under the pair count of coincidences) |
How the analysis differs from the paper's. The files hold one LFP trace, so only electrode reading E1 was run, taking "LFP 0" as electrode 0; E2 (mean of 11 electrodes) could not be. The spectrogram reading S2 uses a 250 ms window, since NetPyNE's own fft defaults cannot resolve below 156 Hz. Population sizes for R1 come from the gid blocks, since silent cells are not stored. The paper's IT rates match exactly when the mean is taken over the cells that fired at any time in the simulation (R3, the cells the file holds), and not over all cells (R1) or the cells active in W (R2). R3 was added to the claims file's readings in answer to a question; the paper does not say which cells enter a mean, so the eight IT outcomes that hold only under R3 rest on it as an assumption. Under R2 and R3 the paired tests were run on the cells kept in both files and on those kept in either (at 0 where absent); the first pairing is adopted, and pd-it6-rate-unchanged, fig2c-control-it23-rate-activated and fig5c-pd-it23-rate-activated rest on it. The coincidence and unitary-event analyses follow the claims file's definitions over all PT5B cells. With 17 to 42 PT5B spikes per ms, the share of coincident spikes and the counts of coincident bins or spikes saturate; the paper must have used another set of cells or another measure for its 1% to 3%, which it does not state, and a reader is asked. For the unitary events, pairs of coincident cells were also counted, against two nulls, and rest-synchrony-increase rests on that count. The S2 spectrogram's 2 Hz test was also run with 1 s and 2 s windows; no outcome changes.
What was found about the dataset. The units table holds only the cells that fired (2,917 to
4,480 of 10,073 M1 cells in the paper's set), where the description says spike trains of all
10,073 neurons. The paper's set holds 20 PT5B potentials per file, not 400, and those potentials
match their cells' stored spikes only in the first half second; in W they seem to come from a run
that diverged from the stored spikes, which the files cannot establish. sub-001/sub-001.nwb duplicates
sub-001_ses-sM1-04-22-2024-01.nwb. Each file holds one LFP trace with no electrode position.
The files' related publication is the preprint, the dandiset lists no related resource, and its
summary names spike sorting as the technique of a simulation.