[BioC] heatmap and cluster with marray

Sean Davis sdavis2 at mail.nih.gov
Wed May 21 15:39:04 CEST 2008


On Wed, May 21, 2008 at 9:24 AM, Abhilash Venu <abhivenu at gmail.com> wrote:
> Hi all,
>
> As a part of my learning, I am trying to create a heatmap of  differentially
> regulated genes. For the same I read the result of the 4 cases using
> 'read.table' and converted it into numerical matrix. Following this I
> created a distance matrix using the following command.
>
> EDistances<-dist(x,method = "euclidean")
> Clustering<-hclust(EDistances,method="complete")
>
> Followed by this I used 'marray' package for creating a heatmap using the
> following commands.
>>pal<-maPalette(low="green", high="red", mid="black") # I prefer this
> pattern, as it is looking good.
>> maColorBar(seq(-3,3, 0.5), col=pal, horizontal=FALSE, k=10)
> I used the following commands for creating the hierarchical cluster and
> heatmap.
>> EDistancesS<-dist(t(x),method = "euclidean")
>> ClusteringS<-hclust(EDistancesS,method="complete")
>> heatmap(x,Colv=as.dendrogram(ClusteringS),Rowv=as.dendrogram(Clustering),
> cexCol =0.8,col=pal,cexRow=1)
>
>
> But I am facing problem with the scale of color intensity. Such as I am not
> getting the intensity (scale or color key) in one graph itself. What could
> be the best method to resolve this problem and to create a heatmap  with a
> properly defined color key in the same graph?

Hi, Abhilash.  You can try using the built-in help capabilities to get
some hints.  Try:

help.search('heatmap')

There are numerous methods for heatmaps available.  Also, searching
the email list archives will turn up even more hits.  As a short
answer, try the heatmap.2() function.

Sean



More information about the Bioconductor mailing list