ssc.moduleScore: Add module scores for gene expression programs in single...

View source: R/utils.R

ssc.moduleScoreR Documentation

Add module scores for gene expression programs in single cells. Mofidy from Seurat::AddModuleScore

Description

Calculate the average expression levels of each program (cluster) on single cell level, subtracted by the aggregated expression of control feature sets. All analyzed features are binned based on averaged expression, and the control features are randomly selected from each bin.

Usage

ssc.moduleScore(
  obj,
  features,
  pool = NULL,
  nbin = 24,
  ctrl = 100,
  assay.name = "exprs",
  adjB = NULL,
  do.scale = T,
  seed = 1
)

Arguments

obj

object of SingleCellExperiment

features

Feature expression programs in named list

pool

List of features to check expression levels agains, defaults to rownames(x = object)

nbin

Number of bins of aggregate expression levels for all analyzed features

ctrl

Number of control features selected from the same bin per analyzed feature

assay.name

Name of assay to use

adjB

character; batch column of the colData(obj). (default: NULL)

do.scale

logical; scale the data (default: TRUE)

seed

Set a random seed

Value

Returns a SingleCellExperiment object with module scores added to object meta data

References

Tirosh et al, Science (2016); Seurat's source code


Japrin/sscVis documentation built on March 5, 2025, 10:23 a.m.