diff --git a/defaults/parameters.yaml b/defaults/parameters.yaml index 4f91e7fd9..2645248a2 100644 --- a/defaults/parameters.yaml +++ b/defaults/parameters.yaml @@ -115,7 +115,8 @@ combine_sequences_for_subsampling: warn_about_duplicates: true tree: - tree-builder-args: "'-ninit 10 -n 4'" + tree-builder-args: "'-ninit 10 -n 4 -me 0.05'" + override_default_args: true # TreeTime settings refine: diff --git a/docs/src/reference/change_log.md b/docs/src/reference/change_log.md index 2335a3b78..dd3f5545a 100644 --- a/docs/src/reference/change_log.md +++ b/docs/src/reference/change_log.md @@ -3,6 +3,10 @@ As of April 2021, we use major version numbers (e.g. v2) to reflect backward incompatible changes to the workflow that likely require you to update your Nextstrain installation. We also use this change log to document new features that maintain backward compatibility, indicating these features by the date they were added. +## v12 (? February 2022) + + - Add a new workflow parameter in the `tree` config named [`override_default_args`](https://docs.nextstrain.org/projects/ncov/en/latest/reference/configuration.html#override_default_args) that enables overriding default tree builder arguments with the values defined by [`tree-builder-args`](https://docs.nextstrain.org/projects/ncov/en/latest/reference/configuration.html#tree-builder-args). This release of the workflow sets this parameter to `true` by default, which may be a breaking change for users who have modified the default tree builder arguments. Upgrade to [Augur 14.0.0](https://github.com/nextstrain/augur/blob/master/CHANGES.md#1400-8-february-2022) and run `augur tree -h` to see the default arguments for the tree builder you use. [See the original Augur pull request](https://github.com/nextstrain/augur/pull/839), for more details. + ## New features since last version update ## v12 (12 July 2022) diff --git a/docs/src/reference/workflow-config-file.rst b/docs/src/reference/workflow-config-file.rst index 699d41b73..013a46370 100644 --- a/docs/src/reference/workflow-config-file.rst +++ b/docs/src/reference/workflow-config-file.rst @@ -822,7 +822,14 @@ tree-builder-args - type: string - description: Arguments specific to the tree method (``iqtree``) to be passed through to the tree builder command run by ``augur tree``. -- default: ``'-ninit 10 -n 4'`` +- default: ``'-ninit 10 -n 4 -me 0.05'`` + +override_default_args +~~~~~~~~~~~~~~~~~~~~~ + +- type: boolean +- description: Override default tree builder arguments with the values provided by the user in ``tree-builder-args`` instead of augmenting the existing defaults. +- default: ``true`` diff --git a/workflow/snakemake_rules/main_workflow.smk b/workflow/snakemake_rules/main_workflow.smk index c3d19cea2..7d2aa1729 100644 --- a/workflow/snakemake_rules/main_workflow.smk +++ b/workflow/snakemake_rules/main_workflow.smk @@ -787,6 +787,7 @@ rule tree: tree = "results/{build_name}/tree_raw.nwk" params: args = lambda w: config["tree"].get("tree-builder-args","") if "tree" in config else "", + override_default_args = lambda wildcards: "--override-default-args" if config["tree"].get("override_default_args", False) else "", exclude_sites = lambda w: f"--exclude-sites {config['files']['sites_to_mask']}" if "sites_to_mask" in config["files"] else "" log: "logs/tree_{build_name}.txt" @@ -804,6 +805,7 @@ rule tree: augur tree \ --alignment {input.alignment} \ --tree-builder-args {params.args} \ + {params.override_default_args} \ {params.exclude_sites} \ --output {output.tree} \ --nthreads {threads} 2>&1 | tee {log}