View source: R/prop_props_pie.R
plot_props_pie | R Documentation |
This function allows you to visualize the relative abundance of sub-populations after running fit_maple()
plot_props_pie(fit, group)
fit |
A list returned by fit_maple() |
group |
A column name of fit$W or a grouping vector of length N (nrow(fit$W)) |
A ggplot object
## Not run: brain1 <- LoadData("stxBrain", type = "anterior1") brain2 <- LoadData("stxBrain", type = "anterior2") brain1 <- SCTransform(brain1, assay = "Spatial", verbose = FALSE) brain2 <- SCTransform(brain2, assay = "Spatial", verbose = FALSE) brain <- merge(brain1,brain2) DefaultAssay(brain) <- "SCT" VariableFeatures(brain) <- c(VariableFeatures(brain1),VariableFeatures(brain2)) brain <- RunPCA(brain) brain_fit_PCs <- fit_maple(brain,K = 6,emb = "PCs") plot_props_pie(brain_fit_PCs, group = brain$orig.ident) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.