From 1e8e98d20310d6223f22bdf35949133a3f9b2429 Mon Sep 17 00:00:00 2001 From: Jennifer Chang Date: Wed, 27 Mar 2024 08:39:29 +0000 Subject: [PATCH 1/2] phylo: Update config section of README to reflect reality Copied commit from zika: https://github.com/nextstrain/zika/pull/51/commits/810e1d217bc8de7bd233f426a498abbc3bba5e8a As duplicating https://github.com/nextstrain/zika/pull/51 --- phylogenetic/README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/phylogenetic/README.md b/phylogenetic/README.md index 0636e776..119928fd 100644 --- a/phylogenetic/README.md +++ b/phylogenetic/README.md @@ -27,9 +27,10 @@ Once you've run the build, you can view the results in auspice: ## Configuration -Configuration takes place entirely with the `Snakefile`. This can be read top-to-bottom, each rule -specifies its file inputs and output and also its parameters. There is little redirection and each -rule should be able to be reasoned with on its own. +Configuration for the workflow takes place entirely within the [defaults/config_dengue.ymal](defaults/config_dengue.yaml). +The analysis pipeline is contained in [Snakefile](Snakefile) with included [rules](rules). +Each rule specifies its file inputs and output and pulls its parameters from the config. +There is little redirection and each rule should be able to be reasoned with on its own. ### Using GenBank data From 65153cbcd1851fc0dba34e670c044a960cf5bc41 Mon Sep 17 00:00:00 2001 From: Jennifer Chang Date: Wed, 27 Mar 2024 08:50:00 +0000 Subject: [PATCH 2/2] phylo: Add build-config/nextstrain-automation Add config and rules for Nextstrain automation to deploy the Dengue dataset Copied commit from zika: https://github.com/nextstrain/zika/pull/51/commits/810e1d217bc8de7bd233f426a498abbc3bba5e8a As duplicating https://github.com/nextstrain/zika/pull/51 --- phylogenetic/README.md | 14 ++++++++++++++ .../nextstrain-automation/config.yaml | 4 ++++ .../nextstrain-automation/deploy.smk | 15 +++++++++++++++ 3 files changed, 33 insertions(+) create mode 100644 phylogenetic/build-configs/nextstrain-automation/config.yaml create mode 100644 phylogenetic/build-configs/nextstrain-automation/deploy.smk diff --git a/phylogenetic/README.md b/phylogenetic/README.md index 119928fd..d3942d66 100644 --- a/phylogenetic/README.md +++ b/phylogenetic/README.md @@ -69,3 +69,17 @@ With access to AWS, this can be more quickly run as: [auspice]: https://docs.nextstrain.org/projects/auspice/en/stable/index.html [Installing Nextstrain guide]: https://docs.nextstrain.org/en/latest/install.html [Running a Pathogen Workflow guide]: https://docs.nextstrain.org/en/latest/tutorials/running-a-workflow.html + +### 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 +``` diff --git a/phylogenetic/build-configs/nextstrain-automation/config.yaml b/phylogenetic/build-configs/nextstrain-automation/config.yaml new file mode 100644 index 00000000..e5494050 --- /dev/null +++ b/phylogenetic/build-configs/nextstrain-automation/config.yaml @@ -0,0 +1,4 @@ +custom_rules: + - build-configs/nextstrain-automation/deploy.smk + +deploy_url: "s3://nextstrain-data" diff --git a/phylogenetic/build-configs/nextstrain-automation/deploy.smk b/phylogenetic/build-configs/nextstrain-automation/deploy.smk new file mode 100644 index 00000000..547d818d --- /dev/null +++ b/phylogenetic/build-configs/nextstrain-automation/deploy.smk @@ -0,0 +1,15 @@ +""" +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} + """