jan-eforest commited on
Commit
c2e511a
·
verified ·
1 Parent(s): 9035df2

Add dataset card

Browse files
Files changed (1) hide show
  1. README.md +86 -0
README.md ADDED
@@ -0,0 +1,86 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: cc-by-4.0
3
+ pretty_name: "census-large: balanced human scRNA-seq corpus from CELLxGENE Census"
4
+ size_categories:
5
+ - 1M<n<10M
6
+ tags:
7
+ - biology
8
+ - single-cell
9
+ - scRNA-seq
10
+ - transcriptomics
11
+ - cellxgene
12
+ - autoencoder
13
+ - autoencodix
14
+ ---
15
+
16
+ # census-large
17
+
18
+ A balanced human single-cell RNA-seq corpus derived from the
19
+ [CZ CELLxGENE Census](https://chanzuckerberg.github.io/cellxgene-census/). It was used to tune, train and evaluate
20
+ the large pretrained AUTOENCODIX models (Ontix, Varix, Disentanglix), which are available in the
21
+ [autoencodix model collection](https://huggingface.co/autoencodix).
22
+
23
+ - Code to create the corpus: [ACX_largemodel_reproducibility](https://github.com/jan-forest/ACX_largemodel_reproducibility)
24
+ (`src/01_get_census_data.py`, `src/02_census_preparation.py`)
25
+ - Extended results (evaluation tables, holdout latent embeddings, plots): [Zenodo](https://doi.org/10.5281/zenodo.24396083)
26
+ - Python package: [autoencodix](https://github.com/jan-forest/autoencodix_package) ([PyPI](https://pypi.org/project/autoencodix/))
27
+
28
+ ## Corpus creation
29
+
30
+ - Source: CELLxGENE Census LTS release `2025-11-08`, *Homo sapiens*.
31
+ - Balancing: cells were grouped into chunks, one per unique combination of
32
+ cell type × tissue × sex (male, female, unknown) × disease state (normal, diseased).
33
+ For each chunk, cells with fewer than 5% expressed genes were removed, and each chunk was then randomly downsampled to
34
+ 1,000 cells. Chunks with fewer than 1,000 cells were omitted, which left 4,158 chunks.
35
+ - Expression values are `log1p` transformed and cover 16,375 genes (Ensembl IDs in `var`, symbols in
36
+ `var["feature_name"]`).
37
+ - The joined corpus was randomly split into 90% train, 5% tune (hyperparameter optimisation) and 5% holdout
38
+ (evaluation).
39
+
40
+ ## Files
41
+
42
+ | Split | AnnData | AUTOENCODIX container | Cells (container splits) | Used for |
43
+ |---|---|---|---|---|
44
+ | train | `census_train_split.h5ad` | `census-acxcontainer_train.pkl` | 3,364,463 (3,330,818 train / 16,822 valid / 16,823 test) | Final model training |
45
+ | tune | `census_tune_split.h5ad` | `census-acxcontainer_tune.pkl` | 177,077 (106,246 train / 63,747 valid / 7,084 test) | Hyperparameter tuning |
46
+ | holdout | `census_holdout_split.h5ad` | `census-acxcontainer_holdout.pkl` | 186,396 | Evaluation, xAI, data generation |
47
+
48
+ Each split is provided in two formats with the same content:
49
+
50
+ - **`*.h5ad`**: standard [AnnData](https://anndata.readthedocs.io/) files. `obs` contains the Census cell annotations
51
+ (e.g. `cell_type`, `tissue`, `tissue_general`, `disease`, `sex`, `development_stage`), the derived annotations
52
+ `high_level_stage_name` and `is_diseased`, and 25 cell-type classification tasks (`Task1_Monocytes` …
53
+ `Task25_Secretory-Epithelium`) used for downstream evaluation.
54
+ - **`*.pkl`**: AUTOENCODIX data containers with fixed train/valid/test assignments, exactly as used in the experiments.
55
+ Loading them requires `autoencodix==0.2.4`.
56
+
57
+ ## Usage
58
+
59
+ ```python
60
+ from huggingface_hub import hf_hub_download
61
+ import anndata as ad
62
+
63
+ path = hf_hub_download("autoencodix/census-large", "census_holdout_split.h5ad", repo_type="dataset")
64
+ adata = ad.read_h5ad(path) # use backed="r" for the large train split
65
+ ```
66
+
67
+ ```python
68
+ import pickle
69
+ from huggingface_hub import hf_hub_download
70
+
71
+ path = hf_hub_download("autoencodix/census-large", "census-acxcontainer_holdout.pkl", repo_type="dataset")
72
+ with open(path, "rb") as f:
73
+ acx_container = pickle.load(f) # requires autoencodix==0.2.4
74
+ ```
75
+
76
+ The containers are pickle files. Only load pickle files from sources you trust.
77
+
78
+ ## License and attribution
79
+
80
+ The data are derived from the CZ CELLxGENE Discover / Census corpus. Datasets in CELLxGENE are published under
81
+ CC BY 4.0. Please cite the CELLxGENE Discover publication and the original datasets (`obs["dataset_id"]`) together
82
+ with the AUTOENCODIX publication.
83
+
84
+ - CZI Cell Science Program et al. *CZ CELLxGENE Discover: a single-cell data platform for scalable exploration,
85
+ analysis and modeling of aggregated data.* Nucleic Acids Research 53(D1):D886–D900 (2025).
86
+ - AUTOENCODIX publication: citation will be added when the preprint is available.