The full dataset viewer is not available (click to read why). Only showing a preview of the rows.
Error code: DatasetGenerationCastError
Exception: DatasetGenerationCastError
Message: An error occurred while generating the dataset
All the data files must have the same columns, but at some point there are 4 new columns ({'label_b', 'method_b', 'label_a', 'method_a'}) and 3 missing columns ({'coverage_percent', 'labelled_cells', 'method'}).
This happened while the csv dataset builder was generating data using
hf://datasets/kmmuleelab/P2Mdb/code/validation/annotation_pairs.csv (at revision c9d184aa83c61c8851edad2779d939abc200edcd), ['hf://datasets/kmmuleelab/P2Mdb@c9d184aa83c61c8851edad2779d939abc200edcd/code/validation/annotation_coverage.csv', 'hf://datasets/kmmuleelab/P2Mdb@c9d184aa83c61c8851edad2779d939abc200edcd/code/validation/annotation_pairs.csv', 'hf://datasets/kmmuleelab/P2Mdb@c9d184aa83c61c8851edad2779d939abc200edcd/code/validation/markers.csv', 'hf://datasets/kmmuleelab/P2Mdb@c9d184aa83c61c8851edad2779d939abc200edcd/code/validation/parameters.csv']
Please either edit the data files to have matching columns, or separate them into different configurations (see docs at https://hf.co/docs/hub/datasets-manual-configuration#multiple-configurations)
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 2306, in cast_table_to_schema
raise CastError(
...<3 lines>...
)
datasets.table.CastError: Couldn't cast
label_a: string
label_b: string
cells: int64
accession: string
method_a: string
method_b: string
-- schema metadata --
pandas: '{"index_columns": [{"kind": "range", "name": null, "start": 0, "' + 964
to
{'accession': Value('string'), 'method': Value('string'), 'cells': Value('int64'), 'labelled_cells': Value('int64'), 'coverage_percent': Value('float64')}
because column names don't match
During handling of the above exception, another exception occurred:
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 1850, in _prepare_split_single
raise DatasetGenerationCastError.from_cast_error(
...<4 lines>...
)
datasets.exceptions.DatasetGenerationCastError: An error occurred while generating the dataset
All the data files must have the same columns, but at some point there are 4 new columns ({'label_b', 'method_b', 'label_a', 'method_a'}) and 3 missing columns ({'coverage_percent', 'labelled_cells', 'method'}).
This happened while the csv dataset builder was generating data using
hf://datasets/kmmuleelab/P2Mdb/code/validation/annotation_pairs.csv (at revision c9d184aa83c61c8851edad2779d939abc200edcd), ['hf://datasets/kmmuleelab/P2Mdb@c9d184aa83c61c8851edad2779d939abc200edcd/code/validation/annotation_coverage.csv', 'hf://datasets/kmmuleelab/P2Mdb@c9d184aa83c61c8851edad2779d939abc200edcd/code/validation/annotation_pairs.csv', 'hf://datasets/kmmuleelab/P2Mdb@c9d184aa83c61c8851edad2779d939abc200edcd/code/validation/markers.csv', 'hf://datasets/kmmuleelab/P2Mdb@c9d184aa83c61c8851edad2779d939abc200edcd/code/validation/parameters.csv']
Please either edit the data files to have matching columns, or separate them into different configurations (see docs at https://hf.co/docs/hub/datasets-manual-configuration#multiple-configurations)Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
accession string | method string | cells int64 | labelled_cells int64 | coverage_percent float64 |
|---|---|---|---|---|
GSE246662 | celltype_singler | 66,288 | 39,169 | 59.089126 |
GSE246662 | celltype_sctype | 66,288 | 39,169 | 59.089126 |
GSE264205 | celltype_singler | 14,991 | 5,674 | 37.849376 |
GSE264205 | celltype_sctype | 14,991 | 5,674 | 37.849376 |
GSE181919 | celltype_article | 52,805 | 52,805 | 100 |
GSE181919 | celltype_singler | 52,805 | 52,739 | 99.875012 |
GSE181919 | celltype_sctype | 52,805 | 52,739 | 99.875012 |
GSE246662 | null | 27,119 | null | null |
GSE246662 | null | 290 | null | null |
GSE246662 | null | 4,173 | null | null |
GSE246662 | null | 56 | null | null |
GSE246662 | null | 1,998 | null | null |
GSE246662 | null | 3,606 | null | null |
GSE246662 | null | 1,352 | null | null |
GSE246662 | null | 404 | null | null |
GSE246662 | null | 1,301 | null | null |
GSE246662 | null | 43 | null | null |
GSE246662 | null | 3,035 | null | null |
GSE246662 | null | 2,204 | null | null |
GSE246662 | null | 554 | null | null |
GSE246662 | null | 1,862 | null | null |
GSE246662 | null | 7,733 | null | null |
GSE246662 | null | 1,149 | null | null |
GSE246662 | null | 678 | null | null |
GSE246662 | null | 1,338 | null | null |
GSE246662 | null | 2,286 | null | null |
GSE246662 | null | 2,191 | null | null |
GSE246662 | null | 910 | null | null |
GSE246662 | null | 46 | null | null |
GSE246662 | null | 628 | null | null |
GSE246662 | null | 61 | null | null |
GSE246662 | null | 335 | null | null |
GSE246662 | null | 936 | null | null |
GSE264205 | null | 9,317 | null | null |
GSE264205 | null | 838 | null | null |
GSE264205 | null | 1,032 | null | null |
GSE264205 | null | 96 | null | null |
GSE264205 | null | 25 | null | null |
GSE264205 | null | 396 | null | null |
GSE264205 | null | 515 | null | null |
GSE264205 | null | 152 | null | null |
GSE264205 | null | 401 | null | null |
GSE264205 | null | 497 | null | null |
GSE264205 | null | 97 | null | null |
GSE264205 | null | 41 | null | null |
GSE264205 | null | 42 | null | null |
GSE264205 | null | 800 | null | null |
GSE264205 | null | 414 | null | null |
GSE264205 | null | 328 | null | null |
GSE181919 | null | 18 | null | null |
GSE181919 | null | 6 | null | null |
GSE181919 | null | 2 | null | null |
GSE181919 | null | 3 | null | null |
GSE181919 | null | 1 | null | null |
GSE181919 | null | 3 | null | null |
GSE181919 | null | 3 | null | null |
GSE181919 | null | 1 | null | null |
GSE181919 | null | 29 | null | null |
GSE181919 | null | 6,433 | null | null |
GSE181919 | null | 3 | null | null |
GSE181919 | null | 3 | null | null |
GSE181919 | null | 4 | null | null |
GSE181919 | null | 414 | null | null |
GSE181919 | null | 15 | null | null |
GSE181919 | null | 628 | null | null |
GSE181919 | null | 291 | null | null |
GSE181919 | null | 18 | null | null |
GSE181919 | null | 3 | null | null |
GSE181919 | null | 3,240 | null | null |
GSE181919 | null | 1 | null | null |
GSE181919 | null | 28 | null | null |
GSE181919 | null | 8 | null | null |
GSE181919 | null | 51 | null | null |
GSE181919 | null | 2 | null | null |
GSE181919 | null | 24 | null | null |
GSE181919 | null | 453 | null | null |
GSE181919 | null | 11 | null | null |
GSE181919 | null | 2 | null | null |
GSE181919 | null | 4,874 | null | null |
GSE181919 | null | 4 | null | null |
GSE181919 | null | 16 | null | null |
GSE181919 | null | 469 | null | null |
GSE181919 | null | 274 | null | null |
GSE181919 | null | 4 | null | null |
GSE181919 | null | 53 | null | null |
GSE181919 | null | 10,769 | null | null |
GSE181919 | null | 1 | null | null |
GSE181919 | null | 10 | null | null |
GSE181919 | null | 6 | null | null |
GSE181919 | null | 6 | null | null |
GSE181919 | null | 46 | null | null |
GSE181919 | null | 6 | null | null |
GSE181919 | null | 935 | null | null |
GSE181919 | null | 11 | null | null |
GSE181919 | null | 2 | null | null |
GSE181919 | null | 4,528 | null | null |
GSE181919 | null | 5 | null | null |
GSE181919 | null | 1 | null | null |
GSE181919 | null | 226 | null | null |
GSE181919 | null | 365 | null | null |
P2M.db
Transcriptomic data and available analyses for primary and metastatic cancers. This preparation contains 51 single-cell datasets (3,745,638 cells) and 86 bulk records (12,896 expression samples). Original study accessions are the folder names. The website is http://www.nidmarker-db.cn/P2M.db/.
Collection statistics
The collection covers 49 recorded cancer types and subtypes, 28 primary tissues, and 25 identified metastatic tissues. Broad diagnoses and subtypes are retained; only unambiguous naming synonyms are merged. Dataset counts refer to accessions, not independent publications or patients. Unknown sites and ambiguous tissue combinations are excluded from the distinct tissue total.
statistics/summary.json records cohort, cell and specimen totals;
statistics/mapping.csv preserves source labels and their statistical names.
statistics/frequencies.csv counts each gene or pathway once per accession
across metastatic sites, covering all 51 single-cell datasets. Historical and
newly computed results coexist; these are descriptive frequencies.
Malignant ascites and unresolved roles remain separate from solid tumor tissue
statistics. Complete expression matrices retain all released cells.
Files
Both scRNA-seq/<accession>/ and bulk/<accession>/ contain the expression
RDS, samples.csv, dataset.csv, qc.csv, processing_parameters.csv, and
available analysis/ directories. Expression paths have not changed. The single-cell
RDS includes cell metadata and available annotations; a bulk RDS contains
expression matrices and specimen metadata.
analysis/ groups results by module: deg.csv, enrichment.csv, and available
interaction, trajectory, functional-score, immune and PPI tables. Single-cell
rows identify their comparison, metastatic tissue and annotation method when
applicable. comparisons.csv defines each comparison and records overlap with
the released RDS. Available modules differ by study.
interaction_summary.csv stores cell-type pairs and their aggregated weights;
summary_type distinguishes original edge and matrix tables. Both representations
are retained and must not be summed together. trajectory_genes.csv specifies
the ordered genes in trajectory.csv expression vectors; trajectory_edges.csv
contains principal-graph edge coordinates.
processing_parameters.csv uses three columns: function, parameter, value.
It lists recorded settings rather than assumed defaults. Data-dependent R
variable references and processing provenance are explained in dataset.csv.
A header-only parameter table means historical execution settings were not
recorded; it does not indicate that the analysis had no parameters.
Missing annotations and unavailable measurements remain missing. files.csv
lists the released paths and byte sizes.
Read an RDS in R using x <- readRDS("path/to/file.rds").
CSV files can be read using read.csv("path/to/file.csv", check.names = FALSE).
Interpretation and provenance
These data reuse public studies from GEO, ArrayExpress, and TCGA. The original accession and source information are retained in dataset metadata. Source data conditions continue to apply; this preparation does not assign a new blanket license to the reused data.
Actual metastatic tissue and clinical M0/M1 status are distinct. Inspect the comparison basis before interpreting a primary versus metastatic contrast. Normal, adjacent normal, in situ, and unresolved specimens remain distinguishable in metadata and must not automatically be treated as primary or metastatic. Repeated specimens from one patient are not independent patients.
Available historical results are preserved alongside targeted corrections. Legacy summaries may not contain complete tested-gene statistics or reproducible model specifications. In particular, historical immune/PPI analyses can use a different comparison basis from corrected DEG/enrichment results. Missing values and unresolved specimen labels are not invented or replaced with zero. The presence of a result file does not certify every historical model.
Quality control
Each cohort contains qc.csv; qc_fields.csv defines fields and denominators.
Unavailable or unsupported count/mitochondrial metrics are NA. Metrics describe
the released matrix, not necessarily original prefilter raw data. Unresolved
lymph-node pathology is not treated as confirmed metastatic tissue.
Source records and code
sources.csv contains one provenance record for each of the 51 single-cell and
84 bulk accessions. Unavailable original evidence is explicitly marked as not
recorded. GSE41258 has 390 arrays; 253 is its 186 Primary + 67 Metastasis subset.
code/analysis/ provides the complete original analysis scripts and MIT license
with standardized filenames. The source version is Git commit
11530593102b06d74ad7199a940adcbb234015f1. Script contents are unchanged and
retain historical paths, manual grouping and known formatting limitations.
code/read_data.R is the metadata-aware reading example; see code/README.md.
All files are included here and can be downloaded independently from Hugging Face.
Added single-cell releases
The nine added studies provide expression RDS files with cell annotations and specimen metadata, sample records, QC and actual processing parameters. Author cell labels, annotation based on original markers, and automatic annotation with manual marker review are distinguished in the RDS. No downstream analysis results are supplied for these nine additions. Source barcode gaps and unresolved cell identities are documented; absent expression is not imputed.
Analysis of the additional single-cell cohorts
The nine additional cohorts (GSE203067, GSE223374, GSE223499, GSE239676, GSE263733, GSE271675, GSE301075, GSE315534, GSE322620) include analyses based on the released clinical labels and curated cell types. Each metastatic tissue is compared separately with the primary tumor samples. The expression matrix and source annotations are retained. Function parameters and software versions accompany the results. Cell-level differential expression and inferred interactions and trajectories are exploratory; they do not establish patient-independent or causal effects. Comparisons lacking two supported cell types are marked as not applicable for CellChat. Unreachable trajectory cells retain missing pseudotime.
code/single_cell_analysis.R contains the analysis workflow; code/resources/ contains the functional state gene sets and their source references.
To run the workflow on a downloaded cohort, set P2M_DATA_DIR to the directory containing the accession folders and P2M_RESOURCE_DIR to code/resources. Each accession folder may contain the RDS and CSV metadata directly, as in this repository. Run prepare, gc, deg, fe, ci, cs, and ct in that order; the second argument selects the stage (for example, Rscript code/single_cell_analysis.R GSE203067 prepare). Seurat 5 and Harmony are needed for preparation, and the recorded CellChat, clusterProfiler, Monocle3 and CytoTRACE versions are needed for their respective stages. Outputs are written to <accession>/tmp/rerun/. Temporary prepared objects and web-format tables are separate from the merged release tables.
- Downloads last month
- 47