I would like to know how to convert the HClust object to a data format that can be processed by the dendrogram recipe for Makie.
There is a quite long pull-request history for the dendrogram recipe, and it seems it was in the initial design to have compatibility with Clustering.jl, but then it s not clear how to do it…
I do! But will need to review to be 100% certain. I can look again later this week, but the short version is that the hclust object has a “merges” property, which is an ordered list of tuples of integers. Each merge represents a node.
The integers inside merges either represent a leaf (negative numbers) or a previous intersection (positive numbers).
In the makie recipe, you have leaves and intersections, but off the top of my head I don’t remember how they relate… I think there’s an example somewhere in one of the issues, but I’ll dig through and try to PR with a package extension this week