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
orfull_community_membership
output fromicwgcna()
.- 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()
Examples
if (FALSE) { # \dontrun{
library("UCSCXenaTools")
luad <- getTCGAdata(
project = "LUAD", mRNASeq = TRUE, mRNASeqType = "normalized",
clinical = FALSE, download = TRUE
)
ex <- as.matrix(data.table::fread(luad$destfiles), rownames = 1)
results <- icwgcna(ex)
unique_top_genes <- map_eigengenes_on_seurat(
SeuratObject::pbmc_small,
results$community_membership
)
} # }