I think the random resolution of polytomies of ``resolve_polytomies()``
works as advertised. Empirical proof is given by running the attached
script, with ensures that ``resolve_polytomies`` does, indeed, visit
every distinct topology when called multiple times. But you should read
further to understand what is going on, and why your visual assessment
is unreliable.
[NOTE: I have just pushed a change that does, in fact, update the
``resolve_polytomies()`` code. However, it really is more of clean-up
of the code than a major change in logic.]
You are assessing "random" by a *visual* inspection of a *single*
realization of polytomy resolution of a tree that has been *ladderized*.
(1) With ``resolve_polytomies()`` *over a very large number of calls*,
all possible strictly-bifurcating resolutions of a polytomy will be
realized, and any *single* call to ``resolve_polytomies()`` will yield
*one* of these strictly-bifurcating resolutions. You cannot in any way
assess this with one call on one tree. Now, I do not know if these
resolutions are going to be strictly equiprobable, even over an infinite
number of calls. But I am pretty sure that they will all be visited.
(2) Ladderizing a tree will completely obscure the most of the more
unbalanced resolutions to "look" the same.
To account for (1), you should run the process multiple times. Even
here, though, I would not trust a visual inspection of trees, and I
would outright reject any visual inspection of *ladderized* trees.
What needs to be done to check to see if ``resolve_polytomies()`` works
as advertised is to see if it does, indeed, result in all possible
bifurcations if called multiple times. And, indeed it does: run the
attached script. It generates a list of all topologies in PAUP, and then
calls ``resolve_polytomies`` on a star tree multiple times until all the
topologies have been visited. You can play around with the number of
taxa and whether or not the trees are rooted. I have run this with 8
taxa and unrooted, and it pretty quickly (as measured in time to get a
cup a coffee from the machine) visits the entire space of topologies.
-- jeet
> --
> You received this message because you are subscribed to the Google
> Groups "DendroPy Users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to
dendropy-user...@googlegroups.com
> <mailto:
dendropy-user...@googlegroups.com>.
> For more options, visit
https://groups.google.com/d/optout.
--
--------------------------------------
Jeet Sukumaran
--------------------------------------
jeetsu...@gmail.com
--------------------------------------
Blog/Personal Pages:
http://jeetworks.org/
GitHub Repositories:
http://github.com/jeetsukumaran
Photographs (as stream):
http://www.flickr.com/photos/jeetsukumaran/
Photographs (by galleries):
http://www.flickr.com/photos/jeetsukumaran/sets/
--------------------------------------