-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathinstall.R
45 lines (34 loc) · 1.29 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
#!/usr/bin/env Rscript
options(
Ncpus = parallel::detectCores()
)
install.packages(c("devtools", "tidyverse"))
library(tidyverse)
get_requirements <- function(path) {
path %>%
readr::read_lines() %>%
purrr::map_chr(~ .x %>%
stringr:::str_remove("#.*$|^$") %>%
stringr::str_trim()) %>%
purrr::discard(~ .x %>% stringr::str_detect("^$"))
}
# fix dependency of jaccard: Must be installed first
devtools::install_bioc("3.12/qvalue")
# install from CRAN
get_requirements("src/install/requirements/cran.txt") %>%
devtools::install_cran(upgrade_dependencies = FALSE)
# install from Bioconductor
get_requirements("src/install/requirements/bioconductor.txt") %>%
devtools::install_bioc(upgrade_dependencies = FALSE)
# install from GitHub
get_requirements("src/install/requirements/git.txt") %>%
devtools::install_git(upgrade_dependencies = FALSE)
# install versions
devtools::install_version("vctrs", "0.3.6", repos = "https://cloud.r-project.org", upgrade = "never")
devtools::install_version("ggplot2", "3.3.2", upgrade = "never")
# Fix: WGCNA dependencies not available using devtools::install_bioc
install.packages("BiocManager")
BiocManager::install("WGCNA", update = FALSE)
install.packages("DGCA")
# Install complexHeatmap afterwards
devtools::install_bioc("3.11/ComplexHeatmap")