jeetsukumaran / DendroPy

A Python library for phylogenetic scripting, simulation, data processing and manipulation.
https://pypi.org/project/DendroPy/.
BSD 3-Clause "New" or "Revised" License
207 stars 63 forks source link

Can't set random seed or substitution model in RAxML wrapper #131

Closed NoahAmsel closed 4 months ago

NoahAmsel commented 3 years ago

The RAxML executable requires the command line arguments -m to specify the substitution model and -p to specify the random seed. See here. DendroPy's RAxML wrapper sets these arguments to "GTRCAT" and str(random.randint(0, sys.maxsize)), respectively, and doesn't allow the user to change them. While the user can supply a list of raxml_args, they cannot override the values that DendroPy provides for these two arguments.

The function dendropy.interop.raxml.estimate_tree should take two optional arguments, p and m (or they could be called seed and substitution_model). If they are missing, the defaults "GTRCAT" and str(random.randint(0, sys.maxsize)) should be used. I see in the documentation that you're intending to "polish up the interface" in a future release anyway, but I don't think we should wait to fix this problem because it's worse than just not being "Pythonic". Right now, users are blocked from getting reproducible results by their inability to set the random seed.

mmore500 commented 4 months ago

This was fixed in #132