Question: The difference between heatmap.2 and pheatmap
1
gravatar for wangdp123
17 months ago by
wangdp123230
Oxford
wangdp123230 wrote:

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 • 868 views
ADD COMMENTlink modified 17 months ago by Kevin Blighe56k • written 17 months ago by wangdp123230

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 REPLYlink written 17 months ago by h.mon29k

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 REPLYlink written 17 months ago by jared.andrews075.3k
0
gravatar for Kevin Blighe
17 months ago by
Kevin Blighe56k
Kevin Blighe56k wrote:

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

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

heatmap

Kevin

ADD COMMENTlink written 17 months ago by Kevin Blighe56k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1814 users visited in the last hour