-
Notifications
You must be signed in to change notification settings - Fork 351
Expand file tree
/
Copy pathmaestro.config
More file actions
155 lines (143 loc) · 6.59 KB
/
maestro.config
File metadata and controls
155 lines (143 loc) · 6.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
/*
* -------------------------------------------------
* Nextflow config file for running nf-core eager on whole genome data or mitogenomes
* -------------------------------------------------
* nextflow run nf-core/eager -profile maestro,<qos>,maestro,<genome> (where <qos> is long or normal and <genome> is nuclear, mitocondrial or unlimitedtime)
*/
validation {
ignoreParams = [
'eager_maestro_check_max_func'
]
}
params {
config_profile_name = 'nf-core/eager nuclear/mitocondrial - human profiles'
config_profile_description = "Simple profiles for assessing computational ressources that fit human nuclear dna, human mitogenomes processing. unlimitedtime is also available "
}
profiles {
nuclear {
process {
errorStrategy = 'retry'
maxRetries = 2
withName: makeBWAIndex {
cpus = { params.eager_maestro_check_max_func(8 * task.attempt, 'cpus') }
memory = { params.eager_maestro_check_max_func(8.GB * task.attempt, 'memory') }
time = { params.eager_maestro_check_max_func(12.h * task.attempt, 'time') }
}
withName: adapter_removal {
cpus = { params.eager_maestro_check_max_func(8 * task.attempt, 'cpus') }
memory = { params.eager_maestro_check_max_func(16.GB * task.attempt, 'memory') }
time = { params.eager_maestro_check_max_func(12.h * task.attempt, 'time') }
}
withName: bwa {
cpus = { params.eager_maestro_check_max_func(40 * task.attempt, 'cpus') }
memory = { params.eager_maestro_check_max_func(40.GB * task.attempt, 'memory') }
time = 24.h
cache = 'deep'
}
withName: markduplicates {
errorStrategy = { task.exitStatus in [143, 137, 104, 134, 139] ? 'retry' : 'finish' }
cpus = { params.eager_maestro_check_max_func(16 * task.attempt, 'cpus') }
memory = { params.eager_maestro_check_max_func(16.GB * task.attempt, 'memory') }
time = { params.eager_maestro_check_max_func(12.h * task.attempt, 'time') }
}
withName: damageprofiler {
cpus = 1
memory = { params.eager_maestro_check_max_func(8.GB * task.attempt, 'memory') }
time = { params.eager_maestro_check_max_func(6.h * task.attempt, 'time') }
}
withName: fastp {
cpus = 8
memory = { params.eager_maestro_check_max_func(8.GB * task.attempt, 'memory') }
time = { params.eager_maestro_check_max_func(6.h * task.attempt, 'time') }
}
withName: fastqc {
cpus = 2
memory = { params.eager_maestro_check_max_func(8.GB * task.attempt, 'memory') }
time = { params.eager_maestro_check_max_func(6.h * task.attempt, 'time') }
}
}
}
mitocondrial {
process {
errorStrategy = 'retry'
maxRetries = 2
withName: makeBWAIndex {
cpus = { params.eager_maestro_check_max_func(8 * task.attempt, 'cpus') }
memory = { params.eager_maestro_check_max_func(8.GB * task.attempt, 'memory') }
time = { params.eager_maestro_check_max_func(12.h * task.attempt, 'time') }
}
withName: adapter_removal {
cpus = { params.eager_maestro_check_max_func(8 * task.attempt, 'cpus') }
memory = { params.eager_maestro_check_max_func(16.GB * task.attempt, 'memory') }
time = { params.eager_maestro_check_max_func(12.h * task.attempt, 'time') }
}
withName: bwa {
cpus = { params.eager_maestro_check_max_func(5 * task.attempt, 'cpus') }
memory = { params.eager_maestro_check_max_func(5.GB * task.attempt, 'memory') }
time = 24.h
}
withName: markduplicates {
errorStrategy = { task.exitStatus in [143, 137, 104, 134, 139] ? 'retry' : 'finish' }
cpus = { params.eager_maestro_check_max_func(5 * task.attempt, 'cpus') }
memory = { params.eager_maestro_check_max_func(5.GB * task.attempt, 'memory') }
time = { params.eager_maestro_check_max_func(6.h * task.attempt, 'time') }
}
withName: damageprofiler {
cpus = 1
memory = { params.eager_maestro_check_max_func(5.GB * task.attempt, 'memory') }
time = { params.eager_maestro_check_max_func(3.h * task.attempt, 'time') }
}
withName: fastp {
cpus = 8
memory = { params.eager_maestro_check_max_func(5.GB * task.attempt, 'memory') }
time = { params.eager_maestro_check_max_func(3.h * task.attempt, 'time') }
}
withName: fastqc {
cpus = 2
memory = { params.eager_maestro_check_max_func(8.GB * task.attempt, 'memory') }
time = { params.eager_maestro_check_max_func(6.h * task.attempt, 'time') }
}
}
}
unlimitedtime {
process {
errorStrategy = 'finish'
cpus = 5
memory = 200.GB
time = 8760.h
}
}
}
// Function to ensure that resource requirements don't go beyond
// a maximum limit
// FOR DSL1 PIPELINE ONLY!
params.eager_maestro_check_max_func = { obj, type ->
if (type == 'memory') {
try {
if (obj.compareTo(params.max_memory as MemoryUnit) == 1)
return params.max_memory as MemoryUnit
else
return obj
} catch (_) {
println " ### ERROR ### Max memory '${params.max_memory}' is not valid! Using default value: $obj"
return obj
}
} else if (type == 'time') {
try {
if (obj.compareTo(params.max_time as Duration) == 1)
return params.max_time as Duration
else
return obj
} catch (_) {
println " ### ERROR ### Max time '${params.max_time}' is not valid! Using default value: $obj"
return obj
}
} else if (type == 'cpus') {
try {
return Math.min( obj, params.max_cpus as int )
} catch (_) {
println " ### ERROR ### Max cpus '${params.max_cpus}' is not valid! Using default value: $obj"
return obj
}
}
}