Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

assume rooted trees by default in compare_trees #66

Open
arlin opened this issue Aug 28, 2018 · 0 comments
Open

assume rooted trees by default in compare_trees #66

arlin opened this issue Aug 28, 2018 · 0 comments
Assignees
Labels

Comments

@arlin
Copy link
Member

arlin commented Aug 28, 2018

Look at test_compare_trees.TestCompareTrees.test_different. This is a test to make sure that two different trees are distinguished, using tree1 ((a, b)c); and tree2 (a,(b, c));. This is either a mistake or not a good test, because the two trees don't have the same namespace. The first tree is not ((a, b), c);, because taking out the comma before c makes it a two-taxon tree of a and b, with the internal node labeled c.

If you change the first tree to ((a, b), c);, then the test fails because compare_trees says these are the same tree. Try it: curl -X POST "http://phylo.cs.nmsu.edu:5006/phylotastic_ws/compare_trees" -H "content-type:application/json" -d '{"tree1_nwk": "((a,b),c);", "tree2_nwk": "(a,(b,c));"}'

It also fails when comparing ((a, b), (c, d)); and (((a, b), c), d);.

This almost certainly means that compare_trees is assuming unrooted trees.

Change the behavior of compare_trees to assume rooted trees by default. Optionally, add an option to compare unrooted trees.

The examples above will provide test cases for pairs of trees that are either the same or different depending on whether rooting is assumed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants