Closed blueskypie closed 2 years ago
For the following
ht1 = Heatmap(mat1, name = "rnorm")
ht2 = Heatmap(mat2, name = "runif")
ht3 = Heatmap(le, name = "letters")
draw(ht1 + ht2 + ht3)
The row order is determined by the first numeric matrix which is "rnorm"
.
If you want the row order from the combined matrix:
mat0=cbind(mat1,mat2,le)
row_order = hclust(dist(mat0))
ht1 = Heatmap(mat1, name = "rnorm", row_order = row_order)
ht2 = Heatmap(mat2, name = "runif")
ht3 = Heatmap(le, name = "letters")
draw(ht1 + ht2 + ht3)
So, if the row_order
is set in Heatmap
, draw
won't hclust
again?
Yes, Heatmap() is a constructor function, so all settings are there.
In the following code from docs
let
mat0=cbind(mat1,mat2,le)
, is the row clustering ofdraw(ht1 + ht2 + ht3)
computed onmat0
?How to make the row clustering be computed on
mat1
only?mat2
andle
just use the same row order from the row clustering ofmat1
.