Description Usage Arguments Value Author(s) References Examples
Barplot of the number of cells measured for each sample.
1 | plotCounts(x, group_by = "condition", color_by = group_by, prop = FALSE)
|
x |
a |
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)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | 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")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.