[R] heatmap-how to change the order of the rows (genes)
Steve Lianoglou
mailinglist.honeypot at gmail.com
Wed Feb 9 18:23:13 CET 2011
Hi,
On Wed, Feb 9, 2011 at 12:18 PM, yan liu <yanliusun at gmail.com> wrote:
> Hi,
>
> I have a question about the heatmap dendrogram in R. I loaded my data
> matrix in command heatmap(), and it gave me a heatmap accordingly, and the
> rows (genes) also were clustered accordingly. But now I don't want the
> genes clustered in that way, I have a new order of these genes, and want the
> rows of the heatmap are drawed as the order I give. Could anybody help me
> on that? Thank you!
Check out the docs for heatmap a bit more carefully:
R> ?heatmap
I would try setting Rowv=NA, and reorder the rows of your matrix as
you want them to be ordered, ie:
R> heatmap(m[my.gene.order,], Rowv=NA, ...)
Or something like that.
--
Steve Lianoglou
Graduate Student: Computational Systems Biology
| Memorial Sloan-Kettering Cancer Center
| Weill Medical College of Cornell University
Contact Info: http://cbio.mskcc.org/~lianos/contact
More information about the R-help
mailing list