Boxplot annotation per cluster and column using ComplexHeatmap
0
0
Entering edit mode
gdeniz • 0
@gdeniz-15682
Last seen 1 day ago
United States

Hi, I am trying to add boxplot annotations to my heatmap similar as in post 1 but with one boxplot per cluster. For a single column heatmap it works as intended:

library(ComplexHeatmap)
ha = HeatmapAnnotation(summary=anno_summary(height=unit(4,"cm")))
v=rnorm(50)
Heatmap(v,name="mat",top_annotation = ha,width=unit(2,"cm"),km=2)


However, when I have two or more columns I get an error or I get the result as described in the above post.

ha = HeatmapAnnotation(summary=anno_summary(height=unit(4,"cm")))
v=cbind(rnorm(50),rnorm(50,1))
Heatmap(v,name="mat",top_annotation = ha,width=unit(2,"cm"),km=2)
Error: number of observations in top annotation should be as same as ncol of the matrix.


Question also posted here 2

ComplexHeatmap • 107 views