plot_props_pie: Plot grouped pie charts of cell type proportions

View source: R/prop_props_pie.R

plot_props_pieR Documentation

Plot grouped pie charts of cell type proportions

Description

This function allows you to visualize the relative abundance of sub-populations after running fit_maple()

Usage

plot_props_pie(fit, group)

Arguments

fit

A list returned by fit_maple()

group

A column name of fit$W or a grouping vector of length N (nrow(fit$W))

Value

A ggplot object

Examples

## 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) 

maple documentation built on March 18, 2022, 6:02 p.m.

Related to plot_props_pie in maple...