Contents

1 Data Introduction

This package provides a dataset for those wishing to try out the TCGA Workflow: Analyze cancer genomics and epigenomics data using Bioconductor packages [@10.12688/f1000research.8923.2]. The data in this package are a subset of the TCGA data for LGG (Lower grade glioma) and GBM (Glioblastoma multiforme) samples.

2 Loading the data

library(TCGAWorkflowData)
data("elmerExample")
data("TCGA_LGG_Transcriptome_20_samples")
data("TCGA_GBM_Transcriptome_20_samples")
data("histoneMarks")
data("biogrid")
data("genes_GR")
data("maf_lgg_gbm")

3 Data creation

The following commands were used to create the data included with this package.

3.1 Genes information

Download gene information for hg19 using TCGAbiolinks, which uses biomart parckage.

library(GenomicRanges)
library(TCGAbiolinks)
##############################
## Recurrent CNV annotation ## 
##############################
# Get gene information from GENCODE using biomart
genes <- TCGAbiolinks:::get.GRCh.bioMart(genome = "hg19") 
genes <- genes[genes$external_gene_id != "" & genes$chromosome_name %in% c(1:22,"X","Y"),]
genes[genes$chromosome_name == "X", "chromosome_name"] <- 23
genes[genes$chromosome_name == "Y", "chromosome_name"] <- 24
genes$chromosome_name <- sapply(genes$chromosome_name,as.integer)
genes <- genes[order(genes$start_position),]
genes <- genes[order(genes$chromosome_name),]
genes <- genes[,c("external_gene_id", "chromosome_name", "start_position","end_position")]
colnames(genes) <- c("GeneSymbol","Chr","Start","End")
genes_GR <- makeGRangesFromDataFrame(genes,keep.extra.columns = TRUE)
save(genes_GR,genes,file = "genes_GR.rda", compress = "xz")

3.2 GISTIC results

Download and save a subset of GBM GISTIC results from GDAC firehose.

library(RTCGAToolbox)
# Download GISTIC results
lastAnalyseDate <- getFirehoseAnalyzeDates(1)
gistic <- getFirehoseData(
  dataset = "GBM",
  gistic2_Date = lastAnalyseDate,
  GISTIC = TRUE
)

# get GISTIC results
gistic_allbygene <- getData(
  gistic,
  type = "GISTIC", 
  platform = "AllByGene"
)

gistic_thresholedbygene <- getData(
  gistic,
  type = "GISTIC", 
  platform = "ThresholdedByGene"
)

save(
  gistic_allbygene,
  gistic_thresholedbygene,
  file = "GBMGistic.rda", compress = "xz"
)

3.3 Gene expression data

The following code will download 20 LGG (Lower grade glioma) and 20 GBM (Glioblastoma multiforme) samples that have gene expression data. The Gene expression data is the raw expression signal for expression of a gene.

query_exp_lgg <- GDCquery(
  project = "TCGA-LGG",
  data.category = "Transcriptome Profiling",
  data.type = "Gene Expression Quantification", 
  workflow.type = "STAR - Counts"
)
# Get only first 20 samples to make example faster
query_exp_lgg$results[[1]] <- query_exp_lgg$results[[1]][1:20,]
GDCdownload(query_exp_lgg)
exp_lgg <- GDCprepare(
  query = query_exp_lgg
)

query_exp_gbm <- GDCquery(
  project = "TCGA-GBM",
  data.category = "Transcriptome Profiling",
  data.type = "Gene Expression Quantification", 
  workflow.type = "STAR - Counts"
)
# Get only first 20 samples to make example faster
query_exp_gbm$results[[1]] <- query_exp_gbm$results[[1]][1:20,]
GDCdownload(query_exp_gbm)
exp_gbm <- GDCprepare(
  query = query_exp_gbm
)

3.4 DNA methylation and Gene expression data

The following code will select 10 LGG (Lower grade glioma) and 10 GBM (Glioblastoma multiforme) samples that have both DNA methylation and gene expression data. This objects will be then prepared to the format accept by the Biocondcutor package ELMER([link])(http://bioconductor.org/packages/release/bioc/html/ELMER.html). The DNA methylation will have only probes in chromossome 9 in order to make the example of the workflow faster. For a real analysis, all chromossomes should be used. The Gene expression data is the normalized results for expression of a gene.

#----------- 8.3 Identification of Regulatory Enhancers   -------
library(TCGAbiolinks)
# Samples: primary solid tumor w/ DNA methylation and gene expression
matched_met_exp <- function(project, n = NULL){
  # get primary solid tumor samples: DNA methylation
  message("Download DNA methylation information")
  met450k <- GDCquery(
    project = project,
    data.category = "DNA Methylation",
    platform = "Illumina Human Methylation 450",
    data.type = "Methylation Beta Value",
    sample.type = c("Primary Tumor")
  )
  met450k.tp <-  met450k$results[[1]]$cases
  
  # get primary solid tumor samples: RNAseq
  message("Download gene expression information")
  exp <- GDCquery(
    project = project,
    data.category = "Transcriptome Profiling",
    data.type = "Gene Expression Quantification", 
    workflow.type = "STAR - Counts"
    sample.type = c("Primary Tumor")
  )
  
  exp.tp <- exp$results[[1]]$cases
  # Get patients with samples in both platforms
  patients <- unique(substr(exp.tp,1,15)[substr(exp.tp,1,12) %in% substr(met450k.tp,1,12)] )
  if(!is.null(n)) patients <- patients[1:n] # get only n samples
  return(patients)
}
lgg.samples <- matched_met_exp("TCGA-LGG", n = 10)
gbm.samples <- matched_met_exp("TCGA-GBM", n = 10)
samples <- c(lgg.samples,gbm.samples)

#-----------------------------------
# 1 - Methylation
# ----------------------------------
query.met <- GDCquery(
  project = c("TCGA-LGG","TCGA-GBM"),
  data.category = "DNA Methylation",
  platform = "Illumina Human Methylation 450",
  data.type = "Methylation Beta Value",
  barcode = samples
)
GDCdownload(query.met)
met <- GDCprepare(query.met, save = FALSE)
met <- subset(met,subset = as.character(GenomicRanges::seqnames(met)) %in% c("chr9"))

#-----------------------------------
# 2 - Expression
# ----------------------------------
query.exp <- GDCquery(
  project = c("TCGA-LGG","TCGA-GBM"),
  data.category = "Transcriptome Profiling",
  data.type = "Gene Expression Quantification", 
  workflow.type = "STAR - Counts"
  sample.type = c("Primary Tumor")
  barcode =  samples
)
GDCdownload(query.exp)
exp <- GDCprepare(query.exp, save = FALSE)
save(exp, met, gbm.samples, lgg.samples, file = "elmerExample.rda", compress = "xz")

3.5 Mutation data

The following code will download Mutation annotation files (aligned against the genoem of reference hg38) for LGG and GBM samples and merge them into one single single file. The GDC Somatic Mutation Calling Workflow used is the mutect2. For more information please check GDC.

library(TCGAbiolinks)
query <- GDCquery(
  project = c("TCGA-LGG","TCGA-GBM"), 
  data.category = "Simple Nucleotide Variation", 
  access = "open",
  data.type = "Masked Somatic Mutation", 
  workflow.type = "Aliquot Ensemble Somatic Variant Merging and Masking"
)
GDCdownload(query)
maf <- GDCprepare(query)
save(maf,file = "maf_lgg_gbm.rda",compress = "xz")

3.6 Biogrid data

Download biogrid information.

### read biogrid info
### Check last version in https://thebiogrid.org/download.php 
file <- "https://downloads.thebiogrid.org/Download/BioGRID/Latest-Release/BIOGRID-ALL-LATEST.tab2.zip"
if(!file.exists(gsub("zip","txt",basename(file)))){
  downloader::download(file,basename(file))
  unzip(basename(file),junkpaths =TRUE)
}

tmp.biogrid <- vroom::vroom(
  dir(pattern = "BIOGRID-ALL.*\\.txt")
)
save(tmp.biogrid, file = "biogrid.rda", compress = "xz")

3.7 Histone marks

The code below was used to download histone marks specific for brain tissue using the AnnotationHub package that can access the Roadmap database.

4 Session info

R version 4.4.0 beta (2024-04-15 r86425)

Platform: x86_64-pc-linux-gnu

locale: LC_CTYPE=en_US.UTF-8, LC_NUMERIC=C, LC_TIME=en_GB, LC_COLLATE=C, LC_MONETARY=en_US.UTF-8, LC_MESSAGES=en_US.UTF-8, LC_PAPER=en_US.UTF-8, LC_NAME=C, LC_ADDRESS=C, LC_TELEPHONE=C, LC_MEASUREMENT=en_US.UTF-8 and LC_IDENTIFICATION=C

attached base packages:

other attached packages:

loaded via a namespace (and not attached):