From 1df85e90396b81db5bb0d612a81bb0528267f627 Mon Sep 17 00:00:00 2001 From: Ivan Blagoev Topolsky Date: Wed, 2 Nov 2022 13:52:37 +0100 Subject: [PATCH] Tutorial tweaks - tipos - make the cluster step testable in jupytext - configure installer to use strict channel priorities Co-authored-by: Anika John Co-authored-by: Lara Fuhrmann --- README.md | 2 ++ docs/README.md | 4 ++-- docs/tutorial_hiv.md | 2 +- docs/tutorial_sarscov2.md | 39 +++++++++++++++++++++++++++++++++++---- utils/quick_install.sh | 1 + 5 files changed, 41 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index cfe0c2dc1..8fed4c05b 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,8 @@ general: Also see [snakemake's documentation](https://snakemake.readthedocs.io/en/stable/executing/cli.html) to learn more about the command-line options available when executing the workflow. +Tutorials introducing usage of V-pipe are available in the [docs/](docs/README.md) subdirectory. + ### Using quick install script To deploy V-pipe, use the [installation script](utils/README.md#quick-installer) with the following parameters: diff --git a/docs/README.md b/docs/README.md index 41ebc0788..bc4d9196b 100644 --- a/docs/README.md +++ b/docs/README.md @@ -14,9 +14,9 @@ cd tutorial/work/ # do something cd ../.. ``` -Of course you don't necessarily need to do that. You can simply remainin the working directory. +Of course you don't necessarily need to do that. You can simply remain in the working directory. -When editing files like `config.yaml`, you can use your favorite editor (`vim`, `emacs`, `nano`, [butterflies](https://xkcd.com/378/), etc.). By default our tutorial use heredocs to make it easier to copy-paste the blocks into bash: +When editing files like `config.yaml`, you can use your favorite editor (`vim`, `emacs`, `nano`, [butterflies](https://xkcd.com/378/), etc.). By default our tutorials use a [_heredoc_](https://en.wikipedia.org/wiki/Here_document) to make it easier to copy-paste the blocks into bash: ```bash cat > config.yaml < smk-simple-slurm/simple/config.yaml < + #- qos= + - mem_mb=1000 +restart-times: 3 +max-jobs-per-second: 10 +max-status-checks-per-second: 1 +local-cores: 1 +latency-wait: 60 +jobs: 500 +keep-going: True +rerun-incomplete: True +printshellcmds: True +scheduler: greedy +use-conda: True +EOT cd work/ -./vpipe --dry-run --profile ../smk-simple-slurm --jobs 100 +./vpipe --dry-run --profile ../smk-simple-slurm/simple/ --jobs 100 cd ../.. ``` @@ -236,9 +264,12 @@ In addition, Snakemake has [parameters for conda](https://snakemake.readthedocs. - using `-conda-create-envs-only` enables to download the dependencies only without running the pipeline itself. This is very useful if the compute nodes of your cluster are not allowed internet access. - using `--conda-prefix=`_{DIR}_ stores the conda environments of dependencies in a common directory (thus possible to share and re-use between multiple instances of V-pipe). -```console +```bash cd tutorial/work/ +# First download all bioconda dependencies ahead of time ./vpipe --conda-prefix ../snake-envs --cores 1 --conda-create-envs-only +# And then run on the cluster, the compute node will not need to download anything +./vpipe --dry-run --conda-prefix ../snake-envs --profile ../smk-simple-slurm/simple/ --jobs 100 cd ../.. ``` diff --git a/utils/quick_install.sh b/utils/quick_install.sh index 3ada4600b..b585315cf 100755 --- a/utils/quick_install.sh +++ b/utils/quick_install.sh @@ -178,6 +178,7 @@ sh ${MINICONDA} -b -p miniconda3 conda config --add channels defaults conda config --add channels bioconda conda config --add channels conda-forge +conda config --set channel_priority strict # NOTE conda-forge *HAS TO* be higher than bioconda VPIPEENV=