[R] Issues with Heat Map Images

cpleisner leisner1 at illinois.edu
Thu Nov 8 00:31:26 CET 2012


Hello,
I have a large data set from RNA sequencing and I am trying to make a heat
map of my data.  I have am having issues formatting my heat map figure.  My
data set is large with the log2 fold change for over 6oo genes across 4
treatments.  My csv file is formatted as such:
Gene	                           Drought	                Ozone	                
Temp1	          Temp2
Glyma0041s00260	-0.130545875	-0.098349739	0.170508007	      0.091996284
....

So far I have gotten an image, but I can't seem to get the gene names to
display properly.  Here is my code:
heatdata <- read.csv("logFC_bin17.csv", sep=",")
heatdata <- heatdata[,2:5]
heatdata_matrix <- data.matrix(heatdata)
rownames(heatdata_matrix) = paste("Gene", 2:655)
x11()
data_heatmap <- heatmap.2(heatdata_matrix, col=redblue(75), scale="row",
key=TRUE, symkey=FALSE, density.info="none", trace="none", margins=c(10,10),
cexRow=0.5)
jpeg("Heatmap_bin17.jpeg", width=8, height=8, units="in", res=300,
quality=100)

The heat map looks like this (with red green coloring):
<http://r.789695.n4.nabble.com/file/n4648806/Heatmap_bin20.jpeg> 

I fixed the margin issues (not seen in image), but I would like on the right
axis to have the list of gene names so I can pull out the important genes
based on the cluster analysis and heat map.  Also, when I try and output the
figure as a jpeg the jpeg file is found in the correct folder, but when I
open it it is empty (?).  How can I fix these issues?

Thanks!



--
View this message in context: http://r.789695.n4.nabble.com/Issues-with-Heat-Map-Images-tp4648806.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list