plotClusterHeatmap: Plot cluster heatmap

View source: R/plotClusterHeatmap.R

plotClusterHeatmapR Documentation

Plot cluster heatmap

Description

Heatmaps summarizing the clustering result.

Usage

plotClusterHeatmap(
  sce,
  features = rownames(sce),
  clusters = sce$cluster_id,
  by_exprs_values = "exprs",
  fun = "median",
  scale = T,
  cluster_rows = T,
  cluster_anno = F,
  draw_dend = T,
  draw_freqs = T,
  split_by = NULL,
  hm2 = NULL
)

Arguments

sce

A SingleCellExperiment object.

features

A character vector. Specifies which antigens to use for clustering.

clusters

A character vector. Specifies the cluster IDs.

by_exprs_values

A character string. Specifies which assay data to use for plotting.

fun

A character string. Specifies the function for computing the summary statistic.

scale

Logical. Specifies whether scaled values should be plotted. Scaled values corresponds to cofactor arcsinh-transformed expression values scaled between 0 and 1 using 1 Note that hierarchical clustering is performed on the unscaled data.

cluster_rows

Logical. Specifies whether rows should be reordered by hierarchical clustering.

cluster_anno

Logical. Specifies whether clusters should be annotated.

draw_dend

Logical. Specifies if the row dendrogram should be drawn.

draw_freqs

Logical. Specifyies whether to display cell counts and proportions.

split_by

A character string. Must corresponds to a column name of rowData(sce). If specified, the data will be subset according to this variable, and multiple heatmaps will be drawn.

hm2

A character string. Specifies the right-hand side heatmap. One of:

  • "abundances": cluster frequencies across samples

  • a character string/vector corresponding to one/multiple marker(s): median marker expressions across samples and clusters

Depending on argument hm2, the side heatmap can contain one of:

  • relataive cluster abundances by sample

  • median (scaled, arcsinh-transformed) marker expressions by sample

Value

a HeatmapList-class object.


casanova-lab/iMUBAC documentation built on Sept. 13, 2022, 6:36 p.m.