[BioC] Row labels in a heatmap

James W. MacDonald jmacdon at uw.edu
Mon Jul 16 15:24:06 CEST 2012


Hi Liat,

On 7/16/2012 9:12 AM, Liat S wrote:
> Hi all,
> I'm trying to draw a heatmap for some microarray data.
> Since I have many genes, the gene names (row labels) are not readable.
> I would like to replace these gene names by seq(0,500,by=100).

I don't think you want to use that. Unless you only have 6 genes. ;-D

Anyway, heatmap() and heatmap.2() just use the row.names of the matrix 
you input. So just change them.

row.names(yourmatrix) <- seq(1, nrow(yourmatrix),1)

You might also consider plotting the heatmap in such a way that you can 
read the row labels. As a pdf, you can play around with the width and 
height until you get what you want. Something like

pdf("the.pdf", width = 20, height = 500)
heatmap.2(yourmatrix, <otherargs>, lhei = c(0.05, 0.95))
dev.off()

You want the lhei set so the proportions of the heatmap look reasonable.

Best,

Jim


> Any ideas on how to do that?
> I tried both heatmap and heatmap.2, but couldn't find a good way to do this.
> Many thanks!
> Liat.
>   		 	   		
> 	[[alternative HTML version deleted]]
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at r-project.org
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor

-- 
James W. MacDonald, M.S.
Biostatistician
University of Washington
Environmental and Occupational Health Sciences
4225 Roosevelt Way NE, # 100
Seattle WA 98105-6099



More information about the Bioconductor mailing list