In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-11 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces the relevant knowledge of what the result returned by pheatmap is, the content is detailed and easy to understand, the operation is simple and fast, and it has certain reference value. I believe you will gain something after reading this pheatmap return result. Let's take a look at it.
Pheatmap is a heat map R packet, the full name is pretty heatmap. The drawing function used is pheatmap (), and the corresponding data is a numerical matrix, such as based on the following matrix 10X6:
> mat CK-WT-1 CK-WT-2 CK-WT-3 CK-tdr1-1 CK-tdr1-2 CK-tdr1-3AT1G01010 3.741490 7.3618000 5.8173400 5.7113100 7.9705400 10.3762000AT1G01030 5.235280 2.7707000 2.6685900 3.2263200 1.3210500 1.9672600AT1G01040 2.821317 1.5633947 1.9316282 3.1948090 2.6008540 2.3012776AT1G01050 118.660000 . 1430000 123.3830000 97.2229000 95.2539000 91.8525000AT1G01060 1.873769 16.9090246 0.9559375 0.4774184 0.5273923 0.4333881AT1G01070 1.710346 0.7802436 2.7996091 4.7297117 4.3637146 3.3732144AT1G01080 30.261105 33.6571056 31.4669073 30.9689028 28.0334025 27.6215018AT1G01090 86.640500 116.4700000 111.7380000 82.8809000 85.7292000 79.6027000AT1G01100 1448.627845 1634.0417300 1566.5625600 648.4734402 683.4113500 647.2749880AT1G01120 173.996000 51.0019000 52.3322000 66.9486000 41.1148000 49.7169000
The result of drawing directly according to the default parameters is to return a heat map:
Library (pheatmap) pheatmap (mat,scale = "row")
In fact, the result returned by pheatmap () involves several:
Value
Invisibly a pheatmap object that is a list with components
Tree_row the clustering of rows as hclust object
Tree_col the clustering of columns as hclust object
Kmeans the kmeans clustering of rows if parameter kmeans_k was specified
Gtable a gtable object containing the heatmap, can be used for combining the heatmap with other plots
According to the above explanation, we can know that the object returned by pheatmap is a list, which contains the results of multiple clustering, one of which is the result of row clustering, which corresponds to the object returned by row clustering based on hclust, while the object returned by hclust is also a list, including multiple groups of information.
Take the above code as an example, assign the result to a new vector, and then look at the result of the vector:
List=pheatmap (mat,scale= "row") > summary (list) Length Class Mode tree_row 7 hclust list tree_col 7 hclust list kmeans 1-none- logicalgtable 6 gtable list
You can see that list$tree_row is also a list:
Summary (list$tree_row) Length Class Mode merge 18-none- numeric height 9-none- numeric order 10-none- numeric labels 10-none- charactermethod 1-none- charactercall 3-none- call dist.method 1-none- character > list$tree_row$order [1] 2 10 5 7 8 4 9 1 3 6
One of the important contents is order, which is the arrangement order after row clustering rearrangement. based on this information, the sorted matrix can be output, thus the file results consistent with the heat map display order can be obtained:
> newOrder= [list $tree_row$order] > newOrder CK-WT-1 CK-WT-2 CK-WT-3 CK-tdr1-1 CK-tdr1-2 CK-tdr1-3AT1G01030 5.235280 2.7707000 2.6685900 3.2263200 1.3210500 1.9672600AT1G01120 173.996000 51.0019000 66.9486000 41.1148000 49.7169000AT1G01060 1.873769 16.90246 0.9559375 0.4774184 0.5273923 0.4333881AT1G01080 30.261105 33 . 6571056 31.4669073 30.9689028 28.0334025 27.6215018AT1G01090 86.640500 116.4700000 111.7380000 82.8809000 85.7292000 79.6027000AT1G01050 118.660000 140.1430000 123.3830000 97.2229000 95.2539000 91.8525000AT1G01100 1448.627845 1634.0417300 1566.5625600 648.4734402 683.4113500 647.2749880AT1G01010 3.741490 7.3618000 5.8173400 5.7113100 7.9705400 10.3762000AT1G01040 2.821317 1.5633947 1.9316282 3.1948090 2.6008540 2.3012776AT1G01070 1. 710346 0.7802436 2.7996091 4.7297117 4.3637146 3.3732144 this is the end of the article on "what is the result returned by pheatmap" Thank you for reading! I believe you all have a certain understanding of the knowledge of "what is the result returned by pheatmap". If you want to learn more knowledge, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.