pheatmap包绘制热图

目前,绘制热图的软件有很多,我也尝试了几款软件,觉得R的pheatmap包最好用。

pheatmap安装:

source("http://bioconductor.org/biocLite.R")
biocLite("pheatmap")

pheatmap绘制热图只需三步,导入数据结构如下图:

软件调用:

library(pheatmap)

数据导入:

data<- read.table("456.txt",head = T,row.names=1,sep="\t")

绘图:

pheatmap(data,cluster_rows=T,cluster_cols=T,scale="none",border_color="white",color=colorRampPalette(rev(c("red","white","blue")))(102),file="test.pdf",width=3,height=5)


pheatmap可调的参数有很多,可根据需要自行添加,调整


Posted

in

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *