-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnextflow.config
279 lines (246 loc) · 9.09 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
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
/*
===============================================================
Plastome Analysis Pipeline. Started April 2022.
#### Homepage / Documentation
https://github.com/alexisbourdais/
#### Authors
Alexis Bourdais
---------------------------------------------------------------
*/
//////////////////////////////////////////////////////////////////////
////////////////////// Nextflow parameters ///////////////////
//////////////////////////////////////////////////////////////////////
nextflow.enable.dsl=2
// Maximum available cluster resources
params {
max_memory = 200.GB
max_cpus = 32
max_time = 336.h
}
////////////////////////////////////////////////////////////////////
//////////////////// Check max function //////////////////////// (from nfcore community)
////////////////////////////////////////////////////////////////////
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
}
}
}
///////////////////////////////////////////////////////////////////
////////////////////// Process Parameters ///////////////////
///////////////////////////////////////////////////////////////////
/* Singularity mount */
params.singularity = "-B /scratch:/scratch -B /home:/home -B /local:/local -B /db:/db -B /groups:/groups"
/* Workflow */
params.workflow = ""
/* Assembler */
params.assembler = "getorganelle"
/* Results directory */
params.resultsDir = "$baseDir/Results/"
/* Assembly directory */
params.assemblyDir = "${params.resultsDir}/Assembly/"
params.formatAsm = ".fasta"
params.asmFiles = "${params.assemblyDir}/*${params.formatAsm}"
/* Reads directory */
params.baseReadName = "_R{1,2}"
params.formatReadName = ".fastq.gz"
params.readDir = "$baseDir/Data/"
params.readFiles = "${params.readDir}*${params.baseReadName}${params.formatReadName}"
/* Parameters of QC */
params.qc = false
/* Parameters of Trimming */
params.trimming = false
/* Parameters of annotation */
params.annotation = false
/* Parameters of GetOrganelle */
params.getIndex = "embplant_pt"
params.getKmer = "21,45,65,85,105"
/* Parameters of sqtk */
params.seqtkSubsamp = 2000000
/* Parameters of FastPlast */
params.fastIndex = "Brassicales"
/* Parameters of OrgAsm */
params.orgasmProbes = "protChloroArabidopsis"
/* Parameters of Mummer-Quast */
params.quast = false
params.refFasta = "$baseDir/Data/Brassica-oleracea-isolate-HDEM-chloroplast.fasta"
params.refGff = "$baseDir/Data/Brassica-oleracea-isolate-HDEM-chloroplast.gff3"
params.mummerAxe = "'[0:154000]'"
params.mummerFormatOut = "png"
/* Parameters of Mafft */
params.mafftMethod = "auto"
/* Parameters of Phylogenetic */
params.phylogeny = false
/* Parameters of raxml */
params.raxmlModel = "GTRGAMMAI"
/* Parameters of raxml-ng */
params.raxmlngModel = "GTR+G+I"
params.raxmlngBootstrap = "200"
params.raxmlngOption = ""
/* Parameters of iqtree */
params.iqtreeModel = "GTR+I+G"
params.iqtreeOption = ""
report {
enabled = true
overwrite = true
file = "${params.resultsDir}/ChloroBras_report.html"
}
///////////////////////////////////////////////////////////
////////////////////// Profile ///////////////////
///////////////////////////////////////////////////////////
conda.enabled = true
singularity {
enabled = true
autoMounts = true
runOptions = "${params.singularity}"
}
profiles {
standard {
process.executor = 'local'
executor.cpus = 4
executor.memory = 16.GB
}
slurm {
process {
executor = 'slurm'
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' ) }
}
}
}
singularity {
process {
withName: seqtk {
container = 'https://depot.galaxyproject.org/singularity/seqtk%3A1.4--he4a0461_2'
}
withName: 'orgasm|organnot' {
container = 'docker://gricad-registry.univ-grenoble-alpes.fr/eric.coissac/phyloskims:latest'
}
withName: fastplast {
container = 'docker://quay.io/mboudet/fastplast:latest'
}
withName: 'getorganelle_index|getorganelle' {
container = 'https://depot.galaxyproject.org/singularity/getorganelle%3A1.7.7.1--pyhdfd78af_0'
}
withName: mummer {
//container = 'https://depot.galaxyproject.org/singularity/mummer4%3A4.0.0rc1--pl5321hdbdd923_7' # gnuplot missing
conda = 'bioconda::mummer conda-forge::gnuplot'
}
withName: quast {
container = 'https://depot.galaxyproject.org/singularity/quast%3A5.2.0--py39pl5321heaaa4ec_4'
}
withName: mafft {
container = 'https://depot.galaxyproject.org/singularity/mafft%3A7.525--h031d066_1'
}
withName: raxml {
container = 'https://depot.galaxyproject.org/singularity/raxml%3A8.2.9--hec16e2b_6'
}
withName: iqtree {
container = 'https://depot.galaxyproject.org/singularity/iqtree:2.3.6--hdbdd923_0'
}
withName: raxmlng {
container = 'https://depot.galaxyproject.org/singularity/raxml-ng:1.2.2--h6d1f11b_0'
}
withName: fastqc {
container = "https://depot.galaxyproject.org/singularity/fastqc:0.12.1--hdfd78af_0"
}
withName: multiqc {
container = "https://depot.galaxyproject.org/singularity/multiqc%3A1.9--pyh9f0ad1d_0"
}
withName: trimgalore {
container = "https://depot.galaxyproject.org/singularity/trim-galore:0.6.9--hdfd78af_0"
}
withName: fastp {
container = "https://depot.galaxyproject.org/singularity/fastp:0.23.4--h125f33a_5"
}
withName: mfannot {
container = "docker://nbeck/mfannot"
}
}
}
conda {
process {
withName: seqtk {
conda = 'bioconda::fusioncatcher-seqtk'
}
withName: 'orgasm|organnot' {
container = 'docker://gricad-registry.univ-grenoble-alpes.fr/eric.coissac/phyloskims:latest'
}
withName: fastplast {
container = 'docker://quay.io/mboudet/fastplast:latest'
}
withName: 'getorganelle_index|getorganelle' {
conda = 'bioconda::getorganelle'
}
withName: mummer {
conda = 'bioconda::mummer conda-forge::gnuplot'
}
withName: quast {
conda = 'bioconda::quast'
}
withName: mafft {
conda = 'bioconda::mafft'
}
withName: raxml {
conda = 'bioconda::raxml'
}
withName: iqtree {
conda = 'bioconda::iqtree'
}
withName: raxmlng {
conda = 'bioconda::raxml-ng'
}
withName: fastqc {
conda = 'bioconda::fastqc'
}
withName: multiqc {
conda = 'python=3.5 bioconda::multiqc'
}
withName: trimgalore {
conda = 'bioconda::trim-galore'
}
withName: fastp {
conda = 'bioconda::fastp'
}
withName: mfannot {
container = "docker://nbeck/mfannot"
}
}
}
}