Calculate gene module scores

ComputeModuleScore(x, ...)

# S3 method for default
ComputeModuleScore(
  x,
  gene.sets,
  bg.genes = NULL,
  method = "UCell",
  min.size = 20,
  batch.size = 500,
  cores = 1,
  ...
)

# S3 method for Seurat
ComputeModuleScore(
  x,
  gene.sets,
  bg.genes = NULL,
  method = "UCell",
  min.size = 20,
  batch.size = 500,
  cores = 1,
  assay = Seurat::DefaultAssay(x),
  ...
)

Arguments

x

gene expression matrix, rows are genes, columns are cells. Can be any format, UMI, CPM, TPM, etc.

...

Arguments passed to other methods.

gene.sets

a list of gene sets in data.frame or named list.

bg.genes

background genes for calculating signature score, NULL means use all genes. Default: NULL

method

method for calculating signature score, support "AUCell" or "UCell". Default: UCell

min.size

The minimal genes of the gene sets. The size of gene sets less than this value were ignored. Default: 20

batch.size

The number of cells were calculated for each batch. This parameter is for the parallel calculation in adopted in 'AUCell' method. Default: 500

cores

number of threads for parallel computing. Default: 1

assay

Name of the seurat object assay.

Value

A signature score matrix or Seurat object.