R09

作者: rong酱 | 来源:发表于2021-12-10 13:31 被阅读0次

    热图

    library(pheatmap)
    
    bk <- c(seq(-1,-0.01,by=0.01),seq(0,1,by=0.01))
    mycolor <- c(colorRampPalette(colors=c("navy","white"))(length(bk)/2),colorRampPalette(color=c("white","firebrick3"))(length(bk)/2))
    
    r <- read.table('4sample_readcount_new.matrix',sep="\t",row.names=1,header=T)
    rdata <- as.data.frame(r)
    rdata <- rdata[apply(r, 1, function(x) sd(x)!=0),]
    dpi=2500
    png('heatmap_1210.png',w=12*dpi,h=10*dpi,units = "px",res = dpi,type='cairo')
    pheatmap(rdata,scale = "row", cellwidth = 20, cellheight = 0.5,cluster_cols = F,cluster_rows = T,treeheight_row=0, treeheight_col=0,show_rownames=T, color=mycolor,fontsize = 0.5,fontsize_col=12, breaks=bk,legend=F)
    dev.off()
    

    要求高帮助我成长

    相关文章

      网友评论

          本文标题:R09

          本文链接:https://www.haomeiwen.com/subject/dfucfrtx.html