| --- |
| license: cc-by-4.0 |
| tags: |
| - single-cell |
| - rna-seq |
| - scRNA-seq |
| - h5ad |
| - anndata |
| - genomics |
| - benchmark |
| - shape-analysis |
| - synthetic |
| size_categories: |
| - 1M<n<10M |
| task_categories: |
| - tabular-classification |
| - tabular-regression |
| pretty_name: scShapeBench |
| configs: |
| - config_name: scRNAseq |
| data_files: |
| - split: train |
| path: data/scRNAseq/*.h5ad |
| - config_name: sample |
| data_files: |
| - split: train |
| path: data/sample/*.h5ad |
| - config_name: synthetic |
| data_files: |
| - split: train |
| path: data/synthetic/*.npz |
| - config_name: annotations |
| data_files: |
| - split: train |
| path: labels/annotations.parquet |
| - config_name: labels |
| data_files: |
| - split: train |
| path: labels/labels.parquet |
| --- |
| |
| # scShapeBench |
|
|
| A benchmark dataset for single-cell shape analysis with four configurations: **real-world scRNA-seq** data, **synthetic** data, **annotator labels**, and **aggregated labels**. |
|
|
|
|
| ## Dataset Summary |
|
|
| scShapeBench is a curated collection of datasets assembled for benchmarking computational methods in single-cell shape analysis. It is organized into four configurations: |
|
|
| ### scRNAseq |
| Real-world single-cell gene expression datasets. Each dataset is stored as an individual AnnData file with precomputed PCA embeddings and Leiden clustering. |
|
|
| - **Total cells:** 2,547,517 |
| - **Total datasets:** 102 |
| - **Total size:** ~116 GB |
| - **Format:** AnnData (`.h5ad`) |
|
|
| ### synthetic |
| Synthetically generated single-cell data for controlled benchmarking. |
|
|
| - **Format:** NumPy compressed array (`.npz`) + per-sample metadata (`.json`) |
|
|
| ### annotations |
| Per-dataset shape labels from 9 independent annotators. Each annotator assigned one or more shape categories to each dataset they reviewed. |
|
|
| - **Total datasets labeled:** 97 |
| - **Annotators:** 9 |
| - **Shape categories:** `archetypal`, `multi_branch`, `simple_traj`, `clusters` |
| - **Format:** Parquet, long format (one row per dataset–annotator pair) |
|
|
| ### labels |
| Aggregated shape labels derived from the 9 annotator labels using three strategies described in the paper. |
|
|
| - **Total datasets:** 97 |
| - **Aggregations:** `majority`, `soft`, `confidence_weighted`, `union` |
| - **Format:** Parquet, long format (one row per dataset–aggregation pair); values are floats in [0, 1] per shape category |
|
|
| ## Dataset Structure |
|
|
| ``` |
| scShapeBench/ |
| ├── data/ |
| │ ├── scRNAseq/ |
| │ │ ├── SCD-0001.h5ad |
| │ │ ├── SCD-0002.h5ad |
| │ │ ├── ... |
| │ │ └── SCD-0112.h5ad |
| │ └── synthetic/ |
| │ ├── sample_00000.npz |
| │ ├── sample_00000.json |
| │ ├── ... |
| ├── labels/ |
| │ ├── annotations.parquet # Per-annotator shape labels (9 annotators) |
| │ └── labels.parquet # Aggregated labels (majority, soft, confidence_weighted, union) |
| ├── cell_metadata.csv # Combined cell-level metadata (2.5M rows) |
| ├── gene_metadata.csv # Combined gene-level metadata |
| ├── dataset_index.csv # Per-file summary: dimensions, size |
| ├── croissant.json # Croissant 1.1 metadata |
| └── README.md |
| ``` |
|
|
| ### File Naming |
|
|
| **scRNAseq:** Files are named `SCD-XXXX.h5ad` where XXXX is a zero-padded index. The numbering is not contiguous (e.g., SCD-0031, SCD-0032, SCD-0034–0036 are absent). |
|
|
| **synthetic:** Files are named `sample_XXXXX.npz` / `sample_XXXXX.json` with a zero-padded 5-digit index. |
|
|
| ### Per-File Contents |
|
|
| Each `.h5ad` file contains: |
|
|
| | Component | Description | |
| |-----------|-------------| |
| | `X` | Gene expression matrix (cells × genes), log-normalized | |
| | `obs` | Cell metadata: `n_genes`, `leiden` (cluster assignment) | |
| | `var` | Gene metadata: `gene_ids`, `feature_types`, `genome`, `n_cells`, `highly_variable`, etc. | |
| | `obsm['X_pca']` | Precomputed PCA embeddings | |
| | `uns` | Clustering and HVG parameters | |
|
|
| ### Dataset Index |
|
|
| The `dataset_index.csv` file provides per-file summary statistics: |
|
|
| | Column | Description | |
| |--------|-------------| |
| | `file_id` | Dataset identifier (e.g., SCD-0001) | |
| | `filename` | Filename | |
| | `n_cells` | Number of cells | |
| | `n_genes` | Number of genes | |
| | `file_size_bytes` | File size in bytes | |
|
|
| Dataset sizes range from 1,163 cells (SCD-0006) to 434,340 cells (SCD-0037). |
|
|
| ## Usage |
|
|
| ### scRNAseq config |
|
|
| ```python |
| import scanpy as sc |
| import pandas as pd |
| |
| # Load a single dataset |
| adata = sc.read_h5ad("data/scRNAseq/SCD-0001.h5ad") |
| print(adata) |
| |
| # Browse available datasets |
| index = pd.read_csv("dataset_index.csv") |
| print(index.sort_values("n_cells", ascending=False).head()) |
| |
| # Load cell metadata across all datasets |
| cell_meta = pd.read_csv("cell_metadata.csv") |
| print(cell_meta.groupby("file_id").size()) |
| ``` |
|
|
| ### synthetic config |
|
|
| ```python |
| import numpy as np |
| import json |
| |
| # Load a single synthetic sample |
| data = np.load("data/synthetic/sample_00000.npz") |
| meta = json.load(open("data/synthetic/sample_00000.json")) |
| ``` |
|
|
| ### annotations config |
|
|
| ```python |
| import pandas as pd |
| |
| annotations = pd.read_parquet("labels/annotations.parquet") |
| # columns: dataset_id, annotator_id, archetypal, multi_branch, simple_traj, clusters |
| |
| # Fraction of annotators who labeled a dataset as multi_branch |
| agreement = annotations.groupby("dataset_id")["multi_branch"].mean() |
| ``` |
|
|
| ### labels config |
|
|
| ```python |
| import pandas as pd |
| |
| labels = pd.read_parquet("labels/labels.parquet") |
| # columns: dataset_id, aggregation, archetypal, multi_branch, simple_traj, clusters |
| |
| # Get majority-vote labels (binary) |
| majority = labels[labels["aggregation"] == "majority"].set_index("dataset_id") |
| |
| # Get union labels (any annotator assigned the class) |
| union = labels[labels["aggregation"] == "union"].set_index("dataset_id") |
| ``` |
|
|
| ## Sample Data |
|
|
| The full scRNAseq configuration is ~116 GB. A representative sample (~2.6 GB) is available at [`data/sample/`](data/sample/) and accessible as the `sample` config: |
|
|
| ```python |
| from datasets import load_dataset |
| ds = load_dataset("scShape-Benchmark/scShapeBench", "sample") |
| ``` |
|
|
| It contains **9 `.h5ad` files** selected to span the range of dataset sizes present in the full benchmark: |
|
|
| | File | Cells | Size | |
| |------|------:|-----:| |
| | `SCD-0006.h5ad` | 1,163 | 61 MB | |
| | `SCD-0014.h5ad` | 1,886 | 57 MB | |
| | `SCD-0015.h5ad` | 1,973 | 57 MB | |
| | `SCD-0010.h5ad` | 8,686 | 56 MB | |
| | `SCD-0002.h5ad` | 8,368 | 227 MB | |
| | `SCD-0052.h5ad` | 9,669 | 211 MB | |
| | `SCD-0062.h5ad` | 7,976 | 223 MB | |
| | `SCD-0071.h5ad` | 18,890 | 858 MB | |
| | `SCD-0074.h5ad` | 21,225 | 823 MB | |
|
|
| **Selection criteria:** Files were chosen to cover three size tiers — small (<80 MB, 4 files), medium (200–230 MB, 3 files), and large (>800 MB, 2 files) — so reviewers can inspect data at each scale without downloading the full corpus. Within each tier, files were selected by ascending file size from the full `dataset_index.csv`. All lightweight metadata files (`labels/`, `dataset_index.csv`, `cell_metadata.csv`, `gene_metadata.csv`) are available in full regardless of which scRNAseq files are downloaded. |
|
|
| ## Croissant Metadata |
|
|
| This dataset includes a `croissant.json` file conforming to the [Croissant 1.1](https://docs.mlcommons.org/croissant/) metadata standard. This enables programmatic discovery and loading of dataset metadata through compatible tools. |
|
|
| ## Citation |
|
|
| <!-- Add citation information here when available --> |
|
|
| ## License |
|
|
| This dataset is released under the [Creative Commons Attribution 4.0 International (CC BY 4.0)](https://creativecommons.org/licenses/by/4.0/) license. You are free to share and adapt the material for any purpose, provided appropriate credit is given. |
|
|