From ba1ad9acc9c74c99d8eb8d2511e1c83d248e4c94 Mon Sep 17 00:00:00 2001 From: Alexander Peltzer Date: Wed, 24 Oct 2018 14:35:11 +0200 Subject: [PATCH 1/2] Add Tuebingen specific configuration parameters --- conf/binac.config | 1 + conf/cfc.config | 22 +++++++++ conf/resources.config | 104 ++++++++++++++++++++++++++++++++++++++++++ nextflow.config | 10 ++++ 4 files changed, 137 insertions(+) create mode 100644 conf/cfc.config create mode 100644 conf/resources.config diff --git a/conf/binac.config b/conf/binac.config index c35e58c921..6ac781339d 100644 --- a/conf/binac.config +++ b/conf/binac.config @@ -16,6 +16,7 @@ process { } params { + publishDirMode = 'symlink' max_memory = 128.GB max_cpus = 28 max_time = 48.h diff --git a/conf/cfc.config b/conf/cfc.config new file mode 100644 index 0000000000..e93829dde9 --- /dev/null +++ b/conf/cfc.config @@ -0,0 +1,22 @@ +/* + * ------------------------------------------------------------- + * Nextflow config file for use with Singularity on CFC at QBIC + * ------------------------------------------------------------- + * Defines basic usage limits and singularity image id. + */ + +/* +*To be improved by process specific configuration asap, once our CFC cluster has the extra options removed - till then, task.attempt in NextFlow is not supported there. +*/ + +process { + beforeScript = 'module load qbic/singularity_slurm/2.5.2' + executor = 'slurm' +} + +params { + publishDirMode = 'symlink' + max_memory = 60.GB + max_cpus = 20 + max_time = 140.h +} diff --git a/conf/resources.config b/conf/resources.config new file mode 100644 index 0000000000..7e0fa90509 --- /dev/null +++ b/conf/resources.config @@ -0,0 +1,104 @@ +/* + * ------------------------------------------------- + * Nextflow config file for Sarek + * ------------------------------------------------- + * Generalized resource configuration for clusters + * ------------------------------------------------- + */ + +params { + singleCPUMem = 7.GB // for processes that are using more memory but a single CPU only. Use the 'core' queue for these +} + +process { + cpus = { check_max( 10, 'cpus' ) } + memory = { check_max( 16.GB * task.attempt, 'memory' ) } + time = { check_max( 8.h * task.attempt, 'time' ) } + + errorStrategy = {task.exitStatus == 143 ? 'retry' : 'terminate'} + maxErrors = '-1' + maxRetries = 3 + + withName:MapReads { + memory = { check_max( 60.GB * task.attempt, 'memory' ) } + cpus = { check_max( 10, 'cpus' ) } + } + withName:CreateRecalibrationTable { + cpus = { check_max( 12, 'cpus' ) } + memory = {params.singleCPUMem * 8 * task.attempt} + } + withName:MarkDuplicates { + // Actually the -Xmx value should be kept lower + cpus = { check_max( 16, 'cpus' ) } + memory = { check_max( 60.GB * task.attempt, 'memory' ) } + } + withName:MergeBams { + memory = {params.singleCPUMem * task.attempt} + time = { check_max( 5.h * task.attempt, 'time' ) } + } + withName:RecalibrateBam { + cpus = { check_max( 12, 'cpus' ) } + memory = { check_max( 7.GB * 8 * task.attempt, 'memory' ) } + time = { check_max( 5.h * task.attempt, 'time' ) } + } + withName:RunAlleleCount { + cpus = { check_max( 1, 'cpus' ) } + memory = { check_max( 14.GB * task.attempt, 'memory' ) } + } + withName:RunAscat { + cpus = { check_max( 1, 'cpus' ) } + memory = { check_max( 14.GB * task.attempt, 'memory' ) } + } + withName:RunBcftoolsStats { + cpus = { check_max( 1, 'cpus' ) } + } + withName:RunConvertAlleleCounts { + cpus = { check_max( 1, 'cpus' ) } + memory = { check_max( 14.GB * task.attempt, 'memory' ) } + } + withName:RunFastQC { + cpus = { check_max( 2, 'cpus' ) } // FastQC is only capable of running one thread per fastq file. + errorStrategy = { task.exitStatus == 143 ? 'retry' : 'ignore' } + } + withName:RunFreeBayes { + cpus = { check_max( 1, 'cpus' ) } + memory = { check_max( 8.GB * task.attempt, 'memory' ) } + } + withName:RunHaplotypecaller { + cpus = { check_max( 20, 'cpus' ) } + // Increase memory quadratically + memory = { check_max( 7.GB * 2 * task.attempt, 'memory' ) } + time = { check_max( 5.h * task.attempt, 'time' ) } + } + withName:RunGenotypeGVCFs { + cpus = { check_max( 20, 'cpus' ) } + memory = { check_max( 7.GB * task.attempt, 'memory' ) } + } + withName:RunMultiQC { + errorStrategy = { task.exitStatus == 143 ? 'retry' : 'ignore' } + } + withName:RunMutect2 { + cpus = { check_max( 2, 'cpus' ) } + memory = { check_max( 7.GB * task.attempt, 'memory' ) } + time = { check_max( 5.h * task.attempt, 'time' ) } + } + withName:RunSamtoolsStats { + cpus = { check_max( 2, 'cpus' ) } + time = { check_max( 5.h * task.attempt, 'time' ) } + } + withName:RunSingleStrelka { + time = { check_max( 5.h * task.attempt, 'time' ) } + } + withName:RunSnpeff { + cpus = { check_max( 1, 'cpus' ) } + errorStrategy = { task.exitStatus == 143 ? 'retry' : 'ignore' } + } + withName:RunStrelka { + cpus = { check_max( 1, 'cpus' ) } + time = { check_max( 5.h * task.attempt, 'time' ) } + } + withName:RunVEP { + cpus = { check_max( 1, 'cpus' ) } + errorStrategy = { task.exitStatus == 143 ? 'retry' : 'ignore' } + } +} \ No newline at end of file diff --git a/nextflow.config b/nextflow.config index c715feacc8..a8367eb709 100644 --- a/nextflow.config +++ b/nextflow.config @@ -87,6 +87,16 @@ profiles { includeConfig 'conf/base.config' includeConfig 'conf/binac.config' includeConfig 'conf/singularity.config' + includeConfig 'conf/resources.config' includeConfig 'conf/containers.config' } + // Default config for CFC cluster in Tuebingen/Germany + cfc { + includeConfig 'conf/base.config' + includeConfig 'conf/cfc.config' + includeConfig 'conf/singularity.config' + includeConfig 'conf/resources.config' + includeConfig 'conf/containers.config' + } + } From da914b26d7da4a93520432657a061856948cea67 Mon Sep 17 00:00:00 2001 From: Alexander Peltzer Date: Wed, 24 Oct 2018 14:39:03 +0200 Subject: [PATCH 2/2] Add changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a7c060336f..b8256d0027 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ### `Added` - [#671](https://github.com/SciLifeLab/Sarek/pull/671) - New `publishDirMode` param and docs +- [#673](https://github.com/SciLifeLab/Sarek/pull/673) - Profiles for BinAC and CFC clusters in Tübingen ### `Changed`