Question: Heatmap.2 dendrogram generation
0
gravatar for manjumoorthy95
17 months ago by
manjumoorthy9520 wrote:

I used heatmap.2 in R, to create a heatmap. I used the following command :

heatmap.2(as.matrix(mat_data), density.info="none", trace="none", margins =c(12,9), col=my_palette, breaks=seq(96,100,0.5), dendrogram="both")

What is the method used by the heatmap.2 for dendrogram generation? Is it hclust()? If so, what metric (euclidean or manhattan distance) does it use for default, since I have used default parameters in the above command.

heatmap.2 hclust R • 1.4k views
ADD COMMENTlink modified 17 months ago by RamRS30k • written 17 months ago by manjumoorthy9520

Please use the formatting bar (especially the code option) to present your post better. You can use backticks for inline code (`text` becomes text), or select a chunk of text and use the highlighted button to format it as a code block. I've done it for you this time.
code_formatting

ADD REPLYlink written 17 months ago by RamRS30k
1
gravatar for RamRS
17 months ago by
RamRS30k
Baylor College of Medicine, Houston, TX
RamRS30k wrote:

Please read the manual well. It says

... dendrograms are computed as dd <- as.dendrogram(hclustfun(distfun(X))) where X is either x or t(x).

where distful defaults to stats::dist and hclustfun defaults to stats::hclust.

ADD COMMENTlink modified 17 months ago • written 17 months ago by RamRS30k

Iam sorry, but again what is the metric used by hclust() to find distance as we pass the function from distfun(). Is there any default metric ?

ADD REPLYlink written 17 months ago by manjumoorthy9520

To get to that, you’ll either need to ask the developer or look into the source code for all instances of hclustfun being used. I’d recommend doing both - the latter approach is great as a learning method.

ADD REPLYlink written 17 months ago by RamRS30k
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: 847 users visited in the last hour