plotClusterAbundance: Plot the differential Abundance

View source: R/abundance.R

plotClusterAbundanceR Documentation

Plot the differential Abundance

Description

Plot the differential Abundance

Usage

plotClusterAbundance(inSCE, cluster, variable, combinePlot = c("all", "none"))

Arguments

inSCE

A SingleCellExperiment object.

cluster

A single character, specifying the name to store the cluster label in colData.

variable

A single character, specifying the name to store the phenotype labels in colData.

combinePlot

Must be either "all" or "none". "all" will combine all plots into a single ggplot object. Default "all".

Details

This function will visualize the differential abundance in two given variables, by making bar plots that presents the cell counting and fraction in different cases.

Value

When combinePlot = "none", a list with 4 ggplot objects; when combinePlot = "all", a single ggplot object with for subplots.

Examples

data("mouseBrainSubsetSCE", package = "singleCellTK")
plotClusterAbundance(inSCE = mouseBrainSubsetSCE,
                     cluster = "tissue",
                     variable = "level1class")

compbiomed/singleCellTK documentation built on Oct. 27, 2024, 3:26 a.m.