View source: R/plotTopicProfiles.R
plotTopicProfiles | R Documentation |
This function takes in the fitted NMF model and returns the
topic profiles learned for each cell facet = FALSE
or cell type
facet = TRUE
. Ideal training will return all the cell from the same
cell type to share a unique topic profile.
plotTopicProfiles(x, y, facet = FALSE, min_prop = 0.01, ncol = NULL)
x |
|
y |
vector of group labels. Should be of length |
facet |
logical indicating whether to stratify by group.
If |
min_prop |
scalar in [0,1]. When |
ncol |
integer scalar specifying the number of facet columns. |
ggplot
object
Marc Elosua Bayes & Helena L Crowell
library(ggplot2)
x <- mockSC()
y <- mockSP(x)
z <- getMGS(x)
res <- SPOTlight(x, y,
groups = x$type,
mgs = z,
group_id = "type",
verbose = FALSE)
plotTopicProfiles(res[[3]], x$type, facet = TRUE)
plotTopicProfiles(res[[3]], x$type, facet = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.