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)
如若转载,请注明出处:https://www.ouq.net/63.html