Dataset Viewer (First 5GB)
Auto-converted to Parquet Duplicate
input_ids
listlengths
3
4.1k
counts
listlengths
3
4.1k
n_counts
int32
1
12.7M
n_genes
int32
1
15k
cell_index
int32
0
4.14M
source_id
stringlengths
18
36
[ 2, 13952, 16583, 7762, 12779, 9972, 12574, 8151, 517, 5054, 849, 2644, 9426, 4013, 8787, 4972, 6263, 8506, 9855, 13320, 17209, 18790, 15580, 1813, 1605, 8341, 7888, 1528, 14329, 3769, 16673, 9860, 20137, 2777, 3468, 4316, 2917, 14850, 6807,...
[ 0, 28, 50, 5, 23, 14, 28, 6, 4, 8, 6, 2, 11, 92, 2, 12, 6, 66, 56, 9, 22, 52, 2, 28, 29, 2, 2, 2, 4, 41, 47, 90, 2, 3, 57, 16, 12, 4, 48, 2, 5, 4, 7, 4, 4, 45, 6, 2, 26, 2, 42, 25, 5, 6, 4, 9, 8, 25, ...
4,056
1,267
8,989
2a498ace-872a-4935-984b-1afa70fd9886
[ 2, 17388, 11344, 16685, 3812, 9310, 16155, 16772, 4156, 1711, 12592, 7237, 435, 14462, 17355, 8168, 3676, 13705, 12056, 11010, 7623, 3909, 19344, 12, 13091, 1083, 3028, 3532, 391, 1223, 220, 4246, 16758, 3377, 1272, 1360, 7452, 3883, 5275, ...
[ 0, 395, 262, 143, 338, 86, 95, 89, 191, 563, 124, 107, 38, 47, 47, 42, 32, 58, 47, 61, 56, 102, 116, 28, 72, 30, 327, 98, 31, 43, 54, 20, 40, 53, 70, 31, 18, 191, 38, 27, 28, 58, 58, 18, 33, 78, 22, 36, 48, 48, 29, ...
43,946
6,167
56,237
hsapiens_SRP519415
[ 2, 17818, 7093, 6943, 11703, 2298, 9631, 3368, 7909, 12744, 2959, 1706, 5563, 2598, 13312, 4273, 7107, 186, 1180, 614, 17075, 12524, 16323, 12206, 4951, 3728, 10541, 11722, 10378, 19576, 10330, 1638, 2357, 11484, 17333, 2339, 10435, 15743, ...
[ 0, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 2, 2, 2, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 2, 1, 1, 1, 1...
597
497
951,145
978a566a-dc27-478d-b306-26daba116c1f
[ 2, 9060, 9824, 16234, 463, 4258, 1588, 274, 20332, 3379, 9348, 648, 8354, 6021, 9219, 6917, 8285, 16063, 12230, 277, 16674, 9542, 10885, 1074, 8962, 2216, 9888, 4448, 7595, 15195, 14766, 6181, 12046, 16634, 1346, 17332, 2759, 2712, 10193, ...
[ 0, 20, 10, 14, 15, 12, 6, 13, 67, 8, 10, 16, 3, 5, 8, 8, 8, 8, 3, 3, 3, 13, 9, 8, 3, 5, 5, 8, 3, 3, 3, 3, 5, 4, 6, 7, 9, 4, 8, 2, 4, 8, 7, 6, 4, 4, 7, 4, 10, 5, 3, 5, 5, 10, 4, 5, 4, 7, 4, 10, 2, ...
5,234
2,385
157,003
hsapiens_SRP329496
[ 2, 13606, 15207, 12214, 10057, 648, 4156, 1416, 15373, 15329, 9604, 14821, 650, 15140, 10037, 6412, 15050, 14945, 12464, 1017, 9290, 9932, 16216, 9465, 10245, 3974, 12376, 11547, 16729, 19131, 955, 7943, 11279, 13655, 17183, 14671, 16979, 502...
[ 0, 424, 386, 581, 145, 210, 226, 430, 534, 426, 135, 373, 84, 325, 37, 74, 510, 371, 138, 192, 133, 121, 52, 99, 36, 98, 98, 79, 70, 135, 234, 80, 57, 53, 252, 77, 126, 96, 40, 98, 85, 211, 33, 63, 230, 74, 83, 57, 194, ...
54,044
7,302
30,589
f5a04dff-d394-4023-8811-65494e8bb11d
[ 2, 1073, 8073, 8598, 11735, 6491, 9158, 4134, 3561, 2638, 9121, 9590, 12990, 7431, 6613, 7842, 2886, 10843, 303, 11245, 11244, 2868, 874, 5272, 3545, 4391, 376, 12185, 7501, 3292, 2841, 10206, 1711, 3926, 17122, 4435, 5275, 3304, 16556, 1...
[ 0, 74, 128, 141, 100, 65, 76, 29, 143, 82, 63, 39, 56, 30, 44, 41, 45, 83, 151, 28, 119, 20, 33, 23, 60, 34, 32, 98, 30, 17, 18, 29, 183, 20, 26, 15, 20, 24, 26, 13, 37, 28, 31, 30, 18, 38, 12, 10, 11, 6, 15, 12, ...
14,355
3,726
3,062
hsapiens_SRP448593
[ 2, 16772, 1711, 10421, 2052, 5965, 4852, 3522, 3883, 10506, 15801, 8139, 537, 17983, 14795, 720, 14623, 200, 2173, 11213, 8606, 17732, 14747, 7335, 8768, 6051, 3934, 3515, 6152, 4104, 5828, 13942, 17221, 3919, 12513, 14213, 1505, 4337, 1724...
[ 0, 134, 1226, 118, 276, 43, 52, 79, 396, 151, 67, 71, 40, 107, 58, 68, 55, 76, 226, 840, 62, 41, 154, 57, 54, 50, 47, 221, 128, 46, 146, 49, 30, 84, 48, 47, 163, 50, 309, 509, 83, 112, 60, 1073, 37, 36, 1202, 56, 55, 4...
72,486
7,908
14,130
hsapiens_SRP422567
[ 2, 10853, 5849, 9881, 5761, 2748, 5591, 11161, 7227, 262, 2055, 12869, 9734, 4651, 3496, 2259, 313, 16097, 1056, 1376, 3525, 9507, 548, 5795, 10304, 11790, 6516, 7644, 151, 17970, 10569, 5765, 5644, 17120, 13894, 8745, 6787, 7094, 13092, ...
[ 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1...
91
70
33,399
hsapiens_SRP415461
[ 2, 5523, 4711, 16183, 13528, 11924, 12580, 4732, 9181, 10155, 17697, 6399, 6920, 14141, 19836, 2131, 22499, 13539, 20466, 12114, 4276, 14345, 12488, 16299, 9498, 15726, 9909, 10298, 6182, 6748, 710, 6417, 20351, 20378, 1809, 6045, 9249, 15415...
[ 0, 22, 19, 16, 2, 15, 7, 7, 3, 4, 5, 17, 4, 3, 6, 4, 2, 8, 5, 3, 3, 3, 3, 4, 2, 2, 6, 3, 2, 8, 6, 2, 3, 3, 3, 3, 2, 8, 3, 2, 2, 4, 2, 4, 9, 2, 2, 4, 3, 4, 2, 2, 2, 2, 4, 2, 2, 4, 4, 2, 7, 1, 3...
3,022
1,475
696,033
13149914-ea03-4f01-8bf6-b793b667127b
[ 2, 20747, 10372, 10371, 2685, 17790, 10483, 337, 11332, 9039, 1174, 9983, 1041, 4395, 6844, 9257, 7097, 14674, 1889, 7904, 9709, 15332, 12252, 7754, 11316, 4570, 4973, 7138, 12331, 4346, 7556, 7303, 1804, 7909, 20353, 2228, 16933, 10729, 60...
[ 0, 3, 2, 2, 2, 1, 1, 2, 1, 1, 1, 2, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1...
285
189
604,315
hsapiens_SRP394685
[ 2, 10761, 1711, 17195, 6136, 16585, 17189, 12053, 16466, 4448, 17403, 10386, 2941, 395, 5336, 7132, 10137, 13186, 16160, 2512, 448, 13006, 8021, 693, 6141, 8227, 3070, 13353, 1733, 7037, 3829, 1132, 952, 16723, 16648, 12146, 1811, 9851, 295...
[ 0, 22, 101, 23, 23, 13, 25, 67, 16, 9, 94, 4, 5, 26, 2, 12, 20, 2, 25, 13, 6, 5, 4, 12, 2, 2, 60, 2, 4, 2, 8, 6, 11, 3, 19, 2, 3, 8, 3, 26, 3, 15, 4, 3, 2, 4, 2, 3, 3, 4, 4, 8, 6, 2, 2, 3, 6, 2, 2, ...
3,959
1,237
586,153
218acb0f-9f2f-4f76-b90b-15a4b7c7f629
End of preview. Expand in Data Studio

CellxGene + scBaseCount, human, tokenized

Geneformer-style rank-value tokenized human cells: a straightforward union of two existing public corpora, CellxGene Discover (cxg_raw_2025-11-08) and scBaseCount (2025-02-25), deduplicated (CellxGene's own is_primary_data flag, to drop repeated cells across dataset views) and tokenized. 210,202,463 cells from 2,225 source files. This is not an original data-collection effort -- all underlying cells were already public via CellxGene Discover and scBaseCount; this repo is just that union in a ready-to-train tokenized form.

Updates

2026-11-03 update (v2 rebuild): the corpus was rebuilt to fix three problems found in the previous version:

  • Medians. The previous gene-medians file had 7 genes at exactly 0 (forcing a division by zero) and 3,762 more set to a single filler value, so those genes ranked arbitrarily. Medians are now recomputed from this corpus's own raw counts (Geneformer recipe: per cell, non-zero counts normalized to a sum of 10,000; per gene, the median of its non-zero values over every cell), over all ~2.1x10^11 values, using a histogram-based median to avoid holding them in memory.
  • Wrong matrix in some source files. Some h5ads store log-normalized values in X and raw counts in raw/X. An audit pass now picks the raw-count matrix per file (checked to be non-negative and integer on every stored value) instead of assuming X; files that fail the check are excluded rather than silently tokenized from the wrong matrix.
  • No counts. Every token now keeps its raw UMI count (new counts column), so count-level augmentations (read-depth thinning, ambient-RNA injection) are possible at train time. A pooled ambient ("soup") profile per source file is included for this.

Rows are globally shuffled, as of the 2026-10-19 update below. Checked by a whole-corpus QC pass (0 violations of every per-cell structural rule over all 210,202,463 cells) and an independent rebuild of 1,000 random cells straight from the source h5ads with plain anndata, which matched the pipeline's own output 1000/1000. The build scripts, with a full write-up of the fix, the checks, and their results, are at scripts/gene_medians/ in the theislab/leCellJepa repo.

Known gap: 3,216 of 23,262 vocab genes never occur in the corpus (no cell in it expresses them above zero), so they have no median and never appear as a token. An eval tokenizer using this vocab on a dataset that contains one of them should skip it, the same way training does, rather than raising a key error.

2026-10-19 update: rows are now globally shuffled (previously contiguous by source study -- a streaming data loader without its own shuffle would see batches, and a leading-rows validation split, dominated by whichever study happened to be first), and 6 genes whose corpus median was exactly 0 have been dropped from every cell's token list (count / median = inf was forcing them to a spurious rank-1 position in ~1.8% of cells). Cell count and the rest of each cell's ranking are unaffected. (Superseded by the 2026-11-03 update above, which recomputes every gene's median rather than just dropping the 6 worst.)

Contents

  • Repo root -- a HuggingFace datasets DatasetDict (single train split) saved via save_to_disk (dataset_dict.json, train/). Columns: input_ids (large_list, Geneformer-style rank-value encoding, <cls>-prefixed and <eos>-terminated, truncated to 4096 tokens), counts (large_list, raw UMI count per token, 0 at the special tokens, clipped at 65,535), n_counts (int32, the cell's total raw count over all genes), n_genes (int32, non-zero genes with a median, before the 4094-gene cut), cell_index (row in the source h5ad), source_id (the source file's id).
  • vocab/hsapiens_token_dictionary.pkl -- the exact vocab these ids were tokenized against: 23,266 entries, <pad>=0, <mask>=1, <cls>=2, <eos>=3, genes from id 4 (23,262 genes). This is not the same as the default packaged token_dictionary.pkl (~20k genes) -- loading with the wrong vocab silently misaligns gene ids. Changed from the previous version: that one had already pruned the 6 zero-median genes out of the vocab itself (23,260 entries); v2 does not prune the vocab, since a gene with no median is simply never emitted as a token (see below).
  • vocab/hsapiens_gene_medians.pkl -- non-zero median gene expression values used by the tokenizer's normalization step. Replaced in the 2026-11-03 update: recomputed from this corpus's own raw counts rather than an earlier, under-sampled file.
  • soup/soup_matrix.npy + soup/soup_index.json -- one row per source file (float32, rows sum to 1): that file's pooled raw-count profile over its kept cells, for ambient-RNA-injection augmentation. soup_index.json maps source_id to row index.
  • qc/report.json -- the whole-corpus QC summary from the 2026-11-03 rebuild.

Loading

from huggingface_hub import snapshot_download
from datasets import load_from_disk

local_dir = snapshot_download(repo_id="theislab/cellxgene-scbasecount-human-tokenized", repo_type="dataset")
ds = load_from_disk(local_dir)["train"]
Downloads last month
385