heatmap column(sample) names disordered
0
0
Entering edit mode
17 months ago
ziziqolo ▴ 10

Hi dear biostar community,

I have a problem with my heatmap output. I want to draw a heatmap of 45 topvar genes for 52 samples. but my column (sample) names are shown disordered. (e.g. f1d#num is femal-1dpi-disease, and f1c#num is female-1dpi-control) as you can see, column have not any meaningful order. what can I do?

many thanks

heatmap.2 deseq2 Studio R • 595 views
2
Entering edit mode

Order of samples is based on sample (column) clustering, present on the top of image. You can turn off clustering to sort sample names of your choice, on heatmap.

0
Entering edit mode

Would you please tell me more how I can turn off clustring and then cluster by my choice? I'm a beginner unfortunately. Thank you.

1
Entering edit mode

I am not sure how above image is done. Based on your tags, you seem to have used heatmap.2 from gplots

try this:

\$ heatmap.2(x, dendrogram="none", Colv = F)


x being object for drawing.

0
Entering edit mode

so sorry but another question came up for me. Is there ay way to both have ColV = F and dendrogram="column"?

1
Entering edit mode

As far as I know, no. You can try doing that, program throws an error. It also doesn't make sense if one thinks it over.