Scott Newman - 2015-02-23

1) Installing R and R Packages

CNV Explorer is written in R and requires several packages to be installed from CRAN and Bioconductor.

1) Download and install R: http://www.r-project.org/
2) Windows users may need to install a Perl interpretor http://www.activestate.com/activeperl
3) Start R and install the following packages:

Bioconductor
http://www.bioconductor.org/install/
source("http://bioconductor.org/biocLite.R")
biocLite()

cghMCR
http://www.bioconductor.org/packages/2.12/bio/html/cghMCR.html
source("http://bioconductor.org/biocLite.R")
biocLite("cghMCR")

CNTools
http://www.bioconductor.org/packages/release/bioc/html/CNTools.html
source("http://bioconductor.org/biocLite.R")
biocLite("CNTools")

GenomicRanges
http://www.bioconductor.org/packages/release/bioc/html/GenomicRanges.html
source("http://bioconductor.org/biocLite.R")
biocLite("GenomicRanges")

ggplot2
http://cran.r-project.org/web/packages/ggplot2/index.html
install.packages(“ggplot2”)

Shiny
http://cran.r-project.org/web/packages/shiny/index.html
install.packages(“shiny”)

shinyapps
https://github.com/rstudio/shinyapps
if (!require("devtools"))
install.packages("devtools")
devtools::install_github("rstudio/shinyapps")

2) Processing Your Own Data

You can process your own data in one of two ways.

A) The easy way

Once the app has popped up in your browser, select 'Load my own data' from the sample type menu. So long as the prerequisites are installed, CNV Explorer should upload and process your data for you.

Please note that the data needs to be in TCGA .seg and include intervening regions of normal copy number:

TCGA-2F-A9KO 10 109253175 110905211 1027 -0.4865
TCGA-2F-A9KO 10 110905277 111763498 472 -0.1705
TCGA-2F-A9KO 10 111766601 113507257 1194 -0.4592
TCGA-2F-A9KO 10 113514382 135225087 14112 -0.164
TCGA-2F-A9KO 10 39045746 78060379 18548 -0.1608
TCGA-2F-A9KO 10 415240 7943518 5119 0.223
TCGA-2F-A9KO 10 78060510 78162551 88 -0.4986
TCGA-2F-A9KO 10 78168852 109253068 19243 -0.1641
TCGA-2F-A9KO 10 7948874 8058401 72 -0.1798

If you choose this method, then you'll need to re-upload the data every time you use CNV Explorer.

B) The hard way

If you want to preprocess the data, save it as a .Rdata file and permanantly add it to your own CNV Explorer instance, then preprocessing scripts are provided.

i) Navigate to the preprocessing directory.
ii) Place your .seg file(s) in the same directory.
iii) Run the process_CN_files.R script. This should produce two .Rdata files, one for standard gene discovery and one for survival analysis.
iv) Edit the ui.R to point to the new Rdata file:

"Acute Myeloid Leukemia [LAML] TCGA Dec 2014" = "data/LAML.renamed.filtered.seg.standard.Rdata"

v) If you have survival data, you need to add it to the CNV_Explorer_Survival/data/ALL_PATIENT_SURVIVAL.edited.txt file making sure that the patient names in the Rdata file and the survival data file match exactly. Survival data is should be in the following format:

bcr_patient_barcode days_to_last_followup days_to_death
TCGA-ER-A19E 396 396
TCGA-AB-2874 396 [Not Applicable]
TCGA-D1-A16O 865 [Not Applicable]
TCGA-27-1836 914 914

3) Running CNV Explorer on your local computer

Detailed instructions for running and developing shiny applications with R can be found here: http://shiny.rstudio.com/. But it's easy to run the basic app.

1) Make sure that you have two files, ui.R and server.R in your working directory and a data directory containing the various .Rdata files.
2) Install R and all of the required packages listed on the "prerequisites" https://sourceforge.net/p/shinycgh/wiki/Prerequisites/ wiki page.
3) Start R and type:

library(“shiny”)
runApp()

 

Last edit: Scott Newman 2015-02-24