This is a test version of Biostars. For the public version, visit https://www.biostars.org.
heatmap column(sample) names disordered

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 also I added my output image

heatmap.2 deseq2 studio r

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.

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.

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.

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

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.

0 answers

No answers yet.

Log in to answer this question.