Adds module activity scores to a Seurat object based on gene partitions and optionally smooths scores locally.
AddModuleActivityScore(
srat,
gene_partition,
assay = "RNA",
do_local_smooth = FALSE,
knn = 10,
major_vote = 6,
nloop = 100,
module_names = NULL
)
Seurat object; the single-cell RNA-seq data.
factor; the gene modules.
character; the assay used for calculating module score. Default is "RNA".
logical; if TRUE, smooths the module score for each cell by its neighborhoods. Default is FALSE.
integer; the neighborhood size for local smoothing. Default is 10.
integer; the majority vote number for local smoothing. Default is 6.
integer; the number of sampling iterations. Default is 100.
character vector; the prefix name for each gene module. If NULL, default names are used.
A Seurat object with module activity scores added to the metadata.
This function computes module activity scores for gene partitions in a Seurat object. It allows for optional local smoothing of the scores based on neighborhood information.