jeetsukumaran / DendroPy

A Python library for phylogenetic scripting, simulation, data processing and manipulation.

Home Page:https://pypi.org/project/DendroPy/.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

NoahAmsel opened this issue · comments

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.

This was fixed in #132