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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: other
|
| 3 |
+
license_name: nih-genomic-data-sharing
|
| 4 |
+
license_link: https://gdc.cancer.gov/analyze-data/data-analysis-policies
|
| 5 |
+
pretty_name: TCGA Patients (prototype)
|
| 6 |
+
tags:
|
| 7 |
+
- cancer
|
| 8 |
+
- tcga
|
| 9 |
+
- clinical
|
| 10 |
+
- genomics
|
| 11 |
+
configs:
|
| 12 |
+
- config_name: patients
|
| 13 |
+
data_files: patients/*.parquet
|
| 14 |
+
---
|
| 15 |
+
|
| 16 |
+
# TCGA Patients (prototype)
|
| 17 |
+
|
| 18 |
+
One row per patient. Open-access TCGA clinical data from the NCI Genomic Data
|
| 19 |
+
Commons (GDC), pre-joined into a single nested record per case so multi-modal
|
| 20 |
+
oncology models can stream rich patient context in batches without doing joins.
|
| 21 |
+
|
| 22 |
+
- **Projects included:** `TCGA-CHOL`, `TCGA-DLBC`
|
| 23 |
+
- **Generated:** 2026-05-03 23:41:10 UTC
|
| 24 |
+
- **Source:** NCI GDC `/cases` endpoint with expansions on `demographic`,
|
| 25 |
+
`diagnoses`, `diagnoses.treatments`, `follow_ups`, `exposures`,
|
| 26 |
+
`family_histories`, `project`.
|
| 27 |
+
- **Access tier:** open. Redistributable; see [License & redistribution](#license--redistribution) below.
|
| 28 |
+
- **Partitioning:** one Parquet file per TCGA project, at
|
| 29 |
+
`patients/<TCGA-XXXX>.parquet`. The `patients` HF config globs all of them.
|
| 30 |
+
|
| 31 |
+
## Loading
|
| 32 |
+
|
| 33 |
+
```python
|
| 34 |
+
from datasets import load_dataset
|
| 35 |
+
|
| 36 |
+
# Stream all projects (HF concatenates the per-project parquets):
|
| 37 |
+
ds = load_dataset("<repo_id>", "patients", split="train", streaming=True)
|
| 38 |
+
for patient in ds:
|
| 39 |
+
case_id = patient["case_id"]
|
| 40 |
+
diagnoses = patient["diagnoses"] # list of dicts
|
| 41 |
+
treatments = [tx for dx in diagnoses for tx in dx["treatments"]]
|
| 42 |
+
...
|
| 43 |
+
|
| 44 |
+
# Restrict to one project: load only its parquet
|
| 45 |
+
chol = load_dataset("<repo_id>", data_files="patients/TCGA-CHOL.parquet")
|
| 46 |
+
```
|
| 47 |
+
|
| 48 |
+
Or load into pyarrow / polars / pandas directly:
|
| 49 |
+
|
| 50 |
+
```python
|
| 51 |
+
import pyarrow.parquet as pq
|
| 52 |
+
|
| 53 |
+
table = pq.read_table(
|
| 54 |
+
"patients/TCGA-CHOL.parquet",
|
| 55 |
+
columns=["case_id", "project_id", "demographic", "diagnoses"],
|
| 56 |
+
)
|
| 57 |
+
```
|
| 58 |
+
|
| 59 |
+
## Verification
|
| 60 |
+
|
| 61 |
+
This dataset's source is the NCI GDC. The same TCGA cases are also browsable on
|
| 62 |
+
[cBioPortal](https://www.cbioportal.org/). cBioPortal hosts **multiple versions**
|
| 63 |
+
of TCGA per disease (Firehose Legacy, PanCancer Atlas, GDC-sourced); the
|
| 64 |
+
`*_tcga_gdc` family shares our upstream source and is the like-for-like
|
| 65 |
+
comparison. Disease prefixes use cBioPortal's own taxonomy, not always the
|
| 66 |
+
TCGA project suffix (e.g. `TCGA-DLBC` → `dlbclnos_tcga_gdc`).
|
| 67 |
+
|
| 68 |
+
```
|
| 69 |
+
https://www.cbioportal.org/patient/summary?studyId=<study>&caseId=<case_submitter_id>
|
| 70 |
+
```
|
| 71 |
+
|
| 72 |
+
For example, patient `TCGA-W5-AA39` (project `TCGA-CHOL`) →
|
| 73 |
+
`https://www.cbioportal.org/patient/summary?studyId=chol_tcga_gdc&caseId=TCGA-W5-AA39`.
|
| 74 |
+
|
| 75 |
+
## Schema
|
| 76 |
+
|
| 77 |
+
```
|
| 78 |
+
case_id: string
|
| 79 |
+
case_submitter_id: string
|
| 80 |
+
project_id: string
|
| 81 |
+
primary_site: string
|
| 82 |
+
disease_type: string
|
| 83 |
+
demographic: struct<
|
| 84 |
+
demographic_id: string,
|
| 85 |
+
submitter_id: string,
|
| 86 |
+
gender: string,
|
| 87 |
+
sex_at_birth: string,
|
| 88 |
+
race: string,
|
| 89 |
+
ethnicity: string,
|
| 90 |
+
vital_status: string,
|
| 91 |
+
age_at_index: int64,
|
| 92 |
+
days_to_birth: int64,
|
| 93 |
+
days_to_death: int64,
|
| 94 |
+
year_of_birth: int64,
|
| 95 |
+
year_of_death: int64,
|
| 96 |
+
country_of_residence_at_enrollment: string,
|
| 97 |
+
>
|
| 98 |
+
diagnoses: list<struct<
|
| 99 |
+
diagnosis_id: string,
|
| 100 |
+
submitter_id: string,
|
| 101 |
+
primary_diagnosis: string,
|
| 102 |
+
morphology: string,
|
| 103 |
+
tissue_or_organ_of_origin: string,
|
| 104 |
+
site_of_resection_or_biopsy: string,
|
| 105 |
+
icd_10_code: string,
|
| 106 |
+
ajcc_pathologic_stage: string,
|
| 107 |
+
ajcc_pathologic_t: string,
|
| 108 |
+
ajcc_pathologic_n: string,
|
| 109 |
+
ajcc_pathologic_m: string,
|
| 110 |
+
ajcc_staging_system_edition: string,
|
| 111 |
+
age_at_diagnosis: int64,
|
| 112 |
+
days_to_diagnosis: double,
|
| 113 |
+
year_of_diagnosis: int64,
|
| 114 |
+
prior_malignancy: string,
|
| 115 |
+
prior_treatment: string,
|
| 116 |
+
synchronous_malignancy: string,
|
| 117 |
+
classification_of_tumor: string,
|
| 118 |
+
last_known_disease_status: string,
|
| 119 |
+
days_to_last_follow_up: double,
|
| 120 |
+
days_to_last_known_disease_status: double,
|
| 121 |
+
days_to_recurrence: double,
|
| 122 |
+
residual_disease: string,
|
| 123 |
+
diagnosis_is_primary_disease: bool,
|
| 124 |
+
treatments: list<struct<
|
| 125 |
+
treatment_id: string,
|
| 126 |
+
submitter_id: string,
|
| 127 |
+
treatment_type: string,
|
| 128 |
+
treatment_or_therapy: string,
|
| 129 |
+
treatment_intent_type: string,
|
| 130 |
+
treatment_outcome: string,
|
| 131 |
+
therapeutic_agents: string,
|
| 132 |
+
days_to_treatment_start: double,
|
| 133 |
+
days_to_treatment_end: double,
|
| 134 |
+
initial_disease_status: string,
|
| 135 |
+
>>,
|
| 136 |
+
>>
|
| 137 |
+
follow_ups: list<struct<
|
| 138 |
+
follow_up_id: string,
|
| 139 |
+
submitter_id: string,
|
| 140 |
+
timepoint_category: string,
|
| 141 |
+
disease_response: string,
|
| 142 |
+
progression_or_recurrence: string,
|
| 143 |
+
days_to_follow_up: double,
|
| 144 |
+
days_to_progression: double,
|
| 145 |
+
days_to_recurrence: double,
|
| 146 |
+
ecog_performance_status: string,
|
| 147 |
+
>>
|
| 148 |
+
exposures: list<struct<
|
| 149 |
+
exposure_id: string,
|
| 150 |
+
submitter_id: string,
|
| 151 |
+
tobacco_smoking_status: string,
|
| 152 |
+
cigarettes_per_day: double,
|
| 153 |
+
years_smoked: double,
|
| 154 |
+
alcohol_history: string,
|
| 155 |
+
alcohol_intensity: string,
|
| 156 |
+
bmi: double,
|
| 157 |
+
weight: double,
|
| 158 |
+
height: double,
|
| 159 |
+
>>
|
| 160 |
+
family_histories: list<struct<
|
| 161 |
+
family_history_id: string,
|
| 162 |
+
submitter_id: string,
|
| 163 |
+
relationship_type: string,
|
| 164 |
+
relative_with_cancer_history: string,
|
| 165 |
+
relationship_primary_diagnosis: string,
|
| 166 |
+
>>
|
| 167 |
+
```
|
| 168 |
+
|
| 169 |
+
Notes on the nested layout:
|
| 170 |
+
|
| 171 |
+
- `demographic` is a single `struct` (1:1 with the patient).
|
| 172 |
+
- `diagnoses`, `follow_ups`, `exposures`, `family_histories` are `list<struct<...>>`
|
| 173 |
+
(0..N per patient).
|
| 174 |
+
- `treatments` is nested *inside* each diagnosis (`diagnoses[i].treatments`), so
|
| 175 |
+
the source 1:N relationship between diagnosis and treatment is preserved.
|
| 176 |
+
- All leaf fields are nullable.
|
| 177 |
+
|
| 178 |
+
## License & redistribution
|
| 179 |
+
|
| 180 |
+
This dataset only contains TCGA data fetched from the GDC's **open-access** tier
|
| 181 |
+
(`/cases` endpoint with `access=open`). Per the
|
| 182 |
+
[NCI GDC Data Analysis Policy](https://gdc.cancer.gov/analyze-data/data-analysis-policies):
|
| 183 |
+
|
| 184 |
+
> The GDC itself places no restrictions (other than attempts at reidentification)
|
| 185 |
+
> on analysis or publication of open access data provided through the GDC Data Portal.
|
| 186 |
+
|
| 187 |
+
Per the [NCI TCGA citation page](https://www.cancer.gov/ccg/research/genome-sequencing/tcga/using-tcga-data/citing):
|
| 188 |
+
|
| 189 |
+
> Moratoria on all cancer types are now lifted and all TCGA data are available
|
| 190 |
+
> without restrictions on their use in publications or presentations.
|
| 191 |
+
|
| 192 |
+
Per the [GDC Data Access Processes and Tools page](https://gdc.cancer.gov/access-data/data-access-processes-and-tools):
|
| 193 |
+
|
| 194 |
+
> Open access data generally includes high level genomic data that is not
|
| 195 |
+
> individually identifiable, as well as most clinical and all biospecimen data
|
| 196 |
+
> elements.
|
| 197 |
+
|
| 198 |
+
The clinical data here is squarely within that scope.
|
| 199 |
+
|
| 200 |
+
## Restrictions on use
|
| 201 |
+
|
| 202 |
+
The single hard restriction inherited from the GDC policy applies to all
|
| 203 |
+
downstream users:
|
| 204 |
+
|
| 205 |
+
> Users of any data provided by GDC, whether open or controlled access, agree
|
| 206 |
+
> not to attempt to reidentify any individual participant in any study
|
| 207 |
+
> represented by GDC data, for any purpose whatever.
|
| 208 |
+
> ([source](https://gdc.cancer.gov/analyze-data/data-analysis-policies))
|
| 209 |
+
|
| 210 |
+
## Required acknowledgement
|
| 211 |
+
|
| 212 |
+
If you publish or present results derived from this dataset, please include the
|
| 213 |
+
[NCI-required TCGA acknowledgement](https://www.cancer.gov/ccg/research/genome-sequencing/tcga/using-tcga-data/citing):
|
| 214 |
+
|
| 215 |
+
> The results <published or shown> here are in whole or part based upon data
|
| 216 |
+
> generated by the TCGA Research Network: https://www.cancer.gov/tcga.
|
| 217 |
+
|
| 218 |
+
Suggested citations for the GDC and TCGA:
|
| 219 |
+
|
| 220 |
+
- Grossman, R. L., et al. (2016). Toward a Shared Vision for Cancer Genomic Data.
|
| 221 |
+
*NEJM*, 375(12), 1109-1112.
|
| 222 |
+
- The Cancer Genome Atlas Research Network. https://www.cancer.gov/tcga
|
| 223 |
+
- NCI Genomic Data Commons. https://gdc.cancer.gov
|
| 224 |
+
|
| 225 |
+
Additional policy references:
|
| 226 |
+
|
| 227 |
+
- [GDC Policies (umbrella)](https://gdc.cancer.gov/about-gdc/gdc-policies)
|
| 228 |
+
- [GDC Encyclopedia — Controlled Access](https://docs.gdc.cancer.gov/Encyclopedia/pages/Controlled_Access/) (defines what is *not* in this dataset)
|
| 229 |
+
- [NIH Genomic Data Sharing Policy](https://sharing.nih.gov/genomic-data-sharing)
|
| 230 |
+
|
| 231 |
+
## Disclaimer
|
| 232 |
+
|
| 233 |
+
Prototype dataset for engineering validation. Schemas, projects, and column
|
| 234 |
+
coverage will change as additional modalities (mutations, expression, copy number)
|
| 235 |
+
are added — likely as additional top-level nested columns on the same patient row.
|
| 236 |
+
Re-derive from the GDC for any analysis where freshness matters.
|
patients/TCGA-CHOL.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ecdb3d8e1401e8164b1e728ed0f9c2d061cdb53ee24754d3b3df3d468f1c5c11
|
| 3 |
+
size 88665
|
patients/TCGA-DLBC.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3647363606ef796b817acb42e5f545456885eac8ee1b73c671ec1e57c4d4ad05
|
| 3 |
+
size 93491
|