heatmap2 row labels too big

Hi all,

I have a problem with the heatmap2 tool. My problems is in the final data page showing the results. It seems that the labelling is to big, thus resulting in overlapping gene names (see link below).

is there a possibility to sove this problem?

Thanks in advance.
CS

1 Like

Hi @CSm

We cannot see your graph from that link but the display options are known to be limited for text scaling with this version of the tool. About 30-32 total labels are the maximum before the text begins to overlap. Sometimes longer names don’t display well either using those default settings.

This is a sample matrix dataset that displays well for reference/testing: https://raw.githubusercontent.com/galaxyproject/tools-iuc/master/tools/ggplot2/test-data/mtcars.txt

Choices:

  • Choose a different wrapped tool – search the tool panel with the keyword “heatmap” to review and test others out. You could compare your data with the example file above and see how both graph. None of these will shrink the font size but some do display in a nicer font. The versions under “Visualize” will have the same default resolution limits as the tool you are using now – but you could review those two and decide for yourself which is the best (if any).
  • Create your own custom graph. The EU server hosts both Rstudio and Jupyter interactive environments, where you can move data into and out of an IE from a Galaxy history with custom commands: gx_get() and gx_put(). The GTN training site has example usage, search with the IE name. Searching with the keyword “heatmap” also finds examples (but less than 30 labels – or no labels, sometimes just a legend): https://training.galaxyproject.org/
  • Maybe reconsider if more than ~30 labels in a tiny font are informative or not? This wasn’t my idea but it is a reasonable comment I read, originally didn’t like (!!), thought about more, and then decided wasn’t as off-putting as it seemed at first. Much depends on how you plan to use the graphic of course. Source (plus includes some very clear/helpful R tips): r - How to scale the size of heat map and row names font size? - Bioinformatics Stack Exchange

Hope that helps! Others are welcome to add a better reply :slight_smile:

1 Like

Dear jennaj,

thank you very much for your help. I will have a look to other heatmap tools and see what I can get out of them. Otherwise, I already generated a heatmap without labels and add them afterwards.

Best regards
CSm

1 Like