heatmap.2 tiff output help please
2
0
Entering edit mode
@iain-gallagher-2532
Last seen 8.7 years ago
United Kingdom
Hello list. I am trying to draw a heatmap to publication standard. Currently I am having two problems. The first is that when I try to output a tiff file with: >heatmap_data<-as.matrix(t(cropped_data)) >heatcol<-colorRampPalette(brewer.pal(10, "RdBu"))(256) >bitmap('cph_rma_ll_data_heatmap.tiff', type='tifflzw', res=600, height=17.8, width=8.9, units='cm', pointsize=12) >heatmap.2(heatmap_data, col=heatcol, main='RMA Data', key=F, trace='none', labRow=labs, labCol=F, dendrogram='row') >dev.off() I am getting a grayscale image rather than a colour image. I presume that this is because of my misunderstanding RColorBrewer. The second problem relates to the layout in heatmap.2. Ideally, since I am not using the row dendrogram or the scale I would like my image to occupy a plotting space of one row and two columns (to contain the column dendrogram and the heatmap itself). However I cannot get the lmat, lhei and lwid parameters right to achieve this. The image should be 8.9cm wide which would occupy 1 column of the (hopeful) publishers figure layout. Could someone give me some guidance please? Thanks Iain [[alternative HTML version deleted]]
• 1.7k views
ADD COMMENT
0
Entering edit mode
@james-w-macdonald-5106
Last seen 8 hours ago
United States
Hi Iain, IAIN GALLAGHER wrote: > Hello list. > > I am trying to draw a heatmap to publication standard. Currently I am > having two problems. > > The first is that when I try to output a tiff file with: >> heatmap_data<-as.matrix(t(cropped_data)) >> heatcol<-colorRampPalette(brewer.pal(10, "RdBu"))(256) >> bitmap('cph_rma_ll_data_heatmap.tiff', type='tifflzw', res=600, >> height=17.8, width=8.9, units='cm', pointsize=12) >> heatmap.2(heatmap_data, col=heatcol, main='RMA Data', key=F, >> trace='none', labRow=labs, labCol=F, dendrogram='row') dev.off() > > I am getting a grayscale image rather than a colour image. I presume > that this is because of my misunderstanding RColorBrewer. It's because you are using type="tifflzw". Remove that from your call to bitmap and you get color. > > The second problem relates to the layout in heatmap.2. Ideally, since > I am not using the row dendrogram or the scale I would like my image > to occupy a plotting space of one row and two columns (to contain the > column dendrogram and the heatmap itself). However I cannot get the > lmat, lhei and lwid parameters right to achieve this. The image > should be 8.9cm wide which would occupy 1 column of the (hopeful) > publishers figure layout. Does adding lmat = matrix(4:1, ncol = 2, byrow = TRUE), lhei = c(0.1,4) to your call to heatmap.2 help? Best, Jim > > Could someone give me some guidance please? > > Thanks > > Iain > > [[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 -- James W. MacDonald, M.S. Biostatistician Affymetrix and cDNA Microarray Core University of Michigan Cancer Center 1500 E. Medical Center Drive 7410 CCGC Ann Arbor MI 48109 734-647-5623
ADD COMMENT
0
Entering edit mode
@iain-gallagher-2532
Last seen 8.7 years ago
United Kingdom
Thanks James and Martin for your advice. Martin, on my linux box the command 'gs -h' lists the available ghostscript devices etc. However I only know that because you pointed me to the right information ;-) Thanks again Iain IAIN GALLAGHER <iaingallagher@btopenworld.com> wrote: Hello list. I am trying to draw a heatmap to publication standard. Currently I am having two problems. The first is that when I try to output a tiff file with: >heatmap_data<-as.matrix(t(cropped_data)) >heatcol<-colorRampPalette(brewer.pal(10, "RdBu"))(256) >bitmap('cph_rma_ll_data_heatmap.tiff', type='tifflzw', res=600, height=17.8, width=8.9, units='cm', pointsize=12) >heatmap.2(heatmap_data, col=heatcol, main='RMA Data', key=F, trace='none', labRow=labs, labCol=F, dendrogram='row') >dev.off() I am getting a grayscale image rather than a colour image. I presume that this is because of my misunderstanding RColorBrewer. The second problem relates to the layout in heatmap.2. Ideally, since I am not using the row dendrogram or the scale I would like my image to occupy a plotting space of one row and two columns (to contain the column dendrogram and the heatmap itself). However I cannot get the lmat, lhei and lwid parameters right to achieve this. The image should be 8.9cm wide which would occupy 1 column of the (hopeful) publishers figure layout. Could someone give me some guidance please? Thanks Iain [[alternative HTML version deleted]] _______________________________________________ Bioconductor mailing list Bioconductor@stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/bioconductor Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor [[alternative HTML version deleted]]
ADD COMMENT

Login before adding your answer.

Traffic: 585 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