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.
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.