Outputting dendrogram with large numbers of genes without losing resolution
1
0
Entering edit mode
@marie-chehani-alles-1178
Last seen 10.3 years ago
Dear Listserv, I?m attempting to do heatmaps on large lists of genes (often well over 500 genes in each list) using heatmap.2(). Does anyone know how to output a large heatmap without losing resolution in the dendrogram? When a large list of genes is clustered (with genes on the horizontal axis), the horizontal dendrogram is often squashed so that the lines become indistinct, even when the plot area is set to its maximum. I am wondering if there is some way of setting up the R graphics so that I can assign a fixed width to each arm of the dendrogram... say a height of x pixels per gene? Or does anyone know of any other work- arounds for this issue? This must be a common problem so maybe I'm googling the wrong words! Please let me know if this is an issue for the R-listserv rather than Bioconductor. Thanks, Che Marie Alles Cancer Research Program Garvan Institute of Medical Research 384 Victoria Street, Darlinghust, Sydney, NSW 2010, AUSTRALIA
ASSIGN ASSIGN • 2.2k views
ADD COMMENT
0
Entering edit mode
@sean-davis-490
Last seen 4 months ago
United States
Marie Chehani Alles wrote: > Dear Listserv, > > I?m attempting to do heatmaps on large lists of genes (often well over 500 genes in each list) using heatmap.2(). Does anyone know how to output a large heatmap without losing resolution in the dendrogram? When a large list of genes is clustered (with genes on the horizontal axis), the horizontal dendrogram is often squashed so that the lines become indistinct, even when the plot area is set to its maximum. > > I am wondering if there is some way of setting up the R graphics so that I can assign a fixed width to each arm of the dendrogram... say a height of x pixels per gene? Or does anyone know of any other work- arounds for this issue? This must be a common problem so maybe I'm googling the wrong words! > > Please let me know if this is an issue for the R-listserv rather than Bioconductor. Unfortunately, screen size is limited. If you really must use R for this task, then try making a large pdf or png of the same plot (say 35 inches high by 10 inches wide). Then, you can use an external program to view the resulting file. The better alternative is to use a program such as TreeView (and, potentially its close relative "cluster") to interact with such large heatmaps. It is available for free and is a java program, so it works on many platforms. Sean
ADD COMMENT
0
Entering edit mode
Sean's suggestion, of using an external image or pdf viewing program for this task, works actually pretty well for heatmaps with several thousand genes. Below is an example for exporting a heatmap with 500 rows to a pdf file. The important step is the adjustment of the height argument in the pdf() function. The pdf format has the advantage over jpg/png formats that text components (e.g. gene names) are searchable in a decent pdf viewing program. ## Large heatmap example y <- matrix(rnorm(2500), 500, 5, dimnames=list(paste("g", 1:500, sep=""), paste("t", 1:5, sep=""))) hr <- hclust(as.dist(1-cor(t(y), method="pearson")), method="complete") hc <- hclust(as.dist(1-cor(y, method="pearson")), method="complete") library("gplots") pdf("test.pdf", width=6, height=48) heatmap.2(y, Rowv=as.dendrogram(hr), Colv=as.dendrogram(hc), labRow=paste("g", 1:500, sep=""), col=redgreen(75), scale="row", trace="none", key=F) dev.off() Thomas On Thu 07/12/07 09:11, Sean Davis wrote: > Marie Chehani Alles wrote: > > Dear Listserv, > > > > I???m attempting to do heatmaps on large lists of genes (often well over 500 genes in each list) using heatmap.2(). Does anyone know how to output a large heatmap without losing resolution in the dendrogram? When a large list of genes is clustered (with genes on the horizontal axis), the horizontal dendrogram is often squashed so that the lines become indistinct, even when the plot area is set to its maximum. > > > > I am wondering if there is some way of setting up the R graphics so that I can assign a fixed width to each arm of the dendrogram... say a height of x pixels per gene? Or does anyone know of any other work-arounds for this issue? This must be a common problem so maybe I'm googling the wrong words! > > > > Please let me know if this is an issue for the R-listserv rather than Bioconductor. > > Unfortunately, screen size is limited. If you really must use R for > this task, then try making a large pdf or png of the same plot (say 35 > inches high by 10 inches wide). Then, you can use an external program > to view the resulting file. > > The better alternative is to use a program such as TreeView (and, > potentially its close relative "cluster") to interact with such large > heatmaps. It is available for free and is a java program, so it works > on many platforms. > > Sean > > _______________________________________________ > 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 -- Thomas Girke Assistant Professor of Bioinformatics Director, IIGB Bioinformatic Facility Center for Plant Cell Biology (CEPCEB) Institute for Integrative Genome Biology (IIGB) Department of Botany and Plant Sciences 1008 Noel T. Keen Hall University of California Riverside, CA 92521 E-mail: thomas.girke at ucr.edu Website: http://faculty.ucr.edu/~tgirke Ph: 951-827-2469 Fax: 951-827-4437
ADD REPLY

Login before adding your answer.

Traffic: 629 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6