File size: 7,563 Bytes
fcb69dc 8f91d7b fcb69dc 8f91d7b fcb69dc 8f91d7b f4f05c5 8f91d7b fcb69dc 8f91d7b fcb69dc 8f91d7b fcb69dc 8f91d7b fcb69dc 8f91d7b fcb69dc 8f91d7b fcb69dc 8f91d7b fcb69dc 8f91d7b fcb69dc 8f91d7b fcb69dc 8f91d7b f4f05c5 fcb69dc 8f91d7b | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 | ---
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.
|