I went over the entire help section and also looked through the forums to see if this had been done with pheatmap and couldnt find anything. I spent quite some time (I am new to this) trying to figure out a heatmap function to draw multiple annotations. I was initially using heatmap.2 which allows for adjusting the size of the annotation but doesnt allow for multiple annotations. I currently have an image like this (https://i.postimg.cc/Y9Kh0RK3/Sample-Chip.png) when ideally i would like something around this size (made with heatmap.2) https://i.postimg.cc/7PTrm4zf/Sample-Image-2.png
I faced a similar problem with pheatmap, and have switched to ComplexHeatmap, although the options are plenty, I couldn't quite figure out, how exactly to match the rownames of the matrix to its corresponding enrichment term as done in pheatmap annotations. Could you share how you solved this issue ? Thanks !!!
In pheatmap, there's no direct parameter to adjust the width of row annotation tracks, as they're sized automatically based on content and font. However, you can minimise the space indirectly by reducing the font size or hiding the annotation labels entirely.
For more precise control over annotation widths, alternatives like ComplexHeatmap from Bioconductor do allow explicit sizing (e.g., via width = unit(1.5, "cm") in rowAnnotation).
Heatmap functions have a ton of parameters in their readme. Have you read the manual thoroughly? Please show us you have invested some effort.
I went over the entire help section and also looked through the forums to see if this had been done with pheatmap and couldnt find anything. I spent quite some time (I am new to this) trying to figure out a heatmap function to draw multiple annotations. I was initially using heatmap.2 which allows for adjusting the size of the annotation but doesnt allow for multiple annotations. I currently have an image like this (https://i.postimg.cc/Y9Kh0RK3/Sample-Chip.png) when ideally i would like something around this size (made with heatmap.2) https://i.postimg.cc/7PTrm4zf/Sample-Image-2.png
That looks like a
themesetting foraxis.text.yandaxis.ticks.yin ggplot context. Does pheatmap not have relevant settings?EDIT: I see at least 2-3 options addressing this issue. Have you tried tweaking
show_colnamesorfontsize_col? What options have you tried?I agree with you
See How to add images to a Biostars post to add your images properly.
Thanks. I ended up using ComplexHeatmap. It had more options that I needed.
I faced a similar problem with pheatmap, and have switched to ComplexHeatmap, although the options are plenty, I couldn't quite figure out, how exactly to match the rownames of the matrix to its corresponding enrichment term as done in pheatmap annotations. Could you share how you solved this issue ? Thanks !!!