reorder group column in pheatmap
1
0
Entering edit mode
2.9 years ago
Yihan • 0

I'm trying to order the group of my heatmap with wildtype (WT) on the left and disease (SCA7) on the right. However, my heatmap always put SCA7 on the left and WT on the right even after setting cluster_cols to FALSE.

pheatmap(zscore, cluster_rows = FALSE, show_rownames = TRUE,
     show_colnames = FALSE, cluster_cols = FALSE, annotation_col = df,
     color = colorRampPalette(c("green","black", "red"))(100))

The df that annotation_col corresponds to looks like this, so the order is WT at first.

                      Genotype

S15_merged WT

S14_merged WT

S13_merged WT

S11_merged WT

S12_merged WT

S20_merged SCA7

S19_merged SCA7

S18_merged SCA7

S16_merged SCA7

S17_merged SCA7

pheatmap • 1.8k views
ADD COMMENT
0
Entering edit mode

Post example data and image to understand the issue better.

ADD REPLY
0
Entering edit mode
2.9 years ago
shiyang_bio ▴ 170

pheatmap will plot your data in the order of colnames(zscore) if you set cluster_cols = F. You need to make sure that the col order of your zscore is WT to SCA7

ADD COMMENT

Login before adding your answer.

Traffic: 1554 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