heatmap issue
1
0
Entering edit mode
20 months ago
kalyani ▴ 10

heatmap

i wanted to align my controls in one side and patients on the other side.. how can i do it? my code:

heatmap(mat,cluster_rows = T, cluster_columns = T, column_lables=colnames(mat), name="z-score")
heatmap DESeq2 • 671 views
ADD COMMENT
0
Entering edit mode
20 months ago

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 grid or cowplot or a similar package to plot the two heatmaps together.

ADD COMMENT

Login before adding your answer.

Traffic: 3073 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6