diff --git a/phylogenetic/defaults/config_zika.yaml b/phylogenetic/defaults/config_zika.yaml index fa4e134..9b0ab9a 100644 --- a/phylogenetic/defaults/config_zika.yaml +++ b/phylogenetic/defaults/config_zika.yaml @@ -1,2 +1,20 @@ strain_id_field: "accession" -display_strain_field: "strain" \ No newline at end of file +display_strain_field: "strain" + +filter: + group_by: "country year month" + sequences_per_group: 40 + min_date: 2012 + min_length: 5385 + +refine: + coalescent: "opt" + date_inference: "marginal" + clock_filter_iqd: 4 + +ancestral: + inference: "joint" + +traits: + columns: "region country" + sampling_bias_correction: 3 diff --git a/phylogenetic/rules/annotate_phylogeny.smk b/phylogenetic/rules/annotate_phylogeny.smk index 0d2fee6..d09daf7 100644 --- a/phylogenetic/rules/annotate_phylogeny.smk +++ b/phylogenetic/rules/annotate_phylogeny.smk @@ -39,7 +39,7 @@ rule ancestral: output: node_data = "results/nt_muts.json" params: - inference = "joint" + inference = config["ancestral"]["inference"] shell: """ augur ancestral \ @@ -77,8 +77,8 @@ rule traits: output: node_data = "results/traits.json", params: - columns = "region country", - sampling_bias_correction = 3, + columns = config["traits"]["columns"], + sampling_bias_correction = config["traits"]["sampling_bias_correction"], strain_id = config.get("strain_id_field", "strain"), shell: """ diff --git a/phylogenetic/rules/construct_phylogeny.smk b/phylogenetic/rules/construct_phylogeny.smk index efc5ff6..3393ce0 100644 --- a/phylogenetic/rules/construct_phylogeny.smk +++ b/phylogenetic/rules/construct_phylogeny.smk @@ -48,9 +48,9 @@ rule refine: tree = "results/tree.nwk", node_data = "results/branch_lengths.json" params: - coalescent = "opt", - date_inference = "marginal", - clock_filter_iqd = 4, + coalescent = config["refine"]["coalescent"], + date_inference = config["refine"]["date_inference"], + clock_filter_iqd = config["refine"]["clock_filter_iqd"], strain_id = config.get("strain_id_field", "strain"), shell: """ diff --git a/phylogenetic/rules/prepare_sequences.smk b/phylogenetic/rules/prepare_sequences.smk index 96c62f4..fda49c3 100644 --- a/phylogenetic/rules/prepare_sequences.smk +++ b/phylogenetic/rules/prepare_sequences.smk @@ -64,10 +64,10 @@ rule filter: output: sequences = "results/filtered.fasta" params: - group_by = "country year month", - sequences_per_group = 40, - min_date = 2012, - min_length = 5385, + group_by = config["filter"]["group_by"], + sequences_per_group = config["filter"]["sequences_per_group"], + min_date = config["filter"]["min_date"], + min_length = config["filter"]["min_length"], strain_id = config.get("strain_id_field", "strain"), shell: """