annotate 0.3.0/conf/modules.config @ 92:295c2597a475

"planemo upload"
author kkonganti
date Tue, 19 Jul 2022 10:07:24 -0400
parents
children 3f367a0de778
rev   line source
kkonganti@92 1 process {
kkonganti@92 2 publishDir = [
kkonganti@92 3 path: {
kkonganti@92 4 "${task.process.tokenize(':')[-1].toLowerCase()}" == "multiqc" ?
kkonganti@92 5 "${params.output}${params.fs}${params.pipeline.toLowerCase()}-${task.process.tokenize(':')[-1].toLowerCase()}" :
kkonganti@92 6 "${params.output}${params.fs}${task.process.tokenize(':')[-1].toLowerCase()}"
kkonganti@92 7 },
kkonganti@92 8 mode: params.publish_dir_mode,
kkonganti@92 9 overwrite: params.publish_dir_overwrite,
kkonganti@92 10 saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
kkonganti@92 11 ]
kkonganti@92 12
kkonganti@92 13 errorStrategy = {
kkonganti@92 14 ![0].contains(task.exitStatus) ? dynamic_retry(task.attempt, 10) : 'finish'
kkonganti@92 15 }
kkonganti@92 16
kkonganti@92 17 maxRetries = 1
kkonganti@92 18
kkonganti@92 19 withLabel: 'process_femto' {
kkonganti@92 20 cpus = { 1 * task.attempt }
kkonganti@92 21 memory = { 1.GB * task.attempt }
kkonganti@92 22 time = { 1.h * task.attempt }
kkonganti@92 23 }
kkonganti@92 24
kkonganti@92 25 withLabel: 'process_pico' {
kkonganti@92 26 cpus = { 2 * task.attempt }
kkonganti@92 27 memory = { 4.GB * task.attempt }
kkonganti@92 28 time = { 2.h * task.attempt }
kkonganti@92 29 }
kkonganti@92 30
kkonganti@92 31 withLabel: 'process_nano' {
kkonganti@92 32 cpus = { 4 * task.attempt }
kkonganti@92 33 memory = { 8.GB * task.attempt }
kkonganti@92 34 time = { 4.h * task.attempt }
kkonganti@92 35 }
kkonganti@92 36
kkonganti@92 37 withLabel: 'process_micro' {
kkonganti@92 38 cpus = { 8 * task.attempt }
kkonganti@92 39 memory = { 16.GB * task.attempt }
kkonganti@92 40 time = { 8.h * task.attempt }
kkonganti@92 41 }
kkonganti@92 42
kkonganti@92 43 withLabel: 'process_only_mem_low' {
kkonganti@92 44 cpus = { 1 * task.attempt }
kkonganti@92 45 memory = { 60.GB * task.attempt }
kkonganti@92 46 time = { 20.h * task.attempt }
kkonganti@92 47 }
kkonganti@92 48
kkonganti@92 49 withLabel: 'process_only_mem_medium' {
kkonganti@92 50 cpus = { 1 * task.attempt }
kkonganti@92 51 memory = { 100.GB * task.attempt }
kkonganti@92 52 time = { 30.h * task.attempt }
kkonganti@92 53 }
kkonganti@92 54
kkonganti@92 55 withLabel: 'process_only_mem_high' {
kkonganti@92 56 cpus = { 1 * task.attempt }
kkonganti@92 57 memory = { 128.GB * task.attempt }
kkonganti@92 58 time = { 60.h * task.attempt }
kkonganti@92 59 }
kkonganti@92 60
kkonganti@92 61 withLabel: 'process_low' {
kkonganti@92 62 cpus = { 10 * task.attempt }
kkonganti@92 63 memory = { 60.GB * task.attempt }
kkonganti@92 64 time = { 20.h * task.attempt }
kkonganti@92 65 }
kkonganti@92 66
kkonganti@92 67 withLabel: 'process_medium' {
kkonganti@92 68 cpus = { 10 * task.attempt }
kkonganti@92 69 memory = { 100.GB * task.attempt }
kkonganti@92 70 time = { 30.h * task.attempt }
kkonganti@92 71 }
kkonganti@92 72
kkonganti@92 73 withLabel: 'process_high' {
kkonganti@92 74 cpus = { 10 * task.attempt }
kkonganti@92 75 memory = { 128.GB * task.attempt }
kkonganti@92 76 time = { 60.h * task.attempt }
kkonganti@92 77 }
kkonganti@92 78
kkonganti@92 79 withLabel: 'process_higher' {
kkonganti@92 80 cpus = { 10 * task.attempt }
kkonganti@92 81 memory = { 256.GB * task.attempt }
kkonganti@92 82 time = { 60.h * task.attempt }
kkonganti@92 83 }
kkonganti@92 84
kkonganti@92 85 withLabel: 'process_gigantic' {
kkonganti@92 86 cpus = { 10 * task.attempt }
kkonganti@92 87 memory = { 512.GB * task.attempt }
kkonganti@92 88 time = { 60.h * task.attempt }
kkonganti@92 89 }
kkonganti@92 90 }
kkonganti@92 91
kkonganti@92 92 if ( (params.input || params.metadata ) && params.pipeline ) {
kkonganti@92 93 try {
kkonganti@92 94 includeConfig "${params.workflowsconf}${params.fs}process${params.fs}${params.pipeline}.process.config"
kkonganti@92 95 } catch (Exception e) {
kkonganti@92 96 System.err.println('-'.multiply(params.linewidth) + "\n" +
kkonganti@92 97 "\033[0;31m${params.cfsanpipename} - ERROR\033[0m\n" +
kkonganti@92 98 '-'.multiply(params.linewidth) + "\n" + "\033[0;31mCould not load " +
kkonganti@92 99 "default pipeline's process configuration. Please provide a pipeline \n" +
kkonganti@92 100 "name using the --pipeline option.\n\033[0m" + '-'.multiply(params.linewidth) + "\n")
kkonganti@92 101 System.exit(1)
kkonganti@92 102 }
kkonganti@92 103 }
kkonganti@92 104
kkonganti@92 105 // Function will return after sleeping for some time.
kkonganti@92 106 // Sleep time increases exponentially by task attempt.
kkonganti@92 107 def dynamic_retry(task_retry_num, factor_by) {
kkonganti@92 108 // sleep(Math.pow(2, task_retry_num.toInteger()) * factor_by.toInteger() as long)
kkonganti@92 109 sleep(Math.pow(1.27, task_retry_num.toInteger()) as long)
kkonganti@92 110 return 'retry'
kkonganti@92 111 }