args - commandArgsTRUE arg1 - args1 #homelzhangscriptmetebolism_heatmapqvgotxt # arg2 - asnumericargs2 df-readtablearg1header = Tsep = t # df2-readtablehomelzhangscriptmetebolism_heatmapsample_groupt
#保存结果; png(file=paste0(arg1,".png"),width=800,height=600) p1 dev.off()
#注释信息添加; p2<-pheatmap(dt,cluster_rows=F,cluster_cols=F, display_numbers=T,number_format="%.3f", border="white", fontsize_number=7, fontsize_col = 8, fontsize_row = 8, angle_col = 90, annotation_col=annotation, annotation_colors=c("Type"="white"), annotation_legend=T) p2
#保存结果; png(file=paste0(arg1,".with_annotation.png"),width=800,height=600) p2 dev.off()
#对数据进行归一化和聚类处理; p3<-pheatmap(dt,cluster_rows=T,cluster_cols=T, display_numbers=T,number_format="%.3f", border="white", fontsize_number=7, fontsize_col = 8, fontsize_row = 8, angle_col = 90, annotation_col=annotation, annotation_colors=c("Type"="white"), annotation_legend=T) p3
#保存结果; png(file=paste0(arg1,".with_annotation_clustered.png"),width=800,height=600) p3 dev.off()
原文地址: https://www.cveoy.top/t/topic/bHH3 著作权归作者所有。请勿转载和采集!