Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add phylo automation config #29

Merged
merged 2 commits into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading