From 75a51e6ed7177ad3a7b9dc344c9d6d085b07773a Mon Sep 17 00:00:00 2001 From: Jennifer Chang Date: Thu, 17 Oct 2024 00:45:11 -0700 Subject: [PATCH] Allow more lenient refine rules for the global refine parameters Separate washington-state specific refine parameters from a more permissive global refine parameters. --- phylogenetic/build-configs/washington-state/config.yaml | 3 +++ phylogenetic/defaults/config.yaml | 5 ++++- phylogenetic/rules/construct_phylogeny.smk | 9 ++------- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/phylogenetic/build-configs/washington-state/config.yaml b/phylogenetic/build-configs/washington-state/config.yaml index 0b91a50..6268f41 100644 --- a/phylogenetic/build-configs/washington-state/config.yaml +++ b/phylogenetic/build-configs/washington-state/config.yaml @@ -19,6 +19,9 @@ subsampling: country: --query "country == 'USA' and state not in ['WA', 'CA', 'ID', 'OR', 'NV','AZ','NM', 'CO', 'UT', 'WY', 'MT'] and accession != 'NC_009942'" --group-by state year --subsample-max-sequences 300 --min-length '9800' force_include: --exclude-all --include ../nextclade/defaults/include.txt +refine: + treetime_params: --coalescent opt --clock-filter-iqd 4 --date-inference marginal --date-confidence + traits: metadata_columns: [ 'country', diff --git a/phylogenetic/defaults/config.yaml b/phylogenetic/defaults/config.yaml index d723efb..a86b515 100644 --- a/phylogenetic/defaults/config.yaml +++ b/phylogenetic/defaults/config.yaml @@ -2,7 +2,7 @@ strain_id_field: "accession" # Use 'Egypt 1951' as the reference and root, following Mencattelli et al, 2023 # https://www.nature.com/articles/s41467-023-42185-7 reference: "defaults/reference_global.gb" -root: "AF260968_REF" +root: "AF260968" # Sequences must be FASTA and metadata must be TSV # Both files must be zstd compressed @@ -68,6 +68,9 @@ subsampling: region: --query "is_lab_host != 'true'" --query-columns is_lab_host:str --min-length '9800' --group-by region year --subsample-max-sequences 3000 --exclude defaults/exclude.txt force_include: --exclude-all --include defaults/include.txt +refine: + treetime_params: --coalescent opt --date-inference marginal --date-confidence + traits: metadata_columns: [ 'region', diff --git a/phylogenetic/rules/construct_phylogeny.smk b/phylogenetic/rules/construct_phylogeny.smk index 59fd7be..1c18cae 100644 --- a/phylogenetic/rules/construct_phylogeny.smk +++ b/phylogenetic/rules/construct_phylogeny.smk @@ -55,9 +55,7 @@ rule refine: params: metadata_id_columns = config["strain_id_field"], root = config["root"], - date_inference = "marginal", - coalescent = "opt", - clock_filter_iqd = 4, + treetime_params = config["refine"]["treetime_params"], shell: """ augur refine \ @@ -69,9 +67,6 @@ rule refine: --output-node-data {output.node_data} \ --root {params.root} \ --timetree \ - --coalescent {params.coalescent} \ - --date-confidence \ - --date-inference {params.date_inference} \ - --clock-filter-iqd {params.clock_filter_iqd} \ + {params.treetime_params} \ 2>&1 | tee {log} """