[6e90e5]: / code_final / install_renv.sh

Download this file

47 lines (42 with data), 1.6 kB

 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
#!/usr/bin/env bash
## Create environment w/ conda ## %%%%%%%%%%%%%%%%%%%%%%%%%%
# Check if environment exists in a conditinonal statement
if [[ -z $(conda env list | grep r_env) ]]; then
mamba create -y -n r_env r-essentials r-base
fi
mamba activate r_env
## Set up renv ## %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Rscript -e "
userdir <- unlist(strsplit(Sys.getenv('R_LIBS_USER'),':'))[1L]
repoloc <- 'https://cran.r-project.org/'
install.packages('renv', lib = userdir, repos = repoloc)
"
Rscript -e "renv::init()"
# Install specific packages ## %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
# Rscript -e "install.packages('NMF', repos='http://R-Forge.R-project.org')"
Rscript -e "
source('http://renozao.github.io/repotools/install.R')
if (!require('BiocManager', quietly = TRUE))
install.packages('BiocManager')
BiocManager::install('Biobase')
repotools::install.pkgs('NMF', force=FALSE, quiet=FALSE)
"
# visutils and Seurat is a dependency
Rscript -e "
if (requireNamespace('devtools', quietly = TRUE)) {
userdir <- unlist(strsplit(Sys.getenv('R_LIBS_USER'),':'))[1L]
repoloc <- 'https://cran.r-project.org/'
install.packages('devtools', lib = userdir, repos = repoloc)
}
install.packages("fftwtools")
BiocManager::install("EBImage")
devtools::install_github('iaaka/visutils')
"
# Rscript -e "
# if (requireNamespace('remotes', quietly = TRUE)) {
# userdir <- unlist(strsplit(Sys.getenv('R_LIBS_USER'),':'))[1L]
# repoloc <- 'https://cran.r-project.org/'
# install.packages('remotes', lib = userdir, repos = repoloc)
# }
# remotes::install_github('satijalab/seurat', 'seurat5', quiet = TRUE)
# "