-
Notifications
You must be signed in to change notification settings - Fork 403
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add parameter to enable overriding tree args #871
base: master
Are you sure you want to change the base?
Conversation
Assigning myself to fix the merge conflict with configuration.md, since I migrated that to workflow-config-file.rst. EDIT: done |
Thank you, @joverlee521 for bumping and @victorlin for signing up to fix the merge conflict. The main reason I hadn't merged this already was that this PR does make a potentially breaking change. It sets the override of tree args as the default behavior, but if people already have custom tree-builder args in their config files, Snakemake's deep merge of their config with the defaults will cause the default tree builder args to be overridden by the user's arguments. As a specific example, the original defaults prior to this PR were:
The default arguments for IQ-TREE in
As a result, the config entry above produces an IQ-TREE argument like:
The redundant arguments in that command can cause IQ-TREE to crash, for some operating systems and versions of IQ-TREE. We try to solve this problem with the new argument that allows overriding the default arguments. The proposed defaults in this PR are:
As a result, the config entry above produces an IQ-TREE argument like:
It is possible that users have defined their own tree builder arguments, based on the workflow behavior prior to this PR. For example, a common pattern would be to tell IQ-TREE to collapse zero-length branches in the tree instead of forcing bifurcations:
In the current workflow, this config produces the following IQ-TREE argument, where the first three arguments are
In this PR's implementation, this config would get deep merged with our new defaults to look like so:
As a result of this deep merge, the resulting IQ-TREE command would be:
This command could produce quite different results than the command with the current workflow behavior above. Given that our recommended tree builder arguments require overriding the default Another (less than ideal) solution would be to make |
Adds a configuration parameter to the workflow, `override_default_args`, in the `tree` section that allows users to toggle the corresponding new flag in `augur tree` on or off. Sets the default value to `true`, since the custom tree builder arguments we define in defaults are redundant with previously hardcoded defaults in augur tree. This change should fix a related segmentation fault on some systems, but it also allows users to define more flexible tree builder arguments that conflict with the defaults (e.g., bootstrap mode in IQ-TREE).
a15a062
to
6ea7030
Compare
tree-builder-args: "'-ninit 10 -n 4 -me 0.05'" | ||
override_default_args: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The mix of -
and _
in parameter names right next to each other seems a bit off. Looking at the rest of this file, _
is used for everything but tree-builder-args
. It's probably beyond this PR to change that, so probably fine to use underscores for override_default_args
here to follow broader convention.
Description of proposed changes
Adds a configuration parameter to the workflow,
override_default_args
,in the
tree
section that allows users to toggle the corresponding newflag in
augur tree
on or off. Sets the default value totrue
, sincethe custom tree builder arguments we define in defaults are redundant
with previously hardcoded defaults in augur tree. This change should fix
a related segmentation fault on some systems, but it also allows users
to define more flexible tree builder arguments that conflict with the
defaults (e.g., bootstrap mode in IQ-TREE).
Related issue(s)
Related to nextstrain/augur#780
Testing
Release checklist
If this pull request introduces backward incompatible changes, complete the following steps for a new release of the workflow:
docs/src/reference/change_log.md
in this pull request to document these changes and the new version number.