View Single Post
Old 08-23-2013, 07:32 AM   #7
crazyhottommy
Senior Member
 
Location: Gainesville

Join Date: Apr 2012
Posts: 140
Default

Quote:
Originally Posted by crazyhottommy View Post
Thanks! it worked with your method. the reason I want to map the value to colour is that I want to compare different heatmaps just by the colour.

I have two matrix, but the data range is different
one is from -0.1 to 9
the other is from -0.1 to 12

I think I just have to play around with the colour scheme to make my heatmap look better.

http://s21.postimg.org/72rw342tj/image.png
http://s10.postimg.org/geed1tdrd/image.png


It is from ChIP-seq data. I plot the tag intensity around TSS.

code:
bk = unique(c(seq(-0.1,0.5, length=100),seq(0.5,13,length=100)))
hmcols<- colorRampPalette(c("white","red4"))(length(bk)-1)

the previous code gave me a lot "red" background which I do not want.

Thank you again!
The same code worked for pheatmap but still gave me error if I use heatmap.2
heatmap.2(m1, col=hmcols, breaks = bk, Colv=FALSE, dendrogram="row", symkey=FALSE, symm=F, symbreaks=T, scale="none", trace="none", labRow=NA, labCol=NA)
Error in heatmap.2(m1, col = hmcols, breaks = bk, Colv = FALSE, dendrogram = "row", :
lazy-load database 'P' is corrupt
In addition: Warning messages:
1: In heatmap.2(m1, col = hmcols, breaks = bk, Colv = FALSE, dendrogram = "row", :
restarting interrupted promise evaluation
2: In heatmap.2(m1, col = hmcols, breaks = bk, Colv = FALSE, dendrogram = "row", :
internal error -3 in R_decompress1

why is that? the error message is kind of mysterious...
crazyhottommy is offline   Reply With Quote