Skip to content

About

Selective depletion of upper-layer somatostatin interneuron subtypes in schizophrenia: seven-cohort snRNA-seq meta-analysis, Xenium spatial replication, and SCZ common-variant genetics

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

scz_celltype_paper

Analysis code for "Selective depletion of upper-layer somatostatin interneuron subtypes in schizophrenia" (Endresz et al., bioRxiv, 2026) — a seven-dataset snRNA-seq meta-analysis with Xenium spatial transcriptomics, common-variant genetics and patch-seq physiology.

Headline: upper-layer somatostatin (Sst) interneuron subtypes are selectively depleted in schizophrenia, the same subtypes carry the most SCZ common-variant risk, and they are distinguished by HCN1 and a sag-dominated intrinsic physiology.

The manuscript itself is not in this repo. This is the analysis code, the committed figure inputs, and the rendered figures.

Contact

Questions about the code or the analyses are best raised as a GitHub issue, so the answer is visible to whoever asks next.

Shreejoy Tripathy senior author, corresponding @stripathy · shreejoy.tripathy@camh.ca
Nicole Endresz first author; the snRNA-seq meta-analysis in snrnaseq/ @nendresz-16

Krembil Centre for Neuroinformatics, Centre for Addiction & Mental Health, and the University of Toronto.


Finding the code behind a figure

Figure Built by Component
Fig 1 Final_figures/Code/Figure_1.py, Figure_1a_Barchart.r snrnaseq/
Fig 2 scripts/09_composite_figure.R transcriptomic/
Fig 3 Final_figures/Code/Figure_3.r snrnaseq/
Fig 4 scripts/figures/scz_sst_hcn1_story.R genetics/
S1 Supplemental/Code/Markerplot.py snrnaseq/
S2 code/analysis/plot_markers_resolvability_combined.R spatial/
S3 code/analysis/plot_xenium_merfish_composite.R spatial/
S4 Supplemental/Code/Supertype_DE.r snrnaseq/
S5 Supplemental/Code/NonNeuron_supplement.r snrnaseq/
S6 code/02_plot_pooling_heatmap.R snrnaseq/composition_sensitivity/
S7 Supplemental/Code/Sensitivity_analysis_Barchart.r snrnaseq/
S8 scripts/sst_strata/08_figure.R transcriptomic/
S9 scripts/figures/plot_supp_enrichment_seaad125.R genetics/
S10 scripts/figures/plot_fig4_robustness.R genetics/
T6 scripts/figures/build_supp_table_patchseq_labels.py genetics/

Rendered figures, where they are in the repo, are under manuscript/figures/; that folder's README says which are present.

Supplementary Methods SM1 describes the Xenium pipeline in spatial/. Figures 1b–f are assembled by hand from the annotated Xenium objects that spatial/ produces.

Two conventions, not one. The renderers in transcriptomic/, spatial/, genetics/ and snrnaseq/composition_sensitivity/ write into manuscript/figures/ in place and run from committed inputs, so those figures regenerate from a clean clone without the raw data. Most renderers in snrnaseq/Final_figures/ ran on the Alliance cluster against the full per-dataset objects and wrote to a working directory there; those are here to be read rather than re-executed. Each component's README gives the detail.

Items that must be settled before submission are collected in KNOWN_ISSUES.md, with resolved ones listed at its foot.


Components

Directory What it does
transcriptomic/ Cross-platform differential expression (Fig 2) and the Sst depletion-strata analysis (S8)
spatial/ The Xenium pipeline: cell typing, cortical depth, laminar segmentation, plus Xenium DE and composition (SM1, S2, S3; inputs to Figs 1–3)
genetics/ MAGMA cell-type enrichment of SCZ common-variant risk, fine-mapping, patch-seq physiology (Fig 4, S9, S10, T6)
crossdisorder/ Whether the SCZ-depleted Sst supertypes also decline in Alzheimer's (the AD axis of Fig 4i)
snrnaseq/ The seven-dataset snRNA-seq pipeline: label transfer, composition and DE meta-analysis (Fig 1a, Fig 3, S1, S4, S5, S7), plus a composition robustness check (S6)
shared/ Cross-component interfaces: the snRNA-seq DE seam, and the figure-input staleness guard
manuscript/figures/ The rendered figures, main and supplementary
reserve/ Analyses built and deliberately left out of the paper

The snRNA-seq DE and composition meta-analysis (Endresz et al., in prep) is the root of the dependency graph — everything else is downstream of it. The interface through which the other components consume it is documented in shared/snrnaseq_de/.

See DATA_FLOW.md for who produces what and who consumes it.


Data

Code is tracked; large data is not. Raw Xenium images, sequencing data, GWAS summary statistics and reference atlases are git-ignored and wired in via symlinks or documented download URLs. What is committed is the small set of figure inputs each renderer needs, so no figure depends on data you have to fetch first. Each component's data/README.md lists what to obtain and from where.

Published data (Zenodo)

The data this study generated is deposited at Zenodo, CC-BY-4.0: harmonized per-cell cell-type annotations for all eight datasets, and the cell-type-specific differential expression results at subclass and supertype resolution.

DOI Resolves to
Cite this 10.5281/zenodo.22801229 the concept record — always the newest version
Current version 10.5281/zenodo.22802546 v2, published 2026-09-16

The table below describes v2, which is what 00b_figure_inputs_from_zenodo.py pins and what every claim here was checked against. v1 (22801230) is superseded: its labels were inconsistent between files, so cell_metadata could not be joined to DE_supertype at all. Use v2.

File Size md5 Contents
cell_metadata.parquet 53.6 MB 4e72994e55a2e28a1fe189e0652fa826 3,738,935 cells x 14 columns; 493 donors, 8 datasets (7 snRNA-seq + Xenium); class / subclass / supertype, diagnosis, sex, age, n_counts, n_genes, qc_pass, spatial_domain
DE_subclass.parquet 74.1 MB 71f19c9c6b8e2cb375b38c55f8e757f6 2,471,813 rows: gene, logFC, SE, PValue, FDR, cell_type, cohort; 48,252 genes x 24 subclasses x 9 cohorts (the 7 datasets, Meta-analysis, and Xenium)
DE_supertype.parquet 224.6 MB 031e59837b74d5f6e9d5e425c1df48d9 7,672,228 rows, same columns; 42,249 genes x 115 supertypes x 8 cohorts (the 7 datasets and Meta-analysis; no Xenium)

This is the citable route to the large DE tables, which are not in the repo. Verified 2026-09-16: the Meta-analysis rows of DE_subclass.parquet are the same data as the committed transcriptomic/data/figure_inputs/DE_genes_all_cells_scz.csv — 231,135 rows, 16,361 genes, 24 cell types, agreeing to 1e-16. cell_metadata.parquet is the harmonized annotation set behind the composition analyses.

The three files join on cell type in v2 — that is what v2 fixed. Labels follow the SEA-AD palette the annotations came from (snrnaseq/cluster_order_and_colors.csv), which uses long subclass names (Astrocyte, Microglia-PVM) and short-prefixed supertypes (Astro_1, L2/3 IT_1, Lamp5_Lhx6_1):

cell_metadata.supertype  n  DE_supertype.cell_type : 115 of 115
cell_metadata.subclass   n  DE_subclass.cell_type  :  24 of 24

One difference remains, by design: Zenodo names the datasets MSSM1 / MSSM2 / Frohlich and uses the Control / SCZ diagnosis vocabulary, while the in-repo snrnaseq/ tables use MtSinai / MSSM / OFC and Control / Schizophrenia. Map those when joining Zenodo to repo files. shared/harmonize_zenodo_labels.py is the script that produced v2 and documents the conventions.

Supplementary Tables T1–T4 are published with the article, not here.

Reproducing

git clone <remote-url> && cd scz_celltype_paper
git lfs install && git lfs pull        # REQUIRED — see below

This repository no longer uses Git LFS. Four large DE tables (~2 GB total) were tracked there until 2026-09-16 and have been removed, so a clone is small and no reader hits an LFS quota. The data is not lost — it is published as parquet on Zenodo, described under Published data above. If you have an old clone, git pull will drop them.

You can skip LFS entirely for Figure 2. The same DE data is published as parquet on Zenodo, and a script rebuilds the two snapshots Figure 2 reads:

python3 transcriptomic/scripts/00b_figure_inputs_from_zenodo.py           # check only
python3 transcriptomic/scripts/00b_figure_inputs_from_zenodo.py --write   # rebuild

It downloads DE_subclass.parquet (73.7 MB, md5-checked), translates the Zenodo schema to the repo's, and reports whether it reproduces the tracked snapshots. Verified 2026-09-16 — it does, on every row:

Rebuilt snapshot Rows Worst difference vs tracked
meta_results_cohorts_subclass_forest.csv 143 6.7e-16
DE_genes_all_cells_scz.csv 231,135 5.8e-15

One caveat: Zenodo publishes SE but not k, tau2 or I2. Figure 2 never reads those, so it is unaffected. transcriptomic/scripts/sst_strata/ (Supplementary S8) does read them — but it reads them from the committed DE_genes_all_cells_scz.csv, which carries all three and is an ordinary tracked file. So S8 works from a clone either way; just do not overwrite that snapshot with --write if you intend to run S8. The script warns before it does. Confidence intervals are not a problem — it derives ci.lb/ci.ub as estimate ± 1.959964 × se, matching the tracked table to 1.4e-8.

Then follow the component README for the figure you want. Figure 2, Figure 4 and supplementary figures S2, S3, S6, S8, S9 and S10 render from committed inputs. Re-running the analyses behind them needs the external data.

Two prerequisites:

  • R packages. Beyond the usual tidyverse/ggplot2 stack the renderers need ragg and ggsignif, and Figure 4 needs svglite. Missing any of them fails only at the final ggsave, after the whole figure has been computed.
  • Working directory. Most renderers locate their own root from --file= and run from anywhere. The two in spatial/ do not: run them from spatial/ (cd spatial && Rscript code/analysis/<script>.R), or their relative source() and input paths miss.

Figures 1 and 3 and supplementary figures S1, S4 and S5 are built by snrnaseq/Final_figures/. Most do not render from a clone — those scripts ran on the Alliance cluster against the full per-dataset objects, with cluster-absolute paths, and are here to be read. Two exceptions: S7 renders anywhere (both its inputs are committed), and so do Figure 3 panels d and e, which need only the committed Xenium metadata rather than the Seurat object. The one committed input from that pipeline is the per-donor cell-count matrix behind the composition analysis, snrnaseq/Compositional_analysis/Files/7_cohorts_metadata_names.csv.


License

Two licenses, split the usual way for a paper repository — see LICENSE for the full text and the third-party carve-outs.

Material License
Source code (.R, .r, .py, .sh) MIT
Committed data snapshots, rendered figures, documentation CC BY 4.0, matching the Zenodo deposit

Creative Commons recommends against CC licenses for software — they carry no patent grant and no source-distribution terms — which is why the code is MIT rather than CC BY.

Human donor data from the contributing cohorts stays governed by the consortia's own agreements; neither license grants rights over it. The donor-level tables committed here carry de-identified demographic variables only.

Cite via CITATION.cff, or the paper plus the Zenodo concept DOI 10.5281/zenodo.22801229.

About

Selective depletion of upper-layer somatostatin interneuron subtypes in schizophrenia: seven-cohort snRNA-seq meta-analysis, Xenium spatial replication, and SCZ common-variant genetics

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages