Re: [R-sig-phylo] Breaking polytomies such that all topologies are equiprobable

2020-06-29 Thread Emmanuel Paradis
- Le 27 Juin 20, à 16:53, Yan Wong y...@pixie.org.uk a écrit : > This is extremely helpful, thanks Emmanuel. I think it might be useful to note > this in the documentation for multi2di (or give a pointer to the description), > as it wasn’t obvious to me how to find out this information from

Re: [R-sig-phylo] Breaking polytomies such that all topologies are equiprobable

2020-06-29 Thread Yan Wong
Thanks very much Martin. I’m glad that I brought this up (I think the documentation should probably make this clearer). Your extra functions, together with the corrected Dendropy code and Emmanuel’s hints, should all be useful for me to check I’m doing it right for larger trees. Cheers Yan >

Re: [R-sig-phylo] Breaking polytomies such that all topologies are equiprobable

2020-06-27 Thread Yan Wong
This is extremely helpful, thanks Emmanuel. I think it might be useful to note this in the documentation for multi2di (or give a pointer to the description), as it wasn’t obvious to me how to find out this information from within R. Even better would be an option that allowed equiprobable

Re: [R-sig-phylo] Breaking polytomies such that all topologies are equiprobable

2020-06-27 Thread Emmanuel Paradis
Hi Yan, multi2di() calls rtree() if random = TRUE. As you rightly guessed, the algorithm used by this latter function is (described in APER2, p. 313): 1. Draw randomly an integer a on the interval [1, n − 1]. Set b = n − a. 2. If a > 1, apply (recursively) step 1 after substituting n by a. 3.

Re: [R-sig-phylo] Breaking polytomies such that all topologies are equiprobable

2020-06-26 Thread Holder, Mark Travis
5.864.5860 == From: R-sig-phylo on behalf of Yan Wong Sent: Friday, June 26, 2020 4:46 PM To: r-sig-phylo@r-project.org Subject: [R-sig-phylo] Breaking polytomies such that all topologies are equiprobable I�m trying to figure out how t

[R-sig-phylo] Breaking polytomies such that all topologies are equiprobable

2020-06-26 Thread Yan Wong
I’m trying to figure out how to randomly resolve polytomies such that there is an equal probability of any topology being generated. I thought that the ape function “multi2di” did this, but when I have tried it repeatedly with a 4-tomy, multi2di seems to produce the 3 balanced trees