├── .Rbuildignore ├── .gitignore ├── DESCRIPTION ├── NAMESPACE ├── NEWS ├── R ├── TCGAbiolinksGUI.R ├── global.R └── zzz.R ├── README.md ├── TCGAbiolinksGUI.Rproj ├── inst ├── CITATION └── app │ ├── app.R │ ├── clinical_help.html │ ├── elmer.html │ ├── index.html │ ├── main.css │ ├── references.html │ ├── server.R │ ├── server │ ├── dea.R │ ├── dmr.R │ ├── dnametidat.R │ ├── eaplot.R │ ├── elmer.R │ ├── getclinical.R │ ├── getinference.R │ ├── getmolecular.R │ ├── getmutation.R │ ├── getsubtype.R │ ├── gliomaclassifier.R │ ├── heatmap.R │ ├── maftools.R │ ├── manageSE.R │ ├── meanMet.R │ ├── oncoprint.R │ ├── pathview.R │ ├── starburst.R │ ├── survival.R │ └── volcano.R │ ├── ui.R │ ├── ui │ ├── config.R │ ├── dea.R │ ├── dmr.R │ ├── dnametidat.R │ ├── ea.R │ ├── elmer_analysis.R │ ├── elmer_input.R │ ├── elmer_results.R │ ├── getclinical.R │ ├── getinference.R │ ├── getmolecular.R │ ├── getmutation.R │ ├── getsubtype.R │ ├── gliomaclassifier.R │ ├── heatmap.R │ ├── index.R │ ├── maftools.R │ ├── manageSE.R │ ├── meanMet.R │ ├── oncoprint.R │ ├── pathview.R │ ├── references.R │ ├── starburst.R │ ├── survival.R │ └── volcano.R │ └── www │ ├── TCGAbiolinksGUI.css │ ├── events.js │ ├── logo_gray2.png │ ├── logo_no_text.png │ └── progress.gif ├── man └── TCGAbiolinksGUI.Rd └── vignettes ├── .install_extras ├── Cases.Rmd ├── _output.yaml ├── _site.yml ├── analysis.Rmd ├── bibliography.bib ├── data.Rmd ├── dea.png ├── dea_results.png ├── dmr.png ├── ea.png ├── elmer.png ├── glioma_classifier.png ├── heatmap.png ├── idat.png ├── include ├── after_body.html ├── before_body.html ├── header.html ├── logo.png ├── site.css └── symbol.png ├── index.Rmd ├── integrative.Rmd ├── logo.png ├── meanmet.png ├── oncoprint.png ├── pathview.png ├── starburst.png ├── survival.png ├── tcgasearch.png └── volcano.png /.Rbuildignore: -------------------------------------------------------------------------------- 1 | ^.*\.Rproj$ 2 | ^\.Rproj\.user$ 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .Rproj.user 2 | .Rhistory 3 | .RData 4 | inst/doc 5 | bin/ 6 | script.R 7 | -------------------------------------------------------------------------------- /DESCRIPTION: -------------------------------------------------------------------------------- 1 | Package: TCGAbiolinksGUI 2 | Title: "TCGAbiolinksGUI: A Graphical User Interface to analyze cancer molecular and clinical data" 3 | Version: 1.19.1 4 | Date: 2016-10-28 5 | Author: Tiago Chedraoui Silva , 6 | Antonio Colaprico , 7 | Catharina Olsen , 8 | Michele Ceccarelli, 9 | Gianluca Bontempi , 10 | Benjamin P. Berman , 11 | Houtan Noushmehr 12 | Maintainer: Tiago C. Silva 13 | Description: 14 | "TCGAbiolinksGUI: A Graphical User Interface to analyze cancer molecular and clinical data. 15 | A demo version of GUI is found in https://tcgabiolinksgui.shinyapps.io/tcgabiolinks/" 16 | License: GPL (>= 3) 17 | Depends: 18 | R (>= 3.3.1), 19 | shinydashboard (>= 0.5.3), 20 | TCGAbiolinksGUI.data 21 | Suggests: 22 | testthat, 23 | dplyr, 24 | knitr, 25 | roxygen2, 26 | devtools, 27 | rvest, 28 | xml2, 29 | BiocStyle, 30 | animation, 31 | rmarkdown, 32 | pander 33 | Imports: 34 | shiny (>= 0.14.1), 35 | downloader (>= 0.4), 36 | grid, 37 | DT, 38 | plotly, 39 | readr, 40 | maftools, 41 | stringr (>= 1.1.0), 42 | SummarizedExperiment, 43 | ggrepel, 44 | data.table, 45 | caret, 46 | shinyFiles (>= 0.6.2), 47 | ggplot2 (>= 2.1.0), 48 | pathview, 49 | ELMER (>= 2.0.0), 50 | clusterProfiler, 51 | parallel, 52 | TCGAbiolinks (>= 2.5.5), 53 | shinyjs (>= 0.7), 54 | colourpicker, 55 | sesame, 56 | shinyBS (>= 0.61) 57 | VignetteBuilder: knitr 58 | biocViews: Genetics, 59 | GUI, 60 | DNAMethylation, 61 | StatisticalMethod, 62 | DifferentialMethylation, 63 | GeneRegulation, 64 | GeneExpression, 65 | MethylationArray, 66 | DifferentialExpression, 67 | Sequencing, 68 | Pathways, 69 | Network, 70 | DNASeq 71 | RoxygenNote: 6.1.1 72 | -------------------------------------------------------------------------------- /NAMESPACE: -------------------------------------------------------------------------------- 1 | # Generated by roxygen2: do not edit by hand 2 | 3 | export(TCGAbiolinksGUI) 4 | import(ELMER) 5 | import(TCGAbiolinks) 6 | import(caret) 7 | import(clusterProfiler) 8 | import(data.table) 9 | import(downloader) 10 | import(ggplot2) 11 | import(ggrepel) 12 | import(grid) 13 | import(maftools) 14 | import(parallel) 15 | import(pathview) 16 | import(readr) 17 | import(shiny) 18 | import(shinyBS) 19 | import(shinyFiles) 20 | import(shinydashboard) 21 | import(stringr) 22 | importFrom(SummarizedExperiment,"colData<-") 23 | importFrom(SummarizedExperiment,SummarizedExperiment) 24 | importFrom(SummarizedExperiment,assay) 25 | importFrom(SummarizedExperiment,colData) 26 | importFrom(SummarizedExperiment,rowRanges) 27 | importFrom(SummarizedExperiment,values) 28 | importFrom(colourpicker,colourInput) 29 | importFrom(plotly,config) 30 | importFrom(plotly,layout) 31 | importFrom(plotly,plot_ly) 32 | importFrom(plotly,plotlyOutput) 33 | importFrom(plotly,renderPlotly) 34 | importFrom(sesame,openSesame) 35 | importFrom(shinyjs,hide) 36 | importFrom(shinyjs,show) 37 | importFrom(shinyjs,toggle) 38 | importFrom(shinyjs,useShinyjs) 39 | -------------------------------------------------------------------------------- /NEWS: -------------------------------------------------------------------------------- 1 | TCGAbiolinksGUI 0.99.0 2 | ---------------------------------------------------------------- 3 | FIRST VERSION. Demo: https://tcgabiolinksgui.shinyapps.io/TCGAbiolinksGUI/ 4 | -------------------------------------------------------------------------------- /R/TCGAbiolinksGUI.R: -------------------------------------------------------------------------------- 1 | #' TCGAbiolinksGUI 2 | #' 3 | #' A Graphical User Interface for integrative analysis of TCGA data 4 | #' 5 | #' The functions you're likely to need from \pkg{TCGAbiolinksGUI} are 6 | #' \code{\link{TCGAbiolinksGUI}} 7 | #' 8 | #' @docType package 9 | #' @name TCGAbiolinksGUI 10 | NULL 11 | -------------------------------------------------------------------------------- /R/global.R: -------------------------------------------------------------------------------- 1 | #' @title TCGAbiolinks GUI 2 | #' @description Calls UI interface 3 | #' @param run Used to control the examples. 4 | #' @examples 5 | #' \dontrun{ 6 | #' TCGAbiolinksGUI() 7 | #' } 8 | #' TCGAbiolinksGUI(run = FALSE) 9 | #' @name TCGAbiolinksGUI 10 | #' @import shiny shinyFiles shinydashboard downloader caret 11 | #' TCGAbiolinks ggplot2 shinyBS stringr ggrepel pathview ELMER grid 12 | #' clusterProfiler parallel readr data.table maftools 13 | #' @importFrom SummarizedExperiment SummarizedExperiment values rowRanges colData<- assay colData 14 | #' @importFrom colourpicker colourInput 15 | #' @importFrom shinyjs hide show toggle useShinyjs 16 | #' @importFrom plotly renderPlotly plot_ly layout config plotlyOutput 17 | #' @importFrom sesame openSesame 18 | #' @export 19 | #' @return Open a connection to shiny 20 | TCGAbiolinksGUI <- function(run = TRUE) { 21 | if(run) suppressMessages(shiny::runApp(system.file("app", package = "TCGAbiolinksGUI"),launch.browser=TRUE)) 22 | } 23 | -------------------------------------------------------------------------------- /R/zzz.R: -------------------------------------------------------------------------------- 1 | .onAttach <- function(libname, pkgname) { 2 | 3 | if (!interactive() || stats::runif(1) > 0.1) 4 | return() 5 | welcome.message <- paste0( 6 | " ==================================================================================\n", 7 | " _______ ______ _______ _______ __ __ __ __ __ \n", 8 | " |_ _| | __| _ | |--.|__|.-----.| |__|.-----.| |--.-----.\n", 9 | " | | | ---| | | | _ || || _ || | || || <|__ --|\n", 10 | " |___| |______|_______|___|___|_____||__||_____||__|__||__|__||__|__|_____|\n", 11 | " \n", 12 | " _______ _______ _______ \n" , 13 | " | __| | |_ _| \n" , 14 | " | | | | |_| |_ \n" , 15 | " |_______|_______|_______| \n" , 16 | " \n", 17 | " Version:", utils::packageVersion("TCGAbiolinksGUI"), "\n", 18 | " ==================================================================================\n", 19 | " Use suppressPackageStartupMessages to eliminate \n", 20 | " package startup messages.") 21 | packageStartupMessage(welcome.message) 22 | } 23 | 24 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![](inst/app/www/logo_gray2.png) 2 | 3 | # Introduction 4 | 5 | TCGAbiolinksGUI was created to help users without knowledge of programming to search, download and analyze 6 | TCGA data. This package offers a graphical user interface to the R/Bioconductor packages [TCGAbiolinks]( http://bioconductor.org/packages/TCGAbiolinks/) and [ELMER](http://bioconductor.org/packages/ELMER/) packages. 7 | Also, some other useful packages from Bioconductor, such as [ComplexHeatmap](http://bioconductor.org/packages/ComplexHeatmap/) package has been used for data visualization. 8 | 9 | A running version of the GUI is found in [http://tcgabiolinks.fmrp.usp.br:3838/](http://tcgabiolinks.fmrp.usp.br:3838/) 10 | 11 | ## Installing TCGAbiolinksGUI 12 | 13 | To install the package from [Bioconductor devel repository](http://bioconductor.org/packages/devel/bioc/html/TCGAbiolinksGUI.html), please, use the code below. 14 | 15 | ```R 16 | # for the moment it must be devel version of Bioconductor 17 | if (!requireNamespace("BiocManager", quietly=TRUE)) 18 | install.packages("BiocManager") 19 | BiocManager::install("TCGAbiolinksGUI", dependencies = TRUE) 20 | ``` 21 | 22 | To install the package development version from Github, please, use the code below. 23 | ```R 24 | if (!requireNamespace("BiocManager", quietly=TRUE)) 25 | install.packages("BiocManager") 26 | deps <- c("devtools") 27 | for(pkg in deps) if (!pkg %in% installed.packages()) BiocManager::install(pkg, dependencies = TRUE) 28 | devtools::install_github("tiagochst/ELMER.data") 29 | devtools::install_github("BioinformaticsFMRP/TCGAbiolinksGUI.data",ref = "R_3.4") 30 | devtools::install_github("BioinformaticsFMRP/TCGAbiolinksGUI") 31 | ``` 32 | 33 | ## Docker image 34 | 35 | TCGAbiolinksGUI is available as Docker image (self-contained environments that contain everything needed to run the software), 36 | which can be easily run on Mac OS, Windows and Linux systems. 37 | 38 | The image can be obtained from Docker Hub: https://hub.docker.com/r/tiagochst/tcgabiolinksgui/ 39 | 40 | For more information please check: https://docs.docker.com/ and https://www.bioconductor.org/help/docker/ 41 | 42 | ### Setting up image using graphical user interface (GUI) 43 | 44 | This [PDF](https://drive.google.com/open?id=0B0-8N2fjttG-QXp5LVlPQnVQejg) 45 | shows how to install and execute the image using [kitematic](https://kitematic.com/), which 46 | offers a graphical user interface (GUI) to control your app containers. 47 | 48 | ### Setting up image using command-line 49 | 50 | - Download image: docker pull tiagochst/tcgabiolinksgui 51 | - To run RStudio Server and shiny-server, but the data is not saved if container is stopped: 52 | `sudo docker run --name tcgabiolinksgui -d -P -v /home/$USER/docker:/home/rstudio -p 3333:8787 -p 3334:3838 tiagochst/tcgabiolinksgui` 53 | 1. For more information how data can be saved please read [this wiki](https://github.com/rocker-org/rocker/wiki/How-to-save-data) and see command below 54 | 55 | - To run RStudio Server, shiny-server and save the results in the host machine please use the code below: 56 | `sudo docker run --name tcgabiolinksgui -d -P -v /home/$USER/docker:/home/rstudio -p 3333:8787 -p 3334:3838 tiagochst/tcgabiolinksgui` 57 | 1. In case rstudio is not accessible please check if the folder created (docker) has the right permission 58 | 2. If your system is windows or mac you will need to change `/home/$USER/docker` 59 | to the correct system path. Examples can be found in this [github page](https://github.com/rocker-org/rocker/wiki/Sharing-files-with-host-machine) 60 | 61 | - To stop the image: 62 | 1. Run `sudo docker stop tcgabiolinksgui` to stop it 63 | 64 | - To start the image again (after the first time ran with `docker run` and stopped). 65 | 1. Run `sudo docker start tcgabiolinksgui` 66 | 67 | ### Accessing tools after the image is running: 68 | 69 | - TCGAbiolinksGUI will be available at :3334/tcgabiolinksgui 70 | - RStudio will be available at :3333 (***username: rstudio*** , ***password:rstudio***) 71 | 72 | ## Quick start 73 | 74 | The following commands should be used in order to start the graphical user interface. 75 | 76 | ```R 77 | library(TCGAbiolinksGUI) 78 | TCGAbiolinksGUI() 79 | ``` 80 | ## Video tutorials 81 | 82 | To facilitate the use of this package, we have created some tutorial videos demonstrating the tool. 83 | Please check this [youtube list](https://www.youtube.com/playlist?list=PLoDzAKMJh15m40f7OqOLAW0nJwkVStJIJ). 84 | 85 | ## PDF tutorials 86 | 87 | For each section we created some PDFs with detailing the steps of each section: 88 | [Link to folder with PDFs](https://drive.google.com/drive/folders/0B0-8N2fjttG-Q25ldVVmUTVOTk0?usp=sharing) 89 | 90 | 91 | ## Citation 92 | 93 | Please cite both TCGAbiolinks package and TCGAbiolinksGUI: 94 | 95 | * Colaprico A, Silva TC, Olsen C, Garofano L, Cava C, Garolini D, Sabedot T, Malta TM, Pagnotta SM, Castiglioni I, Ceccarelli M, Bontempi G and Noushmehr H. "TCGAbiolinks: an R/Bioconductor package for integrative analysis of TCGA data." Nucleic acids research (2015): gkv1507. 96 | 97 | * TCGAbiolinksGUI: A Graphical User Interface to analyze TCGA data. Manuscript in preparation. 98 | 99 | Also, if you have used ELMER analysis please cite: 100 | 101 | * Yao, L., Shen, H., Laird, P. W., Farnham, P. J., & Berman, B. P. "Inferring regulatory element landscapes and transcription factor networks from cancer methylomes." Genome Biol 16 (2015): 105. 102 | * Yao, Lijing, Benjamin P. Berman, and Peggy J. Farnham. "Demystifying the secret mission of enhancers: linking distal regulatory elements to target genes." Critical reviews in biochemistry and molecular biology 50.6 (2015): 550-573. 103 | 104 | 105 | If you have used OncoPrint plot and Heatmap Plot please cite: 106 | 107 | * Gu, Zuguang, Roland Eils, and Matthias Schlesner. "Complex heatmaps reveal patterns and correlations in multidimensional genomic data." Bioinformatics (2016): btw313 108 | 109 | If you have used Pathway plot please cite: 110 | 111 | * Luo, Weijun, Brouwer and Cory (2013). “Pathview: an R/Bioconductor package for pathway-based data integration and visualization.” Bioinformatics, 29(14), pp. 1830-1831. 112 | 113 | # Increasing loaded DLL 114 | 115 | If you receive this error message: `maximal number of DLLs reached...` 116 | You will need to increase the maximum number of DLL R can load. R_MAX_NUM_DLLS 117 | In MACOS just modify the file `/Library/Frameworks/R.framework/Resources/etc/Renviron` 118 | and add `R_MAX_NUM_DLLS=110` in the end. 119 | 120 | For other OS check https://stat.ethz.ch/R-manual/R-patched/library/base/html/Startup.html. 121 | 122 | -------------------------------------------------------------------------------- /TCGAbiolinksGUI.Rproj: -------------------------------------------------------------------------------- 1 | Version: 1.0 2 | 3 | RestoreWorkspace: Default 4 | SaveWorkspace: Default 5 | AlwaysSaveHistory: Default 6 | 7 | EnableCodeIndexing: Yes 8 | UseSpacesForTab: Yes 9 | NumSpacesForTab: 4 10 | Encoding: UTF-8 11 | 12 | RnwWeave: knitr 13 | LaTeX: pdfLaTeX 14 | 15 | AutoAppendNewline: Yes 16 | StripTrailingWhitespace: Yes 17 | 18 | BuildType: Package 19 | PackageUseDevtools: Yes 20 | PackageInstallArgs: --no-multiarch --with-keep.source 21 | PackageRoxygenize: rd,collate,namespace 22 | -------------------------------------------------------------------------------- /inst/CITATION: -------------------------------------------------------------------------------- 1 | citHeader("To cite TCGAbiolinksGUI in publications use:") 2 | 3 | citEntry(entry = "Article", 4 | title = "TCGAbiolinksGUI: A graphical user interface to analyze cancer molecular and clinical data. F1000Research 2018, 7:439", 5 | author = personList(as.person("Tiago Chedraoui Silva"), 6 | as.person("Antonio Colaprico"), 7 | as.person("Catharina Olsen"), 8 | as.person("Gianluca Bontempi"), 9 | as.person("Michele Ceccarelli"), 10 | as.person("Benjamin P. Berman"), 11 | as.person("Houtan Noushmehr") 12 | ), 13 | journal = "F1000", 14 | year = "2018", 15 | textVersion = 16 | paste(" Tiago Chedraoui Silva, Antonio Colaprico, Catharina Olsen, Gianluca Bontempi,", 17 | "Michele Ceccarelli, Ben Berman, Houtan Noushmehr.", 18 | "TCGAbiolinksGUI: A Graphical User Interface to analyze cancer molecular and clinical data.", 19 | "F1000Research 2018, https://doi.org/10.12688/f1000research.14197.1") 20 | ) 21 | -------------------------------------------------------------------------------- /inst/app/app.R: -------------------------------------------------------------------------------- 1 | library(shiny) 2 | 3 | ui <- navbarPage( 4 | source(file.path("ui", "ui.R"), local = TRUE)$value 5 | ) 6 | 7 | server <- function(input, output, session) { 8 | # Include the logic (server) for each tab 9 | source(file.path("server", "server.R"), local = TRUE)$value 10 | } 11 | shinyApp(ui = ui, server = server) 12 | -------------------------------------------------------------------------------- /inst/app/elmer.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | ELMER 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
Introduction
17 |
18 | 51 | 52 | 53 | 54 | 57 | 58 | 59 |
Recently, many studies suggest that enhancers play a major role as regulators of cell-specific phenotypes leading to alteration in transcriptomes realated to diseases . In order to investigate regulatory enhancers that can be located at long distances upstream or downstream of target genes Bioconductor offer the Enhancer Linking by Methylation/Expression Relationship (ELMER) package. This package is designed to combine DNA methylation and gene expression data from human tissues to infer multi-level cis-regulatory networks. It uses DNA methylation to identify enhancers and correlates their state with expression of nearby genes to identify one or more transcriptional targets. Transcription factor (TF) binding site analysis of enhancers is coupled with expression analysis of all TFs to infer upstream regulators. 55 | 56 |
60 |
61 |
62 |
63 |
Input
64 |
65 | 98 | 99 | 100 |
ELMER's input is a specific R object called MAE (MultiAssay Experiment) which contains a matrix of DNA methylation 101 | and a matrix of gene expression, a table with Sample information and a table mapping sample to DNA methylation and to gene expression. 102 |
103 |
104 |
105 | 106 |
107 |
ELMER steps
108 |
109 | 142 | 143 | 144 | 145 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 155 | 156 | 157 | 158 | 160 | 161 | 162 | 163 | 164 | 165 |
Step 1 Identify distal probes on HM450K. 146 |
Step 2 Identify distal probes with significantly different DNA methyaltion level in Group1 and VS Group2.
Step 3 Identify putative target genes for differentially methylated distal probes. 154 |
Step 4 Identify enriched motifs for the distal probes which are significantly differentially methylated and linked to putative target gene. 159 |
Step 5 Identify regulatory TFs whose expression associate with DNA methylation at motifs.
166 |
167 |
168 | 169 | 170 | 171 | 172 | -------------------------------------------------------------------------------- /inst/app/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | TCGAbiolinksGUI 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
Smiley face
16 |

17 | TCGAbiolinksGUI: a graphical user interface (GUI) for integrative analysis of TCGA data. 18 |

19 | 20 |

Description of the menus

21 | 22 |
23 |
Step 1 24 | Data
25 |
26 | 58 | 59 | 60 | 61 | 62 | 63 |
> Get GDC Data Download GDC data (molecular, mutation, clinical, subtype information) that will be used in the analysis steps.
64 |
65 |
66 | 67 | 68 |
69 |
Step 2 Analysis
70 |
71 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 |
> Clinical analysis Perform a survival analysis.
> Epigenetic analysis Perform differentially methylated regions (DMR) analysis.The result can be seen through a volcano plot, a heatmap plot.
> Transcriptomic analysis Perform differential expression analysis (DEA). The result can be viewed through a volcano plot and a heatmap plot. Also, for the genes that were identified as upregulated or downregulated an enrichment analysis can be done.
> Genomic analysis Visualize mutation status through a oncoprint using a Mutation Annotation Format (MAF) file.
122 |
123 |
124 | 125 | 126 |
127 |
Step 3Integrative analysis
128 |
129 | 161 | 162 | 163 | 165 | 166 | 167 | 169 | 170 | 171 | 172 |
> Starburst plot 164 | Integrate the epigenetic analysis and transcriptomic analysis results using a starburstplot (correlates the DNA methylation level and nearest gene expression level)
> ELMER 168 | Identify candidate regulatory elements in the non-coding regions of the genome associated with cancer using the R/Bioconductor ELMER pacakge.
173 |
174 |
175 |
176 | 185 |
186 | 187 | 188 | 189 | 190 | -------------------------------------------------------------------------------- /inst/app/main.css: -------------------------------------------------------------------------------- 1 | html { 2 | background-color: #e6e9e9; 3 | background-image: -webkit-linear-gradient(270deg,rgb(230,233,233) 0%,rgb(216,221,221) 100%); 4 | background-image: linear-gradient(270deg,rgb(230,233,233) 0%,rgb(216,221,221) 100%); 5 | -webkit-font-smoothing: antialiased; 6 | } 7 | 8 | body { 9 | margin: 0 auto; 10 | padding: 2em 2em 4em; 11 | max-width: 800px; 12 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; 13 | font-size: 16px; 14 | line-height: 1.5em; 15 | color: #545454; 16 | background-color: #ffffff; 17 | box-shadow: 0 0 2px rgba(0, 0, 0, 0.06); 18 | } 19 | 20 | h1, h2, h3, h4, h5, h6 { 21 | color: #222; 22 | font-weight: 600; 23 | line-height: 1.3em; 24 | } 25 | 26 | h2 { 27 | margin-top: 1.3em; 28 | } 29 | 30 | a { 31 | color: #0083e8; 32 | } 33 | 34 | b, strong { 35 | font-weight: 600; 36 | } 37 | 38 | samp { 39 | display: none; 40 | } 41 | 42 | img { 43 | -webkit-animation: colorize 2s cubic-bezier(0, 0, .78, .36) 1; 44 | animation: colorize 2s cubic-bezier(0, 0, .78, .36) 1; 45 | background: transparent; 46 | border: 10px solid rgba(0, 0, 0, 0.12); 47 | border-radius: 4px; 48 | display: block; 49 | margin: 1.3em auto; 50 | max-width: 95%; 51 | } 52 | 53 | @-webkit-keyframes colorize { 54 | 0% { 55 | -webkit-filter: grayscale(100%); 56 | } 57 | 100% { 58 | -webkit-filter: grayscale(0%); 59 | } 60 | } 61 | 62 | @keyframes colorize { 63 | 0% { 64 | filter: grayscale(100%); 65 | } 66 | 100% { 67 | filter: grayscale(0%); 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /inst/app/server/dea.R: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------- 2 | # DEA 3 | # ------------------------------------------------- 4 | #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--= 5 | # Handling visibility 6 | #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--= 7 | observeEvent(input$deanormalization, { 8 | shinyjs::toggle("deanormalizationmet") 9 | }) 10 | observeEvent(input$deafilter, { 11 | shinyjs::toggle("deafilteringmet") 12 | shinyjs::toggle("deafilteringcut") 13 | }) 14 | #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--= 15 | # Analysis 16 | #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--= 17 | 18 | observeEvent(input$deaAnalysis , { 19 | closeAlert(session, "deaAlert") 20 | # read the data from the downloaded path 21 | # prepare it 22 | se <- isolate({deadata()}) 23 | if(is.null(se)) return(NULL) 24 | 25 | groupCol <- isolate({input$deagroupCol}) 26 | 27 | if(stringr::str_length(groupCol) == 0){ 28 | createAlert(session, "deamessage", "deaAlert", title = "Group input error", style = "danger", 29 | content = paste0("Please, select the groupCol argument"), append = FALSE) 30 | return(NULL) 31 | } 32 | 33 | g1 <- isolate({input$deagroup1}) 34 | g2 <- isolate({input$deagroup2}) 35 | 36 | if(stringr::str_length(g1) == 0){ 37 | createAlert(session, "deamessage", "deaAlert", title = "Group input error", style = "danger", 38 | content = paste0("Please, select the group1 argument"), append = FALSE) 39 | return(NULL) 40 | } 41 | 42 | if(stringr::str_length(g2) == 0){ 43 | createAlert(session, "deamessage", "deaAlert", title = "Group input error", style = "danger", 44 | content = paste0("Please, select the group2 argument"), append = FALSE) 45 | return(NULL) 46 | } 47 | 48 | 49 | 50 | idx.g1 <- which(colData(se)[,groupCol] == g1) 51 | samples.g1 <- colData(se)[idx.g1,"barcode"] 52 | idx.g2 <- which(colData(se)[,groupCol] == g2) 53 | samples.g2 <- colData(se)[idx.g2,"barcode"] 54 | method <- isolate({input$deamethod}) 55 | fdr.cut <- isolate({input$deapvalue}) 56 | logFC.cut <- isolate({input$deathrsld}) 57 | 58 | 59 | if(length(samples.g1) < 2) { 60 | createAlert(session, "deamessage", "deaAlert", title = "Error", style = "danger", 61 | content = paste0("We don't have enough samples for group ", g1, "(n = ",length(samples.g1)," )"), append = FALSE) 62 | return(NULL) 63 | } 64 | 65 | if(length(samples.g2) < 2) { 66 | createAlert(session, "deamessage", "deaAlert", title = "Error", style = "danger", 67 | content = paste0("We don't have enough samples for group ", g2, "(n = ",length(samples.g2)," )"), append = FALSE) 68 | return(NULL) 69 | } 70 | 71 | withProgress(message = 'Differential Expression Analysis in progress', 72 | detail = 'This may take a while...', value = 0, { 73 | 74 | # normalization of genes 75 | if(isolate({input$deanormalization})) { 76 | if(all(grepl("ENS",rownames(se)))){ 77 | geneInfo <- TCGAbiolinks::geneInfoHT 78 | } else { 79 | geneInfo <- TCGAbiolinks::geneInfo 80 | } 81 | incProgress(1/5, detail = paste0('normalization mRNA transcripts and miRNA using EDASeq package')) 82 | exp <- TCGAanalyze_Normalization(tabDF = assay(se), 83 | geneInfo = geneInfo, 84 | method = isolate({input$deanormalizationmet}) 85 | ) 86 | } else { 87 | exp <- assay(se) 88 | } 89 | # quantile filter of genes 90 | if(isolate({input$deafilter})) { 91 | incProgress(1/5, detail = paste0('Filtering mRNA transcripts and miRNA')) 92 | 93 | dataFilt <- TCGAanalyze_Filtering(tabDF = exp, 94 | method = isolate({input$deafilteringmet}), 95 | qnt.cut = isolate({input$deafilteringcut})) 96 | } else { 97 | dataFilt <- exp 98 | } 99 | 100 | incProgress(1/5, detail = paste0('Differentially expression analysis (DEA) using edgeR')) 101 | exp <- TCGAanalyze_DEA(mat1 = dataFilt[,samples.g1], 102 | mat2 = dataFilt[,samples.g2], 103 | Cond1type = g1 , 104 | Cond2type = g2, 105 | method = method) 106 | 107 | incProgress(1/5, detail = paste0('Adding information related to DEGs genes from DEA')) 108 | exp <- TCGAanalyze_LevelTab(exp, 109 | typeCond1 = g1, 110 | typeCond2 = g2, 111 | TableCond1 = dataFilt[,samples.g1], 112 | TableCond2 = dataFilt[,samples.g2]) 113 | 114 | 115 | exp$status <- "Insignificant" 116 | exp[exp$logFC >= logFC.cut & exp$FDR <= fdr.cut,"status"] <- paste0("Upregulated in ", g2) 117 | exp[exp$logFC <= -logFC.cut & exp$FDR <= fdr.cut,"status"] <- paste0("Downregulated in ", g2) 118 | if(all(grepl("\\|",exp$mRNA))) { 119 | exp$exp$mRNA <- unlist(lapply(strsplit(exp$mRNA,"\\|"),function(x) x[2])) 120 | } 121 | colnames(exp)[grep("mRNA",colnames(exp))] <- "Gene_symbol" 122 | incProgress(1/5, detail = paste0('Saving results')) 123 | }) 124 | 125 | out.filename <- paste0(paste("DEA_results",gsub("_",".",groupCol), 126 | gsub("[[:punct:]]| ", ".",g1), gsub("[[:punct:]]| ", ".",g2), 127 | "pcut",fdr.cut,"logFC.cut",logFC.cut,sep="_"),".csv") 128 | getPath <- parseDirPath(get.volumes(isolate({input$workingDir})), input$workingDir) 129 | if (length(getPath) == 0) getPath <- paste0(Sys.getenv("HOME"),"/TCGAbiolinksGUI") 130 | out.filename <- file.path(getPath,out.filename) 131 | write_csv(exp, path = out.filename) 132 | 133 | 134 | #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--= 135 | # TABLE 136 | #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--= 137 | 138 | output$deaSE <- DT::renderDataTable({ 139 | createTable(exp) 140 | }) 141 | 142 | updateCollapse(session, "collapsedea", open = "Genes info") 143 | 144 | createAlert(session, "deamessage", "deaAlert", title = "DEA completed", style = "success", 145 | content = out.filename, append = FALSE) 146 | }) 147 | #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--= 148 | # File selection 149 | #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--= 150 | observe({ 151 | shinyFileChoose(input, 152 | 'deafile', 153 | roots = get.volumes(input$workingDir), 154 | session = session, 155 | restrictions = system.file(package='base'), 156 | filetypes = c('','rda')) 157 | }) 158 | #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--= 159 | # DATA INPUT 160 | #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--= 161 | deadata <- function(){ 162 | inFile <- input$deafile 163 | if(class(inFile) != "list") return(NULL) 164 | file <- as.character(parseFilePaths(get.volumes(isolate({input$workingDir})), input$deafile)$datapath) 165 | se <- get(load(file)) 166 | 167 | if(class(se)!= class(as(SummarizedExperiment(),"RangedSummarizedExperiment"))){ 168 | createAlert(session, "deamessage", "deaAlert", title = "Data input error", style = "danger", 169 | content = paste0("Sorry, but I'm expecting a Summarized Experiment object, but I got a: ", 170 | class(se)), append = FALSE) 171 | return(NULL) 172 | } 173 | 174 | createAlert(session, "deamessage", "deaAlert", title = "Successful data import", style = "info", 175 | content = paste0("Read file:", file), append = FALSE) 176 | return(se) 177 | } 178 | #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--= 179 | # UPDATING FIELDS AFTER DATA INPUT 180 | #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--= 181 | observeEvent(input$deagroupCol , { 182 | updateSelectizeInput(session, 'deagroup1', choices = { 183 | if (class(deadata()) == class(as(SummarizedExperiment(),"RangedSummarizedExperiment"))){ 184 | if (!is.null(deadata()) & input$deagroupCol != "" ) 185 | as.character(colData(deadata())[,input$deagroupCol]) 186 | }}, server = TRUE) 187 | }) 188 | observeEvent(input$deagroupCol , { 189 | updateSelectizeInput(session, 'deagroup2', choices = { 190 | if (class(deadata()) == class(as(SummarizedExperiment(),"RangedSummarizedExperiment"))){ 191 | 192 | if (!is.null(deadata()) & input$deagroupCol != "") 193 | as.character(colData(deadata())[,input$deagroupCol]) 194 | }}, server = TRUE) 195 | }) 196 | observe({ 197 | updateSelectizeInput(session, 'deagroupCol', choices = { 198 | if(!is.null(deadata())) as.character(colnames(colData(deadata()))) 199 | }, server = TRUE) 200 | }) 201 | -------------------------------------------------------------------------------- /inst/app/server/dnametidat.R: -------------------------------------------------------------------------------- 1 | # A notification ID 2 | observe({ 3 | shinyDirChoose(input, 4 | 'IDATfolder', 5 | roots = get.volumes(input$workingDir), 6 | session = session, 7 | restrictions = system.file(package='base')) 8 | }) 9 | 10 | 11 | idat <- reactive({ 12 | inFile <- input$IDATfolder 13 | if(class(inFile) != "list") return(NULL) 14 | baseDir <- parseDirPath(get.volumes(input$workingDir), input$IDATfolder) 15 | IDATs <- dir(path = baseDir,full.names = T,recursive = T,pattern = "idat") 16 | IDATprefixes <- unique(gsub("_Grn.idat|_Red.idat","",IDATs)) 17 | withProgress(message = 'Processing IDAT files with sesame', 18 | detail = 'This may take a while...', value = 0, { 19 | idat <- tryCatch({ 20 | betas <- openSesame(IDATprefixes, 21 | quality.mask = FALSE, 22 | nondetection.mask = FALSE, 23 | mask.use.tcga = FALSE, 24 | pval.threshold = 0.05) 25 | colnames(betas) <- basename(IDATprefixes) 26 | betas <- TCGAbiolinks:::makeSEFromDNAMethylationMatrix(betas,genome = input$IDATgenome,met.platform = input$IDATplatform) 27 | betas 28 | }, error = function(e){ 29 | print(e) 30 | createAlert(session, "idatAlert", "idatmessage", 31 | title = "Error", 32 | style = "danger", 33 | content = paste(e), append = FALSE) 34 | return(NULL) 35 | }) 36 | incProgress(1, detail = "Completed") 37 | }) 38 | return(idat) 39 | }) 40 | observeEvent(input$IDATfolder, { 41 | closeAlert(session,"idatmessage") 42 | output$idattbl <- DT::renderDataTable({ 43 | inFile <- input$IDATfolder 44 | if(class(inFile) != "list") return(NULL) 45 | baseDir <- parseDirPath(get.volumes(input$workingDir), input$IDATfolder) 46 | IDATs <- dir(path = baseDir,full.names = T,recursive = T,pattern = "idat") 47 | IDATprefixes <- unique(gsub("_Grn.idat|_Red.idat","",IDATs)) 48 | df <- data.frame(samples = IDATprefixes) 49 | createTable(df) 50 | }) 51 | }) 52 | 53 | observeEvent(input$IDATplatform, { 54 | updateTextInput(session, "idatfilename", label = "Filename", value = gsub("450K|EPIC|27K",input$IDATplatform,input$idatfilename)) 55 | }) 56 | observeEvent(input$IDATgenome, { 57 | updateTextInput(session, "idatfilename", label = "Filename", value = gsub("hg38|hg19",input$IDATgenome,input$idatfilename)) 58 | }) 59 | 60 | observeEvent(input$idatnormalize, { 61 | closeAlert(session,"idatmessage") 62 | betas <- idat() 63 | if (is.null(idat)) return(NULL) 64 | 65 | withProgress(message = 'Normalizing IDAT files', 66 | detail = 'This may take a while...', value = 0, { 67 | 68 | fname <- isolate({input$idatfilename}) 69 | getPath <- parseDirPath(get.volumes(isolate({input$workingDir})), isolate({input$workingDir})) 70 | if (length(getPath) == 0) getPath <- paste0(Sys.getenv("HOME"),"/TCGAbiolinksGUI") 71 | fname <- file.path(getPath,fname) 72 | 73 | incProgress(1, message = "Saving",detail = paste0("As: ", fname)) 74 | if(tools::file_ext(fname) == "csv"){ 75 | write.csv(assay(betas),file = fname,row.names = T) 76 | } else if(tolower(tools::file_ext(fname)) %in% c("rda","rdata")){ 77 | save(betas,file = fname) 78 | } else { 79 | createAlert(session, 80 | "idatAlert", 81 | "idatmessage", 82 | title = "Error in saving", 83 | style = "danger", 84 | content = "File name has to be .csv or .rda. Saved as Idat.rda", append = FALSE) 85 | save(beta,file = file.path(getPath,"Idat.rda")) 86 | } 87 | 88 | createAlert(session, "idatAlert", "idatmessage", title = "Processed data saved", style = "success", 89 | content = paste0("Saved in: ", "
    ", paste(fname, collapse = "
    "),"
"), append = FALSE) 90 | }) 91 | }) 92 | 93 | #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--= 94 | # Download button 95 | #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--= 96 | observe({ 97 | output$idatdownloadDataBut <- downloadHandler( 98 | filename <- function() { 99 | as.character( isolate({input$idatfilename})) 100 | }, 101 | content <- function(file){ 102 | file.copy( isolate({input$idatfilename}),file) 103 | } 104 | ) 105 | }) 106 | -------------------------------------------------------------------------------- /inst/app/server/getclinical.R: -------------------------------------------------------------------------------- 1 | 2 | observeEvent(input$tcgaClinicalBt, { 3 | updateCollapse(session, "collapseTCGAClinical", open = "Clinical data", close = "Description of the data") 4 | output$tcgaClinicaltbl <- DT::renderDataTable({ 5 | closeAlert(session, "tcgaClinicalAlert") 6 | project <- isolate({input$tcgatumorClinicalFilter}) 7 | type <- isolate({input$tcgaClinicalTypeFilter}) 8 | parser <- isolate({input$tcgaClinicalFilter}) 9 | text.samples <- isolate({input$clinicalBarcode}) 10 | tbl <- data.frame() 11 | 12 | getPath <- parseDirPath(get.volumes(isolate({input$workingDir})), input$workingDir) 13 | if (length(getPath) == 0) getPath <- paste0(Sys.getenv("HOME"),"/TCGAbiolinksGUI") 14 | 15 | withProgress( message = 'Download in progress', 16 | detail = 'This may take a while...', value = 0, { 17 | result = tryCatch({ 18 | if(isolate({input$clinicalIndexed})){ 19 | tbl <- rbind(tbl, GDCquery_clinic(project = project, type = type)) 20 | } else { 21 | if(grepl("clinical", type, ignore.case = TRUE)) type <- "Clinical" 22 | if(grepl("biospecimen", type, ignore.case = TRUE)) type <- "Biospecimen" 23 | query <- GDCquery(project = project, data.category = type) 24 | 25 | result = tryCatch({ 26 | GDCdownload(query, directory = getPath) 27 | } , error = function(e) { 28 | createAlert(session, "tcgaClinicalmessage", "tcgaClinicalAlert", title = "No results found", style = "error", 29 | content = "There was a problem to download the data. Please try again later.", append = FALSE) 30 | 31 | }) 32 | incProgress(1/2, message = "Reading XML files",detail = paste(" Parsing")) 33 | clinical <- GDCprepare_clinic(query, parser, directory = getPath) 34 | tbl <- rbind(tbl, clinical) 35 | } 36 | incProgress(1, detail = "Completed") 37 | return(tbl) 38 | }, error = function(e) { 39 | createAlert(session, "tcgaClinicalmessage", "tcgaClinicalAlert", title = "No results found", style = "warning", 40 | content = "Sorry, we could not find the clinical information for your query.", append = FALSE) 41 | }) 42 | }) 43 | if(is.null(tbl)){ 44 | createAlert(session, "tcgaClinicalmessage", "tcgaClinicalAlert", title = "No results found", style = "warning", 45 | content = "Sorry there are clinical files for your query.", append = FALSE) 46 | return() 47 | } else if(nrow(tbl) == 0) { 48 | createAlert(session, "tcgaClinicalmessage", "tcgaClinicalAlert", title = "No results found", style = "warning", 49 | content = "Sorry there are clinical files for your query.", append = FALSE) 50 | return() 51 | } else { 52 | closeAlert(session, "tcgaClinicalAlert") 53 | # Saving data 54 | if (isolate({input$saveClinicalRda}) || isolate({input$saveClinicalCsv})){ 55 | if(isolate({input$clinicalIndexed})){ 56 | filename <- paste0(project,"_",type,".rda") 57 | } else { 58 | filename <- paste0(project,"_clinical_",parser,".rda") 59 | } 60 | 61 | filename <- file.path(getPath,filename) 62 | save.message <- "" 63 | if (isolate({input$saveClinicalRda})){ 64 | save(tbl, file = filename) 65 | save.message <- paste0(save.message,"File created: ",filename,"
") 66 | } 67 | if (isolate({input$saveClinicalCsv})){ 68 | if(grepl("biospecimen",type, ignore.case = TRUE)) tbl$portions <- NULL 69 | if(grepl("clinical",type, ignore.case = TRUE)) tbl$treatments <- NULL 70 | write_csv(tbl,path = gsub("rda","csv",filename)) 71 | save.message <- paste0(save.message,"File created: ",gsub("rda","csv",filename)) 72 | } 73 | createAlert(session, "tcgaClinicalmessage", "tcgaClinicalAlert", title = "File created", style = "info", 74 | content = save.message, append = TRUE) 75 | } 76 | return(createTable(tbl)) 77 | } 78 | 79 | }) 80 | }) 81 | 82 | 83 | observeEvent(input$tcgaClinicalTypeFilter, { 84 | if(isolate({input$tcgaClinicalTypeFilter}) == "biospecimen") { 85 | options <- sort(c("protocol","admin","aliquot","analyte","bio_patient","sample", "portion", "slide")) 86 | } else { 87 | options <- sort(c("drug", "admin", "follow_up", "radiation", "patient", "stage_event", "new_tumor_event")) 88 | } 89 | updateSelectizeInput(session, 'tcgaClinicalFilter', choices = as.character(options), server = TRUE) 90 | }) 91 | -------------------------------------------------------------------------------- /inst/app/server/getinference.R: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------- 2 | # Network inference 3 | # ------------------------------------------------- 4 | #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--= 5 | # File selection 6 | #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--= 7 | observe({ 8 | shinyFileChoose(input, 'networkfile', roots=get.volumes(input$workingDir), 9 | session=session, restrictions=system.file(package='base'), 10 | filetypes=c('rda', 'RData')) 11 | }) 12 | 13 | #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--= 14 | # Network inference 15 | #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--= 16 | observeEvent(input$networkBt , { 17 | output$tcgaNetworktbl <- renderDataTable({ 18 | # Close in case it is open 19 | closeAlert(session, "networkAlert") 20 | print("Start inference") 21 | 22 | data <- networkdata() 23 | 24 | # Input should be expression data with genes in columns and samples in rows 25 | data <- t(data) 26 | 27 | method <- isolate({input$networkInferenceMethodRb}) 28 | withProgress(message = 'Start inference', 29 | detail = 'This may take a while...', value = 0, { 30 | myadj <- TCGAanalyze_networkInference(data, optionMethod=method) 31 | }) 32 | 33 | # Saving output 34 | out.filename <- paste0(paste("network_results_method", method,sep="_"),".rda") 35 | getPath <- parseDirPath(get.volumes(isolate({input$workingDir})), input$workingDir) 36 | if (length(getPath) == 0) getPath <- paste0(Sys.getenv("HOME"),"/TCGAbiolinksGUI") 37 | 38 | save(myadj, file = out.filename) 39 | 40 | createAlert(session, "networkmessage", "networkAlert", title = "Analysis completed", style = "success", 41 | content = paste0("File saved in: ",out.filename), append = FALSE) 42 | 43 | vals <- unique(sort(myadj[upper.tri(myadj)],decreasing=TRUE))[1:10] 44 | 45 | tbl <- NULL 46 | for(i in 1:10){ 47 | ind <- which(myadj == vals[i], arr.ind = TRUE) 48 | for(j in 1:nrow(ind)) { 49 | aux <- data.frame("gene 1" = rownames(myadj)[ind[j,1]], "gene 2" = rownames(myadj)[ind[j,2]], "value" = vals[i]) 50 | tbl <- rbind(tbl, aux) 51 | } 52 | } 53 | remove <- NULL 54 | for( i in 1:(nrow(tbl)-1)) { 55 | for(j in (i+1):nrow(tbl)) { 56 | if(tbl[i,1] == tbl[j,2] & tbl[i,2] == tbl[j,1]) remove <- c(remove,j) 57 | } 58 | } 59 | tbl <- tbl[-remove,] 60 | 61 | 62 | return(createTable(tbl)) 63 | }) 64 | }) 65 | 66 | 67 | #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--= 68 | # Data input 69 | #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--= 70 | networkdata <- reactive({ 71 | inFile <- input$networkfile 72 | if(class(inFile) != "list") return(NULL) 73 | file <- as.character(parseFilePaths(get.volumes(isolate({input$workingDir})), input$networkfile)$datapath) 74 | 75 | withProgress(message = 'Loading data', 76 | detail = 'This may take a while...', value = 0, { 77 | data <- get(load(file)) 78 | incProgress(1, detail = "Completed") 79 | }) 80 | 81 | # Check data input, should it be a data frame/matrix or summarizedExperiment 82 | if(class(data) != class(as(SummarizedExperiment(),"RangedSummarizedExperiment")) & class(data) != class(data.frame())){ 83 | createAlert(session, "networkmessage", "networkAlert", title = "Data input error", style = "danger", 84 | content = paste0("Sorry, but I'm expecting either a Summarized Experiment object or a data frame/matrix, but I got a: ", 85 | class(data)), append = FALSE) 86 | return(NULL) 87 | } 88 | 89 | if(class(data) == class(as(SummarizedExperiment(),"RangedSummarizedExperiment"))){ 90 | data <- assay(data) 91 | } 92 | 93 | return(data) 94 | }) 95 | -------------------------------------------------------------------------------- /inst/app/server/getmutation.R: -------------------------------------------------------------------------------- 1 | 2 | getMafTumors <- function(){ 3 | root <- "https://api.gdc.cancer.gov/data/" 4 | maf <- fread("https://docs.gdc.cancer.gov/Data/Release_Notes/Manifests/GDC_open_MAFs_manifest.txt", 5 | data.table = FALSE, verbose = FALSE, showProgress = FALSE) 6 | tumor <- unlist(lapply(maf$filename, function(x){unlist(str_split(x,"\\."))[2]})) 7 | proj <- TCGAbiolinks:::getGDCprojects() 8 | 9 | disease <- gsub("TCGA-","",proj$project_id) 10 | idx <- grep("disease_type",colnames(proj)) 11 | names(disease) <- paste0(proj[[idx]], " (",proj$project_id,")") 12 | disease <- sort(disease) 13 | ret <- disease[disease %in% tumor] 14 | return(ret) 15 | } 16 | observe({ 17 | # Created with getMafTumors 18 | updateSelectizeInput(session, 'tcgaMafTumorFilter', choices = maf.tumor, server = TRUE) 19 | }) 20 | 21 | observeEvent(input$tcgaMafSearchBt, { 22 | output$tcgaMutationtbl <- DT::renderDataTable({ 23 | tumor <- isolate({input$tcgaMafTumorFilter}) 24 | getPath <- parseDirPath(get.volumes(isolate({input$workingDir})), input$workingDir) 25 | if (length(getPath) == 0) getPath <- paste0(Sys.getenv("HOME"),"/TCGAbiolinksGUI") 26 | 27 | withProgress(message = 'Download in progress', 28 | detail = 'This may take a while...', value = 0, { 29 | tbl <- GDCquery_Maf(tumor, directory = getPath, 30 | save.csv = isolate({input$saveMafcsv}), 31 | pipelines = isolate({input$tcgaMafPipeline})) 32 | incProgress(1, detail = "Download completed") 33 | }) 34 | if(is.null(tbl)){ 35 | createAlert(session, "tcgaMutationmessage", "tcgaMutationAlert", title = "No results found", style = "warning", 36 | content = "Sorry there are no results for your query.", append = FALSE) 37 | return() 38 | } else if(nrow(tbl) ==0) { 39 | createAlert(session, "tcgaMutationmessage", "tcgaMutationAlert", title = "No results found", style = "warning", 40 | content = "Sorry there are no results for your query.", append = FALSE) 41 | return() 42 | } else { 43 | closeAlert(session, "tcgaMutationAlert") 44 | } 45 | if(grepl("varscan", isolate({input$tcgaMafPipeline}), ignore.case = TRUE)) { 46 | workflow.type <- "VarScan2 Variant Aggregation and Masking" 47 | } else if( isolate({input$tcgaMafPipeline}) == "muse") { 48 | workflow.type <- "MuSE Variant Aggregation and Masking" 49 | } else if( isolate({input$tcgaMafPipeline}) == "somaticsniper") { 50 | workflow.type <- "SomaticSniper Variant Aggregation and Masking" 51 | } else if(grepl("mutect", isolate({input$tcgaMafPipeline}), ignore.case = TRUE)) { 52 | workflow.type <- "MuTect2 Variant Aggregation and Masking" 53 | } else { 54 | stop("Please select the pipeline argument (muse, varscan2, somaticsniper, mutect2)") 55 | } 56 | query <- GDCquery(paste0("TCGA-",tumor), 57 | data.category = "Simple Nucleotide Variation", 58 | data.type = "Masked Somatic Mutation", 59 | workflow.type = workflow.type) 60 | 61 | fout <- file.path(getPath, getResults(query)$file_name) 62 | save(tbl,file = gsub("maf.gz","rda",fout)) 63 | closeAlert(session, "tcgaMutationAlert") 64 | if(isolate({input$saveMafcsv})) { 65 | createAlert(session, "tcgaMutationmessage", "tcgaMutationAlert", title = "Download completed", style = "success", 66 | content = paste0("Saved file:
    ",fout,"
    ", gsub(".gz",".csv",fout), "
"), append = FALSE) 67 | } else { 68 | createAlert(session, "tcgaMutationmessage", "tcgaMutationAlert", title = "Download completed", style = "success", 69 | content = paste0("Saved file: ", gsub("maf.gz","rda",fout)), append = FALSE) 70 | } 71 | return(createTable(tbl)) 72 | }) 73 | }) 74 | 75 | 76 | -------------------------------------------------------------------------------- /inst/app/server/getsubtype.R: -------------------------------------------------------------------------------- 1 | # Subtype 2 | observeEvent(input$tcgaSubtypeBt, { 3 | updateCollapse(session, "collapseTCGASubtype", open = "Subtype data: results") 4 | output$tcgaSubtypetbl <- DT::renderDataTable({ 5 | tbl <- subtype.result() 6 | tumor <- isolate({input$tcgasubtypeFilter}) 7 | if(!is.null(tbl)) { 8 | closeAlert(session, "tcgaSubtypeAlert") 9 | doi <- c("acc"="Comprehensive Pan-Genomic Characterization of Adrenocortical Carcinoma
doi:10.1016/j.ccell.2016.04.002", 10 | "aml"="Genomic and epigenomic landscapes of adult de novo acute
doi:10.1056/NEJMoa1301689", 11 | "blca"="Comprehensive molecular characterization of urothelial bladder
doi:10.1038/nature12965", 12 | "brca"="Comprehensive molecular portraits of human breast tumours
doi:10.1038/nature11412", 13 | "coad"="Comprehensive molecular characterization of human colon
doi:10.1038/nature11252", 14 | "gbm"="Molecular Profiling Reveals Biologically Discrete Subsets and Pathways of Progression in Diffuse Glioma.
doi:10.1016/j.cell.2015.12.028", 15 | "lgg"="Molecular Profiling Reveals Biologically Discrete Subsets and Pathways of Progression in Diffuse Glioma.
doi:10.1016/j.cell.2015.12.028", 16 | "hnsc"="Comprehensive genomic characterization of head and neck
doi:10.1038/nature14129", 17 | "kich"="The somatic genomic landscape of chromophobe renal cell carcinoma
doi:10.1016/j.ccr.2014.07.014", 18 | "kirc"="Comprehensive molecular characterization of clear cell renal cell carcinoma
doi:10.1038/nature12222", 19 | "kirp"="Comprehensive Molecular Characterization of Papillary Renal-Cell Carcinoma
doi:10.1056/NEJMoa1505917", 20 | "lihc"="", 21 | "luad"="Comprehensive molecular profiling of lung adenocarcinoma
doi:10.1038/nature13385", 22 | "lusc"="Comprehensive genomic characterization of squamous cell lung cancers
doi:10.1038/nature11404", 23 | "ovca"= "Integrated genomic analyses of ovarian carcinoma
doi:10.1038/nature10166", 24 | "pancan"="Multiplatform analysis of 12 cancer types reveals molecular
doi:10.1016/j.cell.2014.06.049", 25 | "pcpg"="Comprehensive Molecular Characterization of Pheochromocytoma and Paraganglioma
http://dx.doi.org/10.1016/j.ccell.2017.01.001", 26 | "prad"="The Molecular Taxonomy of Primary Prostate Cancer
doi:10.1016/j.cell.2015.10.025", 27 | "skcm"="Genomic Classification of Cutaneous Melanoma
doi:10.1016/j.cell.2015.05.044", 28 | "stad"="Comprehensive molecular characterization of gastric adenocarcinoma
doi:10.1038/nature13480", 29 | "thca"="Integrated genomic characterization of papillary thyroid carcinoma
doi:10.1016/j.cell.2014.09.050", 30 | "ucec"="Integrated genomic characterization of endometrial carcinoma
doi:10.1038/nature12113", 31 | "ucs"="") 32 | if (isolate({input$saveSubtypeRda}) || isolate({input$saveSubtypeCsv})) { 33 | save.message <- "" 34 | getPath <- parseDirPath(get.volumes(isolate({input$workingDir})), input$workingDir) 35 | if (length(getPath) == 0) getPath <- paste0(Sys.getenv("HOME"),"/TCGAbiolinksGUI") 36 | filename <- file.path(getPath,paste0(tumor,"_subtype.rda")) 37 | if (isolate({input$saveSubtypeRda})) { 38 | save(tbl, file = filename) 39 | save.message <- paste0(save.message,"
File created: ", filename) 40 | } 41 | if (isolate({input$saveSubtypeCsv})) { 42 | write_csv(tbl, path = gsub("rda","csv",filename)) 43 | save.message <- paste0(save.message,"
File created: ", gsub("rda","csv",filename)) 44 | } 45 | createAlert(session, "tcgaSubtypemessage", "tcgaSubtypeAlert", title = paste0("Success"), style = "success", 46 | content = paste0(save.message,"
Source of the data: ", doi[tumor]), append = TRUE) 47 | 48 | } else { 49 | createAlert(session, "tcgaSubtypemessage", "tcgaSubtypeAlert", title = "Source of the data", style = "success", 50 | content = paste0(doi[tumor]), append = TRUE) 51 | } 52 | 53 | createTable(tbl) 54 | } 55 | 56 | }) 57 | }) 58 | 59 | subtype.result <- reactive({ 60 | tumor <- input$tcgasubtypeFilter 61 | tbl <- data.frame() 62 | 63 | result = tryCatch({ 64 | tbl <- rbind(tbl, TCGAquery_subtype(tumor = tumor)) 65 | 66 | }, error = function(e) { 67 | createAlert(session, "tcgaSubtypemessage", "tcgaSubtypeAlert", title = "No results found", style = "warning", 68 | content = "Sorry there are subtypes for your query.", append = FALSE) 69 | }) 70 | 71 | if(is.null(tbl)){ 72 | createAlert(session, "tcgaSubtypemessage", "tcgaSubtypeAlert", title = "No results found", style = "warning", 73 | content = "Sorry there are subtypes for your query.", append = FALSE) 74 | return() 75 | } else if(nrow(tbl) ==0) { 76 | createAlert(session, "tcgaSubtypemessage", "tcgaSubtypeAlert", title = "No results found", style = "warning", 77 | content = "Sorry there are subtypes for your query.", append = FALSE) 78 | return() 79 | } 80 | return(tbl) 81 | }) 82 | 83 | observeEvent(input$subtypePlotCol, { 84 | col <- isolate({input$subtypePlotCol}) 85 | if(!is.null(col) & str_length(col) > 1) { 86 | updateCollapse(session, "collapseTCGASubtype", open = "Subtype data: Summary") 87 | } 88 | output$subtypeview <- renderPlotly({ 89 | tbl <- subtype.result() 90 | if(is.null(tbl)) return(plotly_empty()) 91 | if(is.null(col)) return(plotly_empty()) 92 | 93 | if(str_length(col) < 2) return(plotly_empty()) 94 | df <- as.data.frame(dplyr::count_(tbl, eval(col))) 95 | colnames(df) <- c("Var1","Freq") 96 | df$Var1 <- as.character(df$Var1) 97 | df$Var1[is.na(df$Var1)] <- "No value" 98 | save(df,file = "test.rda") 99 | p <- plot_ly(df, labels = ~Var1, values = ~Freq, type = 'pie', 100 | textposition = 'inside', 101 | textinfo = 'label+percent', 102 | insidetextfont = list(color = '#FFFFFF'), 103 | hoverinfo = 'text', 104 | text=~paste0(Var1,"\n",Freq), 105 | marker = list(colors = colors, 106 | line = list(color = '#FFFFFF', width = 1)), 107 | showlegend = FALSE) %>% 108 | layout(xaxis = list(showgrid = FALSE, zeroline = FALSE, showticklabels = FALSE), 109 | yaxis = list(showgrid = FALSE, zeroline = FALSE, showticklabels = FALSE)) %>% 110 | config(displayModeBar = F) 111 | }) 112 | }) 113 | observe({ 114 | updateSelectizeInput(session, 'subtypePlotCol', choices = colnames(subtype.result()), server = TRUE) 115 | }) 116 | -------------------------------------------------------------------------------- /inst/app/server/gliomaclassifier.R: -------------------------------------------------------------------------------- 1 | # Glioma classification 2 | 3 | classifyObj <- reactive({ 4 | inFile <- parseFilePaths(get.volumes(isolate({input$workingDir})), input$classifyObj) 5 | if (nrow(inFile) == 0) return(NULL) 6 | file <- as.character(inFile$datapath) 7 | withProgress(message = 'Reading file', 8 | detail = 'This may take a while...', value = 0, { 9 | if(grepl("\\.csv", file)){ 10 | ret <- read_csv(file) 11 | } else { 12 | ret <- get(load(file)) 13 | } 14 | }) 15 | return(ret) 16 | }) 17 | 18 | observe({ 19 | shinyFileChoose(input, 'classifyObj', roots=get.volumes(input$workingDir), session=session, 20 | restrictions=system.file(package='base'), filetypes=c('', "rda","csv")) 21 | }) 22 | 23 | observeEvent(input$gliomaClassify, { 24 | closeAlert(session,alertId = "gliomamessage") 25 | output$gliomatbl <- DT::renderDataTable({ 26 | met <- classifyObj() 27 | if(is.null(met)) { 28 | createAlert(session, "gliomaAlert", "gliomamessage", title = "Error", style = "danger", 29 | content = "Please select a file", append = FALSE) 30 | return(NULL) 31 | } 32 | if(class(met)[1] == "RangedSummarizedExperiment") { 33 | met <- assay(met) %>% as.matrix %>% t 34 | } else { 35 | met <- met %>% as.matrix %>% t 36 | } 37 | 38 | withProgress(message = 'Classifying samples', 39 | detail = 'Selecting models', value = 0, { 40 | tryCatch({ 41 | df.all <- NULL 42 | models <- c("idh","gcimp","idhwt","idhmut") 43 | models <- paste("glioma",models,"model",sep = ".") 44 | data(list = models) 45 | for(i in models){ 46 | incProgress(0.2, message = "Classifying into glioma subtypes",detail = paste0("Model: ", i)) 47 | model <- get(i) 48 | # If it is a Summarized Experiment object 49 | 50 | # keep only probes used in the model 51 | aux <- met[,colnames(met) %in% colnames(model$trainingData),drop=FALSE] 52 | 53 | # This should not happen! 54 | if(any(apply(aux,2,function(x) all(is.na(x))))) { 55 | print("NA columns") 56 | aux[,apply(aux,2,function(x) all(is.na(x)))] <- 0.5 # runif(1, 0, 1) # pick a random number between 0 and 1 57 | } 58 | if(any(apply(aux,2,function(x) any(is.na(x))))) { 59 | print("NA values") 60 | colMedians <- colMedians(aux,na.rm = T) 61 | x <- which(is.na(aux),arr.ind = T) 62 | for(l in 1:nrow(x)){ 63 | aux[x[l,1],x[l,2]] <- colMedians[x[l,2]] 64 | } 65 | } 66 | 67 | pred <- predict(model, aux) 68 | pred.prob <- predict(model, aux, type = "prob") 69 | df <- data.frame(samples = rownames(aux), 70 | groups.classified = pred, 71 | stringsAsFactors = FALSE) 72 | colnames(pred.prob) <- paste0(i,"_", colnames(pred.prob)) 73 | pred.prob$samples <- rownames(pred.prob) 74 | 75 | if(is.null(df.all)) { 76 | df.all <- df 77 | df.prob <- pred.prob 78 | } else { 79 | df.all <- merge(df.all,df, by = "samples") 80 | df.prob <- merge(df.prob,pred.prob,by = "samples") 81 | } 82 | } 83 | incProgress(0.2, message = "Classifying into glioma subtypes",detail = paste0("Preparing final table")) 84 | colnames(df.all) <- c("samples",models) 85 | fctr.cols <- sapply(df.all, is.factor) 86 | df.all[, fctr.cols] <- sapply(df.all[, fctr.cols], as.character) 87 | df.all[grep("6|5|4",df.all$glioma.idh.model),c("glioma.gcimp.model","glioma.idhmut.model")] <- NA 88 | df.all[grep("3|2|1",df.all$glioma.idh.model),c("glioma.idhwt.model")] <- NA 89 | 90 | df.all[grep("3",df.all$glioma.idhmut.model),c("glioma.gcimp.model")] <- "Codel" 91 | 92 | 93 | df.all[grep("1",df.all$glioma.idhwt.model),c("glioma.idhwt.model")] <- "Classic-like" 94 | df.all[grep("2",df.all$glioma.idhwt.model),c("glioma.idhwt.model")] <- "Mesenchymal-like" 95 | df.all[grep("3",df.all$glioma.idhwt.model),c("glioma.idhwt.model")] <- "PA-like" 96 | 97 | # Final column with results 98 | df.all$glioma.DNAmethylation.subtype <- NA 99 | df.all$glioma.DNAmethylation.subtype <- df.all$glioma.idhwt.model 100 | idx <- which(is.na(df.all$glioma.DNAmethylation.subtype)) 101 | df.all$glioma.DNAmethylation.subtype[idx] <- df.all$glioma.gcimp.model[idx] 102 | }, error = function(e){ 103 | createAlert(session, "gliomaAlert", "gliomamessage", title = "Error", style = "error", 104 | content = paste0("Erro: ", "
    ", paste(e, collapse = "
    "),"
"), append = FALSE) 105 | }) 106 | }) 107 | if(isolate({!input$gliomaClassifierProb})){ 108 | return(createTable(df.all,"Glioma classification")) 109 | } 110 | return(createTable(df.prob,"Glioma classification probabilities")) 111 | }) 112 | }) 113 | 114 | -------------------------------------------------------------------------------- /inst/app/server/manageSE.R: -------------------------------------------------------------------------------- 1 | #------------------------------------------------------------------------- 2 | # Summarized experiment edition 3 | #------------------------------------------------------------------------- 4 | #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--= 5 | # DATA INPUT 6 | #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--= 7 | seeditdata <- reactive({ 8 | inFile <- input$seeditfile 9 | if(class(inFile) != "list") return(NULL) 10 | file <- as.character(parseFilePaths(get.volumes(isolate({input$workingDir})), input$seeditfile)$datapath) 11 | if(tools::file_ext(file)=="rda"){ 12 | se <- get(load(file)) 13 | return(se) 14 | } 15 | return(se) 16 | }) 17 | 18 | #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--= 19 | # File selection 20 | #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--= 21 | observe({ 22 | shinyFileChoose(input, 'seeditfile', 23 | roots = get.volumes(input$workingDir), 24 | session = session, 25 | restrictions = system.file(package='base'), 26 | filetypes = c('','rda')) 27 | }) 28 | 29 | output$downloadData <- downloadHandler( 30 | filename = function() { 31 | file <- basename(as.character(parseFilePaths( 32 | get.volumes(isolate({input$workingDir})), input$seeditfile)$datapath)) 33 | paste0("samples-matrix-",gsub("rda",'csv',file)) 34 | }, 35 | content = function(con) { 36 | if(!is.null(seeditdata())) { 37 | data <- as.data.frame(colData(seeditdata())) 38 | file <- as.character(parseFilePaths( 39 | get.volumes(isolate({input$workingDir})), input$seeditfile)$datapath) 40 | row.names <- rownames(data) 41 | write_csv(cbind(row.names,data), con) 42 | } 43 | } 44 | ) 45 | observeEvent(input$seeditSEbt, { 46 | data <- seeditdata() 47 | closeAlert(session,"seeditAlert") 48 | inFile <- isolate({input$seuploadfile}) 49 | if(class(inFile) != "list") return(NULL) 50 | sample.data <- read_csv(inFile$datapath,col_names = TRUE) 51 | sample.data <- DataFrame(sample.data[match(sample.data$row.names,colnames(data)),]) 52 | rownames(sample.data) <- sample.data$row.names 53 | sample.data$row.names <- NULL 54 | colData(data) <- sample.data 55 | getPath <- parseDirPath(get.volumes(isolate({input$workingDir})), input$workingDir) 56 | if (length(getPath) == 0) getPath <- paste0(Sys.getenv("HOME"),"/TCGAbiolinksGUI") 57 | filename <- file.path(getPath,isolate({input$seeditfilename})) 58 | withProgress(message = 'Saving new summarized Experiment object', 59 | detail = 'This may take a while...', value = 0, { 60 | save(data, file = filename) 61 | incProgress(1, detail = "Completed") 62 | 63 | }) 64 | createAlert(session, 65 | "seeditAlert", 66 | "seeditAlertMessage", 67 | title = "File created", 68 | style = "success", 69 | content = paste0("Saved as: ",filename), append = FALSE) 70 | }) 71 | observeEvent(input$seeditfile, { 72 | updateTextInput(session, 73 | "seeditfilename", 74 | value = paste0("edited_", 75 | basename(as.character(parseFilePaths( 76 | get.volumes(isolate({input$workingDir})), 77 | input$seeditfile)$datapath)))) 78 | 79 | updateCollapse(session, "collapseseeEdit", open = "Sample data matrix") 80 | 81 | output$seeditassaytb <- DT::renderDataTable({ 82 | x <- as.data.frame(assay(seeditdata())) 83 | row.names <- rownames(x) 84 | x <- cbind(row.names,x) 85 | return(createTable(x)) 86 | }) 87 | 88 | output$seeditfeaturetb <- DT::renderDataTable({ 89 | return(createTable(as.data.frame(rowRanges(seeditdata())))) 90 | }) 91 | 92 | output$seeditsampletb <- DT::renderDataTable({ 93 | return(createTable(as.data.frame(colData(seeditdata())))) 94 | }) 95 | }) 96 | -------------------------------------------------------------------------------- /inst/app/server/meanMet.R: -------------------------------------------------------------------------------- 1 | ##---------------------------------------------------------------------- 2 | # Mean Methylation 3 | ##---------------------------------------------------------------------- 4 | 5 | #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--= 6 | # Handling visibility 7 | #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--= 8 | observeEvent(input$meanmetSetLimits, { 9 | if(input$meanmetSetLimits){ 10 | shinyjs::show("meanmetylimup") 11 | shinyjs::show("meanmetylimlow") 12 | } else { 13 | shinyjs::hide("meanmetylimup") 14 | shinyjs::hide("meanmetylimlow") 15 | } 16 | }) 17 | observeEvent(input$meanmetSortCB, { 18 | if(input$meanmetSortCB){ 19 | shinyjs::show("meanmetsort") 20 | } else { 21 | shinyjs::hide("meanmetsort") 22 | } 23 | }) 24 | 25 | observe({ 26 | updateSelectizeInput(session, 'meanmetsubgroupCol', choices = { 27 | data <- meandata() 28 | if(!is.null(data)){ 29 | data <- colData(data) 30 | #data <- data[,which(apply(data,2,function(x) class(parse_guess((x)))) == "character")] 31 | as.character(colnames(data)) 32 | } 33 | }, server = TRUE) 34 | }) 35 | observe({ 36 | updateSelectizeInput(session, 'meanmetgroupCol', choices = { 37 | data <- meandata() 38 | if(!is.null(data)){ 39 | data <- colData(data) 40 | #data <- data[,which(apply(data,2,function(x) class(parse_guess((x)))) == "character")] 41 | as.character(colnames(data)) 42 | } 43 | }, server = TRUE) 44 | }) 45 | #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--= 46 | # Plot 47 | #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--= 48 | meanmetPlot <- reactive({ 49 | input$meanmetPlot 50 | closeAlert(session, "meanmetAlert") 51 | jitter <- isolate({input$meanmetplotjitter}) 52 | sort <- NULL 53 | if(isolate({input$meanmetSortCB})) sort <- isolate({input$meanmetsort}) 54 | angle <- isolate({input$meanmetAxisAngle}) 55 | data <- meandata() 56 | 57 | y.limits <- NULL 58 | if(isolate({input$meanmetSetLimits})) y.limits <- c(isolate({input$meanmetylimlow}),isolate({input$meanmetylimup})) 59 | 60 | if(is.null(data)){ 61 | createAlert(session, "meanmetmessage", "meanmetAlert", title = "Missing data", style = "danger", 62 | content = paste0("Please select the data"), append = FALSE) 63 | return(NULL) 64 | } 65 | 66 | if(isolate({input$meanmetgroupCol}) == "") { 67 | group <- NULL 68 | } else { 69 | group <- isolate({input$meanmetgroupCol}) 70 | } 71 | 72 | if(is.null(group)){ 73 | createAlert(session, "meanmetmessage", "meanmetAlert", title = "Missing group column", style = "danger", 74 | content = paste0("Please select group column"), append = FALSE) 75 | return(NULL) 76 | } 77 | 78 | if(isolate({input$meanmetsubgroupCol}) == "") { 79 | subgroup <- NULL 80 | } else { 81 | subgroup <- isolate({input$meanmetsubgroupCol}) 82 | } 83 | 84 | legend.position <- isolate({input$meanmetLegendPos}) 85 | legend.title.position <- isolate({input$meanmetLegendTitlePos}) 86 | legend.ncols <- isolate({input$meanmetLegendncols}) 87 | add.axis.x.text <- isolate({input$meanmetXnames}) 88 | withProgress(message = 'Creating plot', 89 | detail = 'This may take a while...', value = 0, { 90 | if(is.null(sort)){ 91 | TCGAvisualize_meanMethylation(data=data, 92 | groupCol=group, 93 | subgroupCol=subgroup, 94 | filename = NULL, 95 | y.limits = y.limits, 96 | legend.position = legend.position, 97 | legend.title.position = legend.title.position, 98 | legend.ncols = legend.ncols, 99 | add.axis.x.text = add.axis.x.text, 100 | plot.jitter = jitter, 101 | axis.text.x.angle = angle ) 102 | } else { 103 | TCGAvisualize_meanMethylation(data=data, 104 | groupCol=group, 105 | subgroupCol=subgroup, 106 | filename = NULL, 107 | legend.position = legend.position, 108 | legend.title.position = legend.title.position, 109 | legend.ncols = legend.ncols, 110 | add.axis.x.text = add.axis.x.text, 111 | y.limits = y.limits, 112 | plot.jitter = jitter, 113 | axis.text.x.angle = angle, 114 | sort=sort) 115 | } 116 | }) 117 | 118 | }) 119 | observeEvent(input$meanmetPlot, { 120 | output$mean.plotting <- renderPlot({ 121 | meanmetPlot() 122 | }) 123 | }) 124 | 125 | observeEvent(input$meanmetPlot , { 126 | updateCollapse(session, "collapsemeanmet", open = "Mean DNA methylation plot") 127 | output$meanMetplot <- renderUI({ 128 | plotOutput("mean.plotting", width = paste0(isolate({input$meanmetwidth}), "%"), height = isolate({input$meanmetheight})) 129 | })}) 130 | 131 | #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--= 132 | # File selection 133 | #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--= 134 | observe({ 135 | shinyFileChoose(input, 136 | 'meanmetfile', 137 | roots = get.volumes(input$workingDir), 138 | session = session, 139 | restrictions = system.file(package ='base'),filetypes = c('', 'rda')) 140 | }) 141 | 142 | #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--= 143 | # Data input 144 | #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--= 145 | meandata <- reactive({ 146 | inFile <- input$meanmetfile 147 | if(class(inFile) != "list") return(NULL) 148 | 149 | file <- as.character(parseFilePaths(get.volumes(isolate({input$workingDir})), input$meanmetfile)$datapath) 150 | 151 | withProgress(message = 'Loading data', 152 | detail = 'This may take a while...', value = 0, { 153 | result.file <- gsub(".rda","_results.rda",file) 154 | if(file.exists(result.file)) { 155 | se <- get(load(result.file)) 156 | } else { 157 | se <- get(load(file)) 158 | } 159 | incProgress(1, detail = "Completed") 160 | }) 161 | if(class(se)!= class(as(SummarizedExperiment(),"RangedSummarizedExperiment"))){ 162 | createAlert(session, "dmrmessage", "dmrAlert", title = "Data input error", style = "danger", 163 | content = paste0("Sorry, but I'm expecting a Summarized Experiment object, but I got a: ", 164 | class(se)), append = FALSE) 165 | return(NULL) 166 | } 167 | return(se) 168 | }) 169 | 170 | 171 | output$savemeanmetpicture <- downloadHandler( 172 | filename = function(){input$meanmetPlot.filename}, 173 | content = function(file) { 174 | if(tools::file_ext(input$meanmetPlot.filename) == "png") { 175 | device <- function(..., width, height) { 176 | grDevices::png(..., width = 10, height = 10, 177 | res = 300, units = "in") 178 | } 179 | } else if(tools::file_ext(input$meanmetPlot.filename) == "pdf") { 180 | device <- function(..., width, height) { 181 | grDevices::pdf(..., width = 10, height = 10) 182 | } 183 | } else if(tools::file_ext(input$meanmetPlot.filename) == "svg") { 184 | device <- function(..., width, height) { 185 | grDevices::svg(..., width = 10, height = 10) 186 | } 187 | } 188 | 189 | ggsave(file, plot = meanmetPlot(), device = device) 190 | }) 191 | -------------------------------------------------------------------------------- /inst/app/server/pathview.R: -------------------------------------------------------------------------------- 1 | 2 | #---------------------------------------------- 3 | # DEA Pathview 4 | pathway.data <- function(){ 5 | inFile <- input$pathewayexpfile 6 | if(class(inFile) != "list") return(NULL) 7 | file <- as.character(parseFilePaths(get.volumes(isolate({input$workingDir})), input$pathewayexpfile)$datapath) 8 | if(tools::file_ext(file)=="csv"){ 9 | se <- read_csv(file) 10 | } else if(tools::file_ext(file)=="rda"){ 11 | se <- get(load(file)) 12 | } 13 | 14 | return(se) 15 | } 16 | output$deaSE <- DT::renderDataTable({ 17 | data <- pathway.data() 18 | if(!is.null(data)) createTable(as.data.frame(data)) 19 | }) 20 | 21 | observe({ 22 | shinyFileChoose(input, 'pathewayexpfile', 23 | roots=get.volumes(input$workingDir), 24 | session=session, 25 | restrictions=system.file(package='base')) 26 | }) 27 | observeEvent(input$pathwaygraphBt , { 28 | closeAlert(session,"pathviewAlert") 29 | data <- pathway.data() 30 | if(is.null(data)) { 31 | createAlert(session, "pathviewmessage", "pathviewAlert", title = "Data error", style = "danger", 32 | content = "Please upload results", append = FALSE) 33 | return(NULL) 34 | } 35 | pathway.id <- isolate({input$pathway.id}) 36 | kegg.native <- isolate({input$kegg.native.checkbt}) 37 | 38 | # Converting Gene symbol to geneID 39 | if(all(grepl("ENS", data$Gene_symbol))) { 40 | fromType <- "ENSEMBL" 41 | } else { 42 | fromType <- "SYMBOL" 43 | } 44 | 45 | eg = as.data.frame(bitr(data$Gene_symbol, 46 | fromType=fromType, 47 | toType="ENTREZID", 48 | OrgDb="org.Hs.eg.db")) 49 | eg <- eg[!duplicated(eg[,fromType]),] 50 | colnames(eg) <- c("Gene_symbol","ENTREZID") 51 | data <- merge(data,eg,by="Gene_symbol") 52 | 53 | data <- subset(data, select = c("ENTREZID", "logFC")) 54 | genelistDEGs <- as.numeric(data$logFC) 55 | names(genelistDEGs) <- data$ENTREZID 56 | 57 | withProgress(message = 'Creating pathway graph', 58 | detail = 'This may take a while...', value = 0, { 59 | # pathway.id: hsa05214 is the glioma pathway 60 | # limit: sets the limit for gene expression legend and color 61 | tryCatch({ 62 | hsa05214 <- pathview(gene.data = genelistDEGs, 63 | pathway.id = pathway.id, 64 | species = "hsa", 65 | kegg.native = kegg.native, 66 | limit = list(gene=as.integer(max(abs(genelistDEGs))))) 67 | }, error = function(e) { 68 | createAlert(session, "pathviewmessage", "pathviewAlert", title = "Error", style = "warning", 69 | content = "I couldn't convert the pdf to png.", append = FALSE) 70 | print(e) 71 | }) 72 | 73 | incProgress(1, detail = paste("Done")) 74 | }) 75 | getPath <- parseDirPath(get.volumes(isolate({input$workingDir})), input$workingDir) 76 | if (length(getPath) == 0) getPath <- paste0(Sys.getenv("HOME"),"/TCGAbiolinksGUI") 77 | 78 | if(kegg.native) { 79 | extension <- ".pathview.png" 80 | } else { 81 | extension <- ".pathview.pdf" 82 | } 83 | fname <- paste0(pathway.id,extension) 84 | if(file.path(getwd(),fname) != file.path(getPath,fname)) TCGAbiolinks:::move(fname,file.path(getPath,fname)) 85 | 86 | createAlert(session, "pathviewmessage", "pathviewAlert", title = "Pathway graph created", style = "success", 87 | content = paste0("Results saved in: ", file.path(getPath,fname)), append = FALSE) 88 | }) 89 | 90 | observeEvent(input$pathwaygraphBt , { 91 | updateCollapse(session, "collapsepathview", open = "Pathview plot") 92 | output$pathviewPlot <- renderUI({ 93 | plotOutput("pathviewImage", height = input$pathwaygraphheigth) 94 | }) 95 | }) 96 | 97 | observeEvent(input$pathwaygraphBt , { 98 | output$pathviewImage <- renderImage({ 99 | getPath <- parseDirPath(get.volumes(isolate({input$workingDir})), input$workingDir) 100 | if (length(getPath) == 0) getPath <- paste0(Sys.getenv("HOME"),"/TCGAbiolinksGUI") 101 | pathway.id <- isolate({input$pathway.id}) 102 | extension <- ".pathview.png" 103 | outfile <- file.path(getPath, paste0(pathway.id,extension)) 104 | 105 | if(!isolate({input$kegg.native.checkbt})){ 106 | x <- tryCatch({ 107 | conv.extension <- ".pathview.pdf" 108 | extension <- "aux.pathview.png" 109 | outfile <- file.path(getPath, paste0(pathway.id,extension)) 110 | animation::ani.options('autobrowse'=FALSE) 111 | animation::im.convert(file.path(getPath, paste0(pathway.id,conv.extension)), output = outfile, extra.opts="-density 150") 112 | }, error = function(e) { 113 | createAlert(session, "pathviewmessage", "pathviewAlert", title = "Error", style = "warning", 114 | content = "I couldn't convert the pdf to png.", append = FALSE) 115 | print(e) 116 | }) 117 | } 118 | # Return a list containing the filename 119 | list(src = outfile, 120 | contentType = 'image/png', 121 | width = input$pathwaygraphwidth, 122 | height = input$pathwaygraphheight, 123 | alt = "File not found") 124 | }, deleteFile = FALSE) 125 | 126 | }) 127 | -------------------------------------------------------------------------------- /inst/app/ui/config.R: -------------------------------------------------------------------------------- 1 | tabItem(tabName = "config", 2 | fluidRow( 3 | column(1), 4 | column(8, 5 | box(title = "Configuration options", width = NULL, 6 | status = "danger", 7 | solidHeader = FALSE, collapsible = FALSE, 8 | column(3, 9 | bsTooltip("workingDir", "Select where to save outputs","left"), 10 | shinyDirButton('workingDir', 'Set working directory', 'Set working directory', 11 | class='shinyDirectories btn-default'), 12 | downloadButton('downloadDataBut', 'Download', class = "butt2"), 13 | # making the font italics this time 14 | tags$head(tags$style(".butt2{background-color:navy;} .butt2{color: white;} .butt2{width: 100%;} .butt2{margin-top: 11pt;} .butt2{border-radius: 5px;}")) 15 | ), 16 | column(9, verbatimTextOutput("wd"), 17 | shinyFilesButton('downloadfile', 'Select file to download', 'Select file to download', 18 | multiple = FALSE)) 19 | ) 20 | ) 21 | ) 22 | ) 23 | -------------------------------------------------------------------------------- /inst/app/ui/dea.R: -------------------------------------------------------------------------------- 1 | tabItem(tabName = "dea", 2 | fluidRow( 3 | column(8, bsAlert("deamessage"), 4 | bsCollapse(id = "collapsedea", open = "Genes info", 5 | bsCollapsePanel("Genes info", DT::dataTableOutput('deaSE'), style = "default") 6 | )), 7 | column(4, 8 | box(title = "DEA analysis",width = NULL, 9 | status = "danger", 10 | solidHeader = FALSE, collapsible = TRUE, collapsed = FALSE, 11 | box(title = "Data",width = NULL, 12 | solidHeader = TRUE, collapsible = TRUE, collapsed = FALSE, 13 | shinyFilesButton('deafile', 14 | 'Select SummarizedExperiment', 15 | 'Please select SummarizedExperiment object', 16 | multiple = FALSE)), 17 | box(title = "Pre-analysis options",width = NULL, 18 | solidHeader = TRUE, collapsible = TRUE, collapsed = TRUE, 19 | checkboxInput("deanormalization", "Normalization of genes?", value = FALSE, width = NULL), 20 | useShinyjs(), 21 | selectizeInput('deanormalizationmet', 22 | "Normalization of genes method", 23 | choices = c("gcContent","geneLength"), 24 | multiple = FALSE), 25 | checkboxInput("deafilter", "Quantile filter of genes?", value = FALSE, width = NULL), 26 | selectizeInput('deafilteringmet', 27 | "DEA test method", 28 | choices = c("quantile","varFilter","filter1","filter2"), 29 | multiple = FALSE), 30 | numericInput("deafilteringcut", "Threshold selected as mean for filtering", 31 | min = 0, max = 1, value = 0.25, step = 0.1) 32 | ), 33 | box(title = "Analysis parameter",width = NULL, 34 | solidHeader = TRUE, collapsible = TRUE, collapsed = TRUE, 35 | numericInput("deathrsld", "Log FC threshold", 36 | min = 0, max = 100, value = 0, step = 0.5), 37 | numericInput("deapvalue", "P-value adj cut-off", 38 | min = 0, max = 1, value = 0.05, step = 0.001), 39 | selectizeInput('deagroupCol', 40 | "Group column", 41 | choices = NULL, multiple = FALSE), 42 | selectizeInput('deagroup1', 43 | "Group 1", 44 | choices = NULL, multiple = FALSE), 45 | selectizeInput('deagroup2', 46 | "Group 2", 47 | choices = NULL, multiple = FALSE), 48 | selectizeInput('deamethod', 49 | "DEA test method", 50 | choices = c("glmLRT","exactTest"), 51 | multiple = FALSE), 52 | actionButton("deaAnalysis", 53 | "dea analysis", 54 | style = "background-color: #000080; 55 | color: #FFFFFF; 56 | margin-left: auto; 57 | margin-right: auto; 58 | width: 100%", 59 | icon = icon("flask"))) 60 | ) 61 | ) 62 | ) 63 | ) 64 | -------------------------------------------------------------------------------- /inst/app/ui/dmr.R: -------------------------------------------------------------------------------- 1 | tabItem(tabName = "dmr", 2 | 3 | fluidRow( 4 | column(8, bsAlert("dmrmessage"), 5 | bsCollapse(id = "collapseDmr", open = "DMR plots", 6 | bsCollapsePanel("Probes info", DT::dataTableOutput('probesSE'), style = "default"))), 7 | column(4, 8 | box(title = "DMR analysis",width = NULL, 9 | status = "danger", 10 | solidHeader = FALSE, collapsible = FALSE, 11 | box(title = "Data",width = NULL, 12 | solidHeader = TRUE, collapsible = TRUE, 13 | bsTooltip('dmrfile', "A summarized Experiment with DNA methylation array data", "left"), 14 | shinyFilesButton('dmrfile', 'Select data (.rda)', 'Please select SummarizedExperiment object', 15 | multiple = FALSE)), 16 | box(title = "Parameters control",width = NULL, 17 | solidHeader = TRUE, collapsible = TRUE, collapsed = TRUE, 18 | sliderInput("dmrcores", "Cores",step=1, 19 | min = 1, max = parallel::detectCores(), value = 1), 20 | bsTooltip("dmrcores", "Number of CPU cores used to parallelize the code", "left"), 21 | selectizeInput('dmrPvalues', 22 | "Probes to calculate p-values?", 23 | choices = c("differential","all"), multiple = FALSE), 24 | bsTooltip("dmrPvalues", 25 | "All: calculete p-values for all probes (slower). Differential: calculate p-values for probes with a difference of mean DNA methylation higher than the threshold (faster)", 26 | "left"), 27 | numericInput("dmrthrsld", "DNA methylation threshold", 28 | min = 0, max = 1, value = 0.1, step = 0.05), 29 | numericInput("dmrpvalue", "P-value adj cut-off", 30 | min = 0, max = 1, value = 0.05, step = 0.001), 31 | bsTooltip("dmrgroupCol", "Sample matrix column in the SummarizedExperiment that identifies the group of each samples", "left"), 32 | selectizeInput('dmrgroupCol', 33 | "Group column", 34 | choices = NULL, multiple = FALSE), 35 | selectizeInput('dmrgroups', 36 | "Groups", 37 | choices = NULL, multiple = TRUE)), 38 | bsTooltip("dmrgroupCol", "Groups from the Sample matrix column to be compared", "left"), 39 | actionButton("dmrAnalysis", 40 | "DMR analysis", 41 | style = "background-color: #000080; 42 | color: #FFFFFF; 43 | margin-left: auto; 44 | margin-right: auto; 45 | width: 100%", 46 | icon = icon("flask")), 47 | bsTooltip("dmrAnalysis", "This might take from hours up to days", "left")) 48 | ) 49 | ) 50 | ) 51 | -------------------------------------------------------------------------------- /inst/app/ui/dnametidat.R: -------------------------------------------------------------------------------- 1 | tabItem(tabName = "dnametidat", 2 | fluidRow( 3 | column(8, bsAlert("idatAlert"), 4 | bsCollapse(id = "collapseIdat", open = "Samples identified", 5 | bsCollapsePanel("Samples identified", DT::dataTableOutput('idattbl'), style = "default") 6 | )), 7 | column(4, 8 | box(title = "IDAT normalization",width = NULL, 9 | status = "danger", 10 | solidHeader = FALSE, collapsible = FALSE, 11 | shinyDirButton('IDATfolder', 'Select idat folder', 'Please select a folder', TRUE), 12 | tags$hr(), 13 | textInput("idatfilename", label = "Filename", value = "normalizedIdatSE_450K_hg38.rda"), 14 | bsTooltip("idatfilename", "Extensions: csv (flat table) or rda (summarized Experiment)", 15 | "left"), 16 | selectizeInput('IDATplatform', 17 | 'DNA methylation platform', 18 | c( "450K" = "450K", 19 | "27K" = "27K", 20 | "EPIC" = "EPIC" 21 | ), 22 | multiple = FALSE), 23 | selectizeInput('IDATgenome', 24 | 'Genome of reference to annotate probes', 25 | c( "hg38" = "hg38", 26 | "hg19" = "hg19" 27 | ), 28 | multiple = FALSE), 29 | actionButton("idatnormalize", 30 | "Normalize and save", 31 | style = "background-color: #000080; 32 | color: #FFFFFF; 33 | margin-left: auto; 34 | margin-right: auto; 35 | width: 100%", 36 | icon = icon("flask")), 37 | tags$hr(), 38 | downloadButton('idatdownloadDataBut', 'Download normalized results', 39 | style = "background-color: #000080; 40 | color: #FFFFFF; 41 | margin-left: auto; 42 | margin-right: auto; 43 | width: 100%") 44 | ) 45 | ) 46 | ) 47 | ) 48 | -------------------------------------------------------------------------------- /inst/app/ui/ea.R: -------------------------------------------------------------------------------- 1 | tabItem(tabName = "ea", 2 | fluidRow( 3 | column(8, 4 | bsAlert("eamessage"), 5 | bsCollapse(id = "collapseEA", open = "EA plots", 6 | bsCollapsePanel("EA plots", uiOutput("eaPlot"), style = "default"))), 7 | column(4, 8 | box(title = "EA analysis",width = NULL, 9 | status = "danger", 10 | solidHeader = FALSE, collapsible = FALSE, 11 | box(title = "Gene selection",width = NULL, 12 | solidHeader = TRUE, collapsible = TRUE,collapsed = FALSE, 13 | radioButtons("tcgaEaInputRb", "Genes by:", 14 | c("Selection"="Selection", 15 | "Text"="text", 16 | "File"="file")), 17 | bsTooltip("eaGenesTextArea", "Genes separeted by (;), (,) or (new line)", 18 | "left"), 19 | useShinyjs(), 20 | inputTextarea('eaGenesTextArea', '', 2, 30), 21 | selectizeInput('eagenes', 22 | "Genes", 23 | choices = NULL, 24 | multiple = TRUE), 25 | bsTooltip("eaGenesFiles", "Expecting a column Gene_symbol or mRNA in the file (csv,txt,rda). If it is the DEA_results files, it will ignore the insignificant genes", 26 | "left"), 27 | shinyFilesButton('eaGenesFiles', 'Select file with genes', 'Please select a file with genes', multiple = FALSE)), 28 | box(title = "Parameters control",width = NULL, 29 | solidHeader = TRUE, collapsible = TRUE, collapsed = TRUE, 30 | numericInput("eaSizeText", "Size of the text", 31 | step=0.1, min = 0.1, max = 3, value = 1), 32 | numericInput("eaxlim", "X upper limit", 33 | step=1, min = 0, max = 50, value = 0), 34 | sliderInput("nBar", "Number of bar histogram to show", 35 | step=1, min = 1, max = 20, value = 10)), 36 | box(title = "Plot selection",width = NULL, 37 | solidHeader = TRUE, collapsible = TRUE, collapsed = TRUE, 38 | checkboxInput("eaPlotBPCB", " Plot biological process?", value = TRUE, width = NULL), 39 | checkboxInput("eaPlotCCCB", " Plot Cellular Component?", value = TRUE, width = NULL), 40 | checkboxInput("eaPlotMFCB", " Plot Molecular function?", value = TRUE, width = NULL), 41 | checkboxInput("eaPlotPatCB", " Plot Pathways?", value = TRUE, width = NULL)), 42 | box(title = "Colors control",width = NULL, 43 | solidHeader = TRUE, collapsible = TRUE, collapsed = TRUE, 44 | colourpicker::colourInput("colBP", "Biological Process", value = "orange"), 45 | colourpicker::colourInput("colCC", "Cellular Component color", value = "cyan"), 46 | colourpicker::colourInput("colMF", "Molecular function color", value = "green"), 47 | colourpicker::colourInput("colPat", "Pathways color", value = "yellow")), 48 | box(title = "Size control",width = NULL, 49 | solidHeader = TRUE, collapsible = TRUE, collapsed = TRUE, 50 | sliderInput("eawidth", "Plot Width (%)", min = 0, max = 100, value = 100), 51 | sliderInput("eaheight", "Plot Height (px)", min = 0, max = 1000, value = 800)), 52 | actionButton("eaplot", 53 | "EA barplot", 54 | style = "background-color: #000080; 55 | color: #FFFFFF; 56 | margin-left: auto; 57 | margin-right: auto; 58 | width: 100%", 59 | icon = icon("picture-o")), 60 | downloadButton('saveeapicture', 'Export figure', class = "butt2"), 61 | textInput("eaPlot.filename", label = "Filename", value = "enrichmentAnalysis.pdf"), 62 | bsTooltip("eaPlot.filename", "Filename (pdf, png, svg)", "left") 63 | ) 64 | ) 65 | ) 66 | ) 67 | -------------------------------------------------------------------------------- /inst/app/ui/elmer_input.R: -------------------------------------------------------------------------------- 1 | tabItem(tabName = "elmerinput", 2 | fluidRow( 3 | column(8, bsAlert("elmerinputmessage"), 4 | bsCollapse(id = "collapseelmerinput", open = "Enhancer Linking by Methylation/Expression Relationship (ELMER) ", 5 | bsCollapsePanel("Enhancer Linking by Methylation/Expression Relationship (ELMER) ", includeHTML("elmer.html"), style = "default"), 6 | bsCollapsePanel("Sample mapping matrix", DT::dataTableOutput('elmerMaeSampleMapping'), style = "default"), 7 | bsCollapsePanel("Sample metadata", DT::dataTableOutput('elmerMaeSampleMetada'), style = "default")) 8 | ), 9 | column(4, 10 | box(title = "Input - Create MAE object", width = NULL, 11 | status = "danger", 12 | solidHeader = FALSE, collapsible = FALSE,collapsed = FALSE, 13 | box(title = "DNA methylation", width = NULL, 14 | solidHeader = TRUE, collapsible = FALSE,collapsed = FALSE, 15 | shinyFilesButton('elmermetfile', 'Select DNA methylation object', 'Please select DNA methylation object', 16 | multiple = FALSE), 17 | bsTooltip("elmermetfile", "An R object (.rda) with DNA methylation data from HM450K platform (data frame or summarized experiment)", 18 | "left"), 19 | selectizeInput('elmerInputMetPlatform', 20 | "Experiment group", 21 | choices=c("450K","EPIC"), 22 | multiple = FALSE), 23 | numericInput("elmermetnacut", "DNA methylation: Cut-off NA samples (%)", 24 | min = 0, max = 1, value = 0.2, step = 0.1), 25 | bsTooltip("elmermetnacut", "By default, for the DNA methylation data will remove probes with NA values in more than 20% samples and remove the anottation data.", 26 | "left") 27 | ), box(title = "Gene expression data", width = NULL, 28 | solidHeader = TRUE, collapsible = FALSE,collapsed = FALSE, 29 | shinyFilesButton('elmerexpfile', 'Select gene expression object', 'Please select gene expression object', 30 | multiple = FALSE), 31 | bsTooltip("elmerexpfile", "An R object (.rda) with a gene expression object (data frame or summarized experiment)", 32 | "left"), 33 | checkboxInput("elmerInputLinearizeExp", "Linearize gene expression values ?", value = FALSE, width = NULL), 34 | bsTooltip("elmerInputLinearizeExp", "This will take the log2 of gene expression to linearize the with DNA methylation","left") 35 | ), box(title = "Genome", width = NULL, 36 | solidHeader = TRUE, collapsible = FALSE,collapsed = FALSE, 37 | selectizeInput('elmerInputGenome', 38 | "Human reference genome", 39 | choices=c("GRCh38 (hg38)"="hg38","GRCh37 (hg19)"="hg19"), 40 | multiple = FALSE) 41 | ), box(title = "Annotation", width = NULL, 42 | solidHeader = TRUE, collapsible = FALSE,collapsed = FALSE, 43 | checkboxInput("elmerInputTCGA", "Is TCGA data ?", value = TRUE, width = NULL), 44 | bsTooltip("elmerInputTCGA", "If checked we will automatically map each of the matrix (DNA methylation and gene expression) to the samples", 45 | "left"), 46 | downloadButton('elmerInputSampleMapDownload', 'Download sample map example TSV'), 47 | tags$br(), 48 | tags$br(), 49 | fileInput('elmerInputSampleMapFile', 'Select a tsv file with sample mapping', 50 | accept = c( 51 | 'text/csv', 52 | 'text/comma-separated-values', 53 | 'text/tab-separated-values', 54 | '.tsv', 55 | ".csv" 56 | ) 57 | ), 58 | downloadButton('elmerInputpDataDownload', 'Download sample metadata example TSV'), 59 | tags$br(), 60 | tags$br(), 61 | fileInput('elmerInputpDataFile', 'Select a tsv file with sample metadata', 62 | accept = c( 63 | 'text/csv', 64 | 'text/comma-separated-values', 65 | 'text/tab-separated-values', 66 | '.tsv', 67 | ".csv" 68 | ) 69 | ) 70 | ), 71 | textInput("maesavefilename", "Save as:", value = "ELMER_input.rda", width = NULL, placeholder = NULL), 72 | actionButton("elmercreatemae", 73 | "Create MAE object", 74 | style = "background-color: #000080; 75 | color: #FFFFFF; 76 | margin-left: auto; 77 | margin-right: auto; 78 | width: 100%", 79 | icon = icon("floppy-o")) 80 | 81 | ) 82 | ) 83 | ) 84 | ) 85 | -------------------------------------------------------------------------------- /inst/app/ui/elmer_results.R: -------------------------------------------------------------------------------- 1 | tabItem(tabName = "elmerresults", 2 | fluidRow( 3 | column(8, bsAlert("elmermessageresults"), 4 | bsCollapse(id = "collapelmerresults", open = "Plots", 5 | bsCollapsePanel("Results table", DT::dataTableOutput('elmerResult'), style = "default"), 6 | bsCollapsePanel("Plots", uiOutput("elmerPlot"), style = "default"))), 7 | column(4, 8 | box(title = "Analysis", width = NULL, 9 | status = "danger", 10 | solidHeader = FALSE, collapsible = TRUE,collapsed = FALSE, 11 | box(title = "Data", width = NULL, 12 | solidHeader = TRUE, collapsible = TRUE, collapsed = FALSE, 13 | shinyFilesButton('elmerresultsfile', 'Select results', 'Please select results object', 14 | multiple = FALSE), 15 | bsTooltip("elmerresultsfile", "An R object (.rda) with ELMER results (output from ELMER analysis menu)", 16 | "left") 17 | ), 18 | box(title = "Plots", width = NULL, 19 | solidHeader = TRUE, collapsible = TRUE, collapsed = TRUE, 20 | box(title = "Type selection", width = NULL, 21 | solidHeader = TRUE, collapsible = TRUE, collapsed = FALSE, 22 | selectizeInput("elmerPlotType", "Type of plot:", 23 | c("Volcano plot"= "volcano.plot", 24 | "Heatmap pairs"= "heatmap.plot", 25 | "Motif enrichment plot"="motif.enrichment.plot", 26 | "TF ranking plot"="ranking.plot", 27 | "Scatter plots"="scatter.plot", 28 | "Schematic Plot"= "schematic.plot" 29 | ), 30 | multiple = FALSE), 31 | #sliderInput("motif.enrichment.plot.or", "OR", min = 1, max = 20, value = 20), 32 | #sliderInput("motif.enrichment.plot.lowerOR", "OR", min = 1, max = 20, value = 1.1), 33 | #sliderInput("motif.enrichment.plot.nbprobes", "NumOfProbes", min = 1, max = 50, value = 10), 34 | selectizeInput("ranking.plot.motif", "Enriched motif:", 35 | NULL, 36 | multiple = FALSE), 37 | selectizeInput("ranking.plot.tf", "Highlight TF:", 38 | NULL, 39 | multiple = TRUE), 40 | radioButtons("schematic.plot.type", "Schematic plot by:", 41 | c("Genes"="genes", 42 | "Probes"="probes")), 43 | selectizeInput("schematic.plot.genes", "Genes:", 44 | NULL, 45 | multiple = FALSE), 46 | selectizeInput("schematic.plot.probes", "Probes:", 47 | NULL, 48 | multiple = FALSE), 49 | selectizeInput("elmer.heatmap.annotations", "Annotations:", 50 | NULL, 51 | multiple = TRUE), 52 | radioButtons("scatter.plot.type", "Scatter plot by:", 53 | c("By TF"="tf", 54 | "By Probes"="probes", 55 | "By Pair"="pair")), 56 | selectizeInput("scatter.plot.genes", "Genes:", 57 | NULL, 58 | multiple = FALSE), 59 | checkboxInput("motif.enrichment.plot.summary","Add summary table",FALSE), 60 | sliderInput("scatter.plot.nb.genes", "Number of genes", min = 1, max = 20, value = 20), 61 | selectizeInput("scatter.plot.probes", "Probes:", 62 | NULL, 63 | multiple = FALSE), 64 | selectizeInput("scatter.plot.tf", "TF:", 65 | NULL, 66 | multiple = TRUE), 67 | selectizeInput("scatter.plot.motif", "Sites with motif:", 68 | NULL, 69 | multiple = FALSE), 70 | numericInput("motif.enrichment.plot.or", "OR cut-off", min = 1, max = 5, value = 1.3, step = 0.1), 71 | numericInput("motif.enrichment.plot.loweror", "lower OR cut-off", min = 1, max = 5, value = 1.1,step = 0.1) 72 | ), 73 | box(title = "Size control", width = NULL, 74 | solidHeader = TRUE, collapsible = TRUE, collapsed = TRUE, 75 | sliderInput("elmerwidth", "Plot Width (%)", min = 0, max = 100, value = 100), 76 | sliderInput("elmerheight", "Plot Height (px)", min = 0, max = 1200, value = 800)), 77 | actionButton("elmerPlotBt", 78 | "Plot", 79 | style = "background-color: #000080; 80 | color: #FFFFFF; 81 | margin-left: auto; 82 | margin-right: auto; 83 | width: 100%", 84 | icon = icon("picture-o")), 85 | downloadButton('saveelmerpicture', 'Export figure', class = "butt2"), 86 | textInput("elmerPlot.filename", label = "Filename", value = "elmer_plot.pdf"), 87 | bsTooltip("elmerPlot.filename", "Filename (pdf, png, svg)", "left") 88 | ), 89 | box(title = "Results table", width = NULL, 90 | solidHeader = TRUE, collapsible = TRUE, collapsed = TRUE, 91 | selectizeInput("elmerTableType", "Table to show:", 92 | c("Signigicant probes"="sigprobes", 93 | "Pair probe/gene"="pair", 94 | "Enriched motifs"="motif", 95 | "Regulatory TFs"="tf" 96 | ), 97 | multiple = FALSE)) 98 | ) 99 | ) 100 | ) 101 | ) 102 | -------------------------------------------------------------------------------- /inst/app/ui/getclinical.R: -------------------------------------------------------------------------------- 1 | tabItem(tabName = "tcgaClinical", 2 | fluidRow( 3 | column(8, bsAlert("tcgaClinicalmessage"), 4 | bsCollapse(id = "collapseTCGAClinical", open = "Description of the data", 5 | bsCollapsePanel("Description of the data", includeHTML("clinical_help.html"), style = "default"), 6 | bsCollapsePanel("Clinical data", DT::dataTableOutput('tcgaClinicaltbl'), style = "default") 7 | )), 8 | column(4, 9 | box(title = "Clinical data search",width = NULL, 10 | status = "danger", 11 | solidHeader = FALSE, collapsible = FALSE, 12 | selectizeInput('tcgatumorClinicalFilter', 13 | 'Tumor filter', 14 | NULL, 15 | multiple = FALSE), 16 | checkboxInput("clinicalIndexed", "Indexed data ?", value = TRUE, width = NULL), 17 | bsTooltip("clinicalIndexed", "The indexed data is a subset of the patient data updated with the last follow up. It does not have drug, radiation and other information, for that please use the XML data (not indexed)", 18 | "left"), 19 | selectizeInput('tcgaClinicalTypeFilter', 20 | 'Clinical file type filter', 21 | c("biospecimen", "clinical"), 22 | multiple = FALSE), 23 | useShinyjs(), 24 | selectizeInput('tcgaClinicalFilter', 25 | 'Clinical information filter', 26 | c("drug", "admin", "follow_up", "radiation", "patient", "stage_event", "new_tumor_event"), 27 | multiple = FALSE), 28 | bsTooltip("saveClinicalRda", "A Rda file stores a single R object (can only be openned in R)","left"), 29 | checkboxInput("saveClinicalRda", "Save result as R object (Rdata) ?", value = FALSE, width = NULL), 30 | checkboxInput("saveClinicalCsv", "Save result as csv ?", value = FALSE, width = NULL), 31 | actionButton("tcgaClinicalBt", 32 | "Search", 33 | style = "background-color: #000080; 34 | color: #FFFFFF; 35 | margin-left: auto; 36 | margin-right: auto; 37 | width: 100%", 38 | icon = icon("search"))) 39 | ) 40 | ) 41 | ) 42 | -------------------------------------------------------------------------------- /inst/app/ui/getinference.R: -------------------------------------------------------------------------------- 1 | tabItem(tabName = "netinf", 2 | fluidRow( 3 | column(8, bsAlert("networkmessage"), 4 | bsCollapse(id = "collapseTCGAnetwork", open = "Top-scoring edges", 5 | bsCollapsePanel("Top-scoring edges", DT::dataTableOutput('tcgaNetworktbl'), style = "default") 6 | )), 7 | column(4, 8 | box(title = "Network inference",width = NULL, 9 | status = "danger", 10 | solidHeader = FALSE, collapsible = TRUE, collapsed = FALSE, 11 | box(title = "Data",width = NULL, 12 | solidHeader = TRUE, collapsible = TRUE, collapsed = FALSE, 13 | shinyFilesButton('networkfile', 'Select file', 14 | 'Please select the summarized experiment file', 15 | multiple = FALSE) 16 | ), 17 | box(title = "Inference algorithm",width = NULL, 18 | solidHeader = TRUE, collapsible = TRUE, collapsed = FALSE, 19 | 20 | radioButtons("networkInferenceMethodRb", NULL, 21 | c("ARACNE"="aracne", 22 | "C3NET"="c3net", 23 | "CLR"= "clr", 24 | "MRNET"="mrnet") 25 | ) 26 | 27 | ), 28 | actionButton("networkBt", 29 | "Network inference", 30 | style = "background-color: #000080; 31 | color: #FFFFFF; 32 | margin-left: auto; 33 | margin-right: auto; 34 | width: 100%", 35 | icon = icon("picture-o") 36 | ) 37 | ) 38 | ) 39 | ) 40 | ) 41 | -------------------------------------------------------------------------------- /inst/app/ui/getmutation.R: -------------------------------------------------------------------------------- 1 | tabItem(tabName = "tcgaMutation", 2 | fluidRow( 3 | column(8, bsAlert("tcgaMutationmessage"), 4 | bsCollapse(id = "collapseTCGAMutation", open = "Mutation data", 5 | bsCollapsePanel("Mutation data",div(DT::dataTableOutput("tcgaMutationtbl"), style = "font-size: 90%;"), style = "default") 6 | )), 7 | column(4, 8 | box(title = "Mutatation data search",width = NULL, 9 | status = "danger", 10 | solidHeader = FALSE, collapsible = FALSE, 11 | selectizeInput('tcgaMafTumorFilter', 12 | 'Tumor filter', 13 | NULL, 14 | multiple = FALSE), 15 | selectizeInput('tcgaMafPipeline', 16 | 'Variant calling pipelines', 17 | choices = c("muse"="muse", 18 | "somaticsniper"="somaticsniper", 19 | "mutect"="mutect", 20 | "varscan2"="varscan2"), 21 | multiple = FALSE), 22 | checkboxInput("saveMafcsv", "Save MAF as csv?", value = TRUE, width = NULL), 23 | actionButton("tcgaMafSearchBt", 24 | "Download", 25 | style = "background-color: #000080; 26 | color: #FFFFFF; 27 | margin-left: auto; 28 | margin-right: auto; 29 | width: 100%", 30 | icon = icon("download"))) 31 | )) 32 | ) 33 | -------------------------------------------------------------------------------- /inst/app/ui/getsubtype.R: -------------------------------------------------------------------------------- 1 | tabItem(tabName = "tcgaSubtype", 2 | fluidRow( 3 | column(8, bsAlert("tcgaSubtypemessage"), 4 | bsCollapse(id = "collapseTCGASubtype", 5 | bsCollapsePanel("Subtype data: Summary", 6 | htmltools::div(style = "display:block;text-align: center;", plotlyOutput("subtypeview", width = 500, height = 500)), 7 | style = "default"), 8 | bsCollapsePanel("Subtype data: results", DT::dataTableOutput('tcgaSubtypetbl'), style = "default") 9 | )), 10 | column(4, 11 | box(title = "Subtype data search",width = NULL, 12 | status = "danger", 13 | solidHeader = FALSE, collapsible = FALSE, 14 | selectizeInput('tcgasubtypeFilter', 15 | 'Tumor filter', 16 | c("Adrenocortical carcinoma (TCGA-ACC)"="acc", 17 | "Breast invasive carcinoma (TCGA-BRCA)"="brca", 18 | "Colon adenocarcinoma (TCGA-COAD)"="coad", 19 | "Glioblastoma multiforme (TCGA-GBM)"="gbm", 20 | "Head and Neck squamous cell carcinoma (TCGA-HNSC)"="hnsc", 21 | "Kidney Chromophobe (TCGA-KICH)"="kich", 22 | "Kidney renal papillary cell carcinoma (TCGA-KIRP)"="kirp", 23 | "Kidney renal clear cell carcinoma (TCGA-KIRC)"="kirc", 24 | "Brain Lower Grade Glioma (TCGA-LGG)"="lgg", 25 | "Lung adenocarcinoma (TCGA-LUAD)"="luad", 26 | "Lung squamous cell carcinoma (TCGA-LUSC)"="lusc", 27 | "Prostate adenocarcinoma (TCGA-PRAD)"="prad", 28 | "Pheochromocytoma and Paraganglioma (TCGA-PCPG)"="pcpg", 29 | "pancan"="pancan", 30 | "Rectum adenocarcinoma (TCGA-READ)"="read", 31 | "Skin Cutaneous Melanoma (TCGA-SKCM)"="skcm", 32 | "Stomach adenocarcinoma (TCGA-STAD)"="stad", 33 | "Thyroid carcinoma (TCGA-THCA)"="thca", 34 | "Uterine Corpus Endometrial Carcinoma (TCGA-UCEC)"="ucec"), 35 | multiple = FALSE), 36 | bsTooltip("saveSubtypeRda", "A Rda file stores a single R object (can only be openned in R)","left"), 37 | checkboxInput("saveSubtypeRda", "Save result as rda?", value = FALSE, width = NULL), 38 | checkboxInput("saveSubtypeCsv", "Save result as csv?", value = FALSE, width = NULL), 39 | actionButton("tcgaSubtypeBt", 40 | "Search", 41 | style = "background-color: #000080; 42 | color: #FFFFFF; 43 | margin-left: auto; 44 | margin-right: auto; 45 | width: 100%", 46 | icon = icon("search")), 47 | selectizeInput('subtypePlotCol', 48 | 'Column to plot', 49 | NULL, 50 | multiple = FALSE) 51 | ) 52 | )) 53 | ) 54 | -------------------------------------------------------------------------------- /inst/app/ui/gliomaclassifier.R: -------------------------------------------------------------------------------- 1 | tabItem(tabName = "gliomaclassifier", 2 | fluidRow( 3 | column(8, bsAlert("gliomaAlert"), 4 | bsCollapse(id = "collapsegliomaClassifier", open = "Classification", 5 | bsCollapsePanel("Classification", DT::dataTableOutput('gliomatbl'), style = "default") 6 | )), 7 | column(4, 8 | box(title = "Glioma classification",width = NULL, 9 | status = "danger", 10 | solidHeader = FALSE, collapsible = FALSE, 11 | shinyFilesButton(id = 'classifyObj', 12 | label = 'Select DNA methylation (.rda) file', 13 | title = 'Please select a DNA methylation (.rda) file', 14 | multiple = FALSE), 15 | tags$br(), 16 | tags$hr(), 17 | checkboxInput("gliomaClassifierProb", "Show all probabilities predictions", FALSE), 18 | tags$hr(), 19 | actionButton("gliomaClassify", 20 | "Classify into gliomas molecular subtypes", 21 | style = "background-color: #000080; 22 | color: #FFFFFF; 23 | margin-left: auto; 24 | margin-right: auto; 25 | width: 100%", 26 | icon = icon("flask")) 27 | ))) 28 | ) 29 | -------------------------------------------------------------------------------- /inst/app/ui/heatmap.R: -------------------------------------------------------------------------------- 1 | tabItem(tabName = "heatmap", 2 | 3 | fluidRow( 4 | column(8, bsAlert("heatmapmessage"), 5 | bsCollapse(id = "collapseHeatmap", open = "Heatmap", 6 | bsCollapsePanel("Heatmap", 7 | #busyIndicator("Rendering in progress...",wait = 10000), 8 | uiOutput("heatmapPlot"), style = "default"))), 9 | column(4, 10 | box(title = "Heatmap",width = NULL, 11 | status = "danger", 12 | solidHeader = FALSE, collapsible = FALSE, 13 | box(title = "Data",width = NULL, 14 | solidHeader = TRUE, collapsible = TRUE, collapsed = FALSE, 15 | shinyFilesButton('heatmapfile', 'Select file', 16 | 'Please select SummarizedExperiment or data frame object', 17 | multiple = FALSE), 18 | tags$br(), 19 | tags$br(), 20 | shinyFilesButton('heatmapresultsfile', 'Select results', 'Please select object', 21 | multiple = FALSE)), 22 | box(title = "Type of heatmap",width = NULL, 23 | solidHeader = TRUE, collapsible = TRUE, collapsed = TRUE, 24 | 25 | radioButtons("heatmapTypeInputRb", NULL, 26 | c("DNA methylation"="met", 27 | "Gene expression"="exp"),selected = "met") 28 | ), 29 | box(title = "Genes/Probes selection",width = NULL, 30 | solidHeader = TRUE, collapsible = TRUE, collapsed = TRUE, 31 | 32 | useShinyjs(), 33 | radioButtons("heatmapProbesInputRb", "Select probes by:", 34 | c("Status"="Status", 35 | "Selection"="Selection", 36 | "Text"="text")), 37 | selectizeInput('heatmaprobes', 38 | "Probes", 39 | choices = NULL, 40 | multiple = TRUE), 41 | inputTextarea('heatmapProbesTextArea', '', 2, 30), 42 | checkboxInput("heatmap.hypoprobesCb", "Hypermethylatd probes", value = TRUE, width = NULL), 43 | checkboxInput("heatmap.hyperprobesCb", "Hypomethylated probes", value = TRUE, width = NULL), 44 | radioButtons("heatmapGenesInputRb", "Select genes by:", 45 | c("Status"="Status", 46 | "Selection"="Selection", 47 | "Text"="text")), 48 | selectizeInput('heatmagenes', 49 | "Genes", 50 | choices = NULL, 51 | multiple = TRUE), 52 | inputTextarea('heatmapGenesTextArea', '', 2, 30), 53 | checkboxInput("heatmap.upGenesCb", "Up regulated genes", value = TRUE, width = NULL), 54 | checkboxInput("heatmap.downGenewsCb", "Down regulated genes", value = TRUE, width = NULL)), 55 | box(title = "Annotations options",width = NULL, 56 | solidHeader = TRUE, collapsible = TRUE, collapsed = TRUE, 57 | selectizeInput('colmetadataheatmap', 58 | "Columns annotations", 59 | choices = NULL, multiple = TRUE), 60 | bsTooltip("colmetadataheatmap", "Add annotation from SummarizedExperiment into heatmap", "left"), 61 | checkboxInput("heatmap.sortCb", "Sort by column?", value = FALSE, width = NULL), 62 | selectizeInput('heatmapSortCol', 63 | "Sort by columns", 64 | choices = NULL, multiple = FALSE), 65 | selectizeInput('rowmetadataheatmap', 66 | "Rows annotations", 67 | choices = NULL, multiple = TRUE), 68 | checkboxInput("heatmap.show.row.names", "Show row names?", value = FALSE, width = NULL), 69 | checkboxInput("heatmap.show.col.names", "Show col names?", value = FALSE, width = NULL) 70 | ), 71 | box(title = "Text options",width = NULL, 72 | solidHeader = TRUE, collapsible = TRUE, collapsed = TRUE, 73 | textInput("heatmapMain", label = "Title", value = "Heatmap"), 74 | textInput("heatmapLabel", label = "Values label", value = "Values") 75 | ), 76 | box(title = "Color options",width = NULL, 77 | solidHeader = TRUE, collapsible = TRUE, collapsed = TRUE, 78 | checkboxInput("heatmap.colorsCb", "Set colors?", value = FALSE, width = NULL), 79 | colourpicker::colourInput("heatmapcolMax", "Max level", value = "red"), 80 | colourpicker::colourInput("heatmapcolMid", "Mid level", value = "black"), 81 | colourpicker::colourInput("heatmapcolMin", "Min level", value = "green"), 82 | checkboxInput("heatmap.extremesCb", "Set extremes?", value = FALSE, width = NULL), 83 | numericInput("heatmapExtremeMax", "Max Level extreme", 84 | min = -1000000, max = 10000000, value = 0, step = 1), 85 | numericInput("heatmapExtremeMid", "Mid Level extreme", 86 | min = -1000000, max = 10000000, value = 0, step = 1), 87 | numericInput("heatmapExtremeMin", "Min Level extreme", 88 | min = -1000000, max = 10000000, value = 0, step = 1) 89 | ), 90 | box(title = "Clustering and transformation",width = NULL, 91 | solidHeader = TRUE, collapsible = TRUE, collapsed = TRUE, 92 | selectizeInput('heatmapScale', 93 | "Scale data", 94 | choices = c("none","row","col"),selected = "none", multiple = FALSE), 95 | bsTooltip("heatmapScale", "col: scale and center columns (samples); row: scale and center rows (genes)", "left"), 96 | checkboxInput("heatmaplog2_plus_one", "Take the log2(matrix + 1)?", value = FALSE, width = NULL), 97 | bsTooltip("heatmaplog2_plus_one", "This will plot log2(expression data + 1). This is not used for DNA methylation hetmaps.", "left"), 98 | checkboxInput("heatmap.clusterrows", "Cluster rows?", value = FALSE, width = NULL), 99 | checkboxInput("heatmap.clustercol", "Cluster columns?", value = FALSE, width = NULL)), 100 | box(title = "Size control",width = NULL, 101 | solidHeader = TRUE, collapsible = TRUE, collapsed = TRUE, 102 | sliderInput("heatmapwidth", "Plot Width (%)", min = 0, max = 100, value = 100), 103 | sliderInput("heatmapheight", "Plot Height (px)", min = 0, max = 1200, value = 1000), 104 | sliderInput("heatmapRownamesSize", "Row names size", min = 1, max = 18, value = 10) 105 | ), 106 | actionButton("heatmapPlotBt", 107 | "Heatmap plot", 108 | style = "background-color: #000080; 109 | color: #FFFFFF; 110 | margin-left: auto; 111 | margin-right: auto; 112 | width: 100%", 113 | icon = icon("picture-o")), 114 | downloadButton('saveheatmappicture', 'Export figure', class = "butt2"), 115 | textInput("heatmapPlot.filename", label = "Filename", value = "heatmap.pdf"), 116 | bsTooltip("heatmapPlot.filename", "Filename (pdf, png, svg)", "left") 117 | ) 118 | ) 119 | ) 120 | ) 121 | -------------------------------------------------------------------------------- /inst/app/ui/index.R: -------------------------------------------------------------------------------- 1 | tabItem(tabName = "welcome", 2 | fluidRow( 3 | column(1), 4 | column(8, 5 | includeHTML("index.html") 6 | )) 7 | ) 8 | -------------------------------------------------------------------------------- /inst/app/ui/maftools.R: -------------------------------------------------------------------------------- 1 | tabItem(tabName = "maftools", 2 | fluidRow( 3 | column(8, bsAlert("maftoolsmessage"), 4 | bsCollapse(id = "collapsemaftools", open = "Plots", 5 | bsCollapsePanel("Survival log rank test table", DT::dataTableOutput('maftoolsSurvivalTbl'), style = "default"), 6 | bsCollapsePanel("Plots", uiOutput("maftoolsplot"), style = "default") 7 | )), 8 | column(4, 9 | box(title = "Maftools Plot",width = NULL, 10 | status = "danger", 11 | solidHeader = FALSE, collapsible = FALSE, 12 | box(title = "Data",width = NULL, 13 | solidHeader = TRUE, collapsible = TRUE, collapsed = FALSE, 14 | shinyFilesButton('maffile2', 'Select MAF file', 'Please select a maf file', 15 | multiple = FALSE), 16 | tags$br(), 17 | tags$br(), 18 | shinyFilesButton('clinicalmaf', 'Select Clinical file', 'Please select a clinical file', 19 | multiple = FALSE) 20 | ), 21 | box(title = "Plot selection",width = NULL, 22 | solidHeader = TRUE, collapsible = TRUE, collapsed = TRUE, 23 | selectizeInput('maftoolsPlot', 24 | "Plot selection", 25 | choices = c("plotmafSummary"="plotmafSummary", 26 | "oncoplot"="oncoplot", 27 | "Transition and Transversions"="titv", 28 | "rainfallPlot"="rainfallPlot", 29 | "survivalPlot"="survivalPlot", 30 | "geneCloud"="geneCloud"), 31 | multiple = FALSE), 32 | numericInput("maftoolsTop", "Top n mutated genes", 33 | min = 1, max = 300, value = 10, step = 1), 34 | selectizeInput('maftoolsgene', 35 | "Specify gene", 36 | choices=NULL, 37 | multiple = FALSE), 38 | selectizeInput('maftoolstsb', 39 | "Specify sample name", 40 | choices=NULL, 41 | multiple = FALSE), 42 | numericInput("rainfallPlotps", "Point size", 43 | min = 0.1, max = 5, value = 0.6, step = 0.1), 44 | checkboxInput("maftoolsrmNonMutated", "Remove non mutated", value = TRUE, width = NULL) 45 | ), 46 | actionButton("maftoolsPlotBt", 47 | "Plot", 48 | style = "background-color: #000080; 49 | color: #FFFFFF; 50 | margin-left: auto; 51 | margin-right: auto; 52 | width: 100%", 53 | icon = icon("picture-o")), 54 | downloadButton('savemafpicture', 'Export figure', class = "butt2"), 55 | textInput("mafPlot.filename", label = "Filename", value = "maftools.pdf"), 56 | bsTooltip("mafPlot.filename", "Filename (pdf, png, svg)", "left"), 57 | box(title = "Table selection",width = NULL, 58 | solidHeader = TRUE, collapsible = TRUE, collapsed = TRUE, 59 | numericInput("maftoolsTopMutated", "Evaluate survival for top n mutated genes", 60 | min = 1, max = 300, value = 10, step = 1), 61 | actionButton("maftoolsTableBt", 62 | "Calculate", 63 | style = "background-color: #000080; 64 | color: #FFFFFF; 65 | margin-left: auto; 66 | margin-right: auto; 67 | width: 100%", 68 | icon = icon("picture-o")) 69 | ) 70 | 71 | ) 72 | ) 73 | ) 74 | ) 75 | -------------------------------------------------------------------------------- /inst/app/ui/manageSE.R: -------------------------------------------------------------------------------- 1 | tabItem(tabName = "seedit", 2 | fluidRow( 3 | column(8, bsAlert("seeditAlert"), 4 | bsCollapse(id = "collapseseeEdit", open = "Description of the data", 5 | bsCollapsePanel("Sample matrix", DT::dataTableOutput('seeditsampletb'), style = "default"), 6 | bsCollapsePanel("Feature matrix", DT::dataTableOutput('seeditfeaturetb'), style = "default"), 7 | bsCollapsePanel("Assay matrix", DT::dataTableOutput('seeditassaytb'), style = "default") 8 | )), 9 | column(4, 10 | box(title = "Editing summarized experiment",width = NULL, 11 | status = "danger", 12 | solidHeader = FALSE, collapsible = FALSE, 13 | box(title = "Data",width = NULL, 14 | solidHeader = TRUE, collapsible = TRUE, collapsed = FALSE, 15 | shinyFilesButton('seeditfile', 'Select Summarized Experiment file', 'Please select summarized experiment object (.rda)', multiple = FALSE) 16 | ), 17 | box(title = "Update sample matrix",width = NULL, 18 | solidHeader = TRUE, collapsible = TRUE, 19 | downloadButton('downloadData', 'Download sample data matrix'), 20 | tags$br(), 21 | tags$br(), 22 | fileInput('seuploadfile', 'Select a csv to update sample data matrix in the SE', 23 | accept = c( 24 | 'text/csv', 25 | 'text/comma-separated-values', 26 | 'text/tab-separated-values', 27 | 'text/plain', 28 | '.csv', 29 | '.rda' 30 | ) 31 | ), 32 | textInput("seeditfilename", "Save as:", value = "edited_se.rda", width = "100%", placeholder = "Name of the new SummarizedExperiment file (.rda)"), 33 | actionButton("seeditSEbt", 34 | "Save new Summarized Experiment (.rda) with the uploaded file", 35 | style = "background-color: #000080; 36 | color: #FFFFFF; 37 | margin-left: auto; 38 | margin-right: auto; 39 | width: 100%", 40 | icon = icon("floppy-o"))) 41 | ))) 42 | ) 43 | -------------------------------------------------------------------------------- /inst/app/ui/meanMet.R: -------------------------------------------------------------------------------- 1 | tabItem(tabName = "meanmet", 2 | 3 | fluidRow( 4 | column(8, bsAlert("meanmetmessage"), 5 | bsCollapse(id = "collapsemeanmet", open = "Mean DNA methylation plot", 6 | bsCollapsePanel("Mean DNA methylation plot", uiOutput("meanMetplot"), style = "default"))), 7 | column(4, 8 | box(title = "Mean DNA methylation",width = NULL, 9 | status = "danger", 10 | solidHeader = FALSE, collapsible = FALSE, 11 | box(title = "Data",width = NULL, 12 | solidHeader = TRUE, collapsible = TRUE, collapsed = FALSE, 13 | shinyFilesButton('meanmetfile', 'Select file', 'Please select SummarizedExperiment object', 14 | multiple = FALSE), 15 | bsTooltip("meanmetfile", "An R object (.rda) with a summarized experiment of DNA methylation", 16 | "left") 17 | ), 18 | box(title = "Parameters control",width = NULL, 19 | solidHeader = TRUE, collapsible = TRUE, collapsed = TRUE, 20 | selectizeInput('meanmetgroupCol', 21 | "Group column", 22 | choices = NULL, multiple = FALSE), 23 | bsTooltip("meanmetgroupCol", "A column from the SummarizedExperiment object that maps each sample to one group", 24 | "left"), 25 | selectizeInput('meanmetsubgroupCol', 26 | "Sub group column", 27 | choices = NULL, multiple = FALSE), 28 | bsTooltip("meanmetsubgroupCol", "A column from the SummarizedExperiment object that maps each sample to one group", 29 | "left"), 30 | checkboxInput("meanmetplotjitter", "Plot jitters?", value = TRUE, width = NULL), 31 | checkboxInput("meanmetSetLimits", "Select y limits?", value = FALSE, width = NULL), 32 | numericInput("meanmetylimup", "Y upper limit", 33 | step=0.1, min = 0, max = 1, value = 1), 34 | numericInput("meanmetylimlow", "Y lower limit", 35 | step=0.1, min = 0, max = 1, value = 0), 36 | checkboxInput("meanmetSortCB", "Sort plot?", value = FALSE, width = NULL), 37 | selectizeInput('meanmetsort', 38 | "Sort method", 39 | choices = c("None"=NULL, 40 | "Ascending by mean"="mean.asc", 41 | "Descending by mean"="mean.desc", 42 | "Ascending by median"="median.asc", 43 | "Descending by median"="median.desc"), 44 | multiple = FALSE), 45 | checkboxInput("meanmetXnames", "Add x-axis text?", value = FALSE, width = NULL), 46 | sliderInput("meanmetAxisAngle", "x-axis label angle:", min = 0, max = 360, value = 90, step= 45)), 47 | box(title = "Legend control",width = NULL, 48 | solidHeader = TRUE, collapsible = TRUE, collapsed = TRUE, 49 | selectizeInput('meanmetLegendPos', 50 | "Legend position", 51 | choices = c("top","bottom","right","left"),selected = "top", multiple = FALSE), 52 | selectizeInput('meanmetLegendTitlePos', 53 | "Legend Title position", 54 | choices = c("top","bottom","right","left"),selected = "top", multiple = FALSE), 55 | numericInput("meanmetLegendncols", "Number of legend columns", 56 | step=1, min = 0, max = 10, value = 3) 57 | ), 58 | box(title = "Size control",width = NULL, 59 | solidHeader = TRUE, collapsible = TRUE, collapsed = TRUE, 60 | sliderInput("meanmetwidth", "Plot Width (%)", min = 0, max = 100, value = 100), 61 | sliderInput("meanmetheight", "Plot Height (px)", min = 0, max = 1200, value = 800)), 62 | actionButton("meanmetPlot", 63 | "DNA mean methylation plot", 64 | style = "background-color: #000080; 65 | color: #FFFFFF; 66 | margin-left: auto; 67 | margin-right: auto; 68 | width: 100%", 69 | icon = icon("picture-o")), 70 | downloadButton('savemeanmetpicture', 'Export figure', class = "butt2"), 71 | textInput("meanmetPlot.filename", label = "Filename", value = "volcano.pdf"), 72 | bsTooltip("meanmetPlot.filename", "Filename (pdf, png, svg)", "left") 73 | ) 74 | ) 75 | ) 76 | ) 77 | -------------------------------------------------------------------------------- /inst/app/ui/oncoprint.R: -------------------------------------------------------------------------------- 1 | tabItem(tabName = "tcgaOncoPrint", 2 | fluidRow( 3 | column(8, bsAlert("oncomessage"), 4 | bsCollapse(id = "collapseOnco", open = "Oncoprint", 5 | bsCollapsePanel("Oncoprint", 6 | #busyIndicator("Rendering in progress...",wait = 10000), 7 | uiOutput("oncoPlot"), style = "default") 8 | )), 9 | column(4, 10 | box(title = "Oncoprint Plot",width = NULL, 11 | status = "danger", 12 | solidHeader = FALSE, collapsible = FALSE, 13 | box(title = "Data",width = NULL, 14 | solidHeader = TRUE, collapsible = TRUE, collapsed = FALSE, 15 | shinyFilesButton('maffile', 'Select MAF file', 'Please select a maf file', 16 | multiple = FALSE), 17 | tags$br(), 18 | tags$br(), 19 | bsTooltip("mafAnnotation", "The object must have a column with the ID of patients. We look for one of the following columns: bcr_patient_barcode or patient","left"), 20 | shinyFilesButton('mafAnnotation', 'Select annotation file', 'Please select a file with the annotation data frame ', 21 | multiple = FALSE), 22 | useShinyjs(), 23 | selectizeInput('mafAnnotationcols', 24 | "Annotation columns", 25 | choices = NULL, multiple = TRUE), 26 | selectizeInput('mafAnnotationpos', 27 | "Annotation position", 28 | choices = c("top","bottom"),selected = "top", multiple = FALSE) 29 | ), 30 | box(title = "Gene selection",width = NULL, 31 | solidHeader = TRUE, collapsible = TRUE, collapsed = TRUE, 32 | radioButtons("oncoInputRb", "Genes by:", 33 | c("Selection"="Selection", 34 | "Text"="text", 35 | "File"="file")), 36 | bsTooltip("oncoGenesTextArea", "Genes separeted by (;), (,) or (new line)", 37 | "left"), 38 | useShinyjs(), 39 | inputTextarea('oncoGenesTextArea', '', 2, 30), 40 | selectizeInput('oncoGenes', 41 | "genes", 42 | choices = NULL, multiple = TRUE), 43 | shinyFilesButton('oncoGenesFiles', 'Select file with genes', 'Please select a file with genes', multiple = FALSE) 44 | ), 45 | box(title = "General parameters",width = NULL, 46 | solidHeader = TRUE, collapsible = TRUE, collapsed = TRUE, 47 | selectizeInput('oncoInformation', 48 | "Information type", 49 | choices = c("Variant_Type","Variant_Classification"), multiple = FALSE), 50 | selectizeInput('oncoHeatmapLegendSide', 51 | "Heatmap legend side", 52 | choices = c("right","bottom"), multiple = FALSE), 53 | selectizeInput('oncoAnnotationLegendSide', 54 | "Annotation legend side", 55 | choices = c("right","bottom"), multiple = FALSE), 56 | bsTooltip("oncoRmCols", "If there is no alteration in that sample, whether remove it on the oncoprint", 57 | "left"), 58 | checkboxInput("oncoRowSort", "Sort by frequency of alterations decreasingly?", value = FALSE, width = NULL), 59 | checkboxInput("oncoRmCols", "Remove empty columns?", value = FALSE, width = NULL), 60 | checkboxInput("oncoShowColsNames", "Show column names?", value = FALSE, width = NULL), 61 | checkboxInput("oncoShowRowBarplot", "Show barplot annotation on rows?", value = TRUE, width = NULL), 62 | numericInput("oncoWSpace", "Distance between columns", 63 | min = 0, max = 2, value = 0.5, step = 0.1), 64 | numericInput("oncoHSpace", "Distance between rows", 65 | min = 0, max = 2, value = 0.5, step = 0.1) 66 | ), 67 | box(title = "Text parameters",width = NULL, 68 | solidHeader = TRUE, collapsible = TRUE, collapsed = TRUE, 69 | numericInput("oncoTextRowSize", "Rows text size", 70 | min = 0, max = 20, value = 10.0, step = 1), 71 | numericInput("oncoTextLabelSize", "Labels text Size", 72 | min = 0, max = 20, value = 10.0, step = 1)), 73 | box(title = "Colors control",width = NULL, 74 | solidHeader = TRUE, collapsible = TRUE, collapsed = TRUE, 75 | colourpicker::colourInput("colBG", "Background color", value = "#CCCCCC"), 76 | colourpicker::colourInput("colDEL", "DEL color", value = "red"), 77 | colourpicker::colourInput("colINS", "INS color", value = "blue"), 78 | colourpicker::colourInput("colSNP", "SNP color", value = "#008000"), 79 | colourpicker::colourInput("colDNP", "DNP color", value = "purple"), 80 | colourpicker::colourInput("colFSD", "Frame_Shift_Del color", value = "red"), 81 | colourpicker::colourInput("colFSI", "Frame_Shift_Ins color", value = "blue"), 82 | colourpicker::colourInput("colIFD", "In_Frame_Del color", value = "pink"), 83 | colourpicker::colourInput("colIFI", "In_Frame_Ins color", value = "green"), 84 | colourpicker::colourInput("colMM", "Missense_Mutation color", value = "black"), 85 | colourpicker::colourInput("colNM", "Nonsense_Mutation color", value = "#A52A2A"), 86 | colourpicker::colourInput("colNSM", "Nonstop_Mutation color", value = "#666699"), 87 | colourpicker::colourInput("colRNA", "RNA color", value = "#336600"), 88 | colourpicker::colourInput("colSIL", "Silent color", value = "#999900"), 89 | colourpicker::colourInput("colSS", "Splice_Site color", value = "#e63900"), 90 | colourpicker::colourInput("colTSS", "Translation_Start_Site color", value = "#669999"), 91 | colourpicker::colourInput("colTR", "Targeted_Region color", value = "#99ccff")), 92 | box(title = "Size control",width = NULL, 93 | solidHeader = TRUE, collapsible = TRUE, collapsed = TRUE, 94 | sliderInput("oncowidth", "Plot Width (%)", min = 0, max = 100, value = 100), 95 | sliderInput("oncoheight", "Plot Height (px)", min = 0, max = 2000, value = 800) 96 | ), 97 | 98 | actionButton("oncoprintPlot", 99 | "Plot oncoprint", 100 | style = "background-color: #000080; 101 | color: #FFFFFF; 102 | margin-left: auto; 103 | margin-right: auto; 104 | width: 100%", 105 | icon = icon("picture-o") 106 | )) 107 | ) 108 | ) 109 | ) 110 | -------------------------------------------------------------------------------- /inst/app/ui/pathview.R: -------------------------------------------------------------------------------- 1 | tabItem(tabName = "pathview", 2 | fluidRow( 3 | column(8, bsAlert("pathviewmessage"), 4 | bsCollapse(id = "collapsepathview", open = "Pathview plot", 5 | bsCollapsePanel("Pathview plot", uiOutput("pathviewPlot"), style = "default") 6 | )), 7 | column(4, 8 | box(title = "Pathway graphs",width = NULL, 9 | status = "danger", 10 | solidHeader = FALSE, collapsible = TRUE, collapsed = FALSE, 11 | shinyFilesButton('pathewayexpfile', 'DEA result', 'Please select expression result object', 12 | multiple = FALSE), 13 | bsTooltip("pathewayexpfile", "A .rda or .csv file with the following collumns: mRNA and logFC", "left"), 14 | 15 | selectizeInput('pathway.id', 16 | "pathway ID", 17 | choices = pathways.id, 18 | multiple = FALSE), 19 | checkboxInput("kegg.native.checkbt", "Native KEGG?", value = TRUE, width = NULL), 20 | sliderInput("pathwaygraphwidth", "Plot Width", min = 0, max = 1600, value = 1200), 21 | sliderInput("pathwaygraphheight", "Plot Height", min = 0, max = 1200, value = 800), 22 | actionButton("pathwaygraphBt", 23 | "Create pathway file", 24 | style = "background-color: #000080; 25 | color: #FFFFFF; 26 | margin-left: auto; 27 | margin-right: auto; 28 | width: 100%", 29 | icon = icon("file-pdf-o")), 30 | bsTooltip("pathwaygraphBt", "In the figure, colors represents the values of logFC. Red colors are genes up regulated in group 2 while green are the ones downregulated (for a file DEA_results_col_group1_group2...) ", 31 | "left") 32 | ) 33 | ) 34 | ) 35 | ) 36 | -------------------------------------------------------------------------------- /inst/app/ui/references.R: -------------------------------------------------------------------------------- 1 | tabItem(tabName = "references", 2 | fluidRow( 3 | column(1), 4 | column(8, 5 | includeHTML("references.html") 6 | )) 7 | ) 8 | -------------------------------------------------------------------------------- /inst/app/ui/starburst.R: -------------------------------------------------------------------------------- 1 | tabItem(tabName = "starburst", 2 | fluidRow( 3 | useShinyjs(), 4 | column(8, bsAlert("starburstmessage"), 5 | bsCollapse(id = "collapsestarburst", open = "starburst plots", 6 | bsCollapsePanel("starburst result - probe gene pairs", dataTableOutput('starburstResult'), style = "default"), 7 | bsCollapsePanel("starburst plots", 8 | uiOutput("starburstPlot"), style = "default"))), 9 | column(4, 10 | box(title = "Starburst plot",width = NULL, 11 | status = "danger", 12 | solidHeader = FALSE, collapsible = FALSE, 13 | box(title = "Data",width = NULL, 14 | solidHeader = TRUE, collapsible = TRUE, collapsed = FALSE, 15 | bsTooltip("starburstmetfile", "Result from Differential DNA Methylation analysis", 16 | "left"), 17 | shinyFilesButton('starburstmetfile', 'DMR result', 18 | 'Please select DMR_result file', 19 | multiple = FALSE), 20 | tags$br(), 21 | tags$br(), 22 | bsTooltip("starburstexpfile", "Result from Differential Expression Analysis", 23 | "left"), 24 | shinyFilesButton('starburstexpfile', 'DEA result', 'Please select expression result object', 25 | multiple = FALSE), 26 | selectizeInput('starburstMetPlatform', 27 | label = 'DNA methylation platform', 28 | choices = c("Illumina Human Methylation 450" = "450K", 29 | "Illumina Human Methylation 27" = "27K", 30 | "Infinium MethylationEPIC"= "EPIC"), 31 | multiple = FALSE), 32 | selectizeInput('starburstGenome', 33 | label = 'Genome of reference', 34 | choices = c("hg38"="hg38","hg19"="hg19"), 35 | multiple = FALSE) 36 | ), 37 | box(title = "Threshold control",width = NULL, 38 | solidHeader = TRUE, collapsible = TRUE, collapsed = TRUE, 39 | numericInput("starburstexpFC", "Log FC threshold", 40 | min = 0, max = 10, value = 0, step = 0.05), 41 | numericInput("starburstexFDR", "Expression FDR cut-off", 42 | min = 0, max = 1, value = 0.05, step = 0.001), 43 | numericInput("starburstmetdiff", "Mean DNA methylation difference threshold", 44 | min = 0, max = 1, value = 0, step = 0.05), 45 | numericInput("starburstmetFDR", "Methylation FDR cut-off", 46 | min = 0, max = 1, value = 0.05, step = 0.001)), 47 | box(title = "Highlighting options",width = NULL, 48 | solidHeader = TRUE, collapsible = TRUE, collapsed = TRUE, 49 | checkboxInput("starburstNames", "Show genes names?", value = FALSE, width = NULL), 50 | checkboxInput("starburstNamesFill", "Boxed names?", value = TRUE, width = NULL) 51 | ), 52 | box(title = "Colors control",width = NULL, 53 | solidHeader = TRUE, collapsible = TRUE, collapsed = TRUE, 54 | colourpicker::colourInput("sbcolInsignigicant", "Insignificant", value = "black"), 55 | colourpicker::colourInput("sbcolUpHypo", "Upregulated & Hypomethylated", value = "#E69F00"), 56 | colourpicker::colourInput("sbcolDownHypo", "Downregulated & Hypomethylated", value = "#56B4E9"), 57 | colourpicker::colourInput("sbcolHypo", "Hypomethylated", value = "#009E73"), 58 | colourpicker::colourInput("sbcolHyper", "Hypermethylated", value = "red"), 59 | colourpicker::colourInput("sbcolUp", "Upregulated", value = "#0072B2"), 60 | colourpicker::colourInput("sbcolDown", "Downregulated", value = "#D55E00"), 61 | colourpicker::colourInput("sbcolUpHyper", "Upregulated & Hypermethylated", value = "#CC79A7"), 62 | colourpicker::colourInput("sbcolDownHyper", "Downregulated & Hypermethylated", value = "purple")), 63 | box(title = "Size control",width = NULL, 64 | solidHeader = TRUE, collapsible = TRUE, collapsed = TRUE, 65 | sliderInput("starburstwidth", "Plot Width (%)", min = 0, max = 100, value = 100), 66 | sliderInput("starburstheight", "Plot Height (px)", min = 0, max = 1200, value = 800)), 67 | bsTooltip("starburstSave", "Save results of significant genes into a csv file", 68 | "left"), 69 | checkboxInput("starburstSave", "Save result?", value = FALSE, width = NULL), 70 | actionButton("starburstPlot", 71 | "starburst plot", 72 | style = "background-color: #000080; 73 | color: #FFFFFF; 74 | margin-left: auto; 75 | margin-right: auto; 76 | width: 100%", 77 | icon = icon("picture-o")), 78 | downloadButton('savestarburstpicture', 'Export figure', class = "butt2"), 79 | textInput("starburstPlot.filename", label = "Filename", value = "volcano.pdf"), 80 | bsTooltip("starburstPlot.filename", "Filename (pdf, png, svg)", "left") 81 | ) 82 | ) 83 | ) 84 | ) 85 | -------------------------------------------------------------------------------- /inst/app/ui/survival.R: -------------------------------------------------------------------------------- 1 | tabItem(tabName = "tcgasurvival", 2 | fluidRow( 3 | column(8, bsAlert("survivalmessage"), 4 | bsCollapse(id = "collapsesurvivalplot", open = "Survival plot", 5 | bsCollapsePanel("Survival plot", uiOutput("survivalplot"), style = "default") 6 | )), 7 | column(4, 8 | box(title = "Survival plot",width = NULL, 9 | status = "danger", 10 | solidHeader = FALSE, collapsible = FALSE, 11 | box(title = "Data",width = NULL, 12 | solidHeader = TRUE, collapsible = TRUE, 13 | bsTooltip("survivalplotfile", "A table (.csv) or a SummarizedExperiment (.rda) with survival information (days_to_death, days_to_last_follow_up, vital_status).","left"), 14 | shinyFilesButton(id = 'survivalplotfile', 15 | label = 'Select file', 16 | title = 'Please select a csv/rda file with a data frame with the following columns days_to_death, days_to_last_follow_up, vital_status', 17 | multiple = FALSE) 18 | ), 19 | box(title = "Parameters",width = NULL, 20 | solidHeader = TRUE, collapsible = TRUE, collapsed = TRUE, 21 | useShinyjs(), 22 | checkboxInput("survivalbyGene", "Survival by levels ?", value = FALSE, width = NULL), 23 | bsTooltip("survivalbyGene", "If the input is a SummarizedExperiment with gene expression data, the user will be able to verify the survival for the group of samples with high/low expression of a certain gene.","left"), 24 | numericInput("survivalPercent", "High/Low cut-off (%)", 25 | min = 0, max = 1, value = 0.25, step = 0.1), 26 | bsTooltip("survivalPercent", "Cut-off to consider high/low groups. Example if 25%: 0%-25% = Low, 25%-75% - medium, 75%-100% high","left"), 27 | selectizeInput('survivalGene', 28 | 'Gene/Probe', 29 | choices=NULL, 30 | multiple = FALSE), 31 | bsTooltip("survivalGene", "Gene/Probe used to identify high/low groups","left"), 32 | selectizeInput('survivalplotgroup', 33 | 'Group column', 34 | choices=NULL, 35 | multiple = FALSE), 36 | textInput("survivalplotLegend", label = "Legend text", value = "Legend"), 37 | textInput("survivalplotMain", label = "Title", value = "Kaplan-Meier Overall Survival Curves"), 38 | bsTooltip("survivalplotLimit", "Set the limit of the x-axis, if 0 the automatic value will be considered", 39 | "left"), 40 | useShinyjs(), 41 | sliderInput("survivalplotLimit", "x-axis limit", min = 0, max = 10000, value = 0), 42 | checkboxInput("survivalplotPvalue", "Show p-value?", value = TRUE, width = NULL), 43 | checkboxInput("survivalplotRiskTable", "Show risk table?", value = TRUE, width = NULL), 44 | checkboxInput("survivalplotConfInt", "Show confidence interval?", value = TRUE, width = NULL) 45 | ), 46 | box(title = "Size control",width = NULL, 47 | solidHeader = TRUE, collapsible = TRUE, collapsed = TRUE, 48 | sliderInput("survivalwidth", "Plot Width (%)", min = 0, max = 100, value = 100), 49 | sliderInput("survivalheight", "Plot Height (px)", min = 0, max = 1200, value = 800)), 50 | actionButton("survivalplotBt", 51 | "Plot survival plot", 52 | style = "background-color: #000080; 53 | color: #FFFFFF; 54 | margin-left: auto; 55 | margin-right: auto; 56 | width: 100%", 57 | icon = icon("picture-o")), 58 | downloadButton('savesurvivalpicture', 'Export figure', class = "butt2"), 59 | textInput("survivalPlot.filename", label = "Filename", value = "survival.pdf"), 60 | bsTooltip("survivalPlot.filename", "Filename (pdf, png, svg)", "left") 61 | ) 62 | ) 63 | ) 64 | ) 65 | -------------------------------------------------------------------------------- /inst/app/ui/volcano.R: -------------------------------------------------------------------------------- 1 | tabItem(tabName = "volcano", 2 | fluidRow( 3 | column(8, bsAlert("volcanomessage"), 4 | bsCollapse(id = "collapseVolcano", open = "Volcano plot", 5 | #bsCollapsePanel("Probes info", dataTableOutput('probesSE'), style = "default"), 6 | bsCollapsePanel("Volcano plot", 7 | uiOutput("volcanoPlot"), style = "default")), 8 | fluidRow( 9 | column(width = 10, offset = 1, 10 | valueBoxOutput("volcanoBoxDown", width = 4), 11 | valueBoxOutput("volcanoBoxInsig", width = 3), 12 | valueBoxOutput("volcanoBoxUp", width = 4)) 13 | )), 14 | column(4, 15 | box(title = "Volcano Plot",width = NULL, 16 | status = "danger", 17 | solidHeader = FALSE, collapsible = FALSE, 18 | box(title = "Data",width = NULL, 19 | solidHeader = TRUE, collapsible = TRUE, collapsed = FALSE, 20 | bsTooltip("volcanofile", "A file with the DMR_ or DEA_ prefix. This is the differential expression analysis and differential methylation analysis outputs.", "left"), 21 | shinyFilesButton('volcanofile', 'Select results', 'Please select the csv file with the results', 22 | multiple = FALSE)), 23 | box(title = "Volcano options",width = NULL, 24 | solidHeader = TRUE, collapsible = TRUE, collapsed = TRUE, 25 | radioButtons("volcanoInputRb", "Select input type:", 26 | c("DNA methylation"="met", 27 | "Expression"="exp")), 28 | numericInput("volcanoxcutMet", "DNA methylation threshold", 29 | min = 0, max = 1, value = 0, step = 0.05), 30 | numericInput("volcanoxcutExp", "Log FC threshold", 31 | min = 0, max = 100, value = 0, step = 0.5), 32 | numericInput("volcanoycut", "P-value adj cut-off", 33 | min = 0, max = 1, value = 0.05, step = 0.001) 34 | 35 | ), 36 | box(title = "Highlighting options",width = NULL, 37 | solidHeader = TRUE, collapsible = TRUE, collapsed = TRUE, 38 | checkboxInput("volcanoNames", "Show names?", value = FALSE, width = NULL), 39 | checkboxInput("volcanoNamesFill", "Boxed names?", value = TRUE, width = NULL), 40 | selectizeInput('volcanoHighlight', 41 | "Genes/Probes to Highlight", 42 | choices = NULL, multiple = TRUE), 43 | bsTooltip("volcanoShowHighlitgh", "Highlight genes/probes selected before, or significant probes/genes or both cases", "left"), 44 | selectizeInput('volcanoShowHighlitgh', 45 | "Points to highlight", 46 | choices = c("highlighted","significant","both"), multiple = FALSE) 47 | ), 48 | box(title = "Color control",width = NULL, 49 | solidHeader = TRUE, collapsible = TRUE, collapsed = TRUE, 50 | colourpicker::colourInput("volcanoColHighlight", "Highlight color", value = "orange"), 51 | colourpicker::colourInput("colinsignificant", "Insignificant color", value = "black"), 52 | colourpicker::colourInput("colHypomethylated", "Hypomethylated color", value = "darkgreen"), 53 | colourpicker::colourInput("colHypermethylated", "Hypermethylate color", value = "red"), 54 | colourpicker::colourInput("colDownregulated", "Downregulated color", value = "darkgreen"), 55 | colourpicker::colourInput("colUpregulated", "Upregulated genes color", value = "red") 56 | ), 57 | box(title = "Size control",width = NULL, 58 | solidHeader = TRUE, collapsible = TRUE, collapsed = TRUE, 59 | sliderInput("volcanowidth", "Plot Width (%)", min = 0, max = 100, value = 100), 60 | sliderInput("volcanoheight", "Plot Height (px)", min = 0, max = 1200, value = 400)), 61 | bsTooltip("volcanoSave", "Along with the plot, it will save a new csv with the cut-offs set", "left"), 62 | checkboxInput("volcanoSave", "Save file with results?", value = FALSE, width = NULL), 63 | actionButton("volcanoPlotBt", 64 | "Volcano plot", 65 | style = "background-color: #000080; 66 | color: #FFFFFF; 67 | margin-left: auto; 68 | margin-right: auto; 69 | width: 100%", 70 | icon = icon("picture-o") 71 | ), 72 | downloadButton('savevolvanopicture', 'Export figure', class = "butt2"), 73 | textInput("volcanoPlot.filename", label = "Filename", value = "volcano.pdf"), 74 | bsTooltip("volcanoPlot.filename", "Filename (pdf, png, svg)", "left") 75 | ) 76 | ) 77 | ) 78 | ) 79 | -------------------------------------------------------------------------------- /inst/app/www/TCGAbiolinksGUI.css: -------------------------------------------------------------------------------- 1 | @import url("//fonts.googleapis.com/css?family=Lobster|Cabin:400,700"); 2 | @import url("//fonts.googleapis.com/css?family=Nunito|Cabin:400,700"); 3 | 4 | @media only screen and (max-width: 1540px) { 5 | body { 6 | zoom: 0.9; /* all browsers */ 7 | -moz-transform: scale(0.9); /* Firefox */ 8 | } 9 | } 10 | 11 | h1 { 12 | font-family: 'Lobster', cursive; 13 | font-weight: 500; 14 | line-height: 1.1; 15 | color: #1D3AAD; 16 | } 17 | body { 18 | background-color: #fff; 19 | } 20 | .small-box .icon-large { 21 | color: rgba(255, 255, 255, 0.15); 22 | } 23 | 24 | .main-header .logo { 25 | /* font-family: 'Lobster', cursive;*/ 26 | font-family: 'Raleway',sans-serif; 27 | font-weight: bold; 28 | font-size: 24px; 29 | /*color: red*/ 30 | } 31 | 32 | 33 | .skin-blue .main-header .navbar { 34 | background-color: #000080 35 | } 36 | .skin-blue .main-header .logo { 37 | background-color: #000080; 38 | font-family: 'Nunito',sans-serif; 39 | font-weight: bold; 40 | font-size: 24px; 41 | /*color: red*/ 42 | } 43 | .skin-blue .main-header .logo:hover { 44 | background-color: #000080; 45 | opacity: 0.8; 46 | } 47 | 48 | .skin-blue .main-header .navbar .sidebar-toggle:hover { 49 | background-color: #000080 50 | } 51 | .skin-blue .sidebar-menu>li.active>a, 52 | .skin-blue .sidebar-menu>li:hover>a { 53 | color: #fff; 54 | background: #1e282c; 55 | border-left-color: red 56 | } 57 | .shinyDirectories { 58 | width: 100%; 59 | color: #fff; 60 | background-color: navy; 61 | border-color: #000000; 62 | opacity: 0.8; 63 | } 64 | .shinyFiles { 65 | width: 100%; 66 | color: #fff; 67 | background-color: navy; 68 | border-color: #000000; 69 | opacity: 0.8; 70 | } 71 | #downloadData { 72 | width: 100%; 73 | color: #fff; 74 | background-color: navy; 75 | border-color: #000000; 76 | opacity: 0.8; 77 | } 78 | #seuploadfile { 79 | width: 100%; 80 | color: #fff; 81 | background-color: navy; 82 | border-color: #000000; 83 | opacity: 0.8; 84 | } 85 | 86 | /*.shinyFiles:hover { 87 | background-color: navy; 88 | border-color: red; 89 | .opacity 0.8 90 | }*/ 91 | /*.shinyFiles:focus{ 92 | background-color: navy; 93 | border-color: red; 94 | .opacity 0.8 95 | }*/ 96 | 97 | .shiny-progress .progress-text { 98 | position: absolute; 99 | right: 10px; 100 | height: 24px; 101 | width: 440px; 102 | background-color: white; 103 | border-radius: 5px; 104 | border: 1px solid red; 105 | color: black; 106 | border-color: red; 107 | margin: 0px; 108 | padding: 2px 3px; 109 | opacity: 0.85; 110 | } 111 | 112 | body > .header .logo { 113 | font-family: 'Lobster', cursive; 114 | font-weight: bold; 115 | font-size: 24px; 116 | } 117 | pre { 118 | background-color: #B0B0B0; 119 | color: #ffffff; 120 | } 121 | .shiny-progress .bar { 122 | background-color: #FF0000; 123 | opacity: 1.0; 124 | } 125 | .shiny-progress .progress { 126 | background-color: navy; 127 | opacity: 1.0; 128 | } 129 | .shiny-progress-container. { 130 | background-color: navy; 131 | opacity: 1.0; 132 | border-color: red; 133 | } 134 | .shiny-progress { 135 | background-color: navy; 136 | opacity: 1.0; 137 | } 138 | .shiny-progress .progress { 139 | height: 7px; 140 | } 141 | .btn.btn-warning { 142 | color: #fff; 143 | border-color: #000000; 144 | } 145 | 146 | hr { 147 | margin-top: 0px; 148 | margin-bottom: 0px; 149 | } 150 | hr.lineDoc { 151 | padding: 0; 152 | border: 1px solid; 153 | color: rgba(144, 156, 255, 0.43); 154 | text-align: center; 155 | margin-top: 4px; 156 | } 157 | hr.lineAnalysis { 158 | padding: 0; 159 | border: 1px solid; 160 | color: rgba(57, 221, 72, 0.23); 161 | text-align: center; 162 | margin-top: 4px; 163 | } 164 | 165 | hr.lineIntegrative { 166 | padding: 0; 167 | border: 1px solid; 168 | color: rgba(246, 255, 144, 0.34); 169 | text-align: center; 170 | margin-top: 4px; 171 | } 172 | 173 | hr.lineData { 174 | margin-top: 4px; 175 | padding: 0; 176 | border: 1px solid; 177 | text-align: center; 178 | color: rgba(255, 84, 84, 0.36); 179 | } 180 | 181 | hr.lineConfig { 182 | padding: 0; 183 | border: 1px solid; 184 | text-align: center; 185 | color: rgba(84, 158, 255, 0.36); 186 | margin-top: 4px; 187 | } 188 | 189 | #busyModal { 190 | position:absolute; 191 | top: 40%; 192 | left: 0%; 193 | margin-top: -100px; 194 | margin-left: -50px; 195 | display:none; 196 | background: rgba(230, 230, 230, 0); 197 | text-align: center; 198 | padding-top: 20px; 199 | padding-left: 30px; 200 | padding-bottom: 40px; 201 | padding-right: 30px; 202 | border-radius: 5px; 203 | } 204 | 205 | #modal-content-busy{ 206 | border-radius: 5px; 207 | } 208 | 209 | 210 | div.info { 211 | text-align: center; 212 | } 213 | 214 | 215 | #loading-content { 216 | position: fixed; 217 | background: #FFFFFF; 218 | z-index: 10000; 219 | left: 0; 220 | right: 0; 221 | top: 0; 222 | padding-top: 50px; 223 | bottom: 0; 224 | font-size: 50px; 225 | text-align: center; 226 | color: #000000; 227 | } 228 | 229 | -------------------------------------------------------------------------------- /inst/app/www/events.js: -------------------------------------------------------------------------------- 1 | $(function() { 2 | $(document).on({ 3 | 4 | 'shiny:connected': function(event) { 5 | $('form.well').fadeOut(3000).fadeIn(2000); 6 | }, 7 | 8 | 'shiny:disconnected': function(event) { 9 | //alert('Disconnected! The web socket state is ' + event.socket.readyState); 10 | close(); 11 | }, 12 | 13 | 'shiny:busy': function(event) { 14 | // console.log(event) 15 | //$('#busyModal').modal('show'); 16 | }, 17 | 18 | 'shiny:idle': function(event) { 19 | //$('#busyModal').modal('hide'); 20 | }, 21 | 22 | 'shiny:recalculating': function(event) { 23 | console.log('An output is being recalculated... ' + new Date()); 24 | $('#busyModal').modal('show'); 25 | }, 26 | 27 | 'shiny:recalculated': function(event) { 28 | console.log('An output has been recalculated! ' + new Date()); 29 | $('#busyModal').modal('hide'); 30 | } 31 | 32 | }); 33 | 34 | 35 | Shiny.addCustomMessageHandler('special', function(message) { 36 | // 37 | }); 38 | }); 39 | -------------------------------------------------------------------------------- /inst/app/www/logo_gray2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BioinformaticsFMRP/TCGAbiolinksGUI/faec47a35c3b93482467664ecd52cb74f20d577e/inst/app/www/logo_gray2.png -------------------------------------------------------------------------------- /inst/app/www/logo_no_text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BioinformaticsFMRP/TCGAbiolinksGUI/faec47a35c3b93482467664ecd52cb74f20d577e/inst/app/www/logo_no_text.png -------------------------------------------------------------------------------- /inst/app/www/progress.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BioinformaticsFMRP/TCGAbiolinksGUI/faec47a35c3b93482467664ecd52cb74f20d577e/inst/app/www/progress.gif -------------------------------------------------------------------------------- /man/TCGAbiolinksGUI.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/TCGAbiolinksGUI.R, R/global.R 3 | \docType{package} 4 | \name{TCGAbiolinksGUI} 5 | \alias{TCGAbiolinksGUI} 6 | \alias{TCGAbiolinksGUI-package} 7 | \title{TCGAbiolinksGUI} 8 | \usage{ 9 | TCGAbiolinksGUI(run = TRUE) 10 | } 11 | \arguments{ 12 | \item{run}{Used to control the examples.} 13 | } 14 | \value{ 15 | Open a connection to shiny 16 | } 17 | \description{ 18 | A Graphical User Interface for integrative analysis of TCGA data 19 | 20 | Calls UI interface 21 | } 22 | \details{ 23 | The functions you're likely to need from \pkg{TCGAbiolinksGUI} are 24 | \code{\link{TCGAbiolinksGUI}} 25 | } 26 | \examples{ 27 | \dontrun{ 28 | TCGAbiolinksGUI() 29 | } 30 | TCGAbiolinksGUI(run = FALSE) 31 | } 32 | -------------------------------------------------------------------------------- /vignettes/.install_extras: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BioinformaticsFMRP/TCGAbiolinksGUI/faec47a35c3b93482467664ecd52cb74f20d577e/vignettes/.install_extras -------------------------------------------------------------------------------- /vignettes/Cases.Rmd: -------------------------------------------------------------------------------- 1 | --- 2 | title: Cases study 3 | bibliography: bibliography.bib 4 | date: "`r BiocStyle::doc_date()`" 5 | vignette: > 6 | %\VignetteIndexEntry{"5. Cases study"} 7 | %\VignetteEngine{knitr::rmarkdown} 8 | %\VignetteEncoding{UTF-8} 9 | --- 10 | 11 | 12 | # Case: Integration of DNA methylation and gene expression for TCGA adrenal cortical carcinoma (ACC) samples 13 | 14 | In this case study, we downloaded DNA methylation and gene expression for TCGA adrenal cortical carcinoma (ACC) samples, executed the Differentially methylated region (DMR) analysis and Differential Expression Analysis (DEA), then both results were integrated into a starburst plot. 15 | 16 |
17 | [![IMAGE ALT TEXT](http://img.youtube.com/vi/RcXibjFanH4/maxresdefault.jpg)](http://www.youtube.com/watch?v=RcXibjFanH4 "Tutorial video: Integration of methylation and expression for TCGA adrenal cortical carcinoma (ACC) samples - (http://www.youtube.com/watch?v=RcXibjFanH4)") 18 | 19 |
**Tutorial Video:** Integration of methylation and expression for TCGA adrenal cortical carcinoma (ACC) samples - (http://www.youtube.com/watch?v=RcXibjFanH4) 20 |
21 | 22 | # Case: Executing ELMER analysis on TCGA Kidney renal clear cell carcinoma (KIRC) samples 23 | 24 | In this case, we downloaded DNA methylation and gene expression data for TCGA Kidney renal clear cell carcinoma (KIRC) samples. Then, this data is used to execute [ELMER](http://bioconductor.org/packages/ELMER/) analysis. 25 | 26 | For a more detailed example, please check our [Bioc2017 workshop](https://bioinformaticsfmrp.github.io/Bioc2017.TCGAbiolinks.ELMER/index.html). 27 | 28 | 29 |
30 | [![IMAGE ALT TEXT](http://img.youtube.com/vi/EhGw1aF-2_c/maxresdefault.jpg)](http://www.youtube.com/watch?v=EhGw1aF-2_c "Tutorial video: Executing Elmer analysis on TCGA Kidney renal clear cell carcinoma (KIRC) samples - (http://www.youtube.com/watch?v=EhGw1aF-2_c)") 31 | 32 | **Tutorial Video:** Executing Elmer analysis on TCGA Kidney renal clear cell carcinoma (KIRC) samples - (http://www.youtube.com/watch?v=EhGw1aF-2_c) 33 |
34 | 35 | -------------------------------------------------------------------------------- /vignettes/_output.yaml: -------------------------------------------------------------------------------- 1 | html_document: 2 | self_contained: true 3 | number_sections: true 4 | theme: flatly 5 | highlight: tango 6 | mathjax: null 7 | toc: true 8 | toc_float: true 9 | toc_depth: 2 10 | css: include/site.css 11 | includes: 12 | in_header: include/header.html 13 | after_body: include/after_body.html 14 | css: include/site.css 15 | bibliography: bibliography.bib 16 | -------------------------------------------------------------------------------- /vignettes/_site.yml: -------------------------------------------------------------------------------- 1 | name: "TCGAbiolinksGUI" 2 | navbar: 3 | title: '' 4 | href: https://www.bioconductor.org/help/course-materials/2017/BioC2017/ 5 | left: 6 | - text: "Introduction" 7 | icon: fa-home 8 | href: index.html 9 | - text: "Data" 10 | icon: fa-database 11 | href: data.html 12 | menu: 13 | - text: "Analysis" 14 | icon: fa-flask 15 | href: analysis.html 16 | - text: "Integrative analysis" 17 | icon: fa-database 18 | href: integrative.html 19 | - text: "Case Study" 20 | href: Cases.html 21 | right: 22 | - icon: fa-book fa-lg 23 | menu: 24 | - text: "Bioc2017 workshop" 25 | - text: "Github ELMER/TCGAbiolinks" 26 | href: https://github.com/BioinformaticsFMRP/Bioc2017.TCGAbiolinks.ELMER 27 | - text: "---------" 28 | - text: "TCGAbiolinks package" 29 | - text: "Github" 30 | href: https://github.com/BioinformaticsFMRP/TCGAbiolinks 31 | - text: "Bioconductor" 32 | href: http://bioconductor.org/packages/devel/bioc/html/TCGAbiolinks.html 33 | - text: "---------" 34 | - text: "TCGAbiolinksGUI package" 35 | - text: "Github" 36 | href: https://github.com/BioinformaticsFMRP/TCGAbiolinksGUI 37 | - text: "Bioconductor" 38 | href: http://bioconductor.org/packages/devel/bioc/html/TCGAbiolinksGUI.html 39 | - text: "---------" 40 | - text: "ELMER package" 41 | - text: "Github" 42 | href: https://github.com/tiagochst/ELMER 43 | - text: "Bioconductor" 44 | href: http://bioconductor.org/packages/devel/bioc/html/ELMER.html 45 | - text: "---------" 46 | - text: "ELMER.data package" 47 | - text: "Github" 48 | href: https://github.com/tiagochst/ELMER 49 | - text: "Bioconductor" 50 | href: http://bioconductor.org/packages/devel/bioc/html/ELMER.html 51 | - icon: fa-info-circle fa-lg 52 | menu: 53 | - text: "University of São Paulo (USP)" 54 | - icon: fa-home fa-lg 55 | text: "fmrp.usp.br" 56 | href: http://www.fmrp.usp.br/?lang=en 57 | - text: "Université libre de Bruxelles (ULB)" 58 | - icon: fa-home fa-lg 59 | text: "mlg.ulb.ac.be" 60 | href: http://mlg.ulb.ac.be/ 61 | - text: "---------" 62 | - text: "Fundings" 63 | - text: "FAPESP (16/10436-9)" 64 | href: http://www.bv.fapesp.br/en/pesquisa/?sort=-data_inicio&q2=%28instituicao%3A%22Cedars-Sinai+Medical+Center%22%29+AND+%28%28bolsa_en_exact%3A%22Scholarships+abroad%22+AND+situacao_en_exact%3A%22Ongoing%22%29%29 65 | - text: "FAPESP (16/01389-7)" 66 | href: http://bv.fapesp.br/en/pesquisa/?sort=-data_inicio&q2=%28id_pesquisador_exact%3A679917%29+AND+%28%28bolsa_en_exact%3A%22Scholarships+in+Brazil%22+AND+situacao_en_exact%3A%22Ongoing%22%29%29 67 | - text: "Belgian FNRS PDR T100914F" 68 | href: http://mlg.ulb.ac.be/GENGISCAN 69 | - text: "BridgeIRIS" 70 | href: http://mlg.ulb.ac.be/BridgeIRIS 71 | -------------------------------------------------------------------------------- /vignettes/dea.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BioinformaticsFMRP/TCGAbiolinksGUI/faec47a35c3b93482467664ecd52cb74f20d577e/vignettes/dea.png -------------------------------------------------------------------------------- /vignettes/dea_results.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BioinformaticsFMRP/TCGAbiolinksGUI/faec47a35c3b93482467664ecd52cb74f20d577e/vignettes/dea_results.png -------------------------------------------------------------------------------- /vignettes/dmr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BioinformaticsFMRP/TCGAbiolinksGUI/faec47a35c3b93482467664ecd52cb74f20d577e/vignettes/dmr.png -------------------------------------------------------------------------------- /vignettes/ea.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BioinformaticsFMRP/TCGAbiolinksGUI/faec47a35c3b93482467664ecd52cb74f20d577e/vignettes/ea.png -------------------------------------------------------------------------------- /vignettes/elmer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BioinformaticsFMRP/TCGAbiolinksGUI/faec47a35c3b93482467664ecd52cb74f20d577e/vignettes/elmer.png -------------------------------------------------------------------------------- /vignettes/glioma_classifier.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BioinformaticsFMRP/TCGAbiolinksGUI/faec47a35c3b93482467664ecd52cb74f20d577e/vignettes/glioma_classifier.png -------------------------------------------------------------------------------- /vignettes/heatmap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BioinformaticsFMRP/TCGAbiolinksGUI/faec47a35c3b93482467664ecd52cb74f20d577e/vignettes/heatmap.png -------------------------------------------------------------------------------- /vignettes/idat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BioinformaticsFMRP/TCGAbiolinksGUI/faec47a35c3b93482467664ecd52cb74f20d577e/vignettes/idat.png -------------------------------------------------------------------------------- /vignettes/include/after_body.html: -------------------------------------------------------------------------------- 1 | 11 | 17 | -------------------------------------------------------------------------------- /vignettes/include/before_body.html: -------------------------------------------------------------------------------- 1 | 2 | 31 | -------------------------------------------------------------------------------- /vignettes/include/header.html: -------------------------------------------------------------------------------- 1 | 13 | 14 | 23 | 25 | 62 | 67 | 68 | 69 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 123 | 124 | -------------------------------------------------------------------------------- /vignettes/include/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BioinformaticsFMRP/TCGAbiolinksGUI/faec47a35c3b93482467664ecd52cb74f20d577e/vignettes/include/logo.png -------------------------------------------------------------------------------- /vignettes/include/site.css: -------------------------------------------------------------------------------- 1 | .html-widget { 2 | margin-bottom: 1em; 3 | } 4 | h1 .header-section-number::after { 5 | content: "."; 6 | } 7 | 8 | @media only screen and (max-width: 1540px) { 9 | body { 10 | zoom: 0.9; /* all browsers */ 11 | -moz-transform: scale(0.9); /* Firefox */ 12 | } 13 | } 14 | img { 15 | margin-top: 0.3cm; 16 | margin-right: 0.3cm; 17 | } 18 | body { 19 | background-color: #fff; 20 | } 21 | .small-box .icon-large { 22 | color: rgba(255, 255, 255, 0.15); 23 | } 24 | 25 | .navbar { 26 | background: #000080 27 | } 28 | 29 | h1.title { 30 | font-size: 30px; 31 | } 32 | 33 | h1 { 34 | font-size: 28px; 35 | } 36 | 37 | h3 { 38 | font-size: 22px; 39 | } 40 | 41 | .navbar-default .navbar-brand:hover, .navbar-default .navbar-brand:focus { 42 | color: #e74c3c; 43 | background-color: transparent; 44 | } 45 | 46 | .navbar-default .navbar-nav>li>a:hover, .navbar-default .navbar-nav>li>a:focus { 47 | color: #e74c3c; 48 | background-color: transparent; 49 | } 50 | -------------------------------------------------------------------------------- /vignettes/include/symbol.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BioinformaticsFMRP/TCGAbiolinksGUI/faec47a35c3b93482467664ecd52cb74f20d577e/vignettes/include/symbol.png -------------------------------------------------------------------------------- /vignettes/integrative.Rmd: -------------------------------------------------------------------------------- 1 | --- 2 | title: Integrative analysis menu 3 | bibliography: bibliography.bib 4 | date: "`r BiocStyle::doc_date()`" 5 | vignette: > 6 | %\VignetteIndexEntry{"4. Integrative analysis menu"} 7 | %\VignetteEngine{knitr::rmarkdown} 8 | %\VignetteEncoding{UTF-8} 9 | --- 10 | 11 | # Detailed explanation 12 | 13 | For a detailed manual for this section please access these links: 14 | 15 | 1. [Starburst menu manual](https://drive.google.com/open?id=0B0-8N2fjttG-RzU1T1VQU2dQcXM) 16 | 2. [ELMER menu manual](https://drive.google.com/open?id=0B0-8N2fjttG-TDg1czNPUGUwTG8) 17 | 18 | # Menu: Starburst plot 19 | 20 | ![Starburst plot menu: Main window.](starburst.png) 21 | 22 | ## Data 23 | Expected input is a CSV file with the following pattern: 24 | 25 | * DEA result: DEA_results_Group_subgruop1_subgroup2_pcut_0.01_logFC.cut_2.csv 26 | * DMR result: DMR_results_Group_subgruop1_subgroup2_pcut_1e-30_meancut_0.55.csv 27 | 28 | ## Thresholds control 29 | 30 | The possible thresholds controls are: 31 | 32 | * Log FC threshold: gene expression Log2FC threshold 33 | * Expression FDR cut-off: gene expression FDR cut-off (y-axis) 34 | * Mean DNA methylation difference threshold: Mean DNA methylation difference threshold 35 | * Methylation FDR cut-off: DNA methylation FDR cut-off (x-axis) 36 | 37 | The options Mean DNA methylation difference threshold and Log FC threshold are used to circle genes which pass the cut-offs previously defined (eg. mean methylation or FDR). 38 | 39 | ## Highlight control 40 | The possible highlight controls are: 41 | 42 | * Show gene names: show names of significant genes 43 | * Boxed names: show names inside a box 44 | * Circle genes: Circle candidate biologically significant genes 45 | 46 | ## Other option 47 | 48 | * Save result: save results in a CSV file 49 | 50 | ## Tutorial video: 51 | 52 | [![IMAGE ALT TEXT](http://img.youtube.com/vi/_ec6Sij4MBc/maxresdefault.jpg)](http://www.youtube.com/watch?v=_ec6Sij4MBc "Tutorial video: Integrating DMR analysis and DEA results to be visualized into a starburst plot - (http://www.youtube.com/watch?v=_ec6Sij4MBc) ") 53 | 54 |
**Tutorial Video:** Integrating DMR analysis and DEA results to be visualized into a starburst plot - (http://www.youtube.com/watch?v=_ec6Sij4MBc) 55 |
56 | 57 | # Menu: ELMER (Enhancer Linking by Methylation/Expression Relationship) 58 | 59 | This sub-menu will help the user to perform an integrative analysis of DNA methylation and Gene expression using the R/Bioconductor ELMER package [@yao2015inferring]. 60 | 61 | ## Introduction 62 | 63 | Recently, many studies suggest that enhancers play a major role as 64 | regulators of cell-specific phenotypes leading to alteration in 65 | transcriptomes related to diseases 66 | [@giorgio2015large; @groschel2014single; @sur2012mice; @yao2015demystifying]. 67 | In order to investigate regulatory enhancers that can be located at long 68 | distances upstream or downstream of target genes Bioconductor offer the 69 | [Enhancer Linking by Methylation/Expression Relationship 70 | (ELMER)](http://bioconductor.org/packages/ELMER/) package. This package 71 | is designed to combine DNA methylation and gene expression data from 72 | human tissues to infer multi-level cis-regulatory networks. It uses DNA 73 | methylation to identify enhancers and correlates their state with the 74 | expression of nearby genes to identify one or more transcriptional 75 | targets. Transcription factor (TF) binding site analysis of enhancers is 76 | coupled with expression analysis of all TFs to infer upstream 77 | regulators. This package can be easily applied to TCGA public available 78 | cancer datasets and custom DNA methylation and gene expression datasets [@yao2015inferring]. 79 | 80 | [ELMER](http://bioconductor.org/packages/ELMER/) analysis have 5 main 81 | steps: 82 | 83 | 1. Identify distal probes on HM450K or EPIC. 84 | 85 | 2. Identification of distal probes with significant differential DNA methylation (i.e. DMCs) in tumor vs. normal samples. 86 | 87 | 3. Identification of putative target gene(s) for differentially methylated distal probes. 88 | 89 | 4. Identification of enriched motifs within a set of probes in significant probe-gene pairs. 90 | 91 | 5. Identification of master regulator Transcription Factors (TF) for each enriched motif. 92 | 93 | 94 | ## Sub-menu ELMER: Create input data 95 | 96 | The [ELMER](http://bioconductor.org/packages/ELMER/) input is a 97 | mee object that contains a DNA methylation matrix, a gene expression 98 | matrix, a probe information GRanges, the gene information GRanges and a 99 | data frame summarizing the data. It should be highlighted that samples 100 | without both the gene expression and DNA methylation data will be 101 | removed from the mee object. 102 | 103 | To perform ELMER analyses, we need to populate a **MultiAssayExperiment** with a DNA methylation matrix or **SummarizedExperiment** object from HM450K or EPIC platform; a gene expression matrix or SummarizedExperiment object for the same samples; a matrix mapping DNA methylation samples to gene expression samples; and a matrix with sample metadata (i.e. clinical data, molecular subtype, etc.). If TCGA data are used, the last two matrices will be automatically generated. 104 | If using non-TCGA data, the matrix with sample metadata should be provided with at least a column with a patient identifier and another one identifying its group which will be used for analysis, if samples in the methylation and expression matrices are not ordered and with same names, a matrix mapping for each patient identifier their DNA methylation samples and their gene expression samples should be provided to the *createMAE* function. 105 | Based on the genome of reference selected, metadata for the DNA methylation probes, such as genomic coordinates, will be added from http://zwdzwd.github.io/InfiniumAnnotation [@zhou2016comprehensive]; 106 | and metadata for gene expression and annotation is added from Ensembl database [@yates2015ensembl] using [biomaRt](http://bioconductor.org/packages/biomaRt/) [@durinck2009mapping]. 107 | 108 | The steps required to create this object and perform ELMER analysis is described in this [tutorial](https://bioinformaticsfmrp.github.io/Bioc2017.TCGAbiolinks.ELMER/analysis_gui.html). 109 | 110 | 111 | 112 | ### Sub-menu ELMER: Analysis 113 | 114 | After preparing the data into a MAE object, we will execute the five 115 | [ELMER](http://bioconductor.org/packages/ELMER/) steps for the hypo 116 | (distal probes hypomethylated in the group2) direction. 117 | 118 | This box has all the available options for ELMER functions. Please see the [ELMER vignette](http://bioconductor.org/packages/3.7/bioc/vignettes/ELMER/inst/doc/index.html). 119 | 120 | Also, a description of the data used by ELMER (such as the distal enhancer probes) is found in the 121 | [ELMER.data](https://bioconductor.org/packages/release/data/experiment/vignettes/ELMER.data/inst/doc/vignettes.html) 122 | vignette. 123 | 124 | ELMER Identifies the enriched motifs for the distal probes 125 | which are significantly differentially methylated and linked to a putative 126 | target gene, it will plot the Odds Ratio (x axis) for each motif 127 | found. 128 | These motifs by default have a minimum incidence of 10 probes 129 | (that means at least 10 probes were associated with the motif) 130 | in the given probes set and the smallest lower boundary of 95% 131 | confidence interval for Odds Ratio of 1.1. 132 | 133 | After finding the enriched motifs, 134 | [ELMER](http://bioconductor.org/packages/ELMER/) identifies regulatory 135 | transcription factors (TFs) whose expression is associated with DNA 136 | methylation at motifs. [ELMER](http://bioconductor.org/packages/ELMER/) 137 | automatically creates a TF ranking plot for each enriched motif. This 138 | plot shows the TF ranking plots based on the association score 139 | $(-log(P value))$ between TF expression and DNA methylation of the 140 | motif. We can see in Figure below that the top three TFs that are 141 | associated with a motif found. 142 | 143 | In case, it identifies regulatory transcription factors (TFs), an object with the prefix ELMER_results will be created 144 | with the necessary data to visualize the results. 145 | 146 | ## Sub-menu ELMER: Visualize results 147 | 148 | ### Data 149 | 150 | Select the R object (rda) file with ELMER results created in the analysis step (the one with prefix ELMER_results) 151 | 152 | # References 153 | -------------------------------------------------------------------------------- /vignettes/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BioinformaticsFMRP/TCGAbiolinksGUI/faec47a35c3b93482467664ecd52cb74f20d577e/vignettes/logo.png -------------------------------------------------------------------------------- /vignettes/meanmet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BioinformaticsFMRP/TCGAbiolinksGUI/faec47a35c3b93482467664ecd52cb74f20d577e/vignettes/meanmet.png -------------------------------------------------------------------------------- /vignettes/oncoprint.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BioinformaticsFMRP/TCGAbiolinksGUI/faec47a35c3b93482467664ecd52cb74f20d577e/vignettes/oncoprint.png -------------------------------------------------------------------------------- /vignettes/pathview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BioinformaticsFMRP/TCGAbiolinksGUI/faec47a35c3b93482467664ecd52cb74f20d577e/vignettes/pathview.png -------------------------------------------------------------------------------- /vignettes/starburst.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BioinformaticsFMRP/TCGAbiolinksGUI/faec47a35c3b93482467664ecd52cb74f20d577e/vignettes/starburst.png -------------------------------------------------------------------------------- /vignettes/survival.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BioinformaticsFMRP/TCGAbiolinksGUI/faec47a35c3b93482467664ecd52cb74f20d577e/vignettes/survival.png -------------------------------------------------------------------------------- /vignettes/tcgasearch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BioinformaticsFMRP/TCGAbiolinksGUI/faec47a35c3b93482467664ecd52cb74f20d577e/vignettes/tcgasearch.png -------------------------------------------------------------------------------- /vignettes/volcano.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BioinformaticsFMRP/TCGAbiolinksGUI/faec47a35c3b93482467664ecd52cb74f20d577e/vignettes/volcano.png --------------------------------------------------------------------------------