tweaks for the heatmap ()?
3
0
Entering edit mode
Simon Lin ▴ 270
@simon-lin-1272
Last seen 10.2 years ago
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
Clustering marray Clustering marray • 1.6k views
ADD COMMENT
0
Entering edit mode
Florian Hahne ▴ 540
@florian-hahne-2471
Last seen 10.2 years ago
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
ADD COMMENT
0
Entering edit mode
@james-w-macdonald-5106
Last seen 1 day ago
United States
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
ADD COMMENT
0
Entering edit mode
Aedin Culhane ▴ 510
@aedin-culhane-1526
Last seen 5.2 years ago
United States
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
ADD COMMENT

Login before adding your answer.

Traffic: 783 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6