plotCounts {CATALYST} | R Documentation |
Barplot of the number of cells measured for each sample.
plotCounts(x, group_by = "condition", color_by = group_by, prop = FALSE)
x |
|
group_by |
character string specifying a non-numeric
cell metadata column to group by (determines x-axis ticks);
valid values are |
color_by |
character string specifying a non-numeric
cell metadata column to color by (determines grouping of bars);
valid values are |
prop |
logical specifying whether to plot relative abundances
(frequencies) for each group rather than total cell counts;
bars will be stacked when |
a ggplot
object.
Helena L Crowell helena.crowell@uzh.ch
Nowicka M, Krieg C, Crowell HL, Weber LM et al. CyTOF workflow: Differential discovery in high-throughput high-dimensional cytometry datasets. F1000Research 2017, 6:748 (doi: 10.12688/f1000research.11622.1)
data(PBMC_fs, PBMC_panel, PBMC_md) sce <- prepData(PBMC_fs, PBMC_panel, PBMC_md) # plot number of cells per sample, colored by condition plotCounts(sce, group_by = "sample_id", color_by = "condition") # same as above, but order by patient plotCounts(sce, group_by = "patient_id", color_by = "condition") # total number of cell per patient plotCounts(sce, group_by = "patient_id", color_by = NULL) # plot proportion of cells from each patient by condition plotCounts(sce, prop = TRUE, group_by = "condition", color_by = "patient_id")