-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathinstall_bioc_pkgs.R
executable file
·64 lines (57 loc) · 1.33 KB
/
install_bioc_pkgs.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
#!/usr/bin/env Rscript
# Script that installs BioC packages for a given
# Takes in the distribution as the first argument.
args <- commandArgs(trailing = TRUE)
distribution <- args[1]
# Shared BioC packages to install
shared_pkgs <- c(
"Biobase",
"BiocCheck",
"BiocGenerics",
"BiocStyle",
"Bioconductor/BiocBaseUtils",
"ComplexHeatmap",
"DESeq2",
"GenomicRanges",
"Gviz",
"MultiAssayExperiment",
"Rhtslib",
"S4Vectors",
"SummarizedExperiment",
"biomaRt",
"edgeR",
"limma",
"hermes"
)
# Per distro BioC packages to install
bioc_pkgs <- list(
rstudio = shared_pkgs,
`rstudio-local` = shared_pkgs,
`gcc13` = shared_pkgs,
`gcc14` = shared_pkgs,
`atlas` = shared_pkgs,
`valgrind` = shared_pkgs,
`intel` = shared_pkgs,
`nosuggests` = shared_pkgs,
`mkl` = shared_pkgs
)
# Get diff of installed and uninstalled packages for
# idempotent package installation
new_pkgs <- bioc_pkgs[[distribution]][
!(bioc_pkgs[[distribution]] %in% installed.packages()[, "Package"])
]
# cmdstanr is available on r-universe.dev.
install.packages(
"cmdstanr",
repos='https://stan-dev.r-universe.dev'
)
cmdstanr::install_cmdstan()
# Install only uninstalled packages
if (length(new_pkgs)) {
BiocManager::install(new_pkgs,
Ncpus = parallel::detectCores(),
force = TRUE,
ask = FALSE,
update = FALSE
)
}