Download
: Get TCGA dataDownload
: Get GEO dataAnalysis
: To analyze TCGA dataDPA
: Differential Phenotype AnalysisLPA
: Literature Phenotype AnalysisFEA
: Functional Enrichment AnalysisFEAplot
: Functional Enrichment Analysis PlotGRN
: Gene Regulatory NetworkURA
: Upstream Regulator AnalysisPRA
: Pattern Regognition AnalysisplotNetworkHive
: GRN hive visualization taking into account Cosmic cancer genesIn order to make light of cancer development, it is crucial to understand which genes play a role in the mechanisms linked to this disease and moreover which role that is. Commonly biological processes such as proliferation and apoptosis have been linked to cancer progression. Based on expression data we perform functional enrichment analysis, infer gene regulatory networks and upstream regulator analysis to score the importance of well-known biological processes with respect to the studied cancer. We then use these scores to predict two specific roles: genes that act as tumor suppressor genes (TSGs) and genes that act as oncogenes (OCGs). This methodology not only allows us to identify genes with dual role (TSG in one cancer type and OCG in another) but also to elucidate the underlying biological processes.
Cancer development is influenced by mutations in two distinctly different categories of genes, known as tumor suppressor genes (TSG) and oncogenes (OCG). The occurrence of mutations in genes of the first category leads to faster cell proliferation while mutations in genes of second category increases or changes their function. We propose MoonlightR
a new approach to define TSGs and OCGs based on functional enrichment analysis, infer gene regulatory networks and upstream regulator analysis to score the importance of well-known biological processes with respect to the studied cancer.
Moonlight’s pipeline is shown below:
The proposed pipeline consists of following eight steps:
1 For the devel version of MoonlightR we use a short extract of ten biological functions from QIAGEN’S Ingenuity Pathway Analysis (IPA). We are still working to integrate the package.
To install use the code below.
source("https://bioconductor.org/biocLite.R")
biocLite("MoonlightR")
Please cite TCGAbiolinks package:
Related publications to this package:
Download
: Get TCGA dataYou can search TCGA data using the getDataTCGA
function.
getDataTCGA
: Search by cancer type and data type [Gene Expression]The user can query and download the cancer types supported by TCGA, using the function getDataTCGA
: In this example we used LUAD gene expression data with only 4 samples to reduce time downloading.
dataFilt <- getDataTCGA(cancerType = "LUAD",
dataType = "Gene expression",
directory = "data",
nSample = 4)
getDataTCGA
: Search by cancer type and data type [Methylation]The user can also query and download methylation data using the function getDataTCGA
:
dataFilt <- getDataTCGA(cancerType = "BRCA",
dataType = "Methylation",
directory = "data",nSample = 4)
Download
: Get GEO dataYou can search GEO data using the getDataGEO
function.
GEO_TCGAtab: a 18x12 matrix that provides the GEO data set we matched to one of the 18 given TCGA cancer types
knitr::kable(GEO_TCGAtab, digits = 2,
caption = "Table with GEO data set matched to one
of the 18 given TCGA cancer types ",
row.names = TRUE)
Cancer | TP | NT | DEG. | Dataset | TP.1 | NT.1 | Platform | DEG.. | Common | GEO_Normal | GEO_Tumor | |
---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | BLCA | 408 | 19 | 2937 | GSE13507 | 165 | 10 | GPL65000 | 2099 | 896 | control | cancer |
2 | BRCA | 1097 | 114 | 3390 | GSE39004 | 61 | 47 | GPL6244 | 2449 | 1248 | normal | Tumor |
3 | CHOL | 36 | 9 | 5015 | GSE26566 | 104 | 59 | GPL6104 | 3983 | 2587 | Surrounding | Tumor |
4 | COAD | 286 | 41 | 3788 | GSE41657 | 25 | 12 | GPL6480 | 3523 | 1367 | N | A |
5 | ESCA | 184 | 11 | 2525 | GSE20347 | 17 | 17 | GPL571 | 1316 | 406 | normal | carcinoma |
6 | GBM | 156 | 5 | 4828 | GSE50161 | 34 | 13 | GPL570 | 4504 | 2660 | normal | GBM |
7 | HNSC | 520 | 44 | 2973 | GSE6631 | 22 | 22 | GPL8300 | 142 | 129 | normal | cancer |
8 | KICH | 66 | 25 | 4355 | GSE15641 | 6 | 23 | GPL96 | 1789 | 680 | normal | chromophobe |
9 | KIRC | 533 | 72 | 3618 | GSE15641 | 32 | 23 | GPL96 | 2911 | 939 | normal | clear cell RCC |
10 | KIRP | 290 | 32 | 3748 | GSE15641 | 11 | 23 | GPL96 | 2020 | 756 | normal | papillary RCC |
11 | LIHC | 371 | 50 | 3043 | GSE45267 | 46 | 41 | GPL570 | 1583 | 860 | normal liver | HCC sample |
12 | LUAD | 515 | 59 | 3498 | GSE10072 | 58 | 49 | GPL96 | 666 | 555 | normal | tumor |
13 | LUSC | 503 | 51 | 4984 | GSE33479 | 14 | 27 | GPL6480 | 3729 | 1706 | normal | squamous cell carcinoma |
14 | PRAD | 497 | 52 | 1860 | GSE6919 | 81 | 90 | GPL8300 | 246 | 149 | normal prostate | tumor samples |
15 | READ | 94 | 10 | 3628 | GSE20842 | 65 | 65 | GPL4133 | 2172 | 1261 | M | T |
16 | STAD | 415 | 35 | 2622 | GSE2685 | 10 | 10 | GPL80 | 487 | 164 | N | T |
17 | THCA | 505 | 59 | 1994 | GSE33630 | 60 | 45 | GPL570 | 1451 | 781 | N | T |
18 | UCEC | 176 | 24 | 4183 | GSE17025 | GPL570 | tp | lcm |
getDataGEO
: Search by cancer type and data type [Gene Expression]The user can query and download the cancer types supported by GEO, using the function getDataGEO
:
dataFilt <- getDataGEO(GEOobject = "GSE20347",platform = "GPL571")
dataFilt <- getDataGEO(TCGAtumor = "ESCA")
Analysis
: To analyze TCGA dataDPA
: Differential Phenotype AnalysisDifferential phenotype analysis is able to identify genes or probes that are significantly different between two phenotypes such as normal vs. tumor, or normal vs. stageI, normal vs. molecular subtype.
For gene expression data, DPA is running a differential expression analysis (DEA) to identify differentially expressed genes (DEGs) using the TCGAanalyze_DEA
function from .
For methylation data, DPA is running a differentially methylated regions analysis (DMR) to identify differentially methylated CpG sites using the TCGAanalyze_DMR
the TCGAanalyze_DMR
function from .
dataDEGs <- DPA(dataFilt = dataFilt,
dataType = "Gene expression")
For gene expression data, DPA dealing with GEO data is running a differential expression analysis (DEA) to identify differentially expressed genes (DEGs) using to the eBayes
and topTable
functions from .
data(GEO_TCGAtab)
DataAnalysisGEO<- "../GEO_dataset/"
i<-5
cancer <- GEO_TCGAtab$Cancer[i]
cancerGEO <- GEO_TCGAtab$Dataset[i]
cancerPLT <-GEO_TCGAtab$Platform[i]
fileCancerGEO <- paste0(cancer,"_GEO_",cancerGEO,"_",cancerPLT, ".RData")
dataFilt <- getDataGEO(TCGAtumor = cancer)
GEOdegs <- DPA(dataConsortium = "GEO",
gset = dataFilt ,
colDescription = "title",
samplesType = c(GEO_TCGAtab$GEO_Normal[i],
GEO_TCGAtab$GEO_Tumor[i]),
fdr.cut = 0.01,
logFC.cut = 1,
gsetFile = paste0(DataAnalysisGEO,fileCancerGEO))
We can visualize those differentially expressed genes (DEGs) with a volcano plot using the TCGAVisualize_volcano
function from .
library(TCGAbiolinks)
TCGAVisualize_volcano(DEGsmatrix$logFC, DEGsmatrix$FDR,
filename = "DEGs_volcano.png",
x.cut = 7,
y.cut = 10^-5,
names = rownames(DEGsmatrix),
color = c("black","red","dodgerblue3"),
names.size = 2,
xlab = " Gene expression fold change (Log2)",
legend = "State",
title = "Volcano plot (Normal NT vs Tumor TP)",
width = 10)
The figure generated by the code above is shown below:
LPA
: Literature Phenotype AnalysisThe user can perform a literature phenotype analysis using the function LPA
, for example for the biological process ‘apoptosis’.
data(DEGsmatrix)
BPselected <- "apoptosis"
BPannotations <- DiseaseList[[match(BPselected,names(DiseaseList))]]$ID
dataLPA <- LPA(dataDEGs = DEGsmatrix[1:5,],
BP = BPselected,
BPlist = BPannotations)
DiseaseListNew <- dataLPA
names(DiseaseListNew) <- BPselected
FEA
: Functional Enrichment AnalysisThe user can perform a functional enrichment analysis using the function FEAcomplete
. For each DEG in the gene set a z-score is calculated. This score indicates how the genes act in the gene set.
data(DEGsmatrix)
dataFEA <- FEA(DEGsmatrix = DEGsmatrix)
The output can be visualized with a FEA plot.
FEAplot
: Functional Enrichment Analysis PlotThe user can plot the result of a functional enrichment analysis using the function plotFEA
. A negative z-score indicates that the process’ activity is decreased. A positive z-score indicates that the process’ activity is increased.
plotFEA(dataFEA = dataFEA, additionalFilename = "_exampleVignette", height = 20, width = 10)
The figure generated by the above code is shown below:
GRN
: Gene Regulatory NetworkThe user can perform a gene regulatory network analysis using the function GRN
which infers the network using the parmigene package.
dataGRN <- GRN(TFs = rownames(DEGsmatrix)[1:100], normCounts = dataFilt,
nGenesPerm = 10,kNearest = 3,nBoot = 10)
URA
: Upstream Regulator AnalysisThe user can perform upstream regulator analysis using the function URA
. This function is applied to each DEG in the enriched gene set and its neighbors in the GRN.
data(dataGRN)
data(DEGsmatrix)
dataURA <- URA(dataGRN = dataGRN,
DEGsmatrix = DEGsmatrix,
BPname = NULL, nCores=2)
PRA
: Pattern Regognition AnalysisThe user can retrieve TSG/OCG candidates using either selected biological processes or a random forest classifier trained on known COSMIC OCGs/TSGs.
data(dataURA)
dataDual <- PRA(dataURA = dataURA,
BPname = c("apoptosis","proliferation of cells"),
thres.role = 0)
plotNetworkHive
: GRN hive visualization taking into account Cosmic cancer genesIn the following plot the nodes are separated into three groups: known tumor suppressor genes (yellow), known oncogenes (green) and the rest (gray).
data(knownDriverGenes)
data(dataGRN)
plotNetworkHive(dataGRN, knownDriverGenes, 0.55)
This vignette shows a complete workflow of the ‘MoonlightR’ package except for the data download. The code is divided into three case study:
dataDEGs <- DPA(dataFilt = dataFilt,
dataType = "Gene expression")
dataFEA <- FEA(DEGsmatrix = dataDEGs)
dataGRN <- GRN(TFs = rownames(dataDEGs)[1:100],
DEGsmatrix = dataDEGs,
DiffGenes = TRUE,
normCounts = dataFilt)
dataURA <- URA(dataGRN = dataGRN,
DEGsmatrix = dataDEGs,
BPname = c("apoptosis",
"proliferation of cells"))
dataDual <- PRA(dataURA = dataURA,
BPname = c("apoptosis",
"proliferation of cells"),
thres.role = 0)
CancerGenes <- list("TSG"=names(dataDual$TSG), "OCG"=names(dataDual$OCG))
plotURA
: Upstream regulatory analysis plotThe user can plot the result of the upstream regulatory analysis using the function plotURA
.
plotURA(dataURA = dataURA[c(names(dataDual$TSG), names(dataDual$OCG)),, drop = FALSE], additionalFilename = "_exampleVignette")
The figure resulted from the code above is shown below:
cancerList <- c("BLCA","COAD","ESCA","HNSC","STAD")
listMoonlight <- moonlight(cancerType = cancerList,
dataType = "Gene expression",
directory = "data",
nSample = 10,
nTF = 100,
DiffGenes = TRUE,
BPname = c("apoptosis","proliferation of cells"))
save(listMoonlight, file = paste0("listMoonlight_ncancer4.Rdata"))
plotCircos
: Moonlight Circos PlotThe results of the moonlight pipeline can be visualized with a circos plot. Outer ring: color by cancer type, Inner ring: OCGs and TSGs, Inner connections: green: common OCGs yellow: common TSGs red: possible dual role
plotCircos(listMoonlight = listMoonlight, additionalFilename = "_ncancer5")
The figure generated by the code above is shown below:
listMoonlight <- NULL
for (i in 1:4){
dataDual <- moonlight(cancerType = "BRCA",
dataType = "Gene expression",
directory = "data",
nSample = 10,
nTF = 5,
DiffGenes = TRUE,
BPname = c("apoptosis","proliferation of cells"),
stage = i)
listMoonlight <- c(listMoonlight, list(dataDual))
save(dataDual, file = paste0("dataDual_stage",as.roman(i), ".Rdata"))
}
names(listMoonlight) <- c("stage1", "stage2", "stage3", "stage4")
# Prepare mutation data for stages
mutation <- GDCquery_Maf(tumor = "BRCA")
res.mutation <- NULL
for(stage in 1:4){
curStage <- paste0("Stage ", as.roman(stage))
dataClin$tumor_stage <- toupper(dataClin$tumor_stage)
dataClin$tumor_stage <- gsub("[ABCDEFGH]","",dataClin$tumor_stage)
dataClin$tumor_stage <- gsub("ST","Stage",dataClin$tumor_stage)
dataStg <- dataClin[dataClin$tumor_stage %in% curStage,]
message(paste(curStage, "with", nrow(dataStg), "samples"))
dataSmTP <- mutation$Tumor_Sample_Barcode
dataStgC <- dataSmTP[substr(dataSmTP,1,12) %in% dataStg$bcr_patient_barcode]
dataSmTP <- dataStgC
info.mutation <- mutation[mutation$Tumor_Sample_Barcode %in% dataSmTP,]
ind <- which(info.mutation[,"Consequence"]=="inframe_deletion")
ind2 <- which(info.mutation[,"Consequence"]=="inframe_insertion")
ind3 <- which(info.mutation[,"Consequence"]=="missense_variant")
res.mutation <- c(res.mutation, list(info.mutation[c(ind, ind2, ind3),c(1,51)]))
}
names(res.mutation) <- c("stage1", "stage2", "stage3", "stage4")
tmp <- NULL
tmp <- c(tmp, list(listMoonlight[[1]][[1]]))
tmp <- c(tmp, list(listMoonlight[[2]][[1]]))
tmp <- c(tmp, list(listMoonlight[[3]][[1]]))
tmp <- c(tmp, list(listMoonlight[[4]][[1]]))
names(tmp) <- names(listMoonlight)
mutation <- GDCquery_Maf(tumor = "BRCA")
plotCircos(listMoonlight=listMoonlight,listMutation=res.mutation, additionalFilename="proc2_wmutation", intensityColDual=0.2,fontSize = 2)
The results of the moonlight pipeline can be visualized with a circos plot. Outer ring: color by cancer type, Inner ring: OCGs and TSGs, Inner connections: green: common OCGs yellow: common TSGs red: possible dual role
The figure generated by the code above is shown below:
Session Information ******
sessionInfo()
## R version 3.4.0 (2017-04-21)
## Platform: x86_64-pc-linux-gnu (64-bit)
## Running under: Ubuntu 16.04.2 LTS
##
## Matrix products: default
## BLAS: /home/biocbuild/bbs-3.5-bioc/R/lib/libRblas.so
## LAPACK: /home/biocbuild/bbs-3.5-bioc/R/lib/libRlapack.so
##
## locale:
## [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
## [3] LC_TIME=en_US.UTF-8 LC_COLLATE=C
## [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
## [7] LC_PAPER=en_US.UTF-8 LC_NAME=C
## [9] LC_ADDRESS=C LC_TELEPHONE=C
## [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
##
## attached base packages:
## [1] grid parallel stats graphics grDevices utils datasets
## [8] methods base
##
## other attached packages:
## [1] TCGAbiolinks_2.4.0 png_0.1-7 MoonlightR_1.2.0
## [4] doParallel_1.0.10 iterators_1.0.8 foreach_1.4.3
## [7] BiocStyle_2.4.0
##
## loaded via a namespace (and not attached):
## [1] R.utils_2.5.0 RSQLite_1.1-2
## [3] AnnotationDbi_1.38.0 trimcluster_0.1-2
## [5] BiocParallel_1.10.0 devtools_1.12.0
## [7] DESeq_1.28.0 munsell_0.4.3
## [9] codetools_0.2-15 preprocessCore_1.38.0
## [11] withr_1.0.2 colorspace_1.3-2
## [13] GOSemSim_2.2.0 BiocInstaller_1.26.0
## [15] Biobase_2.36.0 highr_0.6
## [17] knitr_1.15.1 supraHex_1.14.0
## [19] stats4_3.4.0 robustbase_0.92-7
## [21] DOSE_3.2.0 pathview_1.16.0
## [23] labeling_0.3 KEGGgraph_1.34.0
## [25] GenomeInfoDbData_0.99.0 KMsurv_0.1-5
## [27] mnormt_1.5-5 hwriter_1.3.2
## [29] rprojroot_1.2 downloader_0.4
## [31] c3net_1.1.1 ggthemes_3.4.0
## [33] randomForest_4.6-12 EDASeq_2.10.0
## [35] diptest_0.75-7 R6_2.2.0
## [37] GenomeInfoDb_1.12.0 locfit_1.5-9.1
## [39] flexmix_2.3-13 bitops_1.0-6
## [41] fgsea_1.2.1 DelayedArray_0.2.0
## [43] assertthat_0.2.0 scales_0.4.1
## [45] nnet_7.3-12 gtable_0.2.0
## [47] HiveR_0.2.55 affy_1.54.0
## [49] genefilter_1.58.0 cmprsk_2.2-7
## [51] GlobalOptions_0.0.11 splines_3.4.0
## [53] rtracklayer_1.36.0 lazyeval_0.2.0
## [55] GEOquery_2.42.0 hexbin_1.27.1
## [57] selectr_0.3-1 broom_0.4.2
## [59] yaml_2.1.14 reshape2_1.4.2
## [61] GenomicFeatures_1.28.0 backports_1.0.5
## [63] qvalue_2.8.0 clusterProfiler_3.4.0
## [65] tools_3.4.0 psych_1.7.3.21
## [67] ggplot2_2.2.1 affyio_1.46.0
## [69] gplots_3.0.1 RColorBrewer_1.1-2
## [71] BiocGenerics_0.22.0 Rcpp_0.12.10
## [73] plyr_1.8.4 zlibbioc_1.22.0
## [75] RCurl_1.95-4.8 ggpubr_0.1.2
## [77] GetoptLong_0.1.6 viridis_0.4.0
## [79] zoo_1.8-0 S4Vectors_0.14.0
## [81] SummarizedExperiment_1.6.0 ggrepel_0.6.5
## [83] cluster_2.0.6 magrittr_1.5
## [85] data.table_1.10.4 dnet_1.0.10
## [87] DO.db_2.9 circlize_0.3.10
## [89] survminer_0.3.1 mvtnorm_1.0-6
## [91] whisker_0.3-2 matrixStats_0.52.2
## [93] aroma.light_3.6.0 hms_0.3
## [95] evaluate_0.10 xtable_1.8-2
## [97] minet_3.34.0 XML_3.98-1.6
## [99] jpeg_0.1-8 mclust_5.2.3
## [101] IRanges_2.10.0 gridExtra_2.2.1
## [103] shape_1.4.2 compiler_3.4.0
## [105] biomaRt_2.32.0 tibble_1.3.0
## [107] KernSmooth_2.23-15 R.oo_1.21.0
## [109] htmltools_0.3.5 tidyr_0.6.1
## [111] geneplotter_1.54.0 DBI_0.6-1
## [113] matlab_1.0.2 ComplexHeatmap_1.14.0
## [115] MASS_7.3-47 fpc_2.1-10
## [117] ShortRead_1.34.0 Matrix_1.2-9
## [119] readr_1.1.0 parmigene_1.0.2
## [121] R.methodsS3_1.7.1 gdata_2.17.0
## [123] igraph_1.0.1 km.ci_0.5-2
## [125] GenomicRanges_1.28.0 rvcheck_0.0.8
## [127] GenomicAlignments_1.12.0 RISmed_2.1.6
## [129] foreign_0.8-67 xml2_1.1.1
## [131] roxygen2_6.0.1 annotate_1.54.0
## [133] XVector_0.16.0 rvest_0.3.2
## [135] stringr_1.2.0 digest_0.6.12
## [137] ConsensusClusterPlus_1.40.0 graph_1.54.0
## [139] Biostrings_2.44.0 rmarkdown_1.4
## [141] fastmatch_1.1-0 survMisc_0.5.4
## [143] dendextend_1.5.2 edgeR_3.18.0
## [145] kernlab_0.9-25 Rsamtools_1.28.0
## [147] gtools_3.5.0 commonmark_1.2
## [149] modeltools_0.2-21 rjson_0.2.15
## [151] nlme_3.1-131 jsonlite_1.4
## [153] viridisLite_0.2.0 limma_3.32.0
## [155] lattice_0.20-35 KEGGREST_1.16.0
## [157] httr_1.2.1 DEoptimR_1.0-8
## [159] survival_2.41-3 GO.db_3.4.1
## [161] prabclus_2.2-6 Rgraphviz_2.20.0
## [163] class_7.3-14 stringi_1.1.5
## [165] latticeExtra_0.6-28 caTools_1.17.1
## [167] memoise_1.1.0 dplyr_0.5.0
## [169] ape_4.1
Colaprico, Antonio and Silva, Tiago C. and Olsen, Catharina and Garofano, Luciano and Cava, Claudia and Garolini, Davide and Sabedot, Thais S. and Malta, Tathiane M. and Pagnotta, Stefano M. and Castiglioni, Isabella and Ceccarelli, Michele and Bontempi, Gianluca and Noushmehr, Houtan. 2016. “TCGAbiolinks: An R/Bioconductor Package for Integrative Analysis of TCGA Data.” doi:10.1093/nar/gkv1507.
Silva, TC and Colaprico, A and Olsen, C and D’Angelo, F and Bontempi, G and Ceccarelli, M and Noushmehr, H. 2016. “TCGA Workflow: Analyze Cancer Genomics and Epigenomics Data Using Bioconductor Packages.” doi:10.12688/f1000research.8923.1.