I am looking for two tweaks of the heatmap function:
1) a choice to order the genes by 1-D MDS projection. The current
hierarchical clustering flips many nodes.
2) a color bar at the side to indicate the color scale, as with
maColorBar()
in the marray package
Any code to share?
Thanks!
Simon
Simon Lin wrote:
> I am looking for two tweaks of the heatmap function:
> 1) a choice to order the genes by 1-D MDS projection. The current
> hierarchical clustering flips many nodes.
> 2) a color bar at the side to indicate the color scale, as with
maColorBar()
> in the marray package
>
> Any code to share?
>
> Thanks!
>
> Simon
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives:
http://news.gmane.org/gmane.science.biology.informatics.conductor
>
Hi Simon,
you might want to take a look at the levelplot function in the lattice
package. The following code snippet emulates what heatmap does with a
colorbar added to the plot:
myHeatmap = function(x) {
dd.row = as.dendrogram(hclust(dist(x)))
row.ord = order.dendrogram(dd.row)
dd.col = as.dendrogram(hclust(dist(t(x))))
col.ord = order.dendrogram(dd.col)
levelplot(x[row.ord,col.ord], scales = list(x = list(rot = 90)),
xlab="", ylab="", main="whatever the title is"
col.regions=colorRampPalette(c("white", "darkblue"))(256))
}
You can use any ordering of the rows and column by modifying the
assignments to row.ord and col.ord
BW,
Florian
Hi Simon,
Have you looked at heatmap.2() in gplots? It will draw the color key.
As for the gene ordering, you can always feed heatmap.2() (or
heatmap(),
for that matter) an ordered matrix of data based on the MDS projection
and then set Rowv=NA to keep from reordering the genes. Or did you
want
no reordering, but some sort of a dendrogram as well?
Best,
Jim
Simon Lin wrote:
> I am looking for two tweaks of the heatmap function:
> 1) a choice to order the genes by 1-D MDS projection. The current
> hierarchical clustering flips many nodes.
> 2) a color bar at the side to indicate the color scale, as with
maColorBar()
> in the marray package
>
> Any code to share?
>
> Thanks!
>
> Simon
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives:
http://news.gmane.org/gmane.science.biology.informatics.conductor
--
James W. MacDonald, M.S.
Biostatistician
Affymetrix and cDNA Microarray Core
University of Michigan Cancer Center
1500 E. Medical Center Drive
7410 CCGC
Ann Arbor MI 48109
734-647-5623
Dear Simon
Also have a look at heatplot() in the package made4. It calls
heatmap.2 .
Input parameters include:
dend="both", "row" or "column" or "row"
By default it uses the blue-brown color scheme, 1-Pearson correlation
distance, average linkage joining and will automatically draw a scale
color-bar.
It will automatically scale the row for better visualization. To view
the real data values, use scale ="none"
Regards
Aedin