From acf8c758531d5fd87e548f0caa190b41b7989c8c Mon Sep 17 00:00:00 2001 From: MaxUlysse Date: Thu, 17 Jan 2019 16:32:42 +0100 Subject: [PATCH 1/3] update CHANGELOG --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index aaf352769f..3e3f0695b9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] +### `Added` +- [#712](https://github.com/SciLifeLab/Sarek/pull/712), [#718](https://github.com/SciLifeLab/Sarek/pull/718) - Added possibilities to run Sarek with `conda` + ### `Changed` - [#710](https://github.com/SciLifeLab/Sarek/pull/710) - Improve release checklist and script From b6fb15165a65f1ed1aa1cd5c6364590393b13bc7 Mon Sep 17 00:00:00 2001 From: MaxUlysse Date: Thu, 17 Jan 2019 16:33:20 +0100 Subject: [PATCH 2/3] update docs + new conda profile and config file --- README.md | 16 +++++++++------- conf/conda.config | 10 ++++++++++ docs/CONDA.md | 45 +++++++++++++++++++++++++++++++++++++++++++++ docs/CONFIG.md | 13 +++++++++++++ docs/USAGE.md | 47 ----------------------------------------------- nextflow.config | 3 ++- 6 files changed, 79 insertions(+), 55 deletions(-) create mode 100644 conf/conda.config create mode 100644 docs/CONDA.md diff --git a/README.md b/README.md index 2c68dd7909..84e8247300 100644 --- a/README.md +++ b/README.md @@ -82,13 +82,14 @@ The Sarek pipeline comes with documentation in the `docs/` directory: 06. [Configuration and profiles documentation](https://github.com/SciLifeLab/Sarek/blob/master/docs/CONFIG.md) 07. [Intervals documentation](https://github.com/SciLifeLab/Sarek/blob/master/docs/INTERVALS.md) 08. [Running the pipeline](https://github.com/SciLifeLab/Sarek/blob/master/docs/USAGE.md) -09. [Command line parameters](https://github.com/SciLifeLab/Sarek/blob/master/docs/PARAMETERS.md) -10. [Examples](https://github.com/SciLifeLab/Sarek/blob/master/docs/USE_CASES.md) -11. [Input files documentation](https://github.com/SciLifeLab/Sarek/blob/master/docs/INPUT.md) -12. [Processes documentation](https://github.com/SciLifeLab/Sarek/blob/master/docs/PROCESS.md) -13. [Documentation about containers](https://github.com/SciLifeLab/Sarek/blob/master/docs/CONTAINERS.md) -14. [More information about ASCAT](https://github.com/SciLifeLab/Sarek/blob/master/docs/ASCAT.md) -15. [Output documentation structure](https://github.com/SciLifeLab/Sarek/blob/master/docs/OUTPUT.md) +09. [Running the pipeline using Conda](https://github.com/SciLifeLab/Sarek/blob/master/docs/CONDA.md) +10. [Command line parameters](https://github.com/SciLifeLab/Sarek/blob/master/docs/PARAMETERS.md) +11. [Examples](https://github.com/SciLifeLab/Sarek/blob/master/docs/USE_CASES.md) +12. [Input files documentation](https://github.com/SciLifeLab/Sarek/blob/master/docs/INPUT.md) +13. [Processes documentation](https://github.com/SciLifeLab/Sarek/blob/master/docs/PROCESS.md) +14. [Documentation about containers](https://github.com/SciLifeLab/Sarek/blob/master/docs/CONTAINERS.md) +15. [More information about ASCAT](https://github.com/SciLifeLab/Sarek/blob/master/docs/ASCAT.md) +16. [Output documentation structure](https://github.com/SciLifeLab/Sarek/blob/master/docs/OUTPUT.md) ## Contributions & Support @@ -117,6 +118,7 @@ Helpful contributors: * [Björn Nystedt](https://github.com/bjornnystedt) * [Pall Olason](https://github.com/pallolason) * [Aron Skaftason](https://github.com/arontommi) +* [Nilesh Tawari](https://github.com/nilesh-tawari) -------------------------------------------------------------------------------- diff --git a/conf/conda.config b/conf/conda.config new file mode 100644 index 0000000000..71c5b79eb1 --- /dev/null +++ b/conf/conda.config @@ -0,0 +1,10 @@ +/* + * ------------------------------------------------- + * Nextflow config file for Sarek + * ------------------------------------------------- + * Conda environments for every process + * All environment need to be set up + * ------------------------------------------------- + */ + +process.conda = 'environment.yml' diff --git a/docs/CONDA.md b/docs/CONDA.md new file mode 100644 index 0000000000..b348b6ffe6 --- /dev/null +++ b/docs/CONDA.md @@ -0,0 +1,45 @@ +# Run Sarek using Conda + +> /!\\ +This functionality is still under development, so we would recommend to use it with care. + +> /!\\ +A conda environment is defined but does not contain all the tools needed for fully using Sarek. + +To use Sarek with conda, first make sure that you have conda installed. +We recommend miniconda: +https://conda.io/miniconda.html + +Sarek comes with a conda environment definition - a file called +[`environment.yml`](../environment.yml) which lists conda channels and package names/versions. + +To run Sarek with Conda, you can use/modify the profile `conda`, or follow the following steps: + +1. Create a new environment using the [`environment.yml`](../environment.yml) file: + +```bash +# Download the environment.yml file +curl https://raw.githubusercontent.com/SciLifeLab/Sarek/master/environment.yml -o environment.yml + +# Create a new conda environment using it +conda env create -f environment.yml +``` + +2. Create a nextflow config file as indicated below (Usually as `~/.nextflow/config` file): + +```groovy +process { + beforeScript = { 'module load anaconda; set +u; source activate sarek-2.2.2; set -u;' } +} +``` + +3. While launcing Sarek specify the nextflow config file crreated in step 2 using `-c` option: + +```bash +nextflow run SciLifeLab/Sarek/main.nf \ + --sample samples_germline.tsv \ + -profile conda \ + --genome_base /sw/data/uppnex/ToolBox/hg38bundle \ + --genome GRCh38 \ + -c ~/.nextflow/config +``` diff --git a/docs/CONFIG.md b/docs/CONFIG.md index 4b8786778f..496eb1afa3 100644 --- a/docs/CONFIG.md +++ b/docs/CONFIG.md @@ -29,6 +29,12 @@ Define usage limits and Singularity for BINAC cluster in Tuebingen. Designed for usage with Singularity on CFC at QBic. +### [`conda.config`](https://github.com/SciLifeLab/Sarek/blob/master/conf/conda.config) + +> /!\\ Under development. + +Define conda environement. + ### [`containers.config`](https://github.com/SciLifeLab/Sarek/blob/master/conf/containers.config) Define Containers for all process. @@ -107,6 +113,13 @@ This is the profile for use on the BTB server munin. This is the profile for use on the CFC cluster in Tuebingen. +### `cfc` + +> /!\\ Under development. + +This is the profile for conda testing on a small machine, or on Travis CI. +Conda environement will be built automatically. + ### `docker` This is the profile for docker testing on a small machine, or on Travis CI. diff --git a/docs/USAGE.md b/docs/USAGE.md index 9c1f69f5b2..4a4ff7c5a3 100644 --- a/docs/USAGE.md +++ b/docs/USAGE.md @@ -4,7 +4,6 @@ This guide will take you through your first run of Sarek. It is divided into two steps corresponding to the two main types of analysis offered by Sarek: - Run a Germline Analysis - Run a Somatic Analysis - - Run Sarek using Bioconda This guide assumes you have internet access on the server where the analysis will take place. If you do not have that, please look into the [installation instructions](INSTALL_BIANCA.md) for the restricted access server Bianca at Uppmax, which should give an idea on how to adjust the following examples accordingly. @@ -183,49 +182,3 @@ nextflow run SciLifeLab/Sarek/runMultiQC.nf \ -profile slurm --project \ ``` - -## Run Sarek using Bioconda - -To use Sarek with conda, first make sure that you have conda installed. We recommend miniconda: -https://conda.io/miniconda.html - -Sarek comes with a conda environment definition - a file called -[`environment.yml`](../environment.yml) which lists conda channels and package names/versions. -Follow the steps below to run Sarek with Conda: - -- Step 1: Create a new environment using the [`environment.yml`](../environment.yml) file: - -```bash -# Download the environment.yml file -curl https://raw.githubusercontent.com/SciLifeLab/Sarek/master/environment.yml -o environment.yml - -# Create a new conda environment using it -conda env create -f environment.yml - -``` - -- Step 2: Create a nextflow config file as indicated below (Usually as `~/.nextflow/config` file): - -``` -process { - beforeScript = { 'module load anaconda; set +u; source activate sarek-2.2.2; set -u;' } -// errorStrategy = { task.attempt < 2 ? 'retry' : 'finish' } -// Optionally executor/cluster specific details can be added as indicated below, -/* - executor='sge' - penv='smp' -*/ -} -``` - -- Step 3: While launcing Sarek specify the nextflow config file crreated in step 2 using `-c` option: - -``` -nextflow run SciLifeLab/Sarek/main.nf \ ---sample samples_germline.tsv \ --profile conda \ ---project \ ---genome_base /sw/data/uppnex/ToolBox/hg38bundle \ ---genome GRCh38 --c ~/.nextflow/config -``` diff --git a/nextflow.config b/nextflow.config index a377d11eda..a683ce1793 100644 --- a/nextflow.config +++ b/nextflow.config @@ -108,8 +108,9 @@ profiles { } conda { includeConfig 'conf/base.config' + includeConfig 'conf/travis.config' includeConfig 'conf/genomes.config' - includeConfig 'conf/resources.config' + includeConfig 'conf/conda.config' } } From 27e0cdb1323cb52b1f673b08c77f0336754c626c Mon Sep 17 00:00:00 2001 From: MaxUlysse Date: Thu, 31 Jan 2019 10:25:28 +0100 Subject: [PATCH 3/3] typo --- docs/CONFIG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/CONFIG.md b/docs/CONFIG.md index 496eb1afa3..43b5c7177a 100644 --- a/docs/CONFIG.md +++ b/docs/CONFIG.md @@ -113,7 +113,7 @@ This is the profile for use on the BTB server munin. This is the profile for use on the CFC cluster in Tuebingen. -### `cfc` +### `conda` > /!\\ Under development.