-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Hi! Thanks for publishing tqdist Python interface on PyPi --- very useful tool to have available.
It looks like there may be an issue handling trees with unifurcating roots. I've prepared a minimal example that reproduces the erroneous abort I've encountered,
>>> tqdist.quartet_distance("(B,(A,C,E),D);", "(B,((A,C,E)),D);") # ok
0.0
>>> tqdist.quartet_distance("(B,(A,C,E),D);", "(B,(A,C,E),D);") # ok
0.0
>>> tqdist.quartet_distance("(B,(A,C,E),D);", "(B,((A,C,E)),D);") # internal unifurcation ok
0.0
>>> tqdist.quartet_distance("(B,(A,C,E),D);", "((B,(A,C,E),D));") # one root unifurcation fails
Leaves doesn't agree! Aborting! ( didn't exist in first tree)
The two trees do not have the same set of leaves.
Aborting.
-1.0610772061522669e-14
>>> tqdist.quartet_distance("((B,(A,C,E),D));", "((B,(A,C,E),D));") # but not for identical trees with root unifurcations
0.0Here's the structure of the failing tree

Some more experiments,
>>> tqdist.quartet_distance("(B,(A,C,E),D);", "((B,((A,C),E),D));")
Leaves doesn't agree! Aborting! ( didn't exist in first tree)
The two trees do not have the same set of leaves.
Aborting.
-1.0610772061522669e-14
>>> tqdist.quartet_distance("(B,(A,C,E),D);", "(B,((A,C),E),D);")
0.4
>>> tqdist.quartet_distance("((B,(A,C,E),D));", "((B,((A,C),E),D));")
0.2
Some details:
tqdistPython package installed via PyPi with pip- version 1.0
- Python 3.10.6 (main, Nov 14 2022, 16:10:14) [GCC 11.3.0] on linux
Hope this helps, let me know if there's any other information I can provide!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels