Skip to content

Commit

Permalink
Fix unexpected rooting side effects of Tree.mrca()
Browse files Browse the repository at this point in the history
Sets `collapse_unrooted_basal_bifurcation=False` in call to
`Tree.encode_bipartitions` inside `Tree.mrca`. Closes jeetsukumaran#152.
  • Loading branch information
mmore500 committed Mar 30, 2023
1 parent 34fd844 commit 9d56b8c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/dendropy/datamodel/treemodel/_tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -1550,7 +1550,10 @@ def mrca(self, **kwargs):
if start_node.edge.bipartition.leafset_bitmask == 0 or not kwargs.get(
"is_bipartitions_updated", True
):
self.encode_bipartitions(suppress_unifurcations=False)
self.encode_bipartitions(
suppress_unifurcations=False,
collapse_unrooted_basal_bifurcation=False,
)

if (
start_node.edge.bipartition.leafset_bitmask & leafset_bitmask
Expand Down

0 comments on commit 9d56b8c

Please sign in to comment.