Required Packages and Installation Guides

Leslie Meng

2023-03-14

Packages from R CRAN:

#install.packages("package name")
library(TCA) # TCA
library(dplyr)
library(lubridate)
library(tidyr)
library(data.table)
library(stringr)

Packages from Bioconductor:

To download packages from Bioconductor, you need to install BiocManager.

if (!require("BiocManager", quietly = TRUE))
    install.packages("BiocManager")
BiocManager::install(version = "3.16")
# Install packages from Bioconductor
BiocManager::install("package name from bioconductor")
library(TOAST) #TOAST/CeDAR
library(EpiDISH) #CellDMC
library(DESeq2) #DESeq2
library("recount")
library(GEOquery)
library("biomaRt")
library(org.Hs.eg.db)
library(annotate)
library(EnsDb.Hsapiens.v86) # 1nd method match gene symbols
library(AnnotationDbi) # 3rd method match gene symbols

Packages from Github:

To download packages from Github, you need to download devtools.

if (!require("devtools", quietly = TRUE))
    install.packages("devtools")
devtools::install_github("Sun-lab/CARseq")
library(CARseq) #CARseq
devtools::install_github("ERGlass/lrcde.dev", build_vignettes=TRUE)
library("lrcde")
devtools::install_github('shenorlab/csSAM')
library(csSAM)
devtools::install_github("stephenturner/annotables")
library(annotables) # 2nd method match gene symbols

immunedeconv takes a little bit longer (~30 mins) to be installed and for details please follow this link

install.packages("remotes")
remotes::install_github("omnideconv/immunedeconv")
library(immunedeconv)
library(IOBR)

IOBR utilizes many other R packages according to here. Since the package is not on CRAN or Bioconductor, it should be installed from Github.

# Dependencies: 
# options("repos"= c(CRAN="https://mirrors.tuna.tsinghua.edu.cn/CRAN/"))
# options(BioC_mirror="http://mirrors.tuna.tsinghua.edu.cn/bioconductor/")
if (!requireNamespace("BiocManager", quietly = TRUE)) install.packages("BiocManager")

depens<-c('tibble', 'survival', 'survminer', 'sva', 'limma', "DESeq2","devtools",
          'limSolve', 'GSVA', 'e1071', 'preprocessCore', 'ggplot2', "biomaRt",
          'ggpubr', "devtools", "tidyHeatmap", "caret", "glmnet", "ppcor", "timeROC","pracma")
for(i in 1:length(depens)){
  depen<-depens[i]
  if (!requireNamespace(depen, quietly = TRUE))
    BiocManager::install(depen,update = FALSE)
}

# Installation: 
if (!requireNamespace("IOBR", quietly = TRUE))
  devtools::install_github("IOBR/IOBR")
library(IOBR)