Hello,
I have a large data set from RNA sequencing and I am trying to make a heatmap of my data. I have am having issues formatting my heatmap 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
Glyma# -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)
jpeg("Heatmap_bin17.jpeg", width=8, height=8, units="in", res=300,
quality=100)
data_heatmap <- heatmap.2(heatdata_matrix, col=redgreen(75), scale="row",
key=TRUE, symkey=FALSE, density.info="none", trace="none", margins=c(10,10), labRow =rownames(heatdata_matrix),cexRow=0.5)
dev.off()
Everything about my image is fine except the right axis with the gene ID labels is blurred together (I am having issues uploading the image). It looks like 4 thin rectangles covering up the data. I want it to look like this: http://www.r-bloggers.com/r-heatmaps-with-gplots/
Any suggestions for how to modify the code would be great. I've done a lot of R searches and can't seem to find any modifications that fix my data.
Thanks!
I have a large data set from RNA sequencing and I am trying to make a heatmap of my data. I have am having issues formatting my heatmap 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
Glyma# -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)
jpeg("Heatmap_bin17.jpeg", width=8, height=8, units="in", res=300,
quality=100)
data_heatmap <- heatmap.2(heatdata_matrix, col=redgreen(75), scale="row",
key=TRUE, symkey=FALSE, density.info="none", trace="none", margins=c(10,10), labRow =rownames(heatdata_matrix),cexRow=0.5)
dev.off()
Everything about my image is fine except the right axis with the gene ID labels is blurred together (I am having issues uploading the image). It looks like 4 thin rectangles covering up the data. I want it to look like this: http://www.r-bloggers.com/r-heatmaps-with-gplots/
Any suggestions for how to modify the code would be great. I've done a lot of R searches and can't seem to find any modifications that fix my data.
Thanks!
Comment