Skip to contents

Use scores to calculate module scores for feature expression programs in single cells and applies to Seurat object using UCell::AddModuleScore_UCell()

Usage

map_eigengenes_on_seurat(
  seurat_obj,
  membership,
  cutoff_method = c("value", "top_gene", "both"),
  value_cutoff = 0.75,
  top_genes_cutoff = 10,
  assay = "RNA",
  slot = "data",
  prefix = NULL,
  suffix = "_UCell",
  ncores = 1
)

Arguments

seurat_obj

Seurat Object

membership

a data.frame or matrix of continuous values, with genes as rows and communities as columns. Often this is the community_membership or full_community_membership output from icwgcna().

cutoff_method

should cutoff be based on a value, number of top genes, or both method. Both method will apply the top gene method, but only for genes higher than the value_cutoff.

value_cutoff

value cutoff (ignored when cutoff_method = "top_gene")

top_genes_cutoff

number of top genes to include (ignored when cutoff_method = "value")

assay

Seurat object assay element to use

slot

Pull out data from this slot of the Seurat object

prefix

prefix to add to column names of the Seurat object meta.data

suffix

suffix to add to column names of the Seurat object meta.data

ncores

Number of processors to parallelize computation for UCell::AddModuleScore_UCell()

Value

Seurat Object with additional meta.data columns of community results

Details

For typical Seurat objects this function may take a few minutes if only using one core.

Examples