Skip to content

For remote attendees: R Packages Installation

Ryan Mulqueen edited this page May 23, 2026 · 1 revision

Download Rstudio

Download the Rstudio appropriate desktop app and follow the setup instructions.

https://posit.co/download/rstudio-desktop

Note you may also need to configure a github token for downloading packages from github.

1. Basic data handling

library(Matrix)
library(matrixStats)
library(tidyverse)
library(dplyr)
library(reshape2)
library(arrow)
library(schard)
library(BiocParallel)
library(Rfast)
library(Rfast2)
library(BiocNeighbors)
install.packages("rlang")

install.packages(c("devtools","Matrix","matrixStats","tidyverse","dplyr","reshape2","arrow","Rfast","Rfast2"))

GITHUB_PAT="your_PAT_token" ## may need github account to download, personal access token can be set in environment: 


remotes::install_github("cellgeni/schard") 

install.packages("BiocManager","remotes")

BiocManager::install(c("BiocParallel","BiocNeighbors"))

2. Plotting and visualization

library(ggplot2)
library(grid)
library(cowplot)
library(patchwork)
library(plotly)
library(ggpubr)
library(ggrepel)
library(RColorBrewer)
library(paletteer)
library(fields)
library(ComplexHeatmap)
install.packages(c("ggplot2","grid","cowplot","patchwork","plotly","ggpubr","ggrepel","RColorBrewer","paletteer","fields"))

BiocManager::install("ComplexHeatmap")

3. scRNA-seq analysis

library(Seurat)    ## 5.4.0
library(SeuratWrappers)
library(SeuratData)
library(SeuratExtend)
library(presto)
library(scCustomize)
install.packages(c("Seurat", "scCustomize"))

BiocManager::install(c("presto"))

remotes::install_github("satijalab/seurat-wrappers") # may need github account to download

remotes::install_github("satijalab/seurat-data") # may need github account to download

remotes::install_github("huayc09/SeuratExtend") # may need github account to download

4. Spatial transcriptomics

library(Banksy)
library(Giotto)
library(spacexr)
library(spdep)
library(terra)
library(deldir)
library(FNN)
install.packages(c("spdep", "terra", "deldir", "FNN"))

BiocManager::install(c("Banksy", "spacexr"))

pak::pkg_install("giotto-suite/Giotto") #fix
library(Giotto)#
Giotto::installGiottoEnvironment()#

5. CNV inference

library(copykat)
library(copykit)
library(infercnv)
library(SpatialInferCNV)
BiocManager::install("infercnv")

devtools::install_github("navinlabcode/copykat") # may need github account to download

devtools::install_github("navinlabcode/copykit") # may need github account to download

devtools::install_github("aerickso/SpatialInferCNV") # may need github account to download

6. Integration / batch correction

library(harmony)
library(batchelor)
install.packages("harmony")

BiocManager::install("batchelor")

7. Reference annotation

library(SingleR)  
library(celldex)
library(scRNAseq)
library(Azimuth)
library(AzimuthAPI)
BiocManager::install(c("SingleR", "celldex", "scRNAseq"))

remotes::install_github("satijalab/azimuth", ref = "master") #fix

devtools::install_github("satijalab/AzimuthAPI") #fix

Additional Packages

library(msigdbr)
library(fgsea)
library(scrapper)
install.packages("msigdbr")

BiocManager::install(c("fgsea", "scrapper"))

Clone this wiki locally