Question: tweaks for the heatmap ()?
0
gravatar for Simon Lin
12.0 years ago by
Simon Lin270
Simon Lin270 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
clustering marray • 603 views
ADD COMMENTlink modified 12.0 years ago by Aedin Culhane510 • written 12.0 years ago by Simon Lin270
Answer: tweaks for the heatmap ()?
0
gravatar for Florian Hahne
12.0 years ago by
Florian Hahne540
Florian Hahne540 wrote:
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 COMMENTlink written 12.0 years ago by Florian Hahne540
Answer: tweaks for the heatmap ()?
0
gravatar for James W. MacDonald
12.0 years ago by
United States
James W. MacDonald51k wrote:
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 COMMENTlink written 12.0 years ago by James W. MacDonald51k
Answer: tweaks for the heatmap ()?
0
gravatar for Aedin Culhane
12.0 years ago by
Aedin Culhane510
United States
Aedin Culhane510 wrote:
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 COMMENTlink written 12.0 years ago by Aedin Culhane510
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 458 users visited in the last hour