cassiopeia.critique.robinson_foulds#

cassiopeia.critique.robinson_foulds(tree1, tree2)[source]#

Compares two trees with Robinson-Foulds distance.

Computes the Robinsons-Foulds distance between two trees. Currently, this is the unweighted variant as most of the algorithms we use are maximum- parsimony based and do not use edge weights. This is mostly just a wrapper around the robinson_foulds method from Ete3.

Parameters:
tree1 CassiopeiaTree

A CassiopeiaTree representing the first tree

tree2 CassiopeiaTree

A CassiopeiaTree representing the second tree

Return type:

Tuple[float, float]

Returns:

The Robinson-Foulds distance between the two trees and the maximum

Robinson-Foulds distance for downstream normalization