Extract order of hierarchical cluster dendrogram

I’d like to extract the necessary information from the Hierarchical Cluster View node to enable me to order the columns of a table in the same way as they appear in the tree. This is easy to do in R, but I can’t see any way to do it with Knime’s clustering tools. I’d rather not have to call up R just to do something as simple as this. Is there any way to do it?

I have seen some references to a third-party extension called HiTS, but I am having trouble getting Knime to see its URL (as per https://github.com/aborg0/hits/blob/wiki/Install.md).

1 Like


The Hierarchical Cluster View node doesn’t have an output port, so you can’t use it to pass information to other nodes. Just to confirm, you want to re-order the columns in your data to reflect the ordering of the clusters?


Yep, I’d like to order the rows or columns of a table so that they match the left-to-right order of the items in the dendrogram. A workaround that gets me half-way there is to assign clusters at multiple levels (e.g. once with 10 clusters and once with 20) and then group the smaller clusters within the higher-level clusters. But matching the dendrogram exactly would be preferable.

1 Like

I think my extension had similar feature, the Sort by Cluster node. (Also there was a Leaf Ordering node, which order the results to minimize the sum of adjacent diffs. Reverse Order allows to change the order to the opposite. There is also a Dendrogram with Heatmap node if you prefer that visualization.)