forked from fmalmeida/MpGAP
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnextflow.config
235 lines (185 loc) · 8.85 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
/*
* Configuration File to run fmalmeida/mpgap pipeline.
*/
/*
* Pipeline parameters
*/
params {
/*
* Input parameter
*/
// Path to YAML samplesheet file.
// Please read the documentation https://mpgap.readthedocs.io/en/latest/samplesheet.html to know how to create a samplesheet file.
input = ""
/*
* Output parameters
*/
// Output folder name
output = "output"
/*
* Resources parameters
*/
// Number of threads to be used by each software.
threads = 3
// Number of jobs to run in parallel. Be aware that each job (in parallel) can consume
// N threads (set above). Be sure to carefully check your resources before augmenting
// this parameter. For example: parallel_jobs = 2 + threads = 5 can consume until 10
// threads at once.
// If not given, let's nextflow automatically handle it.
parallel_jobs =
// Memory allocation for pilon polish.
// Values in Gb. Default 50G. 50G has been proved to be enough in most cases.
// This step is crucial because with not enough memory will crash and not correct your assembly.
pilon_memory_limit = 50
/*
* General parameters
*
* These parameters will set the default for all samples.
* However, they can also be set inside the YAML, if this happens
* the pipeline will use the value inside the YAML to overwrite
* the parameter for that specific sample.
*
* Please read the documentation https://mpgap.readthedocs.io/en/latest/samplesheet.html to know more about the samplesheet file.
*/
// This parameter only needs to be set if the software chosen is Canu, wtdbg2 or Haslr. Is optional for Flye.
// It is an estimate of the size of the genome. Common suffices are allowed, for example, 3.7m or 2.8g
genome_size = ""
// Select the appropriate value to pass to wtdbg2 to assemble input.
// Options are: "ont" for Nanopore reads, "rs" for PacBio RSII, "sq" for PacBio Sequel, "ccs" for PacBio CCS reads.
// By default, if not given, the pipeline will use the value "ont" if nanopore reads are used and "sq" if pacbio reads are used
wtdbg2_technology = ""
// Select the appropriate shasta config to use for assembly
// Since shasta v0.8 (Oct/2021) this parameter is now mandatory.
shasta_config = "Nanopore-Oct2021"
// Tells the pipeline to interpret the long reads as "corrected" long reads.
// This will activate (if available) the options for corrected reads in the
// assemblers: -corrected (in canu), --pacbio-corr|--nano-corr (in flye), etc.
// Be cautious when using this parameter. If your reads are not corrected, and
// you use this parameter, you will probably do not generate any contig.
corrected_long_reads = false
// This parameter below (hybrid_strategy) is to select the hybrid strategies adopted by the pipeline.
// Read the documentation https://mpgap.readthedocs.io/en/latest/manual.html to know more about the hybrid strategies.
//
// Whenever using this parameter, it is also possible to polish the longreads-only assemblies with Nanopolish,
// Medaka or VarianCaller (Arrow) before the polishing with shortreads (using Pilon). For that it is necessary to set
// the right parameters: pacbio_bam and nanopolish_fast5 (files given only inside YAML) or medaka_model.
hybrid_strategy = 1
// Default medaka model used for polishing nanopore long reads assemblies.
// Please read their manual https://github.com/nanoporetech/medaka to know more about the available models.
medaka_model = "r941_min_high_g360"
// This parameter sets to nanopolish the max number of haplotypes to be considered.
// Sometimes the pipeline may crash because to much variation was found exceeding the limit
nanopolish_max_haplotypes = 1000
/*
* Advanced parameters
*
* Controlling the execution of assemblers
* It must be set as true to skip the software and false to use it.
* Also adding the possibility to pass additional parameters to them
* Additional parameters must be in quotes and separated by spaces.
*/
quast_additional_parameters = "" // Give additional parameters to Quast while assessing assembly metrics.
// Must be given as shown in Quast manual. E.g. " --large --eukaryote ".
skip_spades = false // Hybrid and shortreads only assemblies
spades_additional_parameters = "" // Must be given as shown in Spades manual. E.g. " --meta --plasmids "
skip_shovill = false // Paired shortreads only assemblies
shovill_additional_parameters = "" // Must be given as shown in Shovill manual. E.g. " --depth 15 "
// The pipeline already executes shovill with spades, skesa and megahit, so please, do not use it with shovill's ``--assembler`` parameter.
skip_unicycler = false // Hybrid and shortreads only assemblies
unicycler_additional_parameters = "" // Must be given as shown in Unicycler manual. E.g. " --mode conservative --no_correct "
skip_haslr = false // Hybrid assemblies
haslr_additional_parameters = "" // Must be given as shown in Haslr manual. E.g. " --cov-lr 30 "
skip_canu = false // Longreads only assemblies
canu_additional_parameters = "" // Must be given as shown in Canu manual. E.g. " correctedErrorRate=0.075 corOutCoverage=200 "
skip_flye = false // Longreads only assemblies
flye_additional_parameters = "" // Must be given as shown in Flye manual. E.g. " --meta --iterations 4 "
skip_raven = false // Longreads only assemblies
raven_additional_parameters = "" // Must be given as shown in Raven manual. E.g. " --polishing-rounds 4 "
skip_wtdbg2 = false // Longreads only assemblies
wtdbg2_additional_parameters = "" // Must be given as shown in wtdbg2 manual. E.g. " --tidy-reads 5000 "
skip_shasta = false // Nanopore longreads only assemblies
shasta_additional_parameters = "" // Must be given as shown in shasta manual. E.g. " --Reads.minReadLength 5000 "
}
/*
* Configuring Nextflow reports
*/
// Trace Report
trace {
enabled = false
file = "${params.output}" + "/mpgap_trace.txt"
fields = "task_id,name,status,exit,realtime,cpus,%cpu,memory,%mem,rss"
}
// Timeline Report
timeline {
enabled = false
file = "${params.output}" + "/mpgap_timeline.html"
}
// Complete Report
report {
enabled = true
file = "${params.output}" + "/mpgap_nextflow_report.html"
}
/*
Setting up NF profiles
To use different profiles and executors
please read more at: https://www.nextflow.io/docs/latest/config.html#config-profiles
*/
profiles {
// standard local profile
// uses docker by default
standard {
// using docker as default
singularity.enabled = false
docker.enabled = true
docker.runOptions = '-u \$(id -u):\$(id -g)'
fixOwnership = true
process.container = "fmalmeida/mpgap:v3.1"
// QueueSize limit
if (params.parallel_jobs) {
executor.local.queueSize = params.parallel_jobs
}
}
// local executor
local {
// QueueSize limit
if (params.parallel_jobs) {
executor.local.queueSize = params.parallel_jobs
}
}
// conda profile
conda {
singularity.enabled = false
docker.enabled = false
process.conda = "$CONDA_PREFIX/envs/mpgap-3.1"
}
// docker profile
docker {
singularity.enabled = false
docker.enabled = true
docker.runOptions = '-u \$(id -u):\$(id -g)'
fixOwnership = true
process.container = "fmalmeida/mpgap:v3.1"
}
// singularity profile
singularity {
docker.enabled = false
singularity.enabled = true
singularity.autoMounts = true
process.container = "docker://fmalmeida/mpgap:v3.1"
singularity.autoMounts = true
}
}
/*
Adding manifest
*/
manifest {
name = "fmalmeida/mpgap"
author = "Felipe Almeida"
description = "Nextflow pipeline for de novo genome assembly"
homePage = "https://github.com/fmalmeida/mpgap"
mainScript = "main.nf"
nextflowVersion = ">=20.10.0"
version = "3.1"
}
// specifying number of threads wanted
process.cpus = params.threads