Skip to contents

Builds a ComplexHeatmap of per-cluster mean expression for marker features. Default orientation: features as rows, groups as columns (matching ArchR). Set transpose = TRUE for groups as rows, features as columns.

Usage

plot_marker_heatmap(x, ...)

# Default S3 method
plot_marker_heatmap(
  x,
  results = NULL,
  transpose = FALSE,
  pal = "solarExtra",
  scale_rows = TRUE,
  cluster_cols = TRUE,
  label_markers = NULL,
  p_val_cutoff = 0.01,
  log2_fc_cutoff = 0.5,
  show_dend = TRUE,
  ...
)

# S3 method for class 'MarchRProject'
plot_marker_heatmap(
  x,
  assay_name = character(0),
  features = NULL,
  p_val_cutoff = 0.01,
  log2_fc_cutoff = 0.5,
  log2_norm = TRUE,
  scale_to = 10000,
  scale_rows = TRUE,
  limits = c(-2, 2),
  transpose = FALSE,
  pal = "solarExtra",
  cluster_cols = TRUE,
  label_markers = NULL,
  return_matrix = FALSE,
  show_dend = TRUE,
  ...
)

Arguments

x

(matrix | MarchRProject) Normalized features-by-groups matrix, or a MarchRProject with stored marker results.

...

Additional arguments passed to methods.

results

(data.frame|NULL) Marker results table for auto-selecting label_markers. Required when x is a matrix and label_markers is NULL.

transpose

(logical) Swap rows/columns. Default FALSE (features = rows).

pal

(character) Continuous palette name. Default "solarExtra".

scale_rows

(logical) Whether rows were z-scored (affects legend title). Default TRUE.

cluster_cols

(logical) Cluster the column axis. Default TRUE.

label_markers

(character|NULL) Feature names to annotate. NULL = auto top 15 per group. character(0) = no labels.

p_val_cutoff

(numeric) Adjusted p-value threshold for auto labels. Default 0.01.

log2_fc_cutoff

(numeric) Log2 fold-change threshold for auto labels. Default 0.5.

show_dend

(logical) Show dendrogram. Default TRUE.

assay_name

(character) Assay name. Auto-selected if one exists.

features

(character|NULL) Specific features. NULL = all passing cutoffs.

log2_norm

(logical) Column-normalize and log2-transform. Default TRUE.

scale_to

(numeric) Normalization scale factor. Default 1e4.

limits

(numeric) Value clipping range. Default c(-2, 2).

return_matrix

(logical) Return matrix instead of Heatmap. Default FALSE.

Value

A ComplexHeatmap::Heatmap object. Call ComplexHeatmap::draw() to render.

Details

ArchR correspondence: Corresponds to ArchR's plotMarkerHeatmap(). Requires add_marker_features() first.