This is a test version of Biostars. For the public version, visit https://www.biostars.org.
ComplexHeatmap anno_mark position changes with height of gene expression heatmap

Hi all,

This might not be a completely bioinformatical question. But I am plotting a heatmap with ComplexHeatmap with rows as genes and columns as samples. Since I have too many genes plotted, I decided to use anno_mark to show only those that I am interested in. All was working well, until I realized that the position of the labels will change when I tweak with the dimensions of the heatmap. Furthermore, the change in position of the labels is not proportional to the heatmap itself, causing my anno_marks to be at different row positions under varying heatmap heights.

Just wondering if anyone has met this problem before and how they come about stablizing this. Thanks.

complexheatmap

This is a follow up on the thread just incase anyone else has stumbled upon this problem. The anno_mark positioning seems to accurate once the plot is saved to JPG instead of visualizing it on the console. Simply use jpeg() before plotting followed by dev.off() after the plot should work. Changing the dimensions does not seem to affect the anno_mark positioning.

0 answers

No answers yet.

Log in to answer this question.