[BioC] heatmap for high number of genes

michael watson (IAH-C) michael.watson at bbsrc.ac.uk
Tue Mar 2 23:30:19 CET 2010


An example:

library(gplots)
library(geneplotter)

myd <- matrix(rnorm(40000), nrow=10000)

# sort low to high on column 2
l2h <- myd[order(myd[,2]),]

# sort high to low on column 2
h2l <- myd[order(myd[,2],decreasing=TRUE),]

heatmap.2(l2h, Rowv=FALSE, Colv=FALSE, dendrogram="none",
            scale="none", col=greenred.colors(2000),
            trace="none", key=FALSE)
            
x11()
heatmap.2(h2l, Rowv=FALSE, Colv=FALSE, dendrogram="none",
            scale="none", col=dChip.colors(2000),
            trace="none", key=FALSE)
________________________________________
From: bioconductor-bounces at stat.math.ethz.ch [bioconductor-bounces at stat.math.ethz.ch] On Behalf Of avehna [avhena at gmail.com]
Sent: 02 March 2010 22:07
To: Steve Lianoglou; bioconductor at stat.math.ethz.ch
Subject: Re: [BioC] heatmap for high number of genes

Hi Steve:

Thank you so much for your message.

Yes, I'm using "heatmap.2" to display my genes. Do you know about any
function in R to rearrange a matrix based on the "high to low"-ordering of
just one column (treatment)?

Best Regards,
Avhena.

Do you know about any other function in R

On Tue, Mar 2, 2010 at 4:37 PM, Steve Lianoglou <
mailinglist.honeypot at gmail.com> wrote:

> Hi Avehna,
>
> On Tue, Mar 2, 2010 at 4:01 PM, avehna <avhena at gmail.com> wrote:
> > Hi All:
> >
> > I would like to display all the differentially expressed genes that I got
> > for 4 different treatments (respect to the control) onto a heatmap plot,
> in
> > such a way that they're ordered respect to their expression values. My
> > questions are:
> >
> > 1- Is there a way to make a heatmap for around 10000 genes (the "union"
> set
> > from all differentially expressed genes) without taking so long in
> > Bioconductor ('cause my computer is getting frozen).
> > 2- How could I order the gene expression profiles from high to low
> > expression values. (I guess in this case I should take into account one
> of
> > the treatment). I'd like to get a beautiful heatmap from red to blue (for
> > example).
>
> The heatmap is taking so long because its calculating the pairwise
> similarity of the genes (rows) of your matrix in order to
> group/cluster them.
>
> It sounds like you don't *want* heatmap to cluster the genes, because
> you want them to be displayed in a very specific and pre-determined
> order (high to low ... something?), so calculating this row-wise
> clustering is exactly what you don't want to do.
>
> You didn't mention which heatmap function you're using, but lets
> assume you're using the gplots::heatmap.2 function, you can set its
> "Rowv" parameter to FALSE, and it won't (shouldn't) reorder cluster
> your matrix by rows.
>
> Just ensure that you reorder the rows of your input matrix (let's call
> it X) the way you want, then just:
>
> R> heatmap.2(X, Rowv=FALSE, ...)
>
> That should go much faster.
>
> -steve
>
>
> --
> 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<http://cbio.mskcc.org/%7Elianos/contact>
>

        [[alternative HTML version deleted]]

_______________________________________________
Bioconductor mailing list
Bioconductor at stat.math.ethz.ch
https://stat.ethz.ch/mailman/listinfo/bioconductor
Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor



More information about the Bioconductor mailing list