From bdb8cdeae0961e571d1d0406e1b96248b61c9ad5 Mon Sep 17 00:00:00 2001 From: John Huddleston Date: Fri, 7 Aug 2020 13:27:31 -0700 Subject: [PATCH] Document snakemake commands with required cores argument Adds the required `--cores 1` argument to all calls to snakemake in both scripts and documentation. This is the first step toward removing Snakemake as an augur dependency [1]. [1] https://github.com/nextstrain/augur/pull/557 --- docs/tutorials/tb_tutorial.md | 6 +++--- docs/tutorials/zika_tutorial.md | 4 ++-- docs/usage/augur_snakemake.md | 4 ++-- tests/builds/runner.sh | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/tutorials/tb_tutorial.md b/docs/tutorials/tb_tutorial.md index bb54a8e77..296697b7b 100644 --- a/docs/tutorials/tb_tutorial.md +++ b/docs/tutorials/tb_tutorial.md @@ -100,12 +100,12 @@ rule filter: Now run filter. If you are using the Snakefile included with the TB tutorial, you can run: ```bash -snakemake filter +snakemake --cores 1 filter ``` If you have created your own Snakefile, you'll need to specify its name. For example, if it is called `TB_snakefile`, you would run: ```bash -snakemake -s TB_snakefile filter +snakemake --cores 1 -s TB_snakefile filter ``` ### Mask the Sequences @@ -450,7 +450,7 @@ rule all: This rule tells Snakemake what the final output of our entire run should look like. It will run all rules necessary to produce these files, so they should be the names of your final step. -If you have an "all" rule, you can run your entire analysis just by running `snakemake` or `snakemake --snakefile Snakefile2` (if the name of your Snakefile is not 'Snakefile'). +If you have an "all" rule, you can run your entire analysis just by running `snakemake --cores 1` or `snakemake --cores 1 --snakefile Snakefile2` (if the name of your Snakefile is not 'Snakefile'). We'll need to add a few remaining files to our list of files at the start of our Snakefile: ```bash diff --git a/docs/tutorials/zika_tutorial.md b/docs/tutorials/zika_tutorial.md index 858eec535..d01ec4966 100644 --- a/docs/tutorials/zika_tutorial.md +++ b/docs/tutorials/zika_tutorial.md @@ -79,7 +79,7 @@ This rule would produce `results/filtered.fasta` from the input files `data/sequ Note that we explicitly specify what is an input and what is an output file. To filter our data, we would now call snakemake as ```bash -snakemake results/filtered.fasta +snakemake --cores 1 results/filtered.fasta ``` and snakemake will run the same command as specified above. @@ -102,7 +102,7 @@ rule align: ``` If you now want to generate the alignment, you can type ```bash -snakemake results/aligned.fasta +snakemake --cores 1 results/aligned.fasta ``` and snakemake will diff --git a/docs/usage/augur_snakemake.md b/docs/usage/augur_snakemake.md index 46b7b71de..b01fb7d26 100644 --- a/docs/usage/augur_snakemake.md +++ b/docs/usage/augur_snakemake.md @@ -29,7 +29,7 @@ This rule would produce `results/filtered.fasta` from the input files `data/sequ Note that we explicitly specify what is an input and what is an output file. To filter our data, we would now call snakemake as ```bash -snakemake results/filtered.fasta +snakemake --cores 1 results/filtered.fasta ``` and snakemake will run the same command as specified above. @@ -52,7 +52,7 @@ rule align: ``` If you now want to generate the alignment, you can type ```bash -snakemake results/aligned.fasta +snakemake --cores 1 results/aligned.fasta ``` and snakemake will diff --git a/tests/builds/runner.sh b/tests/builds/runner.sh index aa5eab1c5..6d9b84777 100644 --- a/tests/builds/runner.sh +++ b/tests/builds/runner.sh @@ -19,8 +19,8 @@ mkdir auspice for snakefile in ./*/Snakefile; do echo -e "\nRunning ${snakefile} (quietly)\n" pushd $(dirname "${snakefile}") >/dev/null - snakemake --quiet clean 1>/dev/null - snakemake --quiet 1>/dev/null + snakemake --cores 1 --quiet clean 1>/dev/null + snakemake --cores 1 --quiet 1>/dev/null cp auspice/*.json ../auspice popd >/dev/null done