Visualizes values stored in the colData slot of a SingleCellExperiment object via a bar plot.
plotSCEBarColData(
inSCE,
coldata,
sample = NULL,
groupBy = NULL,
dots = TRUE,
xlab = NULL,
ylab = NULL,
axisSize = 10,
axisLabelSize = 10,
dotSize = 0.5,
transparency = 1,
defaultTheme = TRUE,
gridLine = FALSE,
summary = NULL,
title = NULL,
titleSize = NULL,
combinePlot = TRUE
)
Input SingleCellExperiment object with saved dimension reduction components or a variable with saved results. Required.
colData value that will be plotted.
Character vector. Indicates which sample each cell belongs to.
Groupings for each numeric value. A user may input a vector equal length to the number of the samples in the SingleCellExperiment object, or can be retrieved from the colData slot. Default NULL.
Boolean. If TRUE, will plot dots for each violin plot. Default TRUE.
Character vector. Label for x-axis. Default NULL.
Character vector. Label for y-axis. Default NULL.
Size of x/y-axis ticks. Default 10.
Size of x/y-axis labels. Default 10.
Size of dots. Default 0.5.
Transparency of the dots, values will be 0-1. Default 1.
Removes grid in plot and sets axis title size to 10 when TRUE. Default TRUE.
Adds a horizontal grid line if TRUE. Will still be drawn even if defaultTheme is TRUE. Default FALSE.
Adds a summary statistic, as well as a crossbar to the violin plot. Options are "mean" or "median". Default NULL.
Title of plot. Default NULL.
Size of title of plot. Default 15.
Boolean. If multiple plots are generated (multiple samples, etc.), will combined plots using `cowplot::plot_grid`. Default TRUE.
a ggplot of the barplot of coldata.
data("mouseBrainSubsetSCE")
plotSCEBarColData(
inSCE = mouseBrainSubsetSCE,
coldata = "age", groupBy = "sex"
)