View source: R/plotFreqHeatmap.R
plotFreqHeatmap | R Documentation |
Heatmap of relative cluster abundances (frequencies) by sample.
plotFreqHeatmap(
x,
k = "meta20",
m = NULL,
normalize = TRUE,
row_anno = TRUE,
col_anno = TRUE,
row_clust = TRUE,
col_clust = TRUE,
row_dend = TRUE,
col_dend = TRUE,
bars = TRUE,
perc = FALSE,
hm_pal = rev(brewer.pal(11, "RdBu")),
k_pal = .cluster_cols,
m_pal = k_pal
)
x |
a |
k |
character string specifying the clustering to use;
valid values are |
m |
character string specifying a metaclustering
to include as an annotation when |
normalize |
logical specifying whether to Z-score normalize. |
row_anno , col_anno |
logical specifying whether to
include row/column annotations for clusters/samples;
for |
row_clust , col_clust |
logical specifying whether rows/columns (clusters/samples) should be hierarchically clustered and re-ordered accordingly. |
row_dend , col_dend |
logical specifying whether to include row/column dendrograms. |
bars |
logical specifying whether to include a barplot of cell counts per cluster as a right-hand side row annotation. |
perc |
logical specifying whether to display
percentage labels next to bars when |
hm_pal |
character vector of colors to interpolate for the heatmap. |
k_pal , m_pal |
character vector of colors
to use for cluster and merging row annotations.
If less than |
a Heatmap-class
object.
Helena L Crowell helena.crowell@uzh.ch
plotAbundances
,
plotExprHeatmap
,
plotMultiHeatmap
,
data(PBMC_fs, PBMC_panel, PBMC_md)
sce <- prepData(PBMC_fs, PBMC_panel, PBMC_md)
sce <- cluster(sce)
# complete
plotFreqHeatmap(sce, k = "meta12", m = "meta8")
# minimal
plotFreqHeatmap(sce, k = "meta10",
normalize = FALSE, bars = FALSE,
row_anno = FALSE, col_anno = FALSE,
row_clust = FALSE, col_clust = FALSE)
# customize colors & annotations
plotFreqHeatmap(sce,
k = "meta7", m = "meta4",
col_anno = "condition",
hm_pal = c("navy", "grey95", "gold"),
k_pal = hcl.colors(7, "Set 2"),
m_pal = hcl.colors(4, "Dark 3"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.