ComplexHeatmap学习笔记

时间:2020-06-04 00:00:21   收藏:0   阅读:79
set.seed(12345)
cls <- plyr::ldply (row_order(p), data.frame)
names(cls) <- c("id", "rowid") 
cls <- dplyr::arrange(cls, rowid)
scaled_cluster_data2$cluster <- cls$id

特别注意,使用row_order提取聚类结果时,如果不set.seed,那聚类结果会不一致,为了提取的聚类结果与作图的结果一致,要set.seed

 

Referrence:

https://www.bioinfo-scrounger.com/archives/484/

https://stackoverflow.com/questions/50829127/inconsistent-clustering-with-complexheatmap

 Inspired by Nancy‘s suggestion.

原文:https://www.cnblogs.com/lee-shinn/p/13040880.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!