Skip to content

Commit

Permalink
Export strain, division and location as additional metadata
Browse files Browse the repository at this point in the history
This swap to using --metadata-columns in augur export to surface strain, division and location.
  • Loading branch information
trvrb committed Apr 12, 2024
1 parent 796f747 commit b51ea60
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 15 deletions.
5 changes: 0 additions & 5 deletions phylogenetic/defaults/auspice_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,6 @@
"key": "region",
"title": "Region",
"type": "categorical"
},
{
"key": "strain",
"title": "Strain name",
"type": "categorical"
}
],
"geo_resolutions": [
Expand Down
7 changes: 1 addition & 6 deletions phylogenetic/defaults/auspice_config_N450.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,7 @@
"key": "region",
"title": "Region",
"type": "categorical"
},
{
"key": "strain",
"title": "Strain name",
"type": "categorical"
}
}
],
"geo_resolutions": [
"country",
Expand Down
4 changes: 3 additions & 1 deletion phylogenetic/defaults/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ filter_N450:
refine:
coalescent: "opt"
date_inference: "marginal"
clock_filter_iqd: 4
clock_filter_iqd: 4
ancestral:
inference: "joint"
export:
metadata_columns: "strain division location"
6 changes: 3 additions & 3 deletions phylogenetic/rules/export.smk
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ rule export:
aa_muts = "results/{gene}/aa_muts.json",
colors = config["files"]["colors"],
auspice_config = lambda wildcard: "defaults/auspice_config.json" if wildcard.gene in ["genome"] else "defaults/auspice_config_N450.json"

output:
auspice_json = "auspice/measles_{gene}.json",
root_sequence = "auspice/measles_{gene}_root-sequence.json"
params:
strain_id = config["strain_id_field"]
strain_id = config["strain_id_field"],
metadata_columns = config["export"]["metadata_columns"]
shell:
"""
augur export v2 \
Expand All @@ -29,8 +29,8 @@ rule export:
--metadata-id-columns {params.strain_id} \
--node-data {input.branch_lengths} {input.nt_muts} {input.aa_muts} \
--colors {input.colors} \
--metadata-columns {params.metadata_columns} \
--auspice-config {input.auspice_config} \
--include-root-sequence \
--output {output.auspice_json}
"""

0 comments on commit b51ea60

Please sign in to comment.