forked from nf-core/mag
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbase.config
177 lines (169 loc) · 8.06 KB
/
base.config
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
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
nf-core/mag 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 {
cpus = { check_max( 1 * task.attempt, 'cpus' ) }
memory = { check_max( 7.GB * task.attempt, 'memory' ) }
time = { check_max( 4.h * task.attempt, 'time' ) }
errorStrategy = { task.exitStatus in [143,137,104,134,139] ? 'retry' : 'finish' }
maxRetries = 3
maxErrors = '-1'
// Process-specific resource requirements
// NOTE - Please try and re-use 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 = { check_max( 1 , 'cpus' ) }
memory = { check_max( 6.GB * task.attempt, 'memory' ) }
time = { check_max( 4.h * task.attempt, 'time' ) }
}
withLabel:process_low {
cpus = { check_max( 2 * task.attempt, 'cpus' ) }
memory = { check_max( 12.GB * task.attempt, 'memory' ) }
time = { check_max( 4.h * task.attempt, 'time' ) }
}
withLabel:process_medium {
cpus = { check_max( 6 * task.attempt, 'cpus' ) }
memory = { check_max( 36.GB * task.attempt, 'memory' ) }
time = { check_max( 8.h * task.attempt, 'time' ) }
}
withLabel:process_high {
cpus = { check_max( 12 * task.attempt, 'cpus' ) }
memory = { check_max( 72.GB * task.attempt, 'memory' ) }
time = { check_max( 16.h * task.attempt, 'time' ) }
}
withLabel:process_long {
time = { check_max( 20.h * task.attempt, 'time' ) }
}
withLabel:process_high_memory {
memory = { check_max( 200.GB * task.attempt, 'memory' ) }
}
withLabel:error_ignore {
errorStrategy = 'ignore'
}
withLabel:error_retry {
errorStrategy = 'retry'
maxRetries = 2
}
withName:CUSTOM_DUMPSOFTWAREVERSIONS {
cache = false
}
withName: BOWTIE2_HOST_REMOVAL_BUILD {
cpus = { check_max (10 * task.attempt, 'cpus' ) }
memory = { check_max (20.GB * task.attempt, 'memory' ) }
time = { check_max (4.h * task.attempt, 'time' ) }
}
withName: BOWTIE2_HOST_REMOVAL_ALIGN {
cpus = { check_max (10 * task.attempt, 'cpus' ) }
memory = { check_max (10.GB * task.attempt, 'memory' ) }
time = { check_max (6.h * task.attempt, 'time' ) }
}
withName: BOWTIE2_PHIX_REMOVAL_ALIGN {
cpus = { check_max (4 * task.attempt, 'cpus' ) }
memory = { check_max (8.GB * task.attempt, 'memory' ) }
time = { check_max (6.h * task.attempt, 'time' ) }
}
withName: PORECHOP {
cpus = { check_max (4 * task.attempt, 'cpus' ) }
memory = { check_max (30.GB * task.attempt, 'memory' ) }
time = { check_max (4.h * task.attempt, 'time' ) }
}
withName: NANOLYSE {
cpus = { check_max (2 * task.attempt, 'cpus' ) }
memory = { check_max (10.GB * task.attempt, 'memory' ) }
time = { check_max (3.h * task.attempt, 'time' ) }
}
//filtlong: exponential increase of memory and time with attempts
withName: FILTLONG {
cpus = { check_max (8 * task.attempt , 'cpus' ) }
memory = { check_max (64.GB * (2**(task.attempt-1)), 'memory' ) }
time = { check_max (24.h * (2**(task.attempt-1)), 'time' ) }
}
withName: CENTRIFUGE {
cpus = { check_max (8 * task.attempt, 'cpus' ) }
memory = { check_max (40.GB * task.attempt, 'memory' ) }
time = { check_max (12.h * task.attempt, 'time' ) }
}
withName: KRAKEN2 {
cpus = { check_max (8 * task.attempt, 'cpus' ) }
memory = { check_max (40.GB * task.attempt, 'memory' ) }
time = { check_max (12.h * task.attempt, 'time' ) }
}
withName: KRONA {
cpus = { check_max (8 * task.attempt, 'cpus' ) }
memory = { check_max (20.GB * task.attempt, 'memory' ) }
time = { check_max (12.h * task.attempt, 'time' ) }
}
withName: CAT_DB_GENERATE {
memory = { check_max (200.GB * task.attempt, 'memory' ) }
time = { check_max (16.h * task.attempt, 'time' ) }
}
withName: CAT {
cpus = { check_max (8 * task.attempt, 'cpus' ) }
memory = { check_max (40.GB * task.attempt, 'memory' ) }
time = { check_max (12.h * task.attempt, 'time' ) }
}
withName: GTDBTK_CLASSIFY {
cpus = { check_max (10 * task.attempt, 'cpus' ) }
memory = { check_max (128.GB * task.attempt, 'memory' ) }
time = { check_max (12.h * task.attempt, 'time' ) }
}
//MEGAHIT returns exit code 250 when running out of memory
withName: MEGAHIT {
cpus = { check_megahit_cpus (8, task.attempt ) }
memory = { check_max (40.GB * task.attempt, 'memory' ) }
time = { check_max (16.h * task.attempt, 'time' ) }
errorStrategy = { task.exitStatus in [143,137,104,134,139,250] ? 'retry' : 'finish' }
}
//SPAdes returns error(1) if it runs out of memory (and for other reasons as well...)!
//exponential increase of memory and time with attempts, keep number of threads to enable reproducibility
withName: SPADES {
cpus = { check_spades_cpus (10, task.attempt) }
memory = { check_max (64.GB * (2**(task.attempt-1)), 'memory' ) }
time = { check_max (24.h * (2**(task.attempt-1)), 'time' ) }
errorStrategy = { task.exitStatus in [143,137,21,1] ? 'retry' : 'finish' }
maxRetries = 5
}
withName: SPADESHYBRID {
cpus = { check_spadeshybrid_cpus (10, task.attempt) }
memory = { check_max (64.GB * (2**(task.attempt-1)), 'memory' ) }
time = { check_max (24.h * (2**(task.attempt-1)), 'time' ) }
errorStrategy = { task.exitStatus in [143,137,21,1] ? 'retry' : 'finish' }
maxRetries = 5
}
//returns exit code 247 when running out of memory
withName: BOWTIE2_ASSEMBLY_ALIGN {
cpus = { check_max (2 * task.attempt, 'cpus' ) }
memory = { check_max (8.GB * task.attempt, 'memory' ) }
time = { check_max (8.h * task.attempt, 'time' ) }
errorStrategy = { task.exitStatus in [143,137,104,134,139,247] ? 'retry' : 'finish' }
}
withName: METABAT2_METABAT2 {
cpus = { check_max (8 * task.attempt, 'cpus' ) }
memory = { check_max (20.GB * task.attempt, 'memory' ) }
time = { check_max (8.h * task.attempt, 'time' ) }
}
withName: MAG_DEPTHS {
memory = { check_max (16.GB * task.attempt, 'memory' ) }
}
withName: BUSCO {
cpus = { check_max (8 * task.attempt, 'cpus' ) }
memory = { check_max (20.GB * task.attempt, 'memory' ) }
}
withName: MAXBIN2 {
// often fails when insufficient information, so we allow it to gracefully fail without failing the pipeline
errorStrategy = { task.exitStatus in [ 1, 255 ] ? 'ignore' : 'retry' }
}
withName: DASTOOL_DASTOOL {
// if SCGs not found, bins cannot be assigned and DAS_tool will die with exit status 1
errorStrategy = { task.exitStatus in [143,137,104,134,139] ? 'retry' : task.exitStatus == 1 ? 'ignore' : 'finish' }
}
}