plotPbExprs | R Documentation |
Boxplot of aggregated marker data by sample or cluster, optionally colored and faceted by non-numeric cell metadata variables of interest.
plotPbExprs(
x,
k = "meta20",
features = "state",
assay = "exprs",
fun = c("median", "mean", "sum"),
facet_by = c("antigen", "cluster_id"),
color_by = "condition",
group_by = color_by,
shape_by = NULL,
size_by = FALSE,
geom = c("both", "points", "boxes"),
jitter = TRUE,
ncol = NULL
)
x |
a |
k |
character string specifying which clustering to use;
values values are |
features |
character vector specifying
which features to include; valid values are
|
assay |
character string specifying which assay data
to use; valid values are |
fun |
character string specifying the summary statistic to use. |
facet_by |
|
color_by , group_by , shape_by |
character string specifying a non-numeric cell metadata variable
to color, group and shape by, respectively; valid values are
|
size_by |
logical specifying whether to scale point sizes by
the number of cells in a given sample or cluster-sample instance;
ignored when |
geom |
character string specifying whether to include only points, boxplots or both. |
jitter |
logical specifying whether to use |
ncol |
integer scalar specifying number of facet columns. |
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)
# construct SCE
data(PBMC_fs, PBMC_panel, PBMC_md)
sce <- prepData(PBMC_fs, PBMC_panel, PBMC_md)
sce <- cluster(sce, verbose = FALSE)
# plot median expressions by sample & condition
# ...split by marker
plotPbExprs(sce,
shape_by = "patient_id",
features = sample(rownames(sce), 6))
# ...split by cluster
plotPbExprs(sce, facet_by = "cluster_id", k = "meta6")
# plot median type-marker expressions by sample & cluster
plotPbExprs(sce, feature = "type", k = "meta6",
facet_by = "antigen", group_by = "cluster_id", color_by = "sample_id",
size_by = TRUE, geom = "points", jitter = FALSE, ncol = 5)
# plot median state-marker expressions
# by sample & cluster, split by condition
plotPbExprs(sce, k = "meta6", facet_by = "antigen",
group_by = "cluster_id", color_by = "condition", ncol = 7)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.