Datasets:
Card restructure: symmetric two-views design (no primary/secondary), shared Data Model + How-Built combined, forward-compatible 'a supplement' phrasing for survival_derived, trimmed disclaimer.
Browse files
README.md
CHANGED
|
@@ -145,81 +145,81 @@ configs:
|
|
| 145 |
|
| 146 |
# TCGA Patients (Open Access)
|
| 147 |
|
| 148 |
-
Open-access TCGA data from the NCI Genomic Data Commons (GDC)
|
| 149 |
-
one HuggingFace (HF) subset per TCGA project; one row per patient. Covers
|
| 150 |
all 33 TCGA projects.
|
| 151 |
|
| 152 |
-
|
|
|
|
|
|
|
| 153 |
- **Schema:** derived from the [GDC Data Dictionary][gdc-dict].
|
| 154 |
- **GDC data release:** Data Release 45.0 - December 04, 2025
|
| 155 |
|
| 156 |
## Data model
|
| 157 |
|
| 158 |
-
|
| 159 |
-
for the canonical entity-by-entity definitions. Each row is one `case` (one
|
| 160 |
-
patient) with the full biospecimen subtree:
|
| 161 |
-
|
| 162 |
-
```
|
| 163 |
-
case one patient (TCGA-XX-1234)
|
| 164 |
-
└── sample physical specimen taken from the patient at one timepoint
|
| 165 |
-
(Primary Tumor, Solid Tissue Normal, Blood Derived Normal, ...)
|
| 166 |
-
└── portion a piece of that sample for a specific lab process
|
| 167 |
-
└── analyte extracted material of one type (DNA or RNA)
|
| 168 |
-
└── aliquot a vial of that analyte handed off for sequencing
|
| 169 |
-
```
|
| 170 |
-
|
| 171 |
-
|
| 172 |
-
### Where this dataset deviates from the GDC
|
| 173 |
-
|
| 174 |
-
The few places this row layout differs from a direct mapping of the GDC `case`
|
| 175 |
-
tree:
|
| 176 |
-
|
| 177 |
-
- **Top-level convenience columns.** Each row carries `gdc_portal_url`
|
| 178 |
-
(templated link to the patient's GDC Data Portal page) and
|
| 179 |
-
`samples_<gdc_data_type_snake_case>` molecular vectors (e.g.
|
| 180 |
-
`samples_masked_somatic_mutation`,
|
| 181 |
-
`samples_gene_expression_quantification`). These let consumers
|
| 182 |
-
column-project just the modalities they need; each entry carries foreign
|
| 183 |
-
keys (FKs) back to `samples[].portions[].analytes[].aliquots[]`.
|
| 184 |
-
- **Resolved sample FKs on Mutation Annotation Format (MAF) rows.** The GDC
|
| 185 |
-
ships MAF variants with aliquot UUIDs in `Tumor_Sample_UUID` /
|
| 186 |
-
`Matched_Norm_Sample_UUID`; we additionally resolve those to
|
| 187 |
-
`tumor_sample_id` / `matched_normal_sample_id` so consumers can join
|
| 188 |
-
straight to `samples[]`.
|
| 189 |
-
- **Stranded RNA-Seq columns dropped.** Each Gene Expression record drops
|
| 190 |
-
`stranded_first` / `stranded_second`; the GDC pipeline [harmonizes
|
| 191 |
-
RNA-Seq reads as
|
| 192 |
-
unstranded](https://docs.gdc.cancer.gov/Data/Bioinformatics_Pipelines/Expression_mRNA_Pipeline/),
|
| 193 |
-
so `unstranded` is the canonical column.
|
| 194 |
|
| 195 |
-
|
| 196 |
-
|
| 197 |
-
Every row originates in the NCI Genomic Data Commons (GDC). Three
|
| 198 |
-
sources feed each project's data:
|
| 199 |
|
| 200 |
- **Case-level clinical structure** — fetched from the GDC `/cases`
|
| 201 |
endpoint, returning the full nested case JSON (demographic + diagnoses
|
| 202 |
→ treatments + follow_ups + exposures + family_histories + samples →
|
| 203 |
-
portions → analytes → aliquots).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 204 |
- **Per-modality molecular files** — discovered via `/files` (filtered
|
| 205 |
by the clauses in the table below) and downloaded via `/data`. Each
|
| 206 |
-
combination locks one `data_type` to a specific GDC pipeline so
|
| 207 |
-
GDC
|
| 208 |
-
`data_type`.
|
| 209 |
-
- **BCR Clinical Supplement
|
| 210 |
-
(BCR) clinical
|
| 211 |
-
nte, drug, radiation, etc.). The harmonized
|
| 212 |
-
or under-populates a number of clinical fields
|
| 213 |
-
biotabs preserve
|
| 214 |
-
|
| 215 |
-
|
| 216 |
-
|
| 217 |
-
|
| 218 |
-
|
| 219 |
-
|
| 220 |
-
|
| 221 |
-
|
| 222 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 223 |
|
| 224 |
### Provenance pinned per build
|
| 225 |
|
|
@@ -232,17 +232,18 @@ sources feed each project's data:
|
|
| 232 |
See the [repository][repo] for full request payloads, filter clauses,
|
| 233 |
and the build pipeline source.
|
| 234 |
|
|
|
|
| 235 |
## Survival endpoints (`survival_derived`)
|
| 236 |
|
| 237 |
-
|
| 238 |
-
endpoints — Overall Survival (OS), Disease-Specific Survival
|
| 239 |
-
Progression-Free Interval (PFI), Disease-Free Interval (DFI) —
|
| 240 |
-
|
| 241 |
([DOI 10.1016/j.cell.2018.02.052](https://doi.org/10.1016/j.cell.2018.02.052)).
|
| 242 |
|
| 243 |
-
Each patient row carries a top-level **`survival_derived` struct** with eight sub-fields: `os_event` / `os_time`, `dss_event` / `dss_time`, `pfi_event` / `pfi_time`, `dfi_event` / `dfi_time`. `*_event` is 0/1 (event observed vs censored); `*_time` is
|
| 244 |
-
from `index_date` (TCGA: diagnosis date). DFI is null for SKCM /
|
| 245 |
-
UVM / LAML — Liu specifies no DFI for those tumor types.
|
| 246 |
|
| 247 |
We've reimplemented Liu's method against the current TCGA data and find
|
| 248 |
broad agreement with the original curated CDR. Differences exist and are
|
|
@@ -253,25 +254,23 @@ migrations all contribute to the gap. This work is evolving; see the
|
|
| 253 |
methodology.
|
| 254 |
|
| 255 |
**Why we don't ship Liu's curated 2018 values directly:** the CDR is a
|
| 256 |
-
frozen 2018 snapshot derived from a since-modified GDC release.
|
| 257 |
-
those values would lock in irreproducible source-data drift.
|
| 258 |
-
on every build, so the values reflect the current GDC and
|
| 259 |
-
from this dataset's other tables alone.
|
| 260 |
|
| 261 |
## Loading
|
| 262 |
|
| 263 |
-
The [`tcga2hf` package][repo] ships a typed `TcgaHfPatient` pydantic model
|
| 264 |
-
that mirrors this schema and adds convenience joins (tumor/normal pairs,
|
| 265 |
-
mutations-by-gene, expression-by-gene, longitudinal timeline).
|
| 266 |
-
|
| 267 |
```python
|
| 268 |
-
|
| 269 |
-
from tcga2hf.models import TcgaHfPatient
|
| 270 |
|
| 271 |
-
|
| 272 |
-
|
| 273 |
```
|
| 274 |
|
|
|
|
|
|
|
|
|
|
| 275 |
## GDC references
|
| 276 |
|
| 277 |
- [Data dictionary][gdc-dict] (every entity + field definition)
|
|
@@ -332,11 +331,9 @@ Policy references:
|
|
| 332 |
|
| 333 |
**This project is not affiliated with the NCI, GDC, or the TCGA Research
|
| 334 |
Network.** It is an experimental open-source pipeline that may change
|
| 335 |
-
significantly between versions
|
| 336 |
-
if you depend on a specific snapshot. Re-derive from the GDC for any
|
| 337 |
-
analysis where freshness matters — the dataset reflects the GDC release
|
| 338 |
-
pinned in each project's `gdc_status.json`. Pipeline source:
|
| 339 |
-
[`galtay/tcga2hf`][repo].
|
| 340 |
|
| 341 |
[gdc-dict]: https://docs.gdc.cancer.gov/Data_Dictionary/
|
| 342 |
[repo]: https://github.com/galtay/tcga2hf
|
|
|
|
|
|
|
|
|
| 145 |
|
| 146 |
# TCGA Patients (Open Access)
|
| 147 |
|
| 148 |
+
Open-access TCGA data from the NCI Genomic Data Commons (GDC). Covers
|
|
|
|
| 149 |
all 33 TCGA projects.
|
| 150 |
|
| 151 |
+
**This view presents one HuggingFace subset per TCGA project**, with one row per patient. See the [`tcga-tabular-open`][tabular] companion for a per-table view of the same underlying data.
|
| 152 |
+
|
| 153 |
+
- **Generated:** 2026-05-09 21:21:40 UTC
|
| 154 |
- **Schema:** derived from the [GDC Data Dictionary][gdc-dict].
|
| 155 |
- **GDC data release:** Data Release 45.0 - December 04, 2025
|
| 156 |
|
| 157 |
## Data model
|
| 158 |
|
| 159 |
+
### Where the data comes from
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 160 |
|
| 161 |
+
Three sources feed each project's data, all open-access:
|
|
|
|
|
|
|
|
|
|
| 162 |
|
| 163 |
- **Case-level clinical structure** — fetched from the GDC `/cases`
|
| 164 |
endpoint, returning the full nested case JSON (demographic + diagnoses
|
| 165 |
→ treatments + follow_ups + exposures + family_histories + samples →
|
| 166 |
+
portions → analytes → aliquots). The biospecimen subtree on each case:
|
| 167 |
+
|
| 168 |
+
```
|
| 169 |
+
case one patient (TCGA-XX-1234)
|
| 170 |
+
└── sample physical specimen taken from the patient at one timepoint
|
| 171 |
+
(Primary Tumor, Solid Tissue Normal, Blood Derived Normal, ...)
|
| 172 |
+
└── portion a piece of that sample for a specific lab process
|
| 173 |
+
└── analyte extracted material of one type (DNA or RNA)
|
| 174 |
+
└── aliquot a vial of that analyte handed off for sequencing
|
| 175 |
+
```
|
| 176 |
+
|
| 177 |
- **Per-modality molecular files** — discovered via `/files` (filtered
|
| 178 |
by the clauses in the table below) and downloaded via `/data`. Each
|
| 179 |
+
combination locks one `data_type` to a specific GDC pipeline so a
|
| 180 |
+
future GDC addition can't quietly substitute a different pipeline
|
| 181 |
+
under the same `data_type`.
|
| 182 |
+
- **BCR Clinical Supplement biotabs** — original Biospecimen Core
|
| 183 |
+
Resource (BCR) clinical forms shipped as per-project TSVs (one per
|
| 184 |
+
form: patient, follow_up, nte, drug, radiation, etc.). The harmonized
|
| 185 |
+
`/cases` endpoint drops or under-populates a number of clinical fields
|
| 186 |
+
the BCR-original biotabs preserve. The schema varies by cancer type
|
| 187 |
+
(e.g. BLCA's BCG-response columns don't exist in CHOL's hepatic-marker
|
| 188 |
+
forms), so each project's biotabs ship only the columns they actually
|
| 189 |
+
carry. Discovered via `/files` filtered to `data_type="Clinical
|
| 190 |
+
Supplement"` + `data_format="bcr biotab"`, downloaded via `/data`.
|
| 191 |
+
|
| 192 |
+
### Source data filters (canonical)
|
| 193 |
+
|
| 194 |
+
Same in both views of the dataset; each row locks the `/files` query
|
| 195 |
+
for one source:
|
| 196 |
+
|
| 197 |
+
| data_type | data_format | data_category | experimental_strategy | analysis.workflow_type |
|
| 198 |
+
|---|---|---|---|---|
|
| 199 |
+
| `Masked Somatic Mutation` | `MAF` | `Simple Nucleotide Variation` | `WXS` | `Aliquot Ensemble Somatic Variant Merging and Masking` |
|
| 200 |
+
| `Gene Expression Quantification` | `TSV` | `Transcriptome Profiling` | `RNA-Seq` | `STAR - Counts` |
|
| 201 |
+
| `Clinical Supplement` | `bcr biotab` | `Clinical` | | |
|
| 202 |
+
|
| 203 |
+
### How each source appears in this view
|
| 204 |
+
|
| 205 |
+
| Source | Where it lands |
|
| 206 |
+
|---|---|
|
| 207 |
+
| GDC `/cases` | nested fields on each patient row (`demographic`, `diagnoses`, `follow_ups`, `exposures`, `family_histories`, `samples`); `gdc_portal_url` link added |
|
| 208 |
+
| Masked Somatic Mutation MAFs | `samples_masked_somatic_mutation` array on each patient row (sample FKs resolved alongside GDC's aliquot UUIDs) |
|
| 209 |
+
| Gene Expression Quantification | `samples_gene_expression_quantification` array on each patient row (`stranded_first` / `stranded_second` dropped — GDC harmonizes as unstranded) |
|
| 210 |
+
| BCR Clinical Supplements | consumed in-memory for the `survival_derived` supplement (see below); not surfaced as columns on the row |
|
| 211 |
+
|
| 212 |
+
|
| 213 |
+
### Specific to this view
|
| 214 |
+
|
| 215 |
+
- Convenience: each row carries `samples_<modality>` array columns so
|
| 216 |
+
you can column-project just the molecular data you need without
|
| 217 |
+
walking the nested GDC entities.
|
| 218 |
+
- Loading: the [`tcga2hf` package][repo] ships a typed `TcgaHfPatient`
|
| 219 |
+
pydantic model that mirrors this schema and adds convenience joins
|
| 220 |
+
(tumor/normal pairs, mutations-by-gene, expression-by-gene,
|
| 221 |
+
longitudinal timeline).
|
| 222 |
+
|
| 223 |
|
| 224 |
### Provenance pinned per build
|
| 225 |
|
|
|
|
| 232 |
See the [repository][repo] for full request payloads, filter clauses,
|
| 233 |
and the build pipeline source.
|
| 234 |
|
| 235 |
+
|
| 236 |
## Survival endpoints (`survival_derived`)
|
| 237 |
|
| 238 |
+
We have provided a supplement to the GDC source data: re-derived
|
| 239 |
+
survival endpoints — Overall Survival (OS), Disease-Specific Survival
|
| 240 |
+
(DSS), Progression-Free Interval (PFI), Disease-Free Interval (DFI) —
|
| 241 |
+
following the algorithm published by **Liu et al. 2018**
|
| 242 |
([DOI 10.1016/j.cell.2018.02.052](https://doi.org/10.1016/j.cell.2018.02.052)).
|
| 243 |
|
| 244 |
+
Each patient row carries a top-level **`survival_derived` struct** with eight sub-fields: `os_event` / `os_time`, `dss_event` / `dss_time`, `pfi_event` / `pfi_time`, `dfi_event` / `dfi_time`. `*_event` is 0/1 (event observed vs censored); `*_time` is
|
| 245 |
+
days from `index_date` (TCGA: diagnosis date). DFI is null for SKCM /
|
| 246 |
+
THYM / UVM / LAML — Liu specifies no DFI for those tumor types.
|
| 247 |
|
| 248 |
We've reimplemented Liu's method against the current TCGA data and find
|
| 249 |
broad agreement with the original curated CDR. Differences exist and are
|
|
|
|
| 254 |
methodology.
|
| 255 |
|
| 256 |
**Why we don't ship Liu's curated 2018 values directly:** the CDR is a
|
| 257 |
+
frozen 2018 snapshot derived from a since-modified GDC release.
|
| 258 |
+
Including those values would lock in irreproducible source-data drift.
|
| 259 |
+
We re-derive on every build, so the values reflect the current GDC and
|
| 260 |
+
are reproducible from this dataset's other tables alone.
|
| 261 |
|
| 262 |
## Loading
|
| 263 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 264 |
```python
|
| 265 |
+
from datasets import load_dataset
|
|
|
|
| 266 |
|
| 267 |
+
# One config per TCGA project.
|
| 268 |
+
luad = load_dataset("gabrielaltay/tcga-patients-open", "TCGA-LUAD")
|
| 269 |
```
|
| 270 |
|
| 271 |
+
Each row is one patient with the full GDC `case` structure nested
|
| 272 |
+
in-place plus the `survival_derived` struct.
|
| 273 |
+
|
| 274 |
## GDC references
|
| 275 |
|
| 276 |
- [Data dictionary][gdc-dict] (every entity + field definition)
|
|
|
|
| 331 |
|
| 332 |
**This project is not affiliated with the NCI, GDC, or the TCGA Research
|
| 333 |
Network.** It is an experimental open-source pipeline that may change
|
| 334 |
+
significantly between versions. Pipeline source: [`galtay/tcga2hf`][repo].
|
|
|
|
|
|
|
|
|
|
|
|
|
| 335 |
|
| 336 |
[gdc-dict]: https://docs.gdc.cancer.gov/Data_Dictionary/
|
| 337 |
[repo]: https://github.com/galtay/tcga2hf
|
| 338 |
+
[patients]: https://huggingface.co/datasets/gabrielaltay/tcga-patients-open
|
| 339 |
+
[tabular]: https://huggingface.co/datasets/gabrielaltay/tcga-tabular-open
|