brokilon.metrics.robinson_foulds module

brokilon.metrics.robinson_foulds.robinson_foulds(tree_t1, tree_t2, attr_t1='name', attr_t2='name')[source]

Returns the Robinson-Foulds symmetric distance between current tree and a different tree instance.

Parameters:
  • tree_t1 – The first input tree for distance computation

  • tree_t2 – The second input tree for distance computation

  • attr_t1 (name) – Compare trees using a custom node attribute as a node name.

  • attr_t2 (name) – Compare trees using a custom node attribute as a node name in target tree.

Returns:

(rf, rf_max, common_attrs, names, edges_t1, edges_t2)

brokilon.metrics.robinson_foulds.robinson_foulds_ccd(tree_t1, tree_t2)[source]