The full dataset viewer is not available (click to read why). Only showing a preview of the rows.
Error code: DatasetGenerationError
Exception: ArrowInvalid
Message: Failed to parse string: 'TCATTACTCTGGAGAG' as a scalar of type int64
Traceback: Traceback (most recent call last):
File "/usr/local/lib/python3.14/site-packages/datasets/builder.py", line 1848, in _prepare_split_single
writer.write_table(table)
~~~~~~~~~~~~~~~~~~^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/arrow_writer.py", line 784, in write_table
self._write_table(pa_table, writer_batch_size=writer_batch_size)
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/arrow_writer.py", line 795, in _write_table
pa_table = table_cast(pa_table, self._schema)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2378, in table_cast
return cast_table_to_schema(table, schema)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2312, in cast_table_to_schema
cast_array_to_feature(
~~~~~~~~~~~~~~~~~~~~~^
table[name] if name in table_column_names else pa.array([None] * len(table), type=schema.field(name).type),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
feature,
^^^^^^^^
)
^
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 1861, in wrapper
return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks])
~~~~^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2152, in cast_array_to_feature
return array_cast(
array,
...<2 lines>...
allow_decimal_to_str=allow_decimal_to_str,
)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 1863, in wrapper
return func(array, *args, **kwargs)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2015, in array_cast
return array.cast(pa_type)
~~~~~~~~~~^^^^^^^^^
File "pyarrow/array.pxi", line 1186, in pyarrow.lib.Array.cast
File "/usr/local/lib/python3.14/site-packages/pyarrow/compute.py", line 414, in cast
return call_function("cast", [arr], options, memory_pool)
File "pyarrow/_compute.pyx", line 604, in pyarrow._compute.call_function
File "pyarrow/_compute.pyx", line 399, in pyarrow._compute.Function.call
result = GetResultValue(
File "pyarrow/error.pxi", line 155, in pyarrow.lib.pyarrow_internal_check_status
return check_status(status)
File "pyarrow/error.pxi", line 92, in pyarrow.lib.check_status
raise convert_status(status)
pyarrow.lib.ArrowInvalid: Failed to parse string: 'TCATTACTCTGGAGAG' as a scalar of type int64
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 1369, in compute_config_parquet_and_info_response
parquet_operations, partial, estimated_dataset_info = stream_convert_to_parquet(
~~~~~~~~~~~~~~~~~~~~~~~~~^
builder, max_dataset_size_bytes=max_dataset_size_bytes
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 948, in stream_convert_to_parquet
builder._prepare_split(split_generator=splits_generators[split], file_format="parquet")
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/builder.py", line 1694, in _prepare_split
for job_id, done, content in self._prepare_split_single(
~~~~~~~~~~~~~~~~~~~~~~~~~~^
gen_kwargs=gen_kwargs, job_id=job_id, **_prepare_split_args
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
):
^
File "/usr/local/lib/python3.14/site-packages/datasets/builder.py", line 1879, in _prepare_split_single
raise DatasetGenerationError("An error occurred while generating the dataset") from e
datasets.exceptions.DatasetGenerationError: An error occurred while generating the datasetNeed help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
source_cell_id int64 | metacell_id int64 |
|---|---|
0 | 240 |
1 | 192 |
2 | 241 |
3 | 76 |
4 | 219 |
5 | 21 |
6 | 82 |
7 | 100 |
8 | 29 |
9 | 29 |
10 | 49 |
11 | 76 |
12 | 96 |
13 | 16 |
14 | 16 |
15 | 242 |
16 | 210 |
17 | 199 |
18 | 183 |
19 | 43 |
20 | 281 |
21 | 291 |
22 | 96 |
23 | 181 |
24 | 73 |
25 | 225 |
26 | 202 |
27 | 71 |
28 | 25 |
29 | 291 |
30 | 82 |
31 | 265 |
32 | 209 |
33 | 249 |
34 | 280 |
35 | 265 |
36 | 276 |
37 | 71 |
38 | 126 |
39 | 93 |
40 | 234 |
41 | 170 |
42 | 298 |
43 | 82 |
44 | 300 |
45 | 43 |
46 | 82 |
47 | 164 |
48 | 233 |
49 | 103 |
50 | 21 |
51 | 193 |
52 | 119 |
53 | 173 |
54 | 307 |
55 | 62 |
56 | 273 |
57 | 193 |
58 | 254 |
59 | 135 |
60 | 74 |
61 | 81 |
62 | 38 |
63 | 278 |
64 | 202 |
65 | 190 |
66 | 38 |
67 | 29 |
68 | 124 |
69 | 261 |
70 | 138 |
71 | 62 |
72 | 82 |
73 | 308 |
74 | 93 |
75 | 29 |
76 | 111 |
77 | 122 |
78 | 193 |
79 | 103 |
80 | 308 |
81 | 62 |
82 | 291 |
83 | 82 |
84 | 240 |
85 | 111 |
86 | 82 |
87 | 34 |
88 | 252 |
89 | 257 |
90 | 93 |
91 | 120 |
92 | 100 |
93 | 101 |
94 | 300 |
95 | 21 |
96 | 288 |
97 | 126 |
98 | 49 |
99 | 234 |
MetacellFormer pretraining corpus
This repository provides the 818,609 metacell profiles used for MetacellFormer pretraining, constructed by summing raw counts from 44,389,000 cells across 1,334 source datasets. It also provides the source-cell memberships and fixed training–validation split: 799,562 metacells for training and 19,047 for validation. The matrices preserve the gene features and expression values used in the study.
Contents
| File | Contents |
|---|---|
source_manifest.tsv |
Source accessions, citations, releases, terms, sizes and relative file paths |
metacells/{dataset_id}.h5ad |
Sparse raw-count sums in X; gene IDs and symbols in var; constituent cell counts and split in obs |
memberships/{dataset_id}.tsv.gz |
source_cell_id, metacell_id, in the selected source-cell order |
splits/{dataset_id}.tsv.gz |
profile_id, split, in metacell row order; train or eval for the tokenizer |
checksums.sha256 |
SHA-256 file checksums |
IDs are unique within a source dataset; use (dataset_id, ID) across sources. eval in the split files means validation. Metacell matrices are unnormalized sums, not mean expression or log-transformed values. Keep all supplied features when computing the normalization denominator.
Use
After installing the GitHub package in MetacellFormer-env, choose a row of source_manifest.tsv and use its metacell_file, split_file and dataset_idx:
python scripts/tokenize_training.py \
--input CORPUS/metacells/DATASET_ID.h5ad \
--split CORPUS/splits/DATASET_ID.tsv.gz \
--dataset-id DATASET_ID --dataset-idx DATASET_INDEX \
--model-dir MODEL_DIRECTORY --output-dir tokens/DATASET_ID
MODEL_DIRECTORY supplies the vocabulary, reference medians and fixed value-bin edges. Check downloaded files with sha256sum -c checksums.sha256.
Reconstructing source counts
Full single-cell matrices are obtained from the original providers. The releases are CELLxGENE Census 2025-11-08 and scBaseCount 2026-01-12. Source selection and MetaQ membership are already fixed; do not draw a new sample or rerun MetaQ to reproduce this corpus.
- CELLxGENE:
source_cell_idis the decimal row index of the dataset-specific filtered Census export, not a Discover barcode or a Censussoma_joinid. Use the Census release above,X_name="raw", the exactsource_filterin the manifest, and retain the complete Census gene axis withfeature_id. The original export usedcellxgene_census.get_anndatawith observation metadata excludingsoma_joinid, producing sequential string row IDs. Preserve this row order and check its row count againstsource_input_cells. A current Discover download is not interchangeable with this view. - scBaseCount:
source_cell_idis the source H5AD observation name. The manifest links the pinnedGene/Homo_sapiensfile. Follow the provider's access instructions if its bucket requires an authenticated billing project.
Prepare the selected source matrix and aggregate using the published memberships:
python scripts/prepare_corpus_source.py --input upstream_counts.h5ad \
--corpus-root CORPUS --dataset-id DATASET_ID --output selected_counts.h5ad
python scripts/aggregate_metacells.py selected_counts.h5ad \
CORPUS/memberships/DATASET_ID.tsv.gz reconstructed.h5ad --source-id DATASET_ID
The preparation command checks cell IDs and the frozen gene universe. Specify --counts-layer if needed. It reads chunks; the selected sparse output remains in memory. The aggregation command sorts metacell IDs lexically, so compare reconstructed and released matrices after alignment by metacell ID and gene ID.
Attribution and terms
CELLxGENE-derived data retain CC BY 4.0; scBaseCount data retain CC0 1.0. Original source citations and terms are recorded per dataset in the manifest. Changes comprise the recorded cell selection, metacell raw-count summation, fixed split and reduced metadata. See LICENSES.md.
- Downloads last month
- 27