pheatmap返回的结果是什么

pheatmap返回的结果是什么

这篇文章主要介绍了pheatmap返回的结果是什么的相关知识,内容详细易懂,操作简单快捷,具有一定借鉴价值,相信大家阅读完这篇pheatmap返回的结果是什么文章都会有所收获,下面我们一起来看看吧。

pheatmap是一个热图绘制的R包,全称pretty heatmap。利用的绘图函数是pheatmap(),对应的数据则是一个数值矩阵,譬如基于如下的矩阵10X6:

pheatmap返回的结果是什么

>matCK-WT-1CK-WT-2CK-WT-3CK-tdr1-1CK-tdr1-2CK-tdr1-3AT1G010103.7414907.36180005.81734005.71131007.970540010.3762000AT1G010305.2352802.77070002.66859003.22632001.32105001.9672600AT1G010402.8213171.56339471.93162823.19480902.60085402.3012776AT1G01050118.660000140.1430000123.383000097.222900095.253900091.8525000AT1G010601.87376916.90902460.95593750.47741840.52739230.4333881AT1G010701.7103460.78024362.79960914.72971174.36371463.3732144AT1G0108030.26110533.657105631.466907330.968902828.033402527.6215018AT1G0109086.640500116.4700000111.738000082.880900085.729200079.6027000AT1G011001448.6278451634.04173001566.5625600648.4734402683.4113500647.2749880AT1G01120173.99600051.001900052.332200066.948600041.114800049.7169000

直接按照默认参数绘图获得的结果是返回一张热图:

library(pheatmap)pheatmap(mat,scale="row")

而实际是pheatmap()返回的结果涉及多个:

Value

Invisibly apheatmapobject that is a list with components

  • tree_rowthe clustering of rows ashclustobject

  • tree_colthe clustering of columns ashclustobject

  • kmeansthe kmeans clustering of rows if parameterkmeans_kwas specified

  • gtableagtableobject containing the heatmap, can be used for combining the heatmap with other plots


根据以上的解释,可以知道pheatmap返回的对象是列表,其中包含了多个聚类的结果,其中一个组成结果为行聚类结果,对应的是行基于hclust聚类返回的对象,而hclust返回的对象也是一个列表,包括了多组信息。

以上面的代码为例,将结果赋给一个新的向量,然后查看向量的结果:

list=pheatmap(mat,scale="row")>summary(list)LengthClassModetree_row7hclustlisttree_col7hclustlistkmeans1-none-logicalgtable6gtablelist

可以看到list$tree_row也是一个列表:

>summary(list$tree_row)LengthClassModemerge18-none-numericheight9-none-numericorder10-none-numericlabels10-none-charactermethod1-none-charactercall3-none-calldist.method1-none-character>list$tree_row$order[1]21057849136

而其中有一个重要的内容是order,他是进行行聚类重排后的排列顺序,基于这个信息可以输出排序后的矩阵,从而获得与热图显示顺序一致的文件结果:

>newOrder=mat[list$tree_row$order,]>newOrderCK-WT-1CK-WT-2CK-WT-3CK-tdr1-1CK-tdr1-2CK-tdr1-3AT1G010305.2352802.77070002.66859003.22632001.32105001.9672600AT1G01120173.99600051.001900052.332200066.948600041.114800049.7169000AT1G010601.87376916.90902460.95593750.47741840.52739230.4333881AT1G0108030.26110533.657105631.466907330.968902828.033402527.6215018AT1G0109086.640500116.4700000111.738000082.880900085.729200079.6027000AT1G01050118.660000140.1430000123.383000097.222900095.253900091.8525000AT1G011001448.6278451634.04173001566.5625600648.4734402683.4113500647.2749880AT1G010103.7414907.36180005.81734005.71131007.970540010.3762000AT1G010402.8213171.56339471.93162823.19480902.60085402.3012776AT1G010701.7103460.78024362.79960914.72971174.36371463.3732144

关于“pheatmap返回的结果是什么”这篇文章的内容就介绍到这里,感谢各位的阅读!相信大家对“pheatmap返回的结果是什么”知识都有一定的了解,大家如果还想学习更多知识,欢迎关注恰卡编程网行业资讯频道。

发布于 2022-03-18 22:46:06
收藏
分享
海报
0 条评论
35
上一篇:css3如何实现2d转化 下一篇:blastall的参数有哪些
目录

    0 条评论

    本站已关闭游客评论,请登录或者注册后再评论吧~

    忘记密码?

    图形验证码