作者:Zuguang Gu8
    翻译:Steven Shen
    原文:Concatenate only the annotations


    The concatenation can be done without any heatmap.

    1. rowAnnotation(foo = 1:12) +
    2. rowAnnotation(bar = anno_barplot(1:12, width = unit(4, "cm")))

    4.8 仅连接注释 - 图1

    If there is only one HeatmapAnnotation object, you must concatenated with NULL.

    rowAnnotation(bar = anno_barplot(1:12, width = unit(4, "cm"))) + NULL
    

    4.8 仅连接注释 - 图2

    The annotation list is actually also a HeatmapList object.

    anno_list = rowAnnotation(foo = 1:12) +
        rowAnnotation(bar = anno_barplot(1:12, width = unit(4, "cm")))
    class(anno_list)
    
    
    ## [1] "HeatmapList"
    ## attr(,"package")
    ## [1] "ComplexHeatmap"
    

    Thus, you can use some functionalities of the draw() function for the annotation list, such as row splitting.

    draw(anno_list, row_split = rep(c("A", "B"), each = 6))
    

    4.8 仅连接注释 - 图3

    In Section 10.2, we will show how to use a list of annotations to visualize multiple summary statistics.