[R] Identifying or searching for labels in a hclust/dendrogram/heatmap
michael watson (IAH-C)
michael.watson at bbsrc.ac.uk
Thu Mar 9 13:47:30 CET 2006
Sorry if this is in the help :-S
I've looked at example(dendrogram) and though it gives some indication of what I want, it doesn't do all.
OK, so here is what I want to do: draw a tree, and then have an action, on user-click, to either draw a sub tree or a plot of the data. I also want users to be able to search for a particular label and have it highlighted on the tree, say in red, where all the other labels are black.
Now, the only tree I can use the "user-click" with is an hclust object, with the identify.hclust() function. As far as I know, neither the dendrogram objects or the output of heatmap is cut-able in this way. So I have the sub-tree and plot drawing set up on user-click using an hclust object and identify.hclust - good :)
Therefore I am working with hclust objects (which is a shame as the dendrogram and heatmap objects look prettier) but I can cope. How do I then go on and highlight a single label, or group of labels, when I have plotted the hclust object? Can I highlight labels on dendrograms and heatmaps 2?
I can just imagine that after a user has drawn the tree, they will want to know where their genes of interest actually lie within that tree.
I'm happy to share the completed code when I have sorted all of this out
More information about the R-help