Skip to content

Commit

Permalink
Merge pull request #29 from nextstrain/add-phylo-automation-config
Browse files Browse the repository at this point in the history
Add phylo automation config
  • Loading branch information
genehack authored Dec 16, 2024
2 parents b564784 + a9b09a1 commit 7532da2
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 4 deletions.
4 changes: 2 additions & 2 deletions phylogenetic/Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ configfile: "defaults/config.yaml"

rule all:
input:
auspice_json=expand("auspice/yellow-fever-virus_{build}.json", build=config["builds"]),
tip_frequencies_json=expand("auspice/yellow-fever-virus_{build}_tip-frequencies.json", build=config["builds"]),
auspice_json=expand("auspice/yellow-fever_{build}.json", build=config["builds"]),
tip_frequencies_json=expand("auspice/yellow-fever_{build}_tip-frequencies.json", build=config["builds"]),


include: "rules/prepare_sequences.smk"
Expand Down
4 changes: 4 additions & 0 deletions phylogenetic/build-configs/nextstrain-automation/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
custom_rules:
- build-configs/nextstrain-automation/deploy.smk

deploy_url: "s3://nextstrain-data"
15 changes: 15 additions & 0 deletions phylogenetic/build-configs/nextstrain-automation/deploy.smk
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
"""
This part of the workflow handles automatic deployments of the measles build.
Uploads the build defined as the default output of the workflow through
the `all` rule from Snakefille
"""

rule deploy_all:
input: *rules.all.input
output: touch("results/deploy_all.done")
params:
deploy_url = config["deploy_url"]
shell:
"""
nextstrain remote upload {params.deploy_url} {input}
"""
4 changes: 2 additions & 2 deletions phylogenetic/rules/export.smk
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ rule export:
auspice_config = lambda w: config["files"][w.build]["auspice_config"],
description=config["files"]["description"],
output:
auspice_json = "auspice/yellow-fever-virus_{build}.json"
auspice_json = "auspice/yellow-fever_{build}.json"
params:
metadata_columns = config["export"]["metadata_columns"],
strain_id = config["strain_id_field"],
Expand Down Expand Up @@ -66,7 +66,7 @@ rule tip_frequencies:
tree = "results/{build}/tree.nwk",
metadata = "data/metadata.tsv"
output:
tip_freq = "auspice/yellow-fever-virus_{build}_tip-frequencies.json"
tip_freq = "auspice/yellow-fever_{build}_tip-frequencies.json"
params:
strain_id = config["strain_id_field"],
min_date = config["tip_frequencies"]["min_date"],
Expand Down

0 comments on commit 7532da2

Please sign in to comment.