Can I change the order by which heatmap cluster branches appear in R?
1
0
Entering edit mode
7.9 years ago
MicroGirl • 0

Hi there!

I have 3 heatmaps: each one for a different growth temperature: 10, 20 and 30 ÂșC for 3 bacterial species (each one with 3 replicates): species A, B and C. In the first heatmap the three replicates of A are in one major branch and B and C are in another another major branch (the replicates of B are then separated from the replicates of C). In the second heatmap B is separated from A and C. And in the third C is separated from B an A. This means that my species appear in different order in the different heatmaps (I know it is logical because it is organized by similarity given by euclidean distance). However, for visual purposes my thesis advisor wants them to stay in the same order (A, B and C) in the three heatmaps. Is there a way to do this with R? Or it is logically impossible?

Thank you! :)

R cluster heatmap • 3.1k views
ADD COMMENT
1
Entering edit mode
7.9 years ago

In heatmap(), you can use the reorder.dendrogram() function to constrain the order of the leaves.

ADD COMMENT

Login before adding your answer.

Traffic: 2039 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