Skip to contents

Adds 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.

Usage

EnrichTCGAMeta(tcga_data, project = NULL)

Arguments

tcga_data

The list returned by LoadTCGA, or any named list with at least a $meta data frame and a $project string.

project

Character scalar. TCGA project ID (e.g. "TCGA-GBM"). Required only when tcga_data does not carry a $project element (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):

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")
} # }