forked from epi2me-labs/wf-amplicon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nextflow_schema.json
332 lines (332 loc) · 17.8 KB
/
nextflow_schema.json
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
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "https://raw.githubusercontent.com/./master/nextflow_schema.json",
"title": "epi2me-labs/wf-amplicon",
"workflow_title": "Amplicon workflow",
"description": "Nextflow workflow for analysing Oxford Nanopore reads created by amplicon sequencing.",
"demo_url": "https://ont-exd-int-s3-euwst1-epi2me-labs.s3.amazonaws.com/wf-amplicon/wf-amplicon-demo.tar.gz",
"aws_demo_url": "https://ont-exd-int-s3-euwst1-epi2me-labs.s3.amazonaws.com/wf-amplicon/wf-amplicon-demo/aws.nextflow.config",
"url": "https://github.com/epi2me-labs/wf-amplicon",
"type": "object",
"definitions": {
"input": {
"title": "Input Options",
"type": "object",
"fa_icon": "fas fa-arrow-right",
"description": "Parameters for finding and handling input data for analysis.",
"properties": {
"fastq": {
"type": "string",
"format": "path",
"title": "FASTQ",
"description": "FASTQ files to use in the analysis.",
"help_text": "This accepts one of three cases: (i) the path to a single FASTQ file; (ii) the path to a top-level directory containing FASTQ files; (iii) the path to a directory containing one level of sub-directories which in turn contain FASTQ files. In the first and second case, a sample name can be supplied with `--sample`. In the last case, the data is assumed to be multiplexed with the names of the sub-directories as barcodes. In this case, a sample sheet can be provided with `--sample_sheet`."
},
"analyse_unclassified": {
"type": "boolean",
"default": false,
"title": "Analyse unclassified reads",
"description": "Analyse unclassified reads from input directory. By default the workflow will not process reads in the unclassified directory.",
"help_text": "If selected and if the input is a multiplex directory the workflow will also process the unclassified directory."
},
"reads_downsampling_size": {
"type": "integer",
"default": 1500,
"title": "Downsampling size",
"description": "Downsample to this number of reads per sample.",
"help_text": "Downsampling is performed after filtering. Downsampling is performed by default to improve performance. Set to 0 to disable downsampling and use all data for analysis. Increasing the downsampling size (or setting it to zero) may lead to excessive memory consumption."
},
"reference": {
"type": "string",
"format": "file-path",
"description": "Path to a reference FASTA file.",
"help_text": "The reference file should contain one sequence per amplicon."
}
},
"required": [
"fastq"
]
},
"samples": {
"title": "Sample Options",
"type": "object",
"fa_icon": "fas fa-vials",
"description": "Parameters that relate to samples such as sample sheets and sample names.",
"properties": {
"sample_sheet": {
"type": "string",
"format": "file-path",
"description": "A CSV file used to map barcodes to sample aliases. The sample sheet can be provided when the input data is a directory containing sub-directories with FASTQ files.",
"help_text": "The sample sheet is a CSV file with, minimally, columns named `barcode` and `alias`. Extra columns are allowed. In variant calling mode, a `ref` column can be added to tell the workflow which reference sequences should be used for which samples (please see the FAQs section in the documentation for details)."
},
"sample": {
"type": "string",
"description": "A single sample name for non-multiplexed data. Permissible if passing a single .fastq(.gz) file or directory of .fastq(.gz) files."
}
}
},
"preprocessing_options": {
"title": "Pre-processing Options",
"type": "object",
"fa_icon": "fas fa-arrow-left",
"description": "Parameters for filtering and downsampling reads before running the rest of the workflow.",
"properties": {
"min_read_length": {
"type": "integer",
"default": 300,
"title": "Minimum read length",
"description": "Shorter reads will be removed."
},
"max_read_length": {
"type": "integer",
"title": "Maximum read length",
"description": "Longer reads will be removed."
},
"min_read_qual": {
"type": "number",
"default": 10,
"title": "Minimum mean read quality",
"description": "Reads with a lower mean quality will be removed."
},
"drop_frac_longest_reads": {
"type": "number",
"default": 0.05,
"title": "Drop longest reads",
"description": "Drop fraction of longest reads.",
"help_text": "The very longest reads might be concatemers or contain other artifacts. In many cases removing them simplifies de novo consensus generation. When running variant calling mode with multiple amplicons per sample, it is recommended to set this to 0.0."
},
"take_longest_remaining_reads": {
"type": "boolean",
"default": true,
"description": "Whether to use the longest (remaining) reads.",
"help_text": "With this option enabled, reads are not randomly selected during downsampling. Instead, after dropping the longest reads (unless the `drop_frac_longest_reads` parameter is set to 0) the longest remaining reads are kept. This is recommended for de-novo mode when working with long amplicons. When running variant calling mode with multiple amplicons per sample, it is recommended to disable this option."
},
"min_n_reads": {
"type": "number",
"default": 40,
"title": "Minimum number of reads",
"description": "Samples / barcodes with fewer reads will not be processed."
}
}
},
"variant_calling_options": {
"title": "Variant Calling Options",
"type": "object",
"fa_icon": "fas fa-arrow-left",
"description": "Parameters affecting the variant calling process.",
"properties": {
"min_coverage": {
"type": "integer",
"title": "Minimum variant coverage",
"description": "Minimum coverage for variants to keep.",
"help_text": "Only variants covered by more than this number of reads are reported in the resulting VCF file.",
"minimum": 0,
"default": 20
},
"basecaller_cfg": {
"type": "string",
"default": "[email protected]",
"title": "Basecaller configuration",
"description": "Name of the basecaller model that processed the signal data; used to select an appropriate Medaka model.",
"help_text": "The basecaller configuration is used to automatically select the appropriate Medaka model. The automatic selection can be overridden with the 'medaka_model' parameters. Available models are: '[email protected]', '[email protected]', '[email protected]', '[email protected]', '[email protected]', 'dna_r10.4.1_e8.2_400bps_hac_prom', 'dna_r9.4.1_450bps_hac_prom', 'dna_r10.3_450bps_hac', 'dna_r10.3_450bps_hac_prom', 'dna_r10.4.1_e8.2_260bps_hac', 'dna_r10.4.1_e8.2_260bps_hac_prom', 'dna_r10.4.1_e8.2_400bps_hac', 'dna_r9.4.1_450bps_hac', 'dna_r9.4.1_e8.1_hac', 'dna_r9.4.1_e8.1_hac_prom'.",
"enum": [
"dna_r10.4.1_e8.2_400bps_hac_prom",
"dna_r9.4.1_450bps_hac_prom",
"dna_r10.3_450bps_hac",
"dna_r10.3_450bps_hac_prom",
"dna_r10.4.1_e8.2_260bps_hac",
"dna_r10.4.1_e8.2_260bps_hac_prom",
"dna_r10.4.1_e8.2_400bps_hac",
"dna_r9.4.1_450bps_hac",
"dna_r9.4.1_e8.1_hac",
"dna_r9.4.1_e8.1_hac_prom"
]
},
"medaka_model": {
"type": "string",
"description": "The name of the Medaka model to use. This will override the model automatically chosen based on the provided basecaller configuration.",
"help_text": "The workflow will attempt to map the basecaller model (provided with 'basecaller_cfg') used to a suitable Medaka model. You can override this by providing a model with this option instead."
}
}
},
"de_novo_options": {
"title": "De-novo Consensus Options",
"type": "object",
"fa_icon": "far fa-question-circle",
"description": "Parameters for creating a de-novo consensus (without a reference).",
"properties": {
"force_spoa_length_threshold": {
"type": "integer",
"default": 2000,
"description": "Consensus length below which to force SPOA consensus generation.",
"help_text": "If the consensus generated by `miniasm` is shorter than this value, force consensus generation with SPOA (regardless of whether the sequence produced by `miniasm` passed QC or not). The rationale for this parameter is that `miniasm` sometimes gives slightly truncated assemblies for short amplicons from RBK data, whereas SPOA tends to be more robust in this regard."
},
"spoa_minimum_relative_coverage": {
"type": "number",
"default": 0.15,
"minimum": 0,
"maximum": 1,
"description": "Minimum coverage (relative to the number of reads per sample after filtering) when constructing the consensus with SPOA.",
"help_text": "Needs to be a number between 0.0 and 1.0. The result of multiplying this number with the number of reads for the corresponding sample (after filtering) is passed on to SPOA's `--min-coverage` option."
},
"minimum_mean_depth": {
"type": "integer",
"default": 30,
"description": "Mean depth threshold to pass consensus quality control.",
"help_text": "Draft consensus sequences with a lower average depth of coverage after re-aligning the input reads will fail QC."
},
"primary_alignments_threshold": {
"type": "number",
"default": 0.7,
"description": "Fraction of primary alignments to pass quality control.",
"help_text": "Draft consensus sequences with a lower fraction of primary alignments after re-aligning the input reads will fail QC."
}
}
},
"output": {
"title": "Output Options",
"type": "object",
"fa_icon": "fas fa-arrow-left",
"description": "Parameters for saving and naming workflow outputs.",
"properties": {
"out_dir": {
"type": "string",
"default": "output",
"format": "directory-path",
"description": "Directory for output of all workflow results."
},
"combine_results": {
"type": "boolean",
"default": false,
"description": "Whether to merge per-sample results into a single BAM / VCF file.",
"help_text": "Per default, results are grouped per sample. With this option, an additional BAM and VCF file are produced which contain the alignments / variants for all samples and amplicons."
}
}
},
"advanced_options": {
"title": "Advanced Options",
"type": "object",
"fa_icon": "far fa-question-circle",
"description": "Advanced options for configuring processes inside the workflow.",
"help_text": "These advanced options do not need to be changed for typical use, but allow fine tuning of workflows for users who want more control over the workflow.",
"properties": {
"number_depth_windows": {
"type": "integer",
"title": "Number of depth windows",
"description": "Number of windows used during depth of coverage calculations.",
"help_text": "Depth of coverage is calculated for each sample across each amplicon split into this number of windows. A higher number will produce more fine-grained plots at the expense of run time.",
"minimum": 10,
"default": 100
},
"medaka_target_depth_per_strand": {
"type": "integer",
"default": 150,
"description": "Downsample each amplicon to this per-strand depth before running Medaka.",
"help_text": "Medaka performs best with even strand coverage and depths between 80X and 400X. To avoid too high coverage, the workflow downsamples the reads for each amplicon to this per-strand depth before running Medaka. Changing this value is discouraged as it might cause decreased performance."
}
}
},
"misc": {
"title": "Miscellaneous Options",
"type": "object",
"description": "Everything else.",
"default": "",
"properties": {
"threads": {
"type": "integer",
"default": 4,
"description": "Maximum number of CPU threads to use per workflow task.",
"help_text": "Several tasks in this workflow benefit from using multiple CPU threads. This option sets the maximum number of CPU threads for such processes. The total CPU resources used by the workflow are constrained by the executor configuration in `nextflow.config`."
},
"disable_ping": {
"type": "boolean",
"default": false,
"description": "Enable to prevent sending a workflow ping."
},
"help": {
"type": "boolean",
"default": false,
"description": "Display help text.",
"fa_icon": "fas fa-question-circle",
"hidden": true
},
"version": {
"type": "boolean",
"default": false,
"description": "Display version and exit.",
"fa_icon": "fas fa-question-circle",
"hidden": true
}
}
}
},
"allOf": [
{
"$ref": "#/definitions/input"
},
{
"$ref": "#/definitions/samples"
},
{
"$ref": "#/definitions/preprocessing_options"
},
{
"$ref": "#/definitions/variant_calling_options"
},
{
"$ref": "#/definitions/de_novo_options"
},
{
"$ref": "#/definitions/output"
},
{
"$ref": "#/definitions/advanced_options"
},
{
"$ref": "#/definitions/misc"
}
],
"properties": {
"aws_image_prefix": {
"type": "string",
"hidden": true
},
"aws_queue": {
"type": "string",
"hidden": true
},
"monochrome_logs": {
"type": "boolean"
},
"validate_params": {
"type": "boolean",
"default": true
},
"show_hidden_params": {
"type": "boolean"
}
},
"resources": {
"recommended": {
"cpus": 12,
"memory": "32GB"
},
"minimum": {
"cpus": 6,
"memory": "16GB"
},
"run_time": "0.5-5 minutes per sample (depending on number of reads, length of amplicons, and available compute).",
"arm_support": true
}
}