|
11 | 11 |
|
12 | 12 | process { |
13 | 13 | cpus = { check_max( 1 * task.attempt, 'cpus' ) } |
14 | | - memory = { check_max( 8.GB * task.attempt, 'memory' ) } |
| 14 | + memory = { check_max( 4.GB * task.attempt, 'memory' ) } |
15 | 15 | time = { check_max( 2.h * task.attempt, 'time' ) } |
16 | 16 |
|
17 | 17 | errorStrategy = { task.exitStatus in [143,137,104,134,139] ? 'retry' : 'finish' } |
18 | | - maxRetries = 1 |
| 18 | + maxRetries = 3 |
19 | 19 | maxErrors = '-1' |
20 | 20 |
|
21 | | - // Process-specific resource requirements (others leave at default, e.g. Fastqc) |
22 | | - withName:get_software_versions { |
23 | | - memory = { check_max( 2.GB, 'memory' ) } |
24 | | - cache = false |
| 21 | + // Generic resource requirements - s(ingle)c(ore)/m(ulti)c(ore) |
| 22 | + |
| 23 | + withLabel:'sc_tiny'{ |
| 24 | + cpus = { check_max( 1, 'cpus' ) } |
| 25 | + memory = { check_max( 1.GB * task.attempt, 'memory' ) } |
| 26 | + time = { check_max( 2.h * task.attempt, 'time' ) } |
25 | 27 | } |
26 | | - withName:convertBam { |
27 | | - cpus = { check_max(8 * task.attempt, 'cpus') } |
| 28 | + |
| 29 | + withLabel:'sc_small'{ |
| 30 | + cpus = { check_max( 1, 'cpus' ) } |
| 31 | + memory = { check_max( 4.GB * task.attempt, 'memory' ) } |
| 32 | + time = { check_max( 2.h * task.attempt, 'time' ) } |
28 | 33 | } |
29 | | - withName:makeSeqDict { |
30 | | - memory = { check_max( 16.GB * task.attempt, 'memory' ) } |
| 34 | + |
| 35 | + withLabel:'sc_medium'{ |
| 36 | + cpus = { check_max( 1, 'cpus' ) } |
| 37 | + memory = { check_max( 8.GB * task.attempt, 'memory' ) } |
| 38 | + time = { check_max( 2.h * task.attempt, 'time' ) } |
31 | 39 | } |
32 | | - withname:makeBWAIndex { |
33 | | - time = params.large_ref ? '12.h' : { check_max(8.h * task.attempt, 'time') } |
| 40 | + |
| 41 | + withLabel:'mc_small'{ |
| 42 | + cpus = { check_max( 2, 'cpus' ) } |
| 43 | + memory = { check_max( 4.GB * task.attempt, 'memory' ) } |
| 44 | + time = { check_max( 2.h * task.attempt, 'time' ) } |
34 | 45 | } |
35 | | - withName:bwa { |
36 | | - memory = { check_max( 16.GB * task.attempt, 'memory' ) } |
37 | | - cpus = { check_max(8 * task.attempt, 'cpus') } |
38 | | - time = { check_max(8.h * task.attempt, 'time') } |
| 46 | + |
| 47 | + withLabel:'mc_medium' { |
| 48 | + cpus = { check_max( 4, 'cpus' ) } |
| 49 | + memory = { check_max( 8.GB * task.attempt, 'memory' ) } |
| 50 | + time = { check_max( 2.h * task.attempt, 'time' ) } |
39 | 51 | } |
40 | | - withName:bwamem{ |
41 | | - memory = { check_max( 16.GB * task.attempt, 'memory' ) } |
42 | | - cpus = { check_max(8 * task.attempt, 'cpus') } |
43 | | - time = { check_max(8.h * task.attempt, 'time') } |
| 52 | + |
| 53 | + withLabel:'mc_large'{ |
| 54 | + cpus = { check_max( 8, 'cpus' ) } |
| 55 | + memory = { check_max( 16.GB * task.attempt, 'memory' ) } |
| 56 | + time = { check_max( 2.h * task.attempt, 'time' ) } |
44 | 57 | } |
45 | | - withName:qualimap{ |
46 | | - cpus = { check_max(8 * task.attempt, 'cpus') } |
47 | | - errorStrategy = 'ignore' |
| 58 | + |
| 59 | + withLabel:'mc_huge'{ |
| 60 | + cpus = { check_max( 32, 'cpus' ) } |
| 61 | + memory = { check_max( 256.GB * task.attempt, 'memory' ) } |
| 62 | + time = { check_max( 2.h * task.attempt, 'time' ) } |
48 | 63 | } |
49 | | - withName:bam_trim{ |
50 | | - cpus = { check_max(4 * task.attempt, 'cpus') } |
| 64 | + |
| 65 | + // Process-specific resource requirements (others leave at default, e.g. Fastqc) |
| 66 | + withName:get_software_versions { |
| 67 | + memory = { check_max( 2.GB, 'memory' ) } |
| 68 | + cache = false |
| 69 | + } |
| 70 | + |
| 71 | + withName:strip_input_fastq { |
| 72 | + time = { check_max( 4.h * task.attempt, 'time' ) } |
51 | 73 | } |
52 | | - withName:markDup{ |
53 | | - cpus = { check_max(8 * task.attempt, 'cpus') } |
| 74 | + |
| 75 | + withName:qualimap{ |
| 76 | + errorStrategy = 'ignore' |
54 | 77 | } |
| 78 | + |
55 | 79 | withName:preseq { |
56 | 80 | errorStrategy = 'ignore' |
57 | 81 | } |
58 | | - withName: fastqc { |
59 | | - errorStrategy = { task.exitStatus in [143,137] ? 'retry' : 'ignore' } |
| 82 | + |
| 83 | + // Add 141 ignore due to unclean pipe closing by pmdtools https://github.com/pontussk/PMDtools/issues/7 |
| 84 | + withName: pmdtools { |
| 85 | + errorStrategy = { task.exitStatus in [141] ? 'ignore' : 'retry' } |
60 | 86 | } |
| 87 | + |
61 | 88 | withName: multiqc { |
62 | 89 | errorStrategy = { task.exitStatus in [143,137] ? 'retry' : 'ignore' } |
63 | 90 | } |
64 | | - withName: damageprofiler { |
65 | | - time = params.large_ref ? { check_max(8.h * task.attempt, 'time') } : { check_max(2.h * task.attempt, 'time')} |
66 | | - } |
67 | | - withName: strip_input_fastq { |
68 | | - cpus = { check_max(8 * task.attempt, 'cpus') } |
69 | | - memory = { check_max( 8.GB * task.attempt, 'memory' ) } |
70 | | - } |
71 | | - withName: malt { |
72 | | - memory = { check_max( 128.GB * task.attempt, 'memory' ) } |
73 | | - cpus = { check_max(16 * task.attempt, 'cpus') } |
74 | | - time = { check_max(2.h * task.attempt, 'time') } |
75 | | - } |
76 | | - withName: maltextract { |
77 | | - memory = { check_max( 8.GB * task.attempt, 'memory' ) } |
78 | | - cpus = { check_max(4 * task.attempt, 'cpus') } |
79 | | - } |
80 | | - withName: vcf2genome { |
81 | | - memory = { check_max( 4.GB * task.attempt, 'memory' ) } |
82 | | - cpus = 1 |
83 | | - } |
84 | 91 | } |
85 | 92 |
|
86 | | - |
87 | 93 | params { |
88 | 94 | // Defaults only, expecting to be overwritten |
89 | 95 | max_memory = 128.GB |
|
0 commit comments