TreeNode.
compare_subsets
(other, exclude_absent_taxa=False)[source]¶Returns fraction of overlapping subsets where self and other differ.
State: Experimental as of 0.4.0.
Names present in only one of the two trees will count as mismatches, if you don’t want this behavior, strip out the non-matching tips first.
Parameters: |
|
---|---|
Returns: | The fraction of overlapping subsets that differ between the trees |
Return type: | float |
See also
Examples
>>> from skbio import TreeNode
>>> tree1 = TreeNode.read(["((a,b),(c,d));"])
>>> tree2 = TreeNode.read(["(((a,b),c),d);"])
>>> tree1.compare_subsets(tree2)
0.5