The Dataset Viewer has been disabled on this dataset.

scCAFM: a causality-aware single-cell foundation model

Tutorial datasets for scCAFM

Paper Code Model License

This repository holds the datasets used by the five scCAFM tutorials. scCAFM is a causality-aware single-cell foundation model that infers cell-specific gene regulatory networks (GRNs) and learns gene and cell embeddings. Every file is a tutorial-ready copy or derivative of a public dataset; the folder names match the notebook names.

Contents

Tutorial File Contents Dimensions Size
Cell-specific GRNs cell_specific_grns/mPancreas.h5ad E15.5 mouse pancreatic endocrinogenesis with cell-population annotations 3,696 cells × 27,998 genes 52.5 MB
Pooled GRNs with ChIP-seq benchmarking chipseq_grn_recovery/hESC.h5ad Human embryonic stem-cell expression 758 cells × 17,735 genes 45.9 MB
chipseq_grn_recovery/mESC.h5ad Mouse embryonic stem-cell expression 421 cells × 18,385 genes 47.7 MB
chipseq_grn_recovery/hESC-ChIP-seq.csv Human ChIP-seq reference network 441,991 edges 5.7 MB
chipseq_grn_recovery/mESC-ChIP-seq.csv Mouse ChIP-seq reference network 985,654 edges 13.2 MB
Pooled GRNs with Perturb-seq validation perturbseq_edge_validation/K562.h5ad K562 essential-scale CRISPRi Perturb-seq, raw counts 162,751 cells × 8,563 genes 792.8 MB
Cell type annotation cell_type_annotation/pbmc.h5ad Human PBMCs with 11 annotated cell types, raw counts 68,579 cells × 32,738 genes 312.5 MB
Gene perturbation prediction gene_perturbation_prediction/norman.h5ad Norman K562 CRISPRa single- and two-gene perturbations 91,205 cells × 5,045 genes 229.3 MB
gene_perturbation_prediction/go_prior.json GEARS Gene Ontology perturbation-gene universe 9,853 genes 0.1 MB
gene_perturbation_prediction/go_edges.csv GEARS Gene Ontology graph 202,314 edges 5.8 MB
gene_perturbation_prediction/split_manifest.json Provenance record for norman.h5ad – 2 kB

MANIFEST.tsv lists the SHA-256 checksum and exact byte size of every file. The collection totals about 1.5 GB.

Download

Download everything into tutorial_data/, the path used by the notebooks:

hf download kaichenxu/scCAFM-data --repo-type dataset --local-dir tutorial_data

Or from Python:

from huggingface_hub import snapshot_download

snapshot_download(
    repo_id="kaichenxu/scCAFM-data",
    repo_type="dataset",
    local_dir="tutorial_data",
)

Load a file:

import anndata as ad
import pandas as pd

pancreas = ad.read_h5ad("tutorial_data/cell_specific_grns/mPancreas.h5ad")
hesc_chip = pd.read_csv("tutorial_data/chipseq_grn_recovery/hESC-ChIP-seq.csv")

For reproducible analyses, pin a commit with the revision argument of snapshot_download.

File details

The .h5ad files follow the AnnData convention: cells in obs, genes in var, and the expression matrix in X.

Mouse pancreas · cell_specific_grns/

mPancreas.h5ad is the processed E15.5 pancreatic endocrinogenesis dataset distributed with scVelo, from the experiment of Bastidas-Ponce et al. (GSE132188). The obs["species"] value is corrected from human to mouse; the matrix, layers, annotations, and embeddings are otherwise unchanged.

Field Content
obs["clusters"] Eight detailed cell populations
obs["clusters_coarse"] Five broader populations
obs["species"] mouse
layers["spliced"], layers["unspliced"] Spliced and unspliced counts
obsm["X_pca"], obsm["X_umap"] PCA and UMAP coordinates
Embryonic stem cells and ChIP-seq references · chipseq_grn_recovery/

hESC.h5ad and mESC.h5ad are reformatted from the experimental expression data distributed with BEELINE, and the two CSV files keep BEELINE's ChIP-seq reference networks. The expression matrices are stored as cell-by-gene AnnData files with obs["species"] and obs["disease"] (set to normal).

CSV column Definition
Gene1 Regulator (transcription factor)
Gene2 Target gene supported by the ChIP-seq reference
K562 Perturb-seq · perturbseq_edge_validation/

K562.h5ad is derived from the raw single-cell count object of the K562 essential-scale CRISPRi Perturb-seq experiment (day 6) of Replogle et al. Of 310,385 original cells, 192,648 pass perturbation-level QC and 162,751 pass cell-level QC. Basic filters keep cells with at least 200 detected genes and genes detected in at least three cells. The QC parameters and cell counts are recorded in uns.

Field Content
X Raw counts after filtering and perturbation QC
obs["gene"] Perturbed gene, or non-targeting
obs["gene_id"] Ensembl identifier of the perturbed gene
obs["sgID_AB"] Paired guide identifiers
obs["species"], obs["disease"], obs["cell_line"], obs["cell_type"], obs["tissue"] Sample annotations
var["gene_name"] Gene symbol
uns["basic_filter"], uns["perturbation_qc"] Preparation parameters and cell counts
PBMC · cell_type_annotation/

pbmc.h5ad contains the fresh 68k PBMC dataset of Zheng et al. with its 11 annotated cell types.

Field Content
X Raw counts
obs["cell_type"] Cell-type label
obs["split"] Training/test split supplied with the file (20,579 / 48,000 cells)
obs["assay"], obs["tissue"], obs["disease"] Sample annotations
var_names, var["gene_ids"] Gene symbols and Ensembl identifiers

The tutorial builds its own stratified 70:30 split over all cells and does not use obs["split"].

Norman perturbations and GO prior · gene_perturbation_prediction/

norman.h5ad is a processed object of the K562 CRISPRa experiment of Norman et al. (GSE133344) in the layout used by GEARS. The object is already gene-filtered, and its expression is consistent with median-library normalization followed by log1p.

Field Content
X Normalized log expression
layers["counts"] Raw counts
obs["condition"], obs["condition_name"], obs["control"], obs["dose_val"], obs["cell_type"] Perturbation labels and GEARS condition fields
var_names, var["gene_name"] Ensembl identifiers and gene symbols
uns GEARS differential-expression rankings and dropout caches

go_prior.json records the 9,853-gene perturbation universe and the hashes of the GEARS source files (6153417, 6934320, 6934319). go_edges.csv holds the 202,314 directed edges (source, target, importance) kept by the GEARS rule of the top 21 incoming edges per target. split_manifest.json records the checksum and stored fields of norman.h5ad and the preparation recipe that the tutorial applies in memory.

Sources and licenses

Each file keeps the terms of its source, so the repository uses the Hugging Face other license. LICENSES.md gives the full terms.

Files Source study Data record License
mPancreas.h5ad Bastidas-Ponce et al., Development (2019) GSE132188, via scVelo Terms of the source record
hESC.h5ad, mESC.h5ad, ChIP-seq CSVs Pratapa et al., Nature Methods (2020), 10.1038/s41592-019-0690-6 10.5281/zenodo.3378975; GSE75748, GSE98664 CC BY-NC 4.0
K562.h5ad Replogle et al., Cell (2022), 10.1016/j.cell.2022.05.013 10.25452/figshare.plus.20029387.v1; GSE146194 CC BY 4.0
pbmc.h5ad Zheng et al., Nature Communications (2017), 10.1038/ncomms14049 10x Genomics, Fresh 68k PBMCs (Donor A) CC BY 4.0
norman.h5ad, split_manifest.json Norman et al., Science (2019), 10.1126/science.aax4438 GSE133344 Terms of the source record
go_prior.json, go_edges.csv Roohani et al., Nature Biotechnology (2024), 10.1038/s41587-023-01905-6 GEARS files on Harvard Dataverse Terms of the source annotations

For raw data and complete experimental metadata, use the primary records above.

Citation

When you use a file from this repository, cite its source study from the table above. If you use scCAFM, please also cite:

@article{xu2026sccafm,
  title   = {Building a causality-aware single-cell RNA-seq foundation model via context-specific causal regulation modeling},
  author  = {Xu, Kaichen and Shen, Yuxuan and Zhu, Maocheng and Duan, Zhenke and Liu, Jin and Wu, Hao and Sun, Xiaobo},
  journal = {Nature Biomedical Engineering},
  year    = {2026},
  note    = {In press}
}
Downloads last month
174