#install.packages("pheatmap")
rt1=read.table("lssoExp",sep="\t",header=T,row.names=1,check.names=F) #读取文件
rt1=as.data.frame(t(rt1[,3:ncol(rt1)]))
rt=log2(10^rt1+0.001)
outpdf="heatmap.pdf"
library(pheatmap)
Type=read.table("clusterCliGroup.Sig.txt",sep="\t",header=T,row.names=1,check.names=F)
Type=Type[order(Type$risk),]
colnames(rt)=gsub("\\.","-",colnames(rt))
rownames(Type)=gsub("\\.","-",rownames(Type))
rt=rt[,row.names(Type)]
pdf(outpdf,height=7.5,width=10)
pheatmap(rt, annotation=Type,
color = colorRampPalette(c("blue", "white", "red"))(50),
cluster_cols =F,
fontsize=8,
fontsize_row=8,
scale="row",
show_colnames=F,
fontsize_col=3)
dev.off()
网友评论