Pheatmap包使用

Pheatmap简介: Pretty Heatmaps——Implementation of heatmaps that offers more control over dimensions and appearance.

1.安装

source(“https://bioconductor.org/biocLite.R”)

biocLite(“pheatmap”)

2.测试

library(pheatmap)
#创建数据集test测试矩阵
test = matrix(rnorm(200), 20, 10)
test[1:10, seq(1, 10, 2)] = test[1:10, seq(1, 10, 2)] + 3
test[11:20, seq(2, 10, 2)] = test[11:20, seq(2, 10, 2)] + 2
test[15:20, seq(2, 10, 2)] = test[15:20, seq(2, 10, 2)] + 4
colnames(test) = paste(“Test”, 1:10, sep = “”)
rownames(test) = paste(“Gene”, 1:20, sep = “”)
# 用pheatmap函数画热图
pheatmap(test)

原创文章,作者:bio,如若转载,请注明出处:https://www.ouq.net/pheatmap%e4%bd%bf%e7%94%a8.html

发表评论

登录后才能评论