-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathbase.config
More file actions
executable file
·358 lines (304 loc) · 11.3 KB
/
Copy pathbase.config
File metadata and controls
executable file
·358 lines (304 loc) · 11.3 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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sanger-tol/treeval Nextflow base config file
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
A 'blank slate' config file, appropriate for general use on most high performance
compute environments. Assumes that all software is installed and available on
the PATH. Runs in `local` mode - all jobs will be run on the logged in environment.
----------------------------------------------------------------------------------------
*/
process {
// TODO nf-core: Check the defaults for all processes
cpus = { 1 * task.attempt }
memory = { 6.GB * task.attempt }
time = { 4.h * task.attempt }
errorStrategy = { task.exitStatus in ((130..145) + 104 + 175) ? 'retry' : 'finish' }
maxRetries = 1
maxErrors = '-1'
// Process-specific resource requirements
// NOTE - Please try and reuse the labels below as much as possible.
// These labels are used and recognised by default in DSL2 files hosted on nf-core/modules.
// If possible, it would be nice to keep the same label naming convention when
// adding in your local modules too.
// See https://www.nextflow.io/docs/latest/config.html#config-process-selectors
withLabel:process_single {
cpus = { 1 }
memory = { 6.GB * task.attempt }
time = { 4.h * task.attempt }
}
withLabel:process_low {
cpus = { 2 * task.attempt }
memory = { 12.GB * task.attempt }
time = { 4.h * task.attempt }
}
withLabel:process_medium {
cpus = { 6 * task.attempt }
memory = { 36.GB * task.attempt }
time = { 8.h * task.attempt }
}
withLabel:process_high {
cpus = { 12 * task.attempt }
memory = { 72.GB * task.attempt }
time = { 16.h * task.attempt }
}
withLabel:process_long {
time = { 20.h * task.attempt }
}
withLabel:process_high_memory {
memory = { 200.GB * task.attempt }
}
withLabel:error_ignore {
errorStrategy = 'ignore'
}
withLabel:error_retry {
errorStrategy = 'retry'
maxRetries = 2
}
withLabel: process_gpu {
ext.use_gpu = { workflow.profile.contains('gpu') }
}
// CUSTOM CONFIGS
// NOTE: For processes that grab files or generate csv
withLabel:process_tiny {
cpus = { 1 }
memory = { 100.MB * task.attempt }
time = { 4.h * task.attempt }
}
withLabel:process_small {
cpus = { 1 }
memory = { 2.GB * task.attempt }
time = { 4.h * task.attempt }
}
withName:CUSTOM_DUMPSOFTWAREVERSIONS {
cache = false
}
// IN CASES WHERE THERE IS ONE HIC FILE THIS WILL NEED ALMOST NOTHING
withName:SAMTOOLS_MERGE {
cpus = { 16 * 1 }
memory = { 50.GB * task.attempt }
time = { 30.h * task.attempt }
}
// RESOURCES: MEMORY INTENSIVE STEPS, SOFTWARE TO BE UPDATED TO COMBAT THIS
withName: '.*:.*:SELFCOMP:SELFCOMP_MUMMER2BED' {
cpus = { 10 * task.attempt }
memory = { 1.GB * Math.ceil( mummerfile.size() / 1e+9 ) * task.attempt }
time = { 12.h * task.attempt }
}
withName: '.*:.*:SELFCOMP:SELFCOMP_MAPIDS' {
cpus = { 10 * task.attempt }
memory = { 1.GB * Math.ceil( bed.size() / 1e+9 ) * task.attempt }
time = { 12.h * task.attempt }
}
// def counted = {x, y ->
// To avoid calculating the countLines multiple times
// Cant use countlines directly on the file otherwise raises a java.nio.file.ProviderMismatchError
// return (x**2) * Math.log(y)
//}
withName: BEDTOOLS_SORT {
memory = { 15.GB * (task.attempt * task.attempt) }
}
withName: SELFCOMP_ALIGNMENTBLOCKS {
cpus = { 20 * task.attempt }
memory = { 1.GB * (Math.ceil((bedfile.size() / 1e+9) * 30) * Math.ceil(task.attempt * 1)) }
time = { 18.h * task.attempt }
}
// RESOURCES: CHANGES TO FREQUENT FAILURES BELOW THIS MEM POINT
withName: '.*:.*:GENE_ALIGNMENT:.*:MINIPROT_ALIGN' {
cpus = { 6 * task.attempt }
memory = {
1.GB * (
reference.size() < 2e9 ? 30 :
(reference.size() < 5e9 ? 50 :
(reference.size() < 10e9 ? 60 :
Math.ceil((reference.size() / 1e9) * 3)
)
)
) * Math.ceil(task.attempt * 1)
}
time = { 10.h * task.attempt }
}
withName: '.*:.*:GENE_ALIGNMENT:.*:MINIMAP2_ALIGN' {
cpus = { 6 * task.attempt }
memory = { 1.GB * ( reference.size() < 2e9 ? 70 : Math.ceil( ( reference.size() / 1e+9 ) * 50 ) * Math.ceil( task.attempt * 1 ) ) }
time = { 10.h * task.attempt }
}
withName: '.*:.*:GENE_ALIGNMENT:.*:MINIPROT_INDEX' {
cpus = { 6 * task.attempt }
memory = { 1.GB * ( fasta.size() < 2e9 ? 50 : Math.ceil( ( fasta.size() / 1e+9 ) * 10 ) * Math.ceil( task.attempt * 1 ) ) }
time = { 10.h * task.attempt }
}
// Standard parameters, covers most insecta. However the memory should be approx 10 * genome size
withName: '.*:.*:READ_COVERAGE:MINIMAP2_ALIGN' {
cpus = { 20 * 1 }
memory = {
1.GB * (
reference.size() < 2e9 ? 30 :
(reference.size() < 5e9 ? 40 :
(reference.size() < 10e9 ? 60 :
Math.ceil((reference.size() / 1e9) * 3)
)
)
) * Math.ceil(task.attempt * 1)
}
time = { 1.h * ( reference.size() < 1e9 ? 10 : reference.size() < 10e9 ? 30 : 48) }
}
withName: BEDTOOLS_GENOMECOV {
memory = { 8.GB * (task.attempt * task.attempt) }
time = { 12.h * task.attempt }
}
// 25GB * (task attempt * 2) = 50GB, 100GB, 150GB
withName:MUMMER {
cpus = { 12 * task.attempt }
// increase memory allocation by fold change of genome size, approx about 10 * ref.size(), max 15 folds
memory = { 1.GB * Math.ceil( 15 * ref.size() / 1e+9 ) * task.attempt }
}
withName:UCSC_BEDGRAPHTOBIGWIG {
cpus = { 2 * task.attempt }
memory = { 1.GB * Math.ceil( bedgraph.size() / 1e+9 ) * task.attempt }
}
withName: CRAM_FILTER_ALIGN_BWAMEM2_FIXMATE_SORT {
cpus = { 16 * 1 }
memory = { 1.GB * ( reference.size() < 2e9 ? 80 : Math.ceil( ( reference.size() / 1e+9 ) * 30 ) * Math.ceil( task.attempt * 1 ) ) }
}
withName: CRAM_FILTER_MINIMAP2_FILTER5END_FIXMATE_SORT {
cpus = { 16 * 1 }
memory = {
1.GB * (
reference.size() < 2e9 ? 30 :
(reference.size() < 5e9 ? 40 :
(reference.size() < 10e9 ? 60 :
Math.ceil((reference.size() / 1e9) * 3)
)
)
) * Math.ceil(task.attempt * 1)
}
}
withName: SNAPSHOT_SRES {
cpus = { 1 * task.attempt }
memory = { 1.GB * task.attempt }
}
withName: PRETEXTMAP_STANDRD{
cpus = { 8 * 1 }
memory = { 3.GB * task.attempt }
time = { 1.h * ( ( fasta.size() < 4e9 ? 24 : 48 ) * task.attempt ) }
}
withName: PRETEXTMAP_HIGHRES {
cpus = { 6 * task.attempt }
memory = { 20.GB * Math.ceil( task.attempt * 2.6 ) }
time = { 1.h * ( ( fasta.size() < 4e9 ? 24 : 48 ) * task.attempt ) }
}
withName: PRETEXT_GRAPH {
memory = { 128.MB * Math.ceil( task.attempt * 1.5 ) }
}
withName: JUICER_TOOLS_PRE {
cpus = { 20 * task.attempt }
memory = { 100.GB * task.attempt }
}
withName: BWAMEM2_INDEX {
memory = { 1.GB * Math.ceil( 28 * fasta.size() / 1e+9 ) * task.attempt }
}
withName: MINIMAP2_INDEX {
cpus = { 2 * task.attempt }
memory = { 1.GB * Math.ceil( 4 * fasta.size() / 1e+9 ) * task.attempt }
}
// add a cpus 16 if bam.size() >= 50GB
withName: BAMTOBED_SORT {
cpus = { 12 }
memory = {
(bam.size() < 100e9 ? 60.GB : // If <100GB -> 60GB fixed
// If 100-150GB -> 50GB + (BAM/4GB)
// If >150GB -> BAM/4GB
(bam.size() <= 150e9 ?
50.GB + (1.GB * Math.ceil(bam.size() / 3e9)) :
1.GB * Math.ceil(bam.size() / 3e9)
)
) * Math.ceil(task.attempt * 1)
}
time = { 30.h * task.attempt }
}
withName: SAMTOOLS_MARKDUP {
cpus = { 12 * 1 }
memory = { 1.GB * Math.ceil( ( (input.size() / 1e9) / 3 ) ) * task.attempt }
}
withName: COOLER_CLOAD {
cpus = { 16 * 1 }
memory = { 20.GB * task.attempt }
}
withName: MERQURYFK_MERQURYFK {
cpus = { 20 * 1 }
memory = { 100.GB * task.attempt }
}
withName: BUSCO_BUSCO {
cpus = { 16 * task.attempt }
memory = { 50.GB * task.attempt }
time = { 20.h * task.attempt }
}
// Large Genomes > 4Gb
//withName: BUSCO_BUSCO {
// cpus = { 30 * task.attempt ) }
// memory = { 100.GB * task.attempt ) }
// time = { 300.h * task.attempt ) }
//}
// Large Genomes > 4Gb
withName: FASTK_FASTK {
cpus = { 8 * task.attempt }
memory = { 100.GB * task.attempt }
}
//
// GENERAL MODULE LIMITS
// Based on reports from SummaryStats
// Most of the final conversion modules barely use any resources
withName: UCSC_BEDTOBIGBED {
cpus = { 1 }
memory = { 2.GB * task.attempt }
}
withName: TABIX_BGZIPTABIX {
cpus = { 1 }
memory = { 1.GB * Math.ceil( (input.size() / 2e+9) < 1 ? 1 : (input.size() / 2e+9) ) * task.attempt }
}
//
// SUBWORKFLOW: GAP_FINDER
// Based on reports from SummaryStats
withName: GAWK_GAP_LENGTH {
cpus = { 1 }
memory = { 100.MB * task.attempt }
}
//
// SUBWORKFLOW: HIC_MAPPING
//
withName: GET_PAIRED_CONTACT_BED {
cpus = { (file.size() > 1e11 ? 12 : 6) }
memory = { 10.GB * task.attempt }
//memory = { 1.GB * Math.ceil( file.size() / 2e+9 ) * task.attempt }
time = { 30.h * task.attempt }
}
//
// SUBWORKFLOW: SYNTENY
//
withName: '.*:.*:SYNTENY:MINIMAP2_ALIGN' {
cpus = { 20 * 1 }
memory = { 1.1.GB * Math.ceil( (reference.size() / 1e+9) * 30 ) * task.attempt }
time = { 20.h * task.attempt }
}
//
// SUBWORKFLOW: REPEAT_DENSITY
//
withName: WINDOWMASKER_MKCOUNTS {
cpus = { 6 }
memory = { 1.5.GB * Math.ceil( ref.size() / 1e+9 ) * task.attempt }
time = { 10.h * task.attempt }
}
withName: WINDOWMASKER_USTAT {
cpus = { 1 }
memory = { 1.GB * Math.ceil( ref.size() / 2e+9 ) * task.attempt }
time = { 4.h * task.attempt }
}
withName: BEDTOOLS_INTERSECT {
memory = { 8.GB * (task.attempt * task.attempt) }
}
withName: GENERATE_CRAM_CSV {
cpus = { 6 }
memory = { 30.GB * task.attempt }
time = { 10.h * task.attempt }
}
}