问题描述
我正在使用R heatmaply包来生成交互式热图.我喜欢该软件,但是我想从中获得与使用pheatmap包相同的群集(行和列的顺序).因此,我希望这两个命令产生相同的输出:
heatmaply(比例(mtcars))秘谱图(比例(mtcars))
有没有办法做到这一点?提前致谢.阿图罗
P.S.我最近问了另一个关于颜色输出的类似问题,即不是聚类输出,在这里得到了很好的回答:
和 heatmaply
的输出
I am using the R heatmaply package to produce interactive heatmaps. I like the software, but I would like to get from it the same clustering (ordering of rows and columns) I get using the pheatmap package. Therefore, I would like the two commands to produce the same ouput:
heatmaply (scale (mtcars))
pheatmap (scale (mtcars))
Is there a way to do this? Thanks in advance. Arturo
P.S. I recently asked another similar question about the color output, i.e., not clustering, output, that was brilliantly answered here: R heatmaply and pheatmap output
Here is a solution to order columns and rows of heatmaply
as in pheatmap
:
phtmap <- pheatmap(scale(mtcars))
heatmaply(scale(mtcars), Rowv=phtmap[[1]], Colv=phtmap[[2]], revC=TRUE)
The ouput of pheatmap
and the output of heatmaply
这篇关于在Pheatmap和Heatmaply R程序包中聚类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!