Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -31,23 +31,50 @@ Stim8hr 132,000 / Stim48hr 132,000 = **396,000**, across 4 donors (D1–D4). Gen
|
|
| 31 |
|
| 32 |
## Embedding recipe (frozen; produced upstream, not re-run by the workbench)
|
| 33 |
|
| 34 |
-
|
|
|
|
|
|
|
| 35 |
- HVG: `highly_variable_genes(n_top_genes=5000, flavor='seurat_v3')` on raw counts
|
| 36 |
-
|
| 37 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 38 |
- Graph/UMAP: `neighbors(n_neighbors=100, use_rep='X_scVI', random_state=42)` → `umap()`
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 45 |
|
| 46 |
## Contents
|
| 47 |
|
| 48 |
- `ntc_clustered.h5ad` — **396,000 × 18,130** (gene-symbol `var_names`).
|
| 49 |
-
- `X` = **log1p of total-count-normalized counts**
|
| 50 |
-
|
|
|
|
| 51 |
- `obs`: `perturbed_gene_name` (all `NTC`), `condition` {Rest, Stim8hr, Stim48hr},
|
| 52 |
`donor` {D1–D4}, `donor_id`, `L0.8` (Leiden cluster id).
|
| 53 |
- Slimmed to `X + obs + var` only; gzip ~14 GB → ~3.86 GB. **`obsm` is dropped —
|
|
@@ -57,8 +84,10 @@ Stim8hr 132,000 / Stim48hr 132,000 = **396,000**, across 4 donors (D1–D4). Gen
|
|
| 57 |
|
| 58 |
**Determinism:** `SEED=12345` in `stage1_pipeline.py` fixes the **downstream
|
| 59 |
nomenclature scoring** (`score_genes` panels + permutation-null FDR), i.e. the
|
| 60 |
-
workbench's *calls made from* this object. It does **not** regenerate the h5ad
|
| 61 |
-
the embedding
|
|
|
|
|
|
|
| 62 |
|
| 63 |
## State labels are the workbench's own
|
| 64 |
|
|
@@ -66,16 +95,19 @@ The 5 state programs the workbench assigns (Naive / Activated / Cycling / Memory
|
|
| 66 |
Treg) are **defined by spot**, not by the Marson paper (which defines no
|
| 67 |
cell-state taxonomy — its only clustering is of ~3,341 perturbations, not cells).
|
| 68 |
Functional calls (Th1/Th2/Th17/Tfh/Treg/CD4-CTL) are scored against the framework
|
| 69 |
-
in: Masopust D
|
| 70 |
-
2026;26(4):298–313.
|
|
|
|
| 71 |
|
| 72 |
## License & attribution
|
| 73 |
|
| 74 |
-
Released under the **MIT License**, mirroring the upstream CZI dataset
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
|
|
|
|
|
|
| 79 |
|
| 80 |
> Data derived from "Primary Human CD4+ T Cell Perturb-seq" (Zhu, Dann, … Marson,
|
| 81 |
> 2025), CZI Virtual Cells Platform, MIT License. Cite bioRxiv
|
|
@@ -86,14 +118,16 @@ A verbatim `LICENSE` (MIT text + the copyright line above) is included in the re
|
|
| 86 |
|
| 87 |
## Ethics
|
| 88 |
|
| 89 |
-
Source material is from primary human CD4⁺ T cells (4
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
|
|
|
|
|
|
| 94 |
|
| 95 |
## Versioning & contact
|
| 96 |
|
| 97 |
- Card version: v1.1 (corrected 2026-07-10) · Object: spot Stage-1, SEED=12345.
|
| 98 |
- Upstream: CZI VCP v1.0.0 (2025-12-22).
|
| 99 |
-
- Contact / issues:
|
|
|
|
| 31 |
|
| 32 |
## Embedding recipe (frozen; produced upstream, not re-run by the workbench)
|
| 33 |
|
| 34 |
+
Verified against the authors' notebook `src/2_embedding/ntc_embedding.ipynb`
|
| 35 |
+
(`emdann/GWT_perturbseq_analysis_2025`), which ran **scvi-tools 1.3.0**:
|
| 36 |
+
|
| 37 |
- HVG: `highly_variable_genes(n_top_genes=5000, flavor='seurat_v3')` on raw counts
|
| 38 |
+
— matches the authors' code exactly.
|
| 39 |
+
- scVI: `SCVI(n_latent=30, n_layers=2, dropout_rate=0.2, gene_likelihood="nb",
|
| 40 |
+
use_layer_norm="both", use_batch_norm="none", encode_covariates=True)`,
|
| 41 |
+
`setup_anndata(batch_key="donor_id")`; `n_hidden=128` and `dispersion="gene"`
|
| 42 |
+
are the scVI defaults (confirmed in the notebook's printed model repr, not passed
|
| 43 |
+
explicitly). Trained: `train(max_epochs=300, early_stopping=True,
|
| 44 |
+
early_stopping_patience=45, train_size=0.9, batch_size=1024,
|
| 45 |
+
limit_train_batches=20)`. The authors set **no scVI seed** — their embedding is
|
| 46 |
+
not seed-reproducible.
|
| 47 |
- Graph/UMAP: `neighbors(n_neighbors=100, use_rep='X_scVI', random_state=42)` → `umap()`
|
| 48 |
+
— matches exactly.
|
| 49 |
+
- Normalization: the authors apply plain `normalize_total()` (**default median
|
| 50 |
+
target_sum, not 1e4**) then `log1p`, and do so **after** the scVI/UMAP step
|
| 51 |
+
(scVI is trained on raw counts); the log-normalized matrix is what lands in
|
| 52 |
+
stored `.X`.
|
| 53 |
+
|
| 54 |
+
**Divergences in spot's own reproduction / description** (not in the authors' code):
|
| 55 |
+
|
| 56 |
+
- `scvi.settings.seed=0` is set by spot's `run_scvi_embedding.py` for
|
| 57 |
+
determinism; the authors' notebook has no seed.
|
| 58 |
+
- `normalize_total(target_sum=1e4)` was used by spot; the authors use the default
|
| 59 |
+
(median) target_sum. If byte-parity with the authors' `.X` matters, drop the 1e4.
|
| 60 |
+
- **Leiden `resolution=0.8` → `obs['L0.8']` is spot's own clustering, not the
|
| 61 |
+
authors'.** `ntc_embedding.ipynb` performs **no Leiden/Louvain clustering** of
|
| 62 |
+
the NTC cells at all (the only Leiden in the repo is in
|
| 63 |
+
`6_functional_interaction`, clustering *perturbations*, not cells). The 13-cluster
|
| 64 |
+
NTC partition is introduced by spot.
|
| 65 |
+
|
| 66 |
+
> Bottom line: the scVI architecture/likelihood/HVG/neighbor params are
|
| 67 |
+
> **paper-exact**, but the recipe is **not** a verbatim reproduction — the
|
| 68 |
+
> normalization target_sum differs, spot adds a seed the authors did not set, and
|
| 69 |
+
> the Leiden clustering is spot's addition. Treat the embedding as
|
| 70 |
+
> "paper-parameter scVI, spot-clustered," not "paper-exact reproduction."
|
| 71 |
|
| 72 |
## Contents
|
| 73 |
|
| 74 |
- `ntc_clustered.h5ad` — **396,000 × 18,130** (gene-symbol `var_names`).
|
| 75 |
+
- `X` = **log1p of total-count-normalized counts**. **Raw counts are NOT
|
| 76 |
+
retained** in the slimmed object. (See Embedding recipe re: target_sum — the
|
| 77 |
+
authors normalize to the default median; spot's variant used 1e4.)
|
| 78 |
- `obs`: `perturbed_gene_name` (all `NTC`), `condition` {Rest, Stim8hr, Stim48hr},
|
| 79 |
`donor` {D1–D4}, `donor_id`, `L0.8` (Leiden cluster id).
|
| 80 |
- Slimmed to `X + obs + var` only; gzip ~14 GB → ~3.86 GB. **`obsm` is dropped —
|
|
|
|
| 84 |
|
| 85 |
**Determinism:** `SEED=12345` in `stage1_pipeline.py` fixes the **downstream
|
| 86 |
nomenclature scoring** (`score_genes` panels + permutation-null FDR), i.e. the
|
| 87 |
+
workbench's *calls made from* this object. It does **not** regenerate the h5ad.
|
| 88 |
+
Note the embedding itself is only partially seeded: `neighbors` used
|
| 89 |
+
`random_state=42`, but the authors set no scVI training seed, so the scVI latent
|
| 90 |
+
space (and hence UMAP/clustering) is not byte-reproducible from their code.
|
| 91 |
|
| 92 |
## State labels are the workbench's own
|
| 93 |
|
|
|
|
| 95 |
Treg) are **defined by spot**, not by the Marson paper (which defines no
|
| 96 |
cell-state taxonomy — its only clustering is of ~3,341 perturbations, not cells).
|
| 97 |
Functional calls (Th1/Th2/Th17/Tfh/Treg/CD4-CTL) are scored against the framework
|
| 98 |
+
in: Masopust D, Awasthi A, Bosselut R, et al. "Guidelines for T cell
|
| 99 |
+
nomenclature." *Nat Rev Immunol* 2026;26(4):298–313.
|
| 100 |
+
doi:10.1038/s41577-025-01238-2 (verified via Crossref).
|
| 101 |
|
| 102 |
## License & attribution
|
| 103 |
|
| 104 |
+
Released under the **MIT License**, mirroring the upstream CZI dataset. Evidence:
|
| 105 |
+
the CZI Croissant metadata (`metadata/*.jsonld`) for **all 12** AnnData splits
|
| 106 |
+
declares `license: https://mit-license.org/`, `version: 1.0.0`, `datePublished:
|
| 107 |
+
2025-12-22`, and `citeAs: unpublished`, with `url:
|
| 108 |
+
https://virtualcellmodels.cziscience.com/dataset/genome-scale-tcell-perturb-seq`.
|
| 109 |
+
MIT permits redistribution and derivatives (incl. commercial) provided the
|
| 110 |
+
copyright and permission notice are retained. Attribution:
|
| 111 |
|
| 112 |
> Data derived from "Primary Human CD4+ T Cell Perturb-seq" (Zhu, Dann, … Marson,
|
| 113 |
> 2025), CZI Virtual Cells Platform, MIT License. Cite bioRxiv
|
|
|
|
| 118 |
|
| 119 |
## Ethics
|
| 120 |
|
| 121 |
+
Source material is from primary human CD4⁺ T cells (4 adult donors, leukapheresis;
|
| 122 |
+
consent per the upstream study). This NTC subset carries only coded donor IDs
|
| 123 |
+
(D1–D4) and condition — **no demographic fields**. The upstream release does hold
|
| 124 |
+
donor demographics (age/sex/ethnicity/weight/height/smoker/blood-type) in
|
| 125 |
+
`sample_metadata.suppl_table.csv`; that table is **not** redistributed here, and
|
| 126 |
+
should not be, as it is the identifying layer. Confirm the upstream consent/PII
|
| 127 |
+
statement on the CZI dataset page before public release.
|
| 128 |
|
| 129 |
## Versioning & contact
|
| 130 |
|
| 131 |
- Card version: v1.1 (corrected 2026-07-10) · Object: spot Stage-1, SEED=12345.
|
| 132 |
- Upstream: CZI VCP v1.0.0 (2025-12-22).
|
| 133 |
+
- Contact / issues: <add maintainer name + email or HF handle>.
|