View source: R/analysis_functions.R
runMS | R Documentation |
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",
...
)
object |
Seurat object |
genelist |
Named list of genesets. |
assay |
Assay used for expression matrix. |
scale |
scale module scores. Default is T. |
score.key |
Expression program prefix. default is "MS". |
size |
UMAP point size. |
ncore |
Number of workers for parallelized implementation. Default is 10. |
raster |
Convert points to raster format, default is FALSE. |
rescale |
rescale values from 0 to 1. Default is FALSE. |
verbose |
Print progress. Default is TRUE. |
winsorize.quantiles |
Rescale values to lie between lower and upper bound quanitle. Default = c(0,1). |
return.plots |
Logical to compute and return plots in results list. Default is TRUE. |
search |
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 |
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.
Nicholas Mikolajewicz
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)
v.auc$plot.max.score
g.auc <- runMS(object = so.query, genelist = gsc.list)
g.auc$plot.max.score
n.auc <- runMS(object = so.query, genelist = neftel.list)
n.auc$plot.max.score
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.