Entering edit mode
Abhilash Venu
▴
340
@abhilash-venu-2680
Last seen 10.2 years ago
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(Cluster
ing),
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?
Regards,
Abhilash
[[alternative HTML version deleted]]