bio-data-visualization-heatmaps-clustering
Installation
SKILL.md
Heatmaps and Clustering
pheatmap (R) - Quick Heatmaps
library(pheatmap)
library(RColorBrewer)
# Basic heatmap with clustering
pheatmap(mat, scale = 'row', cluster_rows = TRUE, cluster_cols = TRUE)
# With annotations
annotation_col <- data.frame(
Condition = metadata$condition,
Batch = metadata$batch,
row.names = colnames(mat)
)