Boxplot annotation per cluster and column using ComplexHeatmap
0
0
Entering edit mode
gdeniz • 0
@gdeniz-15682
Last seen 2.1 years 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.

Please advise.

Question also posted here 2

ComplexHeatmap • 1.3k views
ADD COMMENT

Login before adding your answer.

Traffic: 438 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6