I have a dendrogram represented in a format I don't understand:


I am not sure how to interpret the above. It is an output of hierarchical clustering.

K_1, K_2, K_3, K_4, K_5 are the data points.

I have other dendrograms represented in the following format:

[x_1,x_2,x_3,x_4,x_5] (we start with one big cluster and split a cluster at each step)





I want a way to convert between these two representations.

  • $\begingroup$ Can you tell from which package you got this dendrogram output? $\endgroup$ Aug 3, 2020 at 13:29
  • $\begingroup$ It's from FINEstructure. It's for genome analysis. $\endgroup$ Aug 3, 2020 at 14:17

1 Answer 1


This output represents the dendogram as a tree. The innermost parentheses represent the deepest parts of the tree. For instance the top (root) of the tree start with the pair K5 and a subtree, then this subtree is made of another subtree and K4, and so on.

If we ignore the numerical values (distances I assume?) we have this:


Which represents this tree:

 |                  |
 |            -------------
K_5           |           |
           -------       K_4
           |     |
          K_1  -----
               |   |
              K_2 K_3

Then it can be converted to the desired format:

[K_1 , K_2 , K_3 , K_4 , K_5]
[K_1 , K_2 , K_3 , K_4] [K_5]
[K_1 , K_2 , K_3] [K_4] [K_5]
[K_1] [K_2 , K_3] [K_4] [K_5]
[K_1] [K_2] [K_3] [K_4] [K_5]
  • $\begingroup$ Is there a name for this representation? Is it the most standard representation? $\endgroup$ Aug 3, 2020 at 15:10
  • 1
    $\begingroup$ I don't know any name or whether this is a standard representation of a dendogram. However it's common to represent any kind of tree with a parenthesis structure, for instance mult(6,plus(3,4)) for "6 * (3+4)). I guess the notation is inspired from that... or it could simply be the most direct way to print the data structure in the software you're using. $\endgroup$
    – Erwan
    Aug 3, 2020 at 15:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.