Entering edit mode
Yoo, Seungyeul
▴
110
@yoo-seungyeul-5323
Last seen 10.2 years ago
Hi,
I am trying to draw a heatmap of microarray datasets.
I'm using a heatmap.2 function of gplots as following:
heatmap.2(var_exp,col=greenred,trace="none",scale="row",symkey=TRUE,hc
lust=function(x) hclust(x,method="complete"),distfun=function(x)
as.dist(1-cor(t(x))))
It generates a fine heatmap but the most points are so dark-green or
dark-red because the range of z-score generated by the scale option
with "row".
The color key histogram is like in the attachment
[cid:7A004996-3CFB-4304-82E4-F5A8C2F4B24D at 1425mad.mssm.edu]
How can I scale the z-score to have more reddish and greenish colors
for heatmap?
I actually tried with "breaks" function.
z_5000<-z_function(var_exp)
low_z<-min(z_5000)
lowest<-floor(low_z)
high_z<-max(z_5000)
highest<-ceiling(high_z)
br <- c()
if((abs(lowest))>highest){
br <- c(seq(-(highest),-2.2,by=0.2),seq(-2,-1.1,by=0.1),seq(-1,1,0.05)
,seq(1.1,2,by=0.1),seq(2.2,highest,by=0.2))
br <- c(lowest,br)
} else if((abs(lowest))<highest){ br="" <-="" c(seq(lowest,-2.2,by="0.2),seq(-2,-1.1,by=0.1),seq(-1,1,0.05),seq" (1.1,2,by="0.1),seq(2.2,abs(lowest),by=0.2))" br="" <-="" c(br,highest)="" }="" else{="" br="" <-="" seq(lowest,highest,by="0.1)" }="" the="" heatmap="" became="" more="" colorful="" but="" then="" the="" clustering="" is="" done="" based="" on="" z-score="" not="" the="" raw="" values.="" therefore,="" the="" results="" are="" changed.="" is="" there="" anyway="" i="" can="" use="" more="" colorful="" heatmap="" using="" the="" raw="" dataset="" with="" scale="row" option?="" it="" should="" be="" able="" to="" but="" i="" can't="" find="" it="" in="" the="" archive="" of="" this="" email="" or="" googling.="" please="" help="" and="" thank="" you="" in="" advance.="" seungyeul="" yoo="" postdoctoral="" fellow="" institute="" of="" genomics="" and="" multiscale="" biology="" department="" of="" genetics="" and="" genomic="" sciences="" mount="" sinai="" school="" of="" medicine="" <="" div="">