• 208 views
i wanted to align my controls in one side and patients on the other side.. how can i do it?
heatmap(mat,cluster_rows = T, cluster_columns = T, column_lables=colnames(mat), name="z-score")
Your controls clearly show variable expression for the genes you're plotting so to get them to stick together on the left, you would need to set
cluster_columns=F and manually order your matrix:
mat <- mat[,c(paste0("C", 1:9), paste0("P", 1:9))]
Alternatively, you can split your data into two matrices of controls and patients and then use
cowplot or a similar package to plot the two heatmaps together.
Login before adding your answer.