enrichIt {escape}R Documentation

Calculate gene set enrichment scores for single-cell data

Description

This function allows users to input both the single-cell RNA-sequencing counts and any gene set pathways either from the stored data or from other sources. The enrichment calculation itself uses the gsva R package and the poisson distribution for RNA.

Usage

enrichIt(obj, gene.sets = NULL, groups = 1000, cores = 2)

Arguments

obj

The count matrix, Seurat, or SingleCellExperiment object.

gene.sets

Gene sets from getGeneSets to use for the enrichment analysis. Alternatively a simple base R list where the names of the list elements correspond to the name of the gene set and the elements themselves are simple vectors of gene names representing the gene set.

groups

The number of cells to separate the enrichment calculation.

cores

The number of cores to use for parallelization.

Value

Data frame of normalized enrichmenet scores (NES)

Author(s)

Nick Borcherding, Jared Andrews

See Also

getGeneSets to collect gene sets.

Examples

# download HALLMARK gene set collection
GS <- getGeneSets(library = "H") 
GS <- GS[c(1:2)] #Reduce list size for example
seurat_ex <- suppressWarnings(SeuratObject::pbmc_small)
ES <- enrichIt(obj = seurat_ex, gene.sets = GS)

# alternatively, construct your own list of gene sets
myGS <- list(Housekeeping = c("ACTA1", "ACTN1", "GAPDH"),
  Cancer = c("TP53","BRCA2","ERBB2","MYC"))

[Package escape version 1.4.0 Index]