How to modify right annotation in heatmap without changing the rest of parameters
0
0
Entering edit mode
2.6 years ago

Hi everybody, I am getting stuck on a problem with heatmap created with the library Complex Heatmap in R. I need only to change the right row annotation but I don't want to change any other parameter. Because of course I can add the modification inside Heatmap(..., right_annotion = row_annotation...), but in this way also my heatmap changes, and I want to preserve the first heatmap generated.

I attach the image, what I want to do is to change only the annotation kn the row without touching the rest of the heatmap. Anyone can help me, please?

Thank you

annotation complexHeatmap heatmap • 796 views
ADD COMMENT
0
Entering edit mode

Please add image, code and some data, so basically a minimal reproducible example.

ADD REPLY
0
Entering edit mode

Yes sure, sorry!

This is my code for the heatmap:

library(ComplexHeatmap)

ht2 <- Heatmap(zed, column_order = order(as.numeric(gsub('T', '', colnames(zed)))),
              row_names_gp = gpar(fontsize = 1), column_dend_side = 'top', km=7,
              right_annotation = rowAnnotation(foo = anno_block(gp = gpar(fill = c(1,2,2,1,3,3,1),
                                                                labels = c('','Ascending','Ascending','','Discending','Discending',''),
                                                                labels_gp = gpar(col = 'white')))))

I have done an error on the annotation and I want to modify it without redo all the heatmap, otherwise it changes.

enter image description here

ADD REPLY

Login before adding your answer.

Traffic: 4027 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