
Enrich TCGA metadata with GDC clinical and molecular subtype columns
EnrichTCGAMeta.RdAdds comprehensive clinical data and TCGA marker-paper molecular subtype
columns to an existing metadata data frame — without re-downloading the
expression matrix. This is the fastest way to add paper_IDH.status,
paper_Subtype, paper_CIMP.status, tumour stage, treatment
history, and other GDC variables to a dataset that was previously loaded
with LoadTCGA.
Arguments
- tcga_data
The list returned by
LoadTCGA, or any named list with at least a$metadata frame and a$projectstring.- project
Character scalar. TCGA project ID (e.g.
"TCGA-GBM"). Required only whentcga_datadoes not carry a$projectelement (e.g. when passing a raw metadata data frame).
Value
The input list with $meta replaced by the enriched data
frame. All original columns are preserved; new columns are appended.
If only a metadata data frame was supplied, a data frame is returned.
Details
Internally calls two fast GDC REST API endpoints via TCGAbiolinks (no per-patient file downloads):
TCGAbiolinks::GDCquery_clinic()— comprehensive clinical table (age at diagnosis, pathologic stage, race, vital status, treatment, etc.)TCGAbiolinks::TCGAquery_subtype()— TCGA marker-paper molecular subtypes (paper_*columns), available for most major cancer types.
Requires TCGAbiolinks:
BiocManager::install("TCGAbiolinks").
Examples
if (FALSE) { # \dontrun{
# Typical workflow after first LoadTCGA call
gbm <- LoadTCGA("TCGA-GBM")
gbm <- EnrichTCGAMeta(gbm)
SurvMetaSummary(gbm$meta) # now shows paper_IDH.status, stage, etc.
# Or enrich a bare metadata data frame
meta_enriched <- EnrichTCGAMeta(gbm$meta, project = "TCGA-GBM")
} # }