The difference between heatmap.2 and pheatmap
1
1
Entering edit mode
3.0 years ago
wangdp123 ▴ 250

Hi there,

I have a long standing unresolved question about the difference between heatmap.2 and pheatmap.

In general, we could see the clusters produced by pheatmap exhibit a more obvious color pattern (the genes with the similar colors in each row will cluster together first) rather than heatmap.2 (the genes with the similar colors are distributed).

Does it mean pheatmap outperform heatmap.2 in terms of gene expression profile cluster analysis?

Sometimes, even the clusters of samples look different.

Does anyone know if heatmap.2 usually generate a less clear pattern for the gene expression profiles, why should we use it for the analysis?

Many thanks,

Tom

heatmap RNA-Seq • 1.9k views
ADD COMMENT
0
Entering edit mode

Both packages provide dozens of parameters for customization, and may have different defaults. I bet one can tweak both to produce very similar heatmaps. Personal preference and effort at reading documentation will have a lot of influence on ones results.

ADD REPLY
0
Entering edit mode

As @h.mon said, you can change the clustering algorithms for each quite easily - you should be able to derive essentially the same heatmap from each with a few tweaks. Both are fine for heatmap generation of expression data. It sounds like you might not be scaling by row or just not clustering the columns in your heatmap.2 call.

I always have issues getting multiple pheatmap plots in a single PDF from jupyter notebook, so I tend to avoid it, but it's really just personal preference.

ADD REPLY
0
Entering edit mode
3.0 years ago

Does it mean pheatmap outperform heatmap.2 in terms of gene expression profile cluster analysis?

Absolutely not. Given the same parameter configurations, they should produce the same results. If you run both functions with the default settings, then you will see different results because the default settings will differ between both. For one, I note that both have different default colour schemes, with pheatmap having a broader colour palette than heatmap.2 (which explains the difference in shade that you observe).

From your command line, type ?heatmap.2 and ?pheatmap to see the defaults. Type heatmap.2 or pheatmap to see the actual code for each function.

Other key places to look for differences:

  • dendrogram 'reorder' functions
  • scaling functions
  • distance metrics
  • linkage metrics

Also note the previous answer, here: A: Clustering differences between heatmap.2 and pheatmap

One can produce very clear and professional heatmaps with heatmap.2:

heatmap

Kevin

ADD COMMENT

Login before adding your answer.

Traffic: 1998 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6