comparison 0.2.1/conf/modules.config @ 0:77494b0fa3c7

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