Skip to content

Commit

Permalink
phylo: Add build-config/nextstrain-automation
Browse files Browse the repository at this point in the history
Add config and rules for Nextstrain automation to deploy the Zika
dataset
  • Loading branch information
joverlee521 committed Mar 27, 2024
1 parent 810e1d2 commit d7838ad
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 0 deletions.
14 changes: 14 additions & 0 deletions phylogenetic/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,20 @@ example sequences into the `data/` directory, use the following:

nextstrain build . --configfile build-configs/ci/profiles_config.yaml

### Deploying build

To run the workflow and automatically deploy the build to nextstrain.org,
you will need to have AWS credentials to run the following:

```
nextstrain build \
--env AWS_ACCESS_KEY_ID \
--env AWS_SECRET_ACCESS_KEY \
. \
deploy_all \
--configfile build-configs/nextstrain-automation/config.yaml
```

[Nextstrain]: https://nextstrain.org
[augur]: https://docs.nextstrain.org/projects/augur/en/stable/
[auspice]: https://docs.nextstrain.org/projects/auspice/en/stable/index.html
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"
16 changes: 16 additions & 0 deletions phylogenetic/build-configs/nextstrain-automation/deploy.smk
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
"""
This part of the workflow handles automatic deployments of the zika 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}
"""

0 comments on commit d7838ad

Please sign in to comment.