Entering edit mode
Hi,
Does anyone knows how to put two heatmaps (generated from GeneOverlap package) side-by-side?
These are the code to produce one heatmap:
library(GeneOverlap)
data(GeneOverlap)
gom.obj <- newGOM(hESC.ChIPSeq.list, genome.size=gs.RNASeq)
drawHeatmap(gom.obj, adj.p=TRUE, cutoff=1, # show all.
ncolused=5, grid.col="Blues", note.col="black")
drawHeatmap(gom.obj, log.scale=TRUE, ncolused=5)
drawHeatmap(gom.obj, what="Jaccard", ncolused=5)
Thank you in advance for your help.
Hi James,
Thanks for your comment. I'm not familiar with layout but I tried par(mfrow=c(1,2)) it doesn't work. This still plot the heatmaps on different pages.
Ah, you know what? I forgot that
heatmap.2
already callslayout
, so you won't be able to do what you want, at least within R, usingdrawHeatmap
.An alternative would be to use ComplexHeatmap or pheatmap instead. You will probably have to figure out what
drawHeatmap
does, exactly, in order to generate something comparable on your own. But that's the promise and the peril of Open Source software. All the code is there and available, so you can do what you want. But only if you are willing and able to figure out how to do what you want, given what you have.