generated from sib-swiss/course_website_template
-
Notifications
You must be signed in to change notification settings - Fork 36
/
Copy pathinstall_packages.R
67 lines (57 loc) · 2.1 KB
/
install_packages.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
67
#!/usr/bin/env Rscript
# R script to install requirements for exercises -------------------------------
## a vector of packages to install (edit in this section) ----------------------
### packages could be either on CRAN or bioconductor
# force compilation from source for tidytree
# binary installation is only available for earlier versions
pkgs <- c("devtools", "remotes",
"BiocManager", "dplyr",
"scuttle",
"cowplot",
"ggbeeswarm", "ggnewscale", "msigdbr", "ggrastr",
"bit64", "scater",
"AnnotationDbi",
"SingleR", "celldex",
"dittoSeq", "DelayedArray",
"DelayedMatrixStats",
"limma", "SingleCellExperiment",
"SummarizedExperiment",
"slingshot", "batchelor",
"clustree", "edgeR", "org.Hs.eg.db",
"glmGamPoi"
)
## install Bioconductor --------------------------------------------------------
if (!require("BiocManager", quietly = TRUE)) {
install.packages("BiocManager")
}
## install and check package loading -------------------------------------------
for (pkg in basename(pkgs)) {
BiocManager::install(pkg, ask = FALSE, update = FALSE)
if (!library(pkg, character.only = TRUE, logical.return = TRUE)) {
write(
paste0(
"Installation of package ",
pkg,
" exited with non-zero exit status"
),
stdout()
)
quit(status = 1, save = "no")
}
}
# Seurat from source
install.packages("Seurat", repos = "https://cran.rstudio.com", type = "source")
# clusterProfiler from repo
remotes::install_github("YuLab-SMU/yulab.utils")
remotes::install_github("YuLab-SMU/clusterProfiler")
# # installation old Matrix.utils because it's not on CRAN
# install.packages("https://cran.r-project.org/src/contrib/Archive/Matrix.utils/Matrix.utils_0.9.8.tar.gz", type = "source", repos = NULL)
# # adding this because Matrix might be downgraded by above command
# install.packages("Matrix")
# Monocle3:
devtools::install_github("cole-trapnell-lab/leidenbase")
devtools::install_github("cole-trapnell-lab/monocle3")
# Presto for fast wilcoxon rank sum test:
remotes::install_github("immunogenomics/presto")
# STACAS for integration:
remotes::install_github("carmonalab/STACAS")