R Programming in Heatmaps
如何用R语言绘制热图
pheatmap函数
library(pheatmap)
mat <- read.csv("heatmap_data.csv",row.names = 1)
annotation_row <- read.csv("annotation_row.csv",row.names = 1)
annotation_col <- read.csv("annotation_col.csv",row.names = 1)
pheatmap(mat,
clustering_distance_cols = "euclidean",
clustering_distance_rows = "euclidean",
clustering_method = "complete",
fontsize = 4,
cluster_rows = TRUE,
cluster_cols = TRUE,
annotation_row = annotation_row,
annotation_col = annotation_col)