Skip to contents

Generates a heatmap of enrichment results, with options to split by regulation, customize rotation, colors, and include additional annotations like terms per cluster.

Usage

plotHeatmap(
  input,
  rot = 90,
  column_names_centered = TRUE,
  cluster_rows = FALSE,
  cluster_columns = FALSE,
  padding = unit(c(2, 20, 2, 2), "mm"),
  legend_name = "Mean_ Signif",
  plot_colors = list(up = c("#ececec", "#e17ecd", "#7900d5"), down = c("#ececec",
    "#41B7C4", "#2A5783"), default = c("#ececec", "#41B7C4", "#2A5783")),
  annotation_bar = TRUE
)

Arguments

input

A data frame containing enrichment results with columns Cluster_Annotation, condition, pval_pooled, and optionally terms_per_cluster.

rot

Numeric. Rotation angle for column names. Defaults to 0.

column_names_centered

Logical. If TRUE, centers column names. Defaults to TRUE.

cluster_rows

Logical. If TRUE, rows are clustered. Defaults to FALSE.

cluster_columns

Logical. If TRUE, columns are clustered. Defaults to FALSE.

padding

simpleUnit. Unt for adjusting margins.

legend_name

Character. A character for the legend title. Default to "Mean Signif".

plot_colors

List. A named list of color palettes for the heatmap. Should contain up, down, and default.

annotation_bar

Logical. If TRUE, includes a bar plot annotation for term terms_per_cluster. Defaults to TRUE.

Value

A combined ComplexHeatmap object.