pheatmap:提取行z得分值

时间:2019-05-30 17:14:32

标签: r plot heatmap pheatmap

我对Pheatmap中的行缩放有些困惑。这是我的数据框

gene    s1  s2  s3
1   -3.83   -8.17   -8.59
2   0.33    -4.51   -7.27
3   0.15    -5.26   -6.2
4   -0.08   -6.13   -5.95
5   -1.15   -4.82   -5.75
6   -0.99   -4.11   -4.85
7   0.42    -4.18   -4.54
8   -0.32   -3.43   -4.4
9   -0.72   -3.37   -4.39

在pheatmap生成具有z行得分的图形之后,我需要提取数据帧的那些值

library(pheatmap)

my_colors <- c(min(d),seq(-4,4,by=0.01),max(d))

my_palette <- c("green",colorRampPalette(colors = c("green", "red"))
                (n = length(my_colors)-2), "red")
pheatmap(as.matrix(d),  
         scale = "row",         
         cluster_cols=FALSE,    
         cluster_rows = FALSE,
         treeheight_row=0,      
         show_rownames=FALSE,   
         main = "test.txt",
         color = my_palette,
         breaks = my_colors)

我如何获得pheatmap用于制作热图的喵喵矩阵?

0 个答案:

没有答案