runMS.Rd
Wrapper for Seurat::AddModuleScore(). Calculates module scores for feature expression programs in single cells.
runMS(
object,
genelist,
assay = DefaultAssay(object),
scale = T,
score.key = "MS",
size = autoPointSize(ncol(object)),
ncore = 10,
raster = F,
rescale = F,
verbose = T,
winsorize.quantiles = c(0, 1),
return.plots = T,
search = F,
reduction = "umap",
...
)
Seurat object
Named list of genesets.
Assay used for expression matrix.
scale module scores. Default is T.
Expression program prefix. default is "MS".
UMAP point size.
Number of workers for parallelized implementation. Default is 10.
Convert points to raster format, default is FALSE.
rescale values from 0 to 1. Default is FALSE.
Print progress. Default is TRUE.
Rescale values to lie between lower and upper bound quanitle. Default = c(0,1).
Logical to compute and return plots in results list. Default is TRUE.
Search for symbol synonyms for features in features that don't match features in object? Searches the HGNC's gene names database; see UpdateSymbolList for more details. Default is FALSE.
reduction slot used for visualized data. Default is "umap".
additional parameters passed to geom_point(...)
list of results along with ggplot handles visualizing class predictions overlaid on UMAP.
AddModuleScore
# get genesets
verhaak.df <- geneSets[["Verhaak_CancerCell_2010"]]
verhaak.list <- wideDF2namedList(verhaak.df)
gsc.df <- geneSets[["Richards_NatureCancer_2021_sc"]]
gsc.list <- wideDF2namedList(gsc.df)
neftel.df <- geneSets[["GBM_Hs_Neftel2019"]]
neftel.list <- wideDF2namedList(neftel.df)
verhaak.list <- lapply(verhaak.list, toupper)
gsc.list <- lapply(gsc.list, toupper)
neftel.list <- lapply(neftel.list, toupper)
# classify cells based on provided genesets
v.auc <- runMS(object = so.query, genelist = verhaak.list)
#> Error in GetAssayData(object = object): object 'so.query' not found
v.auc$plot.max.score
#> Error in eval(expr, envir, enclos): object 'v.auc' not found
g.auc <- runMS(object = so.query, genelist = gsc.list)
#> Error in GetAssayData(object = object): object 'so.query' not found
g.auc$plot.max.score
#> Error in eval(expr, envir, enclos): object 'g.auc' not found
n.auc <- runMS(object = so.query, genelist = neftel.list)
#> Error in GetAssayData(object = object): object 'so.query' not found
n.auc$plot.max.score
#> Error in eval(expr, envir, enclos): object 'n.auc' not found