Skip to contents

Heatmap of feature dynamics across a trajectory

Usage

plot_trajectory_heatmap(
  se_trajectory,
  var_cutoff = 0.9,
  max_features = 25000L,
  scale_rows = TRUE,
  limits = c(-1.5, 1.5),
  grep_exclude = NULL,
  pal = NULL,
  color_columns = FALSE,
  column_pal = NULL,
  label_markers = NULL,
  label_top = 50L,
  label_rows = FALSE,
  legend_direction = "vertical",
  row_order = NULL,
  use_seqnames = NULL,
  return_matrix = FALSE
)

Arguments

se_trajectory

(SummarizedExperiment) Output of get_trajectory().

var_cutoff

(numeric/NULL) Variance-quantile cutoff; keeps top-variance rows. Default 0.9.

max_features

(integer/NULL) Cap on retained rows by variance. Default 25000.

scale_rows

(logical) Row z-score then clamp to limits. Default TRUE.

limits

(numeric) Length-2 color limits. Default c(-1.5, 1.5).

grep_exclude

(character/NULL) Regex of rownames to drop. Default NULL.

pal

(character/NULL) Continuous palette name; auto by matrix if NULL. Default NULL.

color_columns

(logical) Annotate columns with colData(se)$label. Default FALSE.

column_pal

(character/NULL) Discrete palette for column labels. Default NULL.

label_markers

(character/NULL) Rownames to label. Default NULL.

label_top

(integer) Label the top-variance N rows. Default 50.

label_rows

(logical) Show all row names. Default FALSE.

legend_direction

(character) Legend orientation, "vertical" or "horizontal". Default "vertical".

row_order

(vector/NULL) Explicit row order; overrides peak ordering. Default NULL.

use_seqnames

(character/NULL) Subset rows by rowData$seqnames. Default NULL.

return_matrix

(logical) Return the ordered plotted matrix, not the heatmap. Default FALSE.

Value

A ComplexHeatmap::Heatmap, or the ordered matrix if return_matrix = TRUE.

Details

Ports ArchR's plotTrajectoryHeatmap. Rows are ordered by the position of their maximum along pseudotime (which.max), not by clustering. A horizontal legend pairs with ComplexHeatmap::draw(heatmap_legend_side = "bottom").