Mercurial > repos > kkonganti > cfsan_centriflaken
diff 0.2.1/conf/modules.config @ 0:77494b0fa3c7
"planemo upload"
author | kkonganti |
---|---|
date | Mon, 27 Jun 2022 15:55:37 -0400 |
parents | |
children | 1cb92deb15f8 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/0.2.1/conf/modules.config Mon Jun 27 15:55:37 2022 -0400 @@ -0,0 +1,87 @@ +process { + publishDir = [ + path: { + "${task.process.tokenize(':')[-1].toLowerCase()}" == "multiqc" ? + "${params.output}${params.fs}${params.pipeline.toLowerCase()}-${task.process.tokenize(':')[-1].toLowerCase()}" : + "${params.output}${params.fs}${task.process.tokenize(':')[-1].toLowerCase()}" + }, + mode: params.publish_dir_mode, + overwrite: params.publish_dir_overwrite, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] + + errorStrategy = { + ![0].contains(task.exitStatus) ? dynamic_retry(task.attempt, 1000) : 'finish' + } + + maxRetries = 11 + + withLabel: 'process_femto' { + cpus= 1 + } + + withLabel: 'process_pico' { + cpus= 2 + } + + withLabel: 'process_nano' { + cpus= 4 + } + + withLabel: 'process_micro' { + cpus= 8 + } + + withLabel: 'process_only_mem_low' { + cpus= 1 + } + + withLabel: 'process_only_mem_medium' { + cpus= 1 + } + + withLabel: 'process_only_mem_high' { + cpus= 1 + } + + withLabel: 'process_low' { + cpus= 10 + } + + withLabel: 'process_medium' { + cpus= 10 + } + + withLabel: 'process_high' { + cpus= 10 + } + + withLabel: 'process_higher' { + cpus= 10 + } + + withLabel: 'process_gigantic' { + cpus= 10 + } +} + +if ( (params.input || params.metadata ) && params.pipeline ) { + try { + includeConfig "${params.workflowsconf}${params.fs}process${params.fs}${params.pipeline}.process.config" + } catch (Exception e) { + System.err.println('-'.multiply(params.linewidth) + "\n" + + "\033[0;31m${params.cfsanpipename} - ERROR\033[0m\n" + + '-'.multiply(params.linewidth) + "\n" + "\033[0;31mCould not load " + + "default pipeline's process configuration. Please provide a pipeline \n" + + "name using the --pipeline option.\n\033[0m" + '-'.multiply(params.linewidth) + "\n") + System.exit(1) + } +} + +// Function will return after sleeping for some time. +// Sleep time increases exponentially by tast attempt. +def dynamic_retry(task_retry_num, factor_by) { + println tas + sleep(Math.pow(2, task_retry_num.toInteger()) * factor_by.toInteger() as long) + return 'retry' +} \ No newline at end of file