Tree

magna.util.tree.dm_to_newick(arr, labels)

Convert a pairwise distance matrix into Newick format.

Parameters
  • arr (ndarray) – The symmetrical pairwise distance matrix.

  • labels (Collection[str]) – The labels of the leaf nodes.

Return type

str