Support disabling the --clock-filter-iqd parameter for augur refine by jgadling · Pull Request #884 · nextstrain/ncov (original) (raw)

Description of proposed changes

Support disabling the --clock-filter-iqd parameter for augur refine. Since --clock-filter-iqd 0 doesn't make sense, we can assume that setting the value to 0 (or even false) should disable it.

Fixes #852
Related to #

Testing

For a very simple test config:

inputs:

builds: test: subsampling_scheme: test_subsampling title: test tree

refine: keep_polytomies: True clock_filter_iqd: 0

subsampling: test_subsampling: test: group_by: "division year month" max_sequences: 10 exclude: "--exclude-where 'region=europe'"

~/ncov# grep clock_filter_iqd my_profiles/builds.yaml
  clock_filter_iqd: 5
~/ncov# rm results/test/tree.nwk && snakemake --printshellcmds auspice/ncov_test.json --profile /tmp/ncov/my_profiles/ --until refine 2>&1 | grep 'augur refine'
        augur refine             --tree results/test/tree_raw.nwk             --alignment results/test/filtered.fasta
             --metadata results/test/metadata_adjusted.tsv.xz             --output-tree results/test/tree.nwk
             --output-node-data results/test/branch_lengths.json             --root Wuhan/Hu-1/2019
             --timetree             --keep-polytomies             --clock-rate 0.0008
             --clock-std-dev 0.0004             --coalescent opt             --date-inference marginal 
            --divergence-unit mutations             --date-confidence
             --no-covariance             --clock-filter-iqd 5 2>&1 | tee logs/refine_test.txt

~/ncov# sed -i 's/filter_iqd:.*/filter_iqd: 0/' my_profiles/builds.yaml
~/ncov# grep clock_filter_iqd my_profiles/builds.yaml
  clock_filter_iqd: 0
~/ncov# rm results/test/tree.nwk && snakemake --printshellcmds auspice/ncov_test.json --profile /tmp/ncov/my_profiles/ --until refine 2>&1 | grep 'augur refine'
        augur refine             --tree results/test/tree_raw.nwk             --alignment results/test/filtered.fasta
             --metadata results/test/metadata_adjusted.tsv.xz             --output-tree results/test/tree.nwk
             --output-node-data results/test/branch_lengths.json             --root Wuhan/Hu-1/2019
             --timetree             --keep-polytomies             --clock-rate 0.0008
             --clock-std-dev 0.0004             --coalescent opt             --date-inference marginal
             --divergence-unit mutations             --date-confidence
             --no-covariance              2>&1 | tee logs/refine_test.txt

Release checklist

If this pull request introduces backward incompatible changes, complete the following steps for a new release of the workflow:

If this pull request introduces new features, complete the following steps: