diff --git a/Snakefile b/Snakefile index 3562078..4f7dbfe 100644 --- a/Snakefile +++ b/Snakefile @@ -1,3 +1,6 @@ +if not config: + configfile: "config/config_zika.yaml" + rule all: input: auspice_json = "auspice/zika.json", @@ -59,12 +62,14 @@ rule filter: group_by = "country year month", sequences_per_group = 40, min_date = 2012, - min_length = 5385 + min_length = 5385, + strain_id = config.get("strain_id_field", "strain"), shell: """ augur filter \ --sequences {input.sequences} \ --metadata {input.metadata} \ + --metadata-id-columns {params.strain_id} \ --exclude {input.exclude} \ --output {output.sequences} \ --group-by {params.group_by} \ @@ -124,13 +129,15 @@ rule refine: params: coalescent = "opt", date_inference = "marginal", - clock_filter_iqd = 4 + clock_filter_iqd = 4, + strain_id = config.get("strain_id_field", "strain"), shell: """ augur refine \ --tree {input.tree} \ --alignment {input.alignment} \ --metadata {input.metadata} \ + --metadata-id-columns {params.strain_id} \ --output-tree {output.tree} \ --output-node-data {output.node_data} \ --timetree \ @@ -212,12 +219,15 @@ rule export: auspice_config = files.auspice_config, description = files.description output: - auspice_json = rules.all.input.auspice_json + auspice_json = rules.all.input.auspice_json, + params: + strain_id = config.get("strain_id_field", "strain"), shell: """ augur export v2 \ --tree {input.tree} \ --metadata {input.metadata} \ + --metadata-id-columns {params.strain_id} \ --node-data {input.branch_lengths} {input.traits} {input.nt_muts} {input.aa_muts} \ --colors {input.colors} \ --auspice-config {input.auspice_config} \ diff --git a/config/config_zika.yaml b/config/config_zika.yaml new file mode 100644 index 0000000..5345584 --- /dev/null +++ b/config/config_zika.yaml @@ -0,0 +1,2 @@ +strain_id_field: "genbank_accession" +display_strain_field: "strain" \ No newline at end of file