[BioC] RE: Display scale on hclust heatmap (Warnes, Gregory R )

Warnes, Gregory R gregory_r_warnes at groton.pfizer.com
Fri Dec 5 21:27:57 MET 2003



> -----Original Message-----
> From: Nitin Jain [mailto:nj7w at virginia.edu]
> Sent: Friday, December 05, 2003 1:52 PM
> To: Warnes, Gregory R
> Subject: RE: [BioC] RE: Display scale on hclust heatmap 
> (Warnes, Gregory
> R )
> 
> 
> Thanks Greg! I appreciate your help.
> 
> Last question in this thread:
> 
> Would the two displays be same if data matrix is split? eg:

The displays will only be the same if you run 1) do any scaling manually on
the data 2) run the dendograms manually, 3) Turn off the auto-scaling and
pass the appropriate dendogram subsets to the heatmap function.

Alternatively, it should be possible to add an option 'subset' to the
heatmap function that does all the processing but just displays the
appropriate subset of the data.   One would just need to add an appropriate
parameter, and then subsetting [] code to various places...

-G

> 
> x <- matrix(sample(0:20,1000, replace=TRUE),nrow=100)
> dist.x <- dist(x,method="euclidean",diag=TRUE)
> clust.x <- hclust(dist.x, method="average")
> dist.y <- dist(t(x), method="euclidean",diag=TRUE)
> clust.y <- hclust(dist.y,method="average")
> heatmap(x, Rowv=as.dendrogram(clust.x), Colv=as.dendrogram(clust.y),
> 	cexRow=1, cexCol=1,col=greenred(255))
> # function greenred is taken from your post a few days ago.
> x1 <- x[1:50,]
> x2 <- x[51:100,]
> heatmap(x1, cexRow=1, cexCol=1,col=greenred(255))
> 
> I think they would be different. So, how can I reproduce only 
> the first half
> of
> first heatmap (if atall?).
> 
> Thanks.
> Nitin
> 
> -----Original Message-----
> From: Warnes, Gregory R [mailto:gregory_r_warnes at groton.pfizer.com]
> Sent: Friday, December 05, 2003 10:50 AM
> To: 'Nitin Jain'
> Cc: 'Bioconductor Mail List'
> Subject: RE: [BioC] RE: Display scale on hclust heatmap 
> (Warnes, Gregory
> R )
> 
> 
> 
> Hi Nitin,
> 
> The heatmap labels do become very hard to read when there is 
> a large number
> of genes.  The easiest way to generate separate sets is to split the
> original data matrix into smaller matrixes and call heatmap 
> individually on
> each one.
> 
> Of course, it makes sense to split the data up in some 
> systematic way.  I
> generally do so based on the results of a statistical model, 
> but one could
> also generate a dendogram and then plot sub-trees on 
> different heatmaps.
> 
> -G
> 
> 
> > -----Original Message-----
> > From: Nitin Jain [mailto:nj7w at virginia.edu]
> > Sent: Friday, December 05, 2003 10:46 AM
> > To: Warnes, Gregory R
> > Subject: RE: [BioC] RE: Display scale on hclust heatmap
> > (Warnes, Gregory
> > R )
> >
> >
> > Thanks Greg!
> >
> > I appreciate your prompt reply. I'll read about the html image map.
> > May be a simpler thing to resolve would be to plot small areas
> > of the heatmap on individual graph sheets - if I wish to plot 3000
> > genes, the GeneIDs are not decipherable - so would like to
> > plot (say) 40
> > genes from the cluster on a single page and use several pages.
> >
> > Is there an easy way for this?
> >
> > Thanks.
> > Nitin
> >
> > >
> > > Nitin,
> > >
> > > The standard R plotting routines don't have any mechanism
> > for attaching
> > > hyperlinks to plots, so this is not straightforward.  It
> > suspect that it
> > > would be necessary to create a html image-map to accomlish
> > this, and I don't
> > > have any experience with that.
> > >
> > > If you figure out how to do so, I would be glad to see if
> > this can be added
> > > to the code.
> > >
> > > -Greg
> > >
> > >
> > > -----Original Message-----
> > > From: Nitin Jain
> > > To: Warnes, Gregory R
> > > Sent: 12/5/03 2:11 AM
> > > Subject: RE: [BioC] RE: Display scale on hclust heatmap
> > (Warnes, Gregory R )
> > >
> > > Dear Greg,
> > >
> > > Is it also possible to put hyperlinks to the gene-symbols
> > to databases
> > > like LocusLink?
> > >
> > > Thanks.
> > > Nitin
> > >
> > > > The current version is now available as part of version
> > 0.8.7 of the
> > > > gregmisc package on cran.
> > > >
> > > > Note that there it is named 'heatmap.2'.
> > > >
> > > > -G
> > > >
> > > >
> > > >
> > > > > -----Original Message-----
> > > > > From: Ramsi Haddad [mailto:rhaddad at genetics.wayne.edu]
> > > > > Sent: Thursday, December 04, 2003 1:40 PM
> > > > > To: Warnes, Gregory R
> > > > > Subject: RE: [BioC] RE: Display scale on hclust heatmap
> > > > > (Warnes, Gregory
> > > > > R )
> > > > >
> > > > >
> > > > > Dear Greg,
> > > > >
> > > > > 	Could you send me the function as a text attachment
> > > > > please?  I was
> > > > > trying to change the one you sent to the list so that I
> > could work
> > > > > around it.  I commentted out the first bit where the
> > function asks
> > > > > if(scale!="none" && key == TRUE).  This allowed the key
> > to be drawn
> > > > > without the colors!
> > > > >
> > > > > Thanks for your time.
> > > > >
> > > > > Ramsi.
> > > > >
> > > > > p.S.  the function is great!
> > > > >
> > > > > On Thu, 2003-12-04 at 13:30, Warnes, Gregory R wrote:
> > > > > > Yes, this was mentioned by another person, and so I've
> > > > > changed the code so
> > > > > > that a color key is present unless explicitly turned off.
> > > > > When scaling is
> > > > > > enabled, the key is labeled 'Row Z-Score' or 'Column
> > Z-Score' as
> > > > > > appropriate.
> > > > > >
> > > > > > -G
> > > > > >
> > > > > > > -----Original Message-----
> > > > > > > From: Ramsi Haddad [mailto:rhaddad at genetics.wayne.edu]
> > > > > > > Sent: Thursday, December 04, 2003 12:00 PM
> > > > > > > To: bioconductor at stat.math.ethz.ch
> > > > > > > Subject: [BioC] RE: Display scale on hclust 
> heatmap (Warnes,
> > > > > > > Gregory R)
> > > > > > >
> > > > > > >
> > > > > > > Dear Greg,
> > > > > > >
> > > > > > > 	I was trying out the new heatmap function.  You made
> > > > > > > the following
> > > > > > > remark in your email:
> > > > > > >
> > > > > > > [If scaling is on, different rows/columns have
> > different scales
> > > > > > > so a color key doesn't make any sense.]
> > > > > > >
> > > > > > > 	If the scaling is on, it is still good to know how each
> > > > > > > gene differs
> > > > > > > from the median.  Therefore, I think it would be very
> > > > > nice to have a
> > > > > > > color key.
> > > > > > >
> > > > > > > Ramsi
> > > > > > >
> > > > > > > _______________________________________________
> > > > > > > Bioconductor mailing list
> > > > > > > Bioconductor at stat.math.ethz.ch
> > > > > > > 
https://www.stat.math.ethz.ch/mailman/listinfo/bioconductor
> > > > > >
> > > > >
> > > > >
> > > > > LEGAL NOTICE
> > > > > Unless expressly stated otherwise, this message is
> > > > confidential and may be privileged. It is intended for the
> > > > addressee(s) only. Access to this E-mail by anyone else is
> > > > unauthorized. If you are not an addressee, any disclosure or
> > > > copying of the contents of this E-mail or any action taken
> > > > (or not taken) in reliance on it is unauthorized and may be
> > > > unlawful. If you are not an addressee, please inform the
> > > > sender immediately.
> > > > --
> > > > Ramsi Haddad, Ph.D.
> > > > Research Associate
> > > >
> > > > Functional Genomics Laboratory,
> > > > Perinatology Research Branch of the
> > > > National Institute of Child Health & Human Development (NICHD),
> > > > and Center for Molecular Medicine and Genetics,
> > > > Wayne State University School of Medicine,
> > > > 3258 Scott Hall
> > > > 540 E. Canfield Ave.
> > > > Detroit, MI 48201
> > > >
> > > > phone:  313-577-2569
> > > > fax:	313-577-7736
> > > >



More information about the Bioconductor mailing list