tcga-patients-open / README.md
gabrielaltay's picture
Add clinical_supplement struct column to patient rows (BCR biotab data: patient/follow_ups/ntes/drugs/radiations/ablations/omfs sub-fields, per-project schema). Patients view now surfaces the same BCR data the tabular view exposes.
bbcc13a verified
|
Raw
History Blame Contribute Delete
13 kB
metadata
license: other
license_name: nih-genomic-data-sharing
license_link: https://gdc.cancer.gov/analyze-data/data-analysis-policies
pretty_name: TCGA Patients (Open Access)
tags:
  - cancer
  - tcga
  - clinical
  - genomics
configs:
  - config_name: TCGA-ACC
    data_files:
      - split: train
        path: TCGA-ACC/data.parquet
  - config_name: TCGA-BLCA
    data_files:
      - split: train
        path: TCGA-BLCA/data.parquet
  - config_name: TCGA-BRCA
    data_files:
      - split: train
        path: TCGA-BRCA/data.parquet
  - config_name: TCGA-CESC
    data_files:
      - split: train
        path: TCGA-CESC/data.parquet
  - config_name: TCGA-CHOL
    data_files:
      - split: train
        path: TCGA-CHOL/data.parquet
  - config_name: TCGA-COAD
    data_files:
      - split: train
        path: TCGA-COAD/data.parquet
  - config_name: TCGA-DLBC
    data_files:
      - split: train
        path: TCGA-DLBC/data.parquet
  - config_name: TCGA-ESCA
    data_files:
      - split: train
        path: TCGA-ESCA/data.parquet
  - config_name: TCGA-GBM
    data_files:
      - split: train
        path: TCGA-GBM/data.parquet
  - config_name: TCGA-HNSC
    data_files:
      - split: train
        path: TCGA-HNSC/data.parquet
  - config_name: TCGA-KICH
    data_files:
      - split: train
        path: TCGA-KICH/data.parquet
  - config_name: TCGA-KIRC
    data_files:
      - split: train
        path: TCGA-KIRC/data.parquet
  - config_name: TCGA-KIRP
    data_files:
      - split: train
        path: TCGA-KIRP/data.parquet
  - config_name: TCGA-LAML
    data_files:
      - split: train
        path: TCGA-LAML/data.parquet
  - config_name: TCGA-LGG
    data_files:
      - split: train
        path: TCGA-LGG/data.parquet
  - config_name: TCGA-LIHC
    data_files:
      - split: train
        path: TCGA-LIHC/data.parquet
  - config_name: TCGA-LUAD
    data_files:
      - split: train
        path: TCGA-LUAD/data.parquet
  - config_name: TCGA-LUSC
    data_files:
      - split: train
        path: TCGA-LUSC/data.parquet
  - config_name: TCGA-MESO
    data_files:
      - split: train
        path: TCGA-MESO/data.parquet
  - config_name: TCGA-OV
    data_files:
      - split: train
        path: TCGA-OV/data.parquet
  - config_name: TCGA-PAAD
    data_files:
      - split: train
        path: TCGA-PAAD/data.parquet
  - config_name: TCGA-PCPG
    data_files:
      - split: train
        path: TCGA-PCPG/data.parquet
  - config_name: TCGA-PRAD
    data_files:
      - split: train
        path: TCGA-PRAD/data.parquet
  - config_name: TCGA-READ
    data_files:
      - split: train
        path: TCGA-READ/data.parquet
  - config_name: TCGA-SARC
    data_files:
      - split: train
        path: TCGA-SARC/data.parquet
  - config_name: TCGA-SKCM
    data_files:
      - split: train
        path: TCGA-SKCM/data.parquet
  - config_name: TCGA-STAD
    data_files:
      - split: train
        path: TCGA-STAD/data.parquet
  - config_name: TCGA-TGCT
    data_files:
      - split: train
        path: TCGA-TGCT/data.parquet
  - config_name: TCGA-THCA
    data_files:
      - split: train
        path: TCGA-THCA/data.parquet
  - config_name: TCGA-THYM
    data_files:
      - split: train
        path: TCGA-THYM/data.parquet
  - config_name: TCGA-UCEC
    data_files:
      - split: train
        path: TCGA-UCEC/data.parquet
  - config_name: TCGA-UCS
    data_files:
      - split: train
        path: TCGA-UCS/data.parquet
  - config_name: TCGA-UVM
    data_files:
      - split: train
        path: TCGA-UVM/data.parquet

TCGA Patients (Open Access)

Open-access TCGA data from the NCI Genomic Data Commons (GDC). Covers all 33 TCGA projects.

This view presents one HuggingFace subset per TCGA project, with one row per patient. See the tcga-tabular-open companion for a per-table view of the same underlying data.

  • Generated: 2026-05-09 22:03:39 UTC
  • Schema: derived from the GDC Data Dictionary.
  • GDC data release: Data Release 45.0 - December 04, 2025

Data model

Where the data comes from

Three sources feed each project's data, all open-access:

  • Case-level clinical structure — fetched from the GDC /cases endpoint, returning the full nested case JSON (demographic + diagnoses → treatments + follow_ups + exposures + family_histories + samples → portions → analytes → aliquots). The biospecimen subtree on each case:

    case          one patient (TCGA-XX-1234)
    └── sample    physical specimen taken from the patient at one timepoint
                  (Primary Tumor, Solid Tissue Normal, Blood Derived Normal, ...)
        └── portion    a piece of that sample for a specific lab process
            └── analyte    extracted material of one type (DNA or RNA)
                └── aliquot    a vial of that analyte handed off for sequencing
    
  • Per-modality molecular files — discovered via /files (filtered by the clauses in the table below) and downloaded via /data. Each combination locks one data_type to a specific GDC pipeline so a future GDC addition can't quietly substitute a different pipeline under the same data_type.

  • BCR Clinical Supplement biotabs — original Biospecimen Core Resource (BCR) clinical forms shipped as per-project TSVs (one per form: patient, follow_up, nte, drug, radiation, etc.). The harmonized /cases endpoint drops or under-populates a number of clinical fields the BCR-original biotabs preserve. The schema varies by cancer type (e.g. BLCA's BCG-response columns don't exist in CHOL's hepatic-marker forms), so each project's biotabs ship only the columns they actually carry. Discovered the same way (/files then /data) — see the filter table below.

Source data filters (canonical)

Same in both views of the dataset; each row locks the /files query for one source:

data_type data_format data_category experimental_strategy analysis.workflow_type
Masked Somatic Mutation MAF Simple Nucleotide Variation WXS Aliquot Ensemble Somatic Variant Merging and Masking
Gene Expression Quantification TSV Transcriptome Profiling RNA-Seq STAR - Counts
Clinical Supplement bcr biotab Clinical

How each source appears in this view

Source Where it lands
GDC /cases nested fields on each patient row (demographic, diagnoses, follow_ups, exposures, family_histories, samples); gdc_portal_url link added
Masked Somatic Mutation MAFs samples_masked_somatic_mutation array on each patient row (sample FKs resolved alongside GDC's aliquot UUIDs)
Gene Expression Quantification samples_gene_expression_quantification array on each patient row (stranded_first / stranded_second dropped — GDC harmonizes as unstranded)
BCR Clinical Supplements clinical_supplement struct on each patient row, with sub-fields patient (1 dict) and follow_ups / ntes / drugs / radiations / ablations / omfs (lists of dicts). Sub-fields with no data for the project are omitted.

Specific to this view

  • Convenience: each row carries samples_<modality> array columns so you can column-project just the molecular data you need without walking the nested GDC entities.
  • Loading: the tcga2hf package ships a typed TcgaHfPatient pydantic model that mirrors this schema and adds convenience joins (tumor/normal pairs, mutations-by-gene, expression-by-gene, longitudinal timeline).

Provenance pinned per build

  • GET /statusdata_release / tag / commit saved in each project's gdc_status.json.
  • GET /v0/submission/_dictionary/_all → schema dictionary snapshot saved alongside the raw data; its SHA-256 is recorded in gdc_status.json.

See the repository for full request payloads, filter clauses, and the build pipeline source.

Survival endpoints (survival_derived)

We have provided a supplement to the GDC source data: re-derived survival endpoints — Overall Survival (OS), Disease-Specific Survival (DSS), Progression-Free Interval (PFI), Disease-Free Interval (DFI) — following the algorithm published by Liu et al. 2018 (DOI 10.1016/j.cell.2018.02.052).

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 days from index_date (TCGA: diagnosis date). DFI is null for SKCM / THYM / UVM / LAML — Liu specifies no DFI for those tumor types.

We've reimplemented Liu's method against the current TCGA data and find broad agreement with the original curated CDR. Differences exist and are expected: this is a newer release of the underlying GDC data, so re-curated clinical values, post-2018 patient additions, and schema migrations all contribute to the gap. This work is evolving; see the repository for the full reproduction report and per-endpoint methodology.

Why we don't ship Liu's curated 2018 values directly: the CDR is a frozen 2018 snapshot derived from a since-modified GDC release. Including those values would lock in irreproducible source-data drift. We re-derive on every build, so the values reflect the current GDC and are reproducible from this dataset's other tables alone.

Loading

from datasets import load_dataset

# One config per TCGA project.
luad = load_dataset("gabrielaltay/tcga-patients-open", "TCGA-LUAD")

Each row is one patient with the full GDC case structure nested in-place plus the survival_derived struct.

GDC references

License & redistribution

Per the NCI GDC Data Analysis Policy:

The GDC itself places no restrictions (other than attempts at reidentification) on analysis or publication of open access data provided through the GDC Data Portal.

Per the NCI TCGA citation page:

Moratoria on all cancer types are now lifted and all TCGA data are available without restrictions on their use in publications or presentations.

Per the GDC Data Access Processes and Tools page:

Open access data generally includes high level genomic data that is not individually identifiable, as well as most clinical and all biospecimen data elements.

Restrictions on use

Users of any data provided by GDC, whether open or controlled access, agree not to attempt to reidentify any individual participant in any study represented by GDC data, for any purpose whatever. (source)

Required acknowledgement

If you publish or present results derived from this dataset, include the NCI-required TCGA acknowledgement:

The results here are in whole or part based upon data generated by the TCGA Research Network: https://www.cancer.gov/tcga.

Suggested citations:

Policy references: GDC Policies, GDC Encyclopedia — Controlled Access (defines what is not in this dataset), NIH Genomic Data Sharing Policy.

Disclaimer

This project is not affiliated with the NCI, GDC, or the TCGA Research Network. It is an experimental open-source pipeline that may change significantly between versions. Pipeline source: galtay/tcga2hf.