-
Notifications
You must be signed in to change notification settings - Fork 19
/
install.R
66 lines (51 loc) · 2.38 KB
/
install.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#' install.R for Gliovis
# This file is part of GlioVis
# Copyright (C) Massimo Squatrito
#
# GlioVis is free software; you can redistribute it and/or modify it under the
# terms of the GNU General Public License as published by the Free Software
# Foundation; either version 3 of the License, or (at your option) any later
# version.
#
# GlioVis is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with
# this program; if not, see <http://www.gnu.org/licenses/>.
#######################################################
# gliovis Installation Instructions:
# see https://github.com/stan-dev/shinystan/blob/develop/install_shinystan.R
# 1) Restart R
# 2) Run install_gliovis(), included below, to install
#######################################################
install_gliovis <- function() {
if (getRversion() < '3.1.1') stop("GlioVis requires R version 3.1.1 or greater.")
msg <- "Note: this will install or update packages needed to run GlioVis Do you want to continue?"
continue <- select.list(choices = c("Yes", "No"), title = msg, graphics = FALSE)
if (continue == "No") {
message("Installation canceled by user.")
return(invisible(NULL))
}
# install needed packages from CRAN
pkg <- c("shiny", "survival", "weights", "googleVis", "tidyverse","shinydashboard",
"htmlwidgets","kernlab","devtools","markdown","caret","Cairo", "DT","GGally",
"Cairo","reshape2", "cgdsr","shinyBS", "gridExtra","survminer","plotly")
new.pkg <- pkg[!(pkg %in% installed.packages())]
if (length(new.pkg)) {
install.packages(new.pkg, dependencies=TRUE)
}
update.packages(pkg[!(pkg %in% new.pkg)])
# install needed packages from Bioconductor
bioc <- c("GSVA","limma","DOSE","clusterProfiler")
if(!(bioc %in% installed.packages())){
source("http://bioconductor.org/biocLite.R")
biocLite(bioc)
}
# install needed packages from Github
devtools::install_github("jokergoo/ComplexHeatmap")
# devtools::install_github(c("GuangchuangYu/DOSE", "GuangchuangYu/clusterProfiler"))
message("\n All set. \n You might need to restart R before using GlioVis \n")
return(invisible(NULL))
}
install_gliovis()