raivokolde / pheatmap

Pretty heatmaps
234 stars 83 forks source link

Support modulated modularity clustering or outline coreglated clusters in correlation heatmap #29

Closed tomwenseleers closed 8 years ago

tomwenseleers commented 8 years ago

One thing that would be nice to add would be to support modulated modularity clustering for correlation heatmaps, as described in http://journals.plos.org/plosgenetics/article?id=10.1371/journal.pgen.1000479 http://mmc.gnets.ncsu.edu/ (Python source code here, http://mmc.gnets.ncsu.edu/data/website/pymmc-pipeline.source.tar.gz).

Or else to allow for some option to highlight positively or negatively coregulated clusters using a thick black outline.

Right now what I do is to plot a correlation heatmap using corm=cor(m]) pheatmap(corm, clustering_method="average", clustering_distance_rows="correlation", clustering_distance_cols="correlation") and then export the graph to Inkscape or Powerpoint and add the black squares for coregulated clusters myself, but could be nice to have an automatic option for this...

raivokolde commented 8 years ago

Pheatmap has no option to draw thick black lines. But I have found small gaps between clusters (see example below) to be more aesthetically pleasing. These can be added automatically if you know the number of clusters in your tree using cutree_rows or manually using gaps_row. 30b70a76-c59f-11e5-8fdb-aab0fda50726