-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathnextflow.config
227 lines (205 loc) · 5.2 KB
/
nextflow.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
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
params {
//General Pipeline Parameters
help = false
outdir = "results"
single_end = false
dpi = 300 //not used
figures = false //not used
//INPUT Parameters
reads = false
sra = false
apikey = false
publish_rawreads = false
getmetadata = false
//QC Parameters
no_qc = false
ref = false
genome = false
cleanreads = false
fastp = false
adapters = "${baseDir}/assets/bbmap/nextera.fa.gz"
min_read_length = 50
logo = "${baseDir}/assets/ikmblogo.png"
//METAPHLAN Parameters
metaphlan = false
updatemetaphlan = false
metaphlan_db = false
metaphlan_analysis_type = "rel_ab_w_read_stats"
strainphlan = false
publish_metaphlanbam = false
//HUMAnN Parameters
humann = false
updatehumann = false
humann_db = false
//KRAKEN Parameters
virus = false
kraken = false
kraken2_db = false
bracken = false
bracken_length = 100
bracken_level = "S"
bracken_threshold = 0
//SALMON Parameters
salmon = false
salmon_db = false
salmon_reference = false
//SYLPH Parameters
sylph = false
sylph_db = 'https://storage.googleapis.com/sylph-stuff/gtdb-r220-c200-dbv1.syldb'
sylph_merge = false
//HIGHTHROUGHPUT Parameters
sylph_processing = false
salmon_processing = false
step1 = false
step2 = false
//ASSEMBLY Parameters
assembly = false
magscot = true
coassembly = false //a binary switch for performing "all" co-assembly
assemblymode = false //allowed values: "single", "all" & "group"
binner = "concoct,maxbin,semibin,metabat,vamb"
//if coassembly shall be performed, force assemblymode to be "all" if not specified in command line
if( params.coassembly ){
assemblymode = "all"
}else{
assemblymode = "single"
}
semibin_environment = "human_gut"
contigsminlength = 2000
gtdbtk_reference = false
gtdbtk_reference = false
skip_gtdbtk = false
updategtdbtk = false
skip_checkm = false
publish_megahit = false
publish_rawbins = false
//vamb contig separator
contig_sep = "megahitcontig"
vamb_groupsize = 100
minimap_indexsize = 16
minimap_indexsize = 16
//MAGSCOT Parameters
magscot_min_sharing = 0.8
magscot_score_a = 1
magscot_score_b = 0.5
magscot_score_c = 0.5
magscot_threshold = 0.5
magscot_min_markers = 25
magscot_iterations = 2
// Default Parameters only, expecting to be overwritten
max_memory = 256.GB
max_cpus = 24
max_time = 240.h
maxMultiqcEmailFileSize = 25.MB
}
profiles {
standard {
includeConfig 'conf/base.config'
includeConfig 'conf/medcluster.config'
}
dx {
includeConfig 'conf/base.config'
includeConfig 'conf/ikmb_dx.config'
}
medcluster {
includeConfig 'conf/base.config'
includeConfig 'conf/medcluster.config'
}
biomedinf {
includeConfig 'conf/base.config'
includeConfig 'conf/biomedinf.config'
}
googlebatch {
includeConfig 'conf/base.config'
includeConfig 'conf/googlebatch.config'
}
/*
caucluster {
includeConfig 'conf/base.config'
includeConfig 'conf/caucluster.config'
}
*/
local {
includeConfig 'conf/base.config'
includeConfig 'conf/local.config'
}
custom {
includeConfig 'conf/base.config'
includeConfig 'conf/custom.config'
}
quickstart {
includeConfig 'conf/base.config'
includeConfig 'conf/quickstart.config'
}
}
env {
PYTHONNOUSERSITE = 1
R_PROFILE_USER = "/.Rprofile"
R_ENVIRON_USER = "/.Renviron"
}
/***********************
Pipeline Info
**********************/
// Capture exit codes from upstream processes when piping
//process.shell = ['/bin/bash', '-euo', 'pipefail']
timeline {
enabled = true
file = "${params.outdir}/pipeline_info/TOFU-MAaPO_timeline.html"
overwrite = true
}
report {
enabled = true
file = "${params.outdir}/pipeline_info/TOFU-MAaPO_report.html"
overwrite = true
}
trace {
enabled = true
file = "${params.outdir}/pipeline_info/TOFU-MAaPO_trace.txt"
overwrite = true
raw = true
fields = 'task_id,hash,native_id,name,status,exit,submit,duration,realtime,%cpu,peak_rss,peak_vmem,rchar,wchar,queue,attempt,container,cpus,memory,time,tag'
}
dag {
enabled = true
file = "${params.outdir}/pipeline_info/TOFU-MAaPO_dag.svg"
overwrite = true
}
manifest {
homePage = 'https://github.com/ikmb/TOFU-MAaPO.git'
description = 'This pipeline performs QC and runs Kraken, Metaphlan4, HUMAnN3 and/or genome assembly on SE or a set of PE metagenomic reads.'
mainScript = 'main.nf'
version = '1.5.0'
nextflowVersion = '>= 20.07.0'
}
// Function to ensure that resource requirements don't go beyond
// a maximum limit
def check_max(obj, type) {
if(type == 'memory'){
try {
if(obj.compareTo(params.max_memory as nextflow.util.MemoryUnit) == 1)
return params.max_memory as nextflow.util.MemoryUnit
else
return obj
} catch (all) {
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 nextflow.util.Duration) == 1)
return params.max_time as nextflow.util.Duration
else
return obj
} catch (all) {
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 (all) {
println " ### ERROR ### Max cpus '${params.max_cpus}' is not valid! Using default value: $obj"
return obj
}
}
}