escape.matrix: Calculate gene set enrichment scores

View source: R/runEscape.R

escape.matrixR Documentation

Calculate gene set enrichment scores

Description

This function allows users to input both the single-cell RNA-sequencing counts and output the enrichment scores as a matrix.

Usage

escape.matrix(
  input.data,
  gene.sets = NULL,
  method = "ssGSEA",
  groups = 1000,
  min.size = 5,
  normalize = FALSE,
  make.positive = FALSE,
  BPPARAM = SerialParam(),
  ...
)

Arguments

input.data

The count matrix, Seurat, or Single-Cell Experiment object.

gene.sets

Gene sets can be a list, output from getGeneSets, or the built-in gene sets in the escape package escape.gene.sets.

method

Select the method to calculate enrichment, AUCell, GSVA, ssGSEA or UCell.

groups

The number of cells to separate the enrichment calculation.

min.size

Minimum number of gene necessary to perform the enrichment calculation

normalize

Whether to divide the enrichment score by the number of genes TRUE or report unnormalized FALSE.

make.positive

During normalization shift enrichment values to a positive range TRUE for downstream analysis or not TRUE (default). Will only be applied if normalize = TRUE.

BPPARAM

A BiocParallel::bpparam() object that for parallelization.

...

pass arguments to AUCell GSVA, ssGSEA, or UCell call

Value

matrix of enrichment scores

Author(s)

Nick Borcherding, Jared Andrews

See Also

getGeneSets to collect gene sets.

Examples

GS <- list(Bcells = c("MS4A1", "CD79B", "CD79A", "IGH1", "IGH2"),
           Tcells = c("CD3E", "CD3D", "CD3G", "CD7","CD8A"))
pbmc_small <- SeuratObject::pbmc_small
ES <- escape.matrix(pbmc_small, 
                    gene.sets = GS, 
                    min.size = NULL)


ncborcherding/escape documentation built on Sept. 23, 2024, 10:01 p.m.