draw-HeatmapAnnotation-method: Draw the heatmap annotations

Description Usage Arguments Details Value Author(s) Examples

Description

Draw the heatmap annotations

Usage

1
2
## S4 method for signature 'HeatmapAnnotation'
draw(object, index, k = NULL, n = NULL, align_to = "bottom", ...)

Arguments

object

a HeatmapAnnotation-class object.

index

a vector of order.

k

if row annotation is splitted, the value identifies which row slice.

n

total number of row slices.

align_to

if the allocated space is more than than the column annotation itself, should the viewport be aligned to the top or bottom?

...

pass to viewport which contains all annotations.

Details

A viewport is created. Mostly, this method is used inside draw,HeatmapList-method.

Value

No value is returned.

Author(s)

Zuguang Gu <z.gu@dkfz.de>

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
df = data.frame(type = c("a", "a", "a", "b", "b", "b"))
ha = HeatmapAnnotation(df = df)
grid.newpage(); draw(ha, 1:6)
grid.newpage(); draw(ha, 6:1)

ha = HeatmapAnnotation(df = df, col = list(type = c("a" =  "red", "b" = "blue")))
grid.newpage(); draw(ha, 1:6)

ha = HeatmapAnnotation(df = df, col = list(type = c("a" =  "red", "b" = "blue")), 
    which = "row")
grid.newpage(); draw(ha, 1:6)

ha = HeatmapAnnotation(points = anno_points(1:6))
grid.newpage(); draw(ha, 1:6)

ha = HeatmapAnnotation(histogram = anno_barplot(1:6))
grid.newpage(); draw(ha, 1:6)

mat = matrix(rnorm(36), 6)
ha = HeatmapAnnotation(boxplot = anno_boxplot(mat))
grid.newpage(); draw(ha, 1:6)

eilslabs/ComplexHeatmap documentation built on May 16, 2019, 1:21 a.m.