add_row_annotation: add_row_annotation

add_row_annotationR Documentation

add_row_annotation

Description

Adds annotation heatmaps for one or more qualitative or quantitative annotations for each row of a main heatmap.

Usage

## S4 method for signature 'Iheatmap'
add_row_annotation(
  p,
  annotation,
  colors = NULL,
  side = c("right", "left"),
  size = 0.05,
  buffer = 0.015,
  inner_buffer = buffer/2,
  layout = list(),
  show_colorbar = TRUE
)

Arguments

p

link{Iheatmap-class} object

annotation

data.frame or object that can be converted to data frame

colors

list of color palettes, with one color per annotation column name

side

side of plot on which to add row annotation

size

relative size of each row annotation

buffer

relative size of buffer between previous subplot and row annotation

inner_buffer

relative size of buffer between each annotation

layout

layout properties for new x axis

show_colorbar

logical indicator to show or hide colorbar

Value

Iheatmap-class object, which can be printed to generate an interactive graphic

Author(s)

Alicia Schep

See Also

iheatmap, add_row_annotation, add_col_signal, add_col_groups

Examples


mat <- matrix(rnorm(24), nrow = 6)
annotation <- data.frame(gender = c(rep("M", 3),rep("F",3)),
                        age = c(20,34,27,19,23,30))
hm <- iheatmap(mat) %>% add_row_annotation(annotation)

# Print heatmap if interactive session 
if (interactive()) hm 

iheatmapr documentation built on Aug. 31, 2023, 1:08 a.m.