[6df130]: / setup_renv.R

Download this file

48 lines (41 with data), 1.0 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
48
# Install renv if not already installed
if (!requireNamespace("renv", quietly = TRUE)) {
install.packages("renv", repos = "https://cloud.r-project.org")
}
# Initialize renv
renv::init(force = TRUE)
# Install BiocManager first
if (!requireNamespace("BiocManager", quietly = TRUE)) {
install.packages("BiocManager")
}
# Install Bioconductor packages first
BiocManager::install(c("MAST", "DESeq2", "SingleCellExperiment"))
# Install CRAN packages
renv::install(c(
"svDialogs",
"vroom",
"dplyr",
"DT",
"Seurat",
"harmony",
"patchwork",
"ggplot2",
"ggrepel",
"ggvenn",
"openxlsx",
"progress",
"rio",
"pheatmap",
"ggfortify",
"devtools",
"Rcpp",
"RcppArmadillo"
))
# Install presto from GitHub with explicit dependencies
renv::install("immunogenomics/presto", type = "github")
# Verify presto installation
if (!requireNamespace("presto", quietly = TRUE)) {
stop("Failed to install presto package")
}
# Snapshot the current state
renv::snapshot()