draw_heatmap: Heatmap for Gene Expression Counts

View source: R/draw_heatmap.R

draw_heatmapR Documentation

Heatmap for Gene Expression Counts

Description

[Experimental]

This produces a heatmap of the chosen assay and groups by various sample variables.

Usage

draw_heatmap(
  object,
  assay_name,
  color_extremes = c(0.01, 0.99),
  col_data_annotation = NULL,
  ...
)

Arguments

object

(AnyHermesData)
input.

assay_name

(string)
selects assay from input.

color_extremes

(numeric)
min and max percentiles to inform the color scheme of the heatmap as blue and red respectively.

col_data_annotation

(character or NULL)
optional grouping variable(s), taken from input sample variables.

...

additional arguments to pass to ComplexHeatmap::Heatmap().

Value

The ComplexHeatmap::Heatmap heatmap

Examples

result <- hermes_data %>%
  normalize(methods = "voom") %>%
  add_quality_flags() %>%
  filter(what = "genes")

draw_heatmap(
  object = result[1:10, ],
  assay_name = "counts",
  col_data_annotation = "COUNTRY"
)

draw_heatmap(
  object = result[1:10, ],
  assay_name = "counts",
  color_extremes = c(0.001, 0.999),
  col_data_annotation = "AGEGRP"
)

insightsengineering/hermes documentation built on Sept. 19, 2024, 9:06 p.m.