Hi, Can someone please guide me towards how to produce "heatmap" output from the output of "hclust" run prior to the actual "heatmap" call? I have some rather lengthy clustering going on and tweeking the visual output with "heatmap" recalculating the clustering every time is not feasible. Thanks, Joh
> To: r-help@stat.math.ethz.ch> From: johannes_graumann@web.de> Date: Fri, 16 May 2008 17:55:26 +0200> Subject: [R] heatmap on pre-established hclust output?> > Hi,> > Can someone please guide me towards how to produce "heatmap" output from the> output of "hclust" run prior to the actual "heatmap" call? I have some> rather lengthy clustering going on and tweeking the visual output> with "heatmap" recalculating the clustering every time is not feasible.> > Thanks, JohI can't say that i have actually tackled this, but I have some experience with the functions you mentioned. Heatmap takes an hclustfun function parameter. You can create a custom clustering function. I don't believe there is a rule that says you have to do actual work in that function call. Look at just returning the results of your more complicated clustering in that call without actually doing the calculations. Jeremiah Rounds Graduate Student Utah State University> > ______________________________________________> R-help@r-project.org mailing list> https://stat.ethz.ch/mailman/listinfo/r-help> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html> and provide commented, minimal, self-contained, reproducible code._________________________________________________________________ E-mail for the greater good. Join the i’m Initiative from Microsoft. ood [[alternative HTML version deleted]]
You just have to pass in the *dendrogram* to heatmap() or heatmap.2(). So if you have an hclust object for the rows and columns (called, say rhclust and chclust): heatmap(datamatrix, Rowv = as.dendrogram(rhclust), Colv = as.dendrogram(chclust), otherargs) Best, Jim Johannes Graumann wrote:> Hi, > > Can someone please guide me towards how to produce "heatmap" output from the > output of "hclust" run prior to the actual "heatmap" call? I have some > rather lengthy clustering going on and tweeking the visual output > with "heatmap" recalculating the clustering every time is not feasible. > > Thanks, Joh > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.-- 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