Learn R Programming

tidyHeatmap (version 1.11.6)

annotation_tile: Adds a tile annotation layer to a `InputHeatmap`, that on evaluation creates a `ComplexHeatmap`

Description

annotation_tile() from a `InputHeatmap` object, adds a tile annotation layer.

Usage

annotation_tile(.data, .column, palette = NULL, size = NULL, ...)

# S4 method for InputHeatmap annotation_tile(.data, .column, palette = NULL, size = NULL, ...)

Value

A `InputHeatmap` object that gets evaluated to a `ComplexHeatmap`

A `InputHeatmap` object that gets evaluated to a `ComplexHeatmap`

Arguments

.data

a `InputHeatmap` object created calling `tidyHeatmap::heatmap()`

.column

Vector of quotes

palette

A character vector of colors, or a function such as colorRamp2 (see examples).

size

A grid::unit object, e.g. unit(2, "cm"). This is the height or width of the annotation depending on the orientation.

...

The arguments that will be passed to anno_block and HeatmapAnnotation if you want to fine tune the aesthetics.

Details

lifecycle::badge("maturing")

It uses `ComplexHeatmap` as visualisation tool.

References

Mangiola, S. and Papenfuss, A.T., 2020. "tidyHeatmap: an R package for modular heatmap production based on tidy principles." Journal of Open Source Software. doi:10.21105/joss.02472.

Examples

Run this code


hm = 
  tidyHeatmap::N52 |>
  tidyHeatmap::heatmap(
    .row = symbol_ct,
    .column = UBR,
    .value = `read count normalised log`
)

hm |> annotation_tile(CAPRA_TOTAL)


hm |> 
  annotation_tile(
    inflection, 
    palette = circlize::colorRamp2(c(0, 3,10), c("white", "green", "red"))
 )

Run the code above in your browser using DataLab