19
|
1
|
|
2 <!-- Flexbar tool definition for Galaxy, version 2.33 -->
|
|
3 <!-- Author: Johannes Roehr -->
|
|
4
|
|
5 <tool id="flexbar" name="Flexbar" version="2.33" force_history_refresh="True">
|
|
6
|
|
7 <description>flexible barcode and adapter removal</description>
|
|
8
|
|
9 <requirements>
|
|
10 <requirement type="binary" version="2.33">flexbar</requirement>
|
|
11 </requirements>
|
|
12
|
|
13 <version_command>flexbar --version</version_command>
|
|
14
|
|
15 <command interpreter="perl">
|
|
16
|
|
17 flexbar.pl flexbar
|
|
18
|
|
19 --threads $threads
|
|
20
|
|
21 --reads $reads
|
|
22
|
|
23 #if $cReads2.select == "on":
|
|
24 #if $cReads2.reads2.ext == $reads.ext:
|
|
25 --reads2 $cReads2.reads2
|
|
26 #end if
|
|
27 #end if
|
|
28
|
|
29
|
|
30 #if $reads.ext == "fasta":
|
|
31 --format fasta
|
|
32 #end if
|
|
33 #if $reads.ext == "fastq":
|
|
34 --format fastq
|
|
35 #end if
|
|
36 #if $reads.ext == "fastqsanger":
|
|
37 --format fastq-sanger
|
|
38 #end if
|
|
39 #if $reads.ext == "fastqsolexa":
|
|
40 --format fastq-solexa
|
|
41 #end if
|
|
42 #if $reads.ext == "fastqillumina":
|
|
43 --format fastq-i1.3
|
|
44 #end if
|
|
45 #if $reads.ext == "csfasta":
|
|
46 --format csfasta
|
|
47 #end if
|
|
48 #if $reads.ext == "fastqcssanger":
|
|
49 --format csfastq
|
|
50 #end if
|
|
51
|
|
52
|
|
53 --max-uncalled $maxUncalled
|
|
54 --min-readlength $minReadLen
|
|
55
|
|
56 #if $trimEnds.select == "on":
|
|
57 --pre-trim-left $trimEnds.trimLeft
|
|
58 --pre-trim-right $trimEnds.trimRight
|
|
59 #end if
|
|
60
|
|
61 #if $cTrimPhred.select == "on":
|
|
62 --pre-trim-phred $cTrimPhred.trimPhred
|
|
63 #end if
|
|
64
|
|
65 #if $cTrimLen.select == "on":
|
|
66 --post-trim-length $cTrimLen.trimLen
|
|
67 #end if
|
|
68
|
|
69
|
|
70 #if $cBarcodes.select == "on":
|
|
71 --barcodes $cBarcodes.barcodes
|
|
72
|
|
73 #if $cBarcodes.cbReads.select == "yes":
|
|
74 --barcode-reads $cBarcodes.cbReads.bReads
|
|
75 #end if
|
|
76
|
|
77 #if $cBarcodes.cbReads.select == "no":
|
|
78 $cBarcodes.cbReads.bKeep
|
|
79 #end if
|
|
80
|
|
81 --barcode-trim-end $cBarcodes.bTrimEnd
|
|
82
|
|
83 #if $cBarcodes.cbTailLen.select == "yes":
|
|
84 --barcode-tail-length $cBarcodes.cbTailLen.bTailLen
|
|
85 #end if
|
|
86
|
|
87 #if $cBarcodes.cbMinOverlap.select == "yes":
|
|
88 --barcode-min-overlap $cBarcodes.cbMinOverlap.bMinOverlap
|
|
89 #end if
|
|
90
|
|
91 --barcode-threshold $cBarcodes.bThresh
|
|
92
|
|
93 #if $cBarcodes.cbAlignScores.select == "yes":
|
|
94 --barcode-match $bMatch
|
|
95 --barcode-mismatch $bMismatch
|
|
96 --barcode-gap $bGap
|
|
97 #end if
|
|
98 #end if
|
|
99
|
|
100
|
|
101 #if $cAdapters.select == "on":
|
|
102
|
|
103 #if $cAdapters.ccAdapters.select == "data":
|
|
104 --adapters $cAdapters.ccAdapters.adaptersData
|
|
105 #end if
|
|
106
|
|
107 #if $cAdapters.ccAdapters.select == "seq":
|
|
108 --adapter-seq $cAdapters.ccAdapters.adapterSeq
|
|
109 #end if
|
|
110
|
|
111 --adapter-trim-end $cAdapters.aTrimEnd
|
|
112
|
|
113 #if $cAdapters.caTailLen.select == "yes":
|
|
114 --adapter-tail-length $cAdapters.caTailLen.aTailLen
|
|
115 #end if
|
|
116
|
|
117 --adapter-min-overlap $cAdapters.aMinOverlap
|
|
118 --adapter-threshold $cAdapters.aThresh
|
|
119
|
|
120 #if $cAdapters.caAlignScores.select == "yes":
|
|
121 --adapter-match $aMatch
|
|
122 --adapter-mismatch $aMismatch
|
|
123 --adapter-gap $aGap
|
|
124 #end if
|
|
125 #end if
|
|
126
|
|
127
|
|
128 #if $cLogging.select == "show":
|
|
129 $cLogging.logLevel
|
|
130 $cLogging.singleReads
|
|
131 $cLogging.lenDist
|
|
132 $cLogging.fastaOutput
|
|
133 $cLogging.numTags
|
|
134 $cLogging.remTags
|
|
135 $cLogging.rndTags
|
|
136 #end if
|
|
137
|
|
138
|
|
139 $output $output.id $__new_file_path__ $reads.ext
|
|
140
|
|
141 </command>
|
|
142
|
|
143 <inputs>
|
|
144
|
|
145 <param format="fasta,fastq,fastqsanger,fastqsolexa,fastqillumina,csfasta,fastqcssanger" name="reads" type="data" label="Sequencing reads" optional="false"/>
|
|
146
|
|
147
|
|
148 <conditional name="cReads2">
|
|
149 <param name="select" type="select" label="2nd read set (paired)">
|
|
150 <option value="off" selected="true">Off</option>
|
|
151 <option value="on">On</option>
|
|
152 </param>
|
20
|
153 <when value="off">
|
|
154 </when>
|
19
|
155 <when value="on">
|
|
156 <param format="fasta,fastq,fastqsanger,fastqsolexa,fastqillumina,csfasta,fastqcssanger" name="reads2" type="data" label="Reads 2" optional="false" help="same format as first read set"/>
|
|
157 </when>
|
|
158 </conditional>
|
|
159
|
|
160
|
|
161 <param name="maxUncalled" size="4" type="integer" value="0" label="1) Max uncalled" optional="false" help="allowed uncalled bases per read"/>
|
|
162
|
|
163 <conditional name="trimEnds">
|
|
164 <param name="select" type="select" label="2) Trimming of ends">
|
|
165 <option value="off" selected="true">Off</option>
|
|
166 <option value="on">On</option>
|
|
167 </param>
|
20
|
168 <when value="off">
|
|
169 </when>
|
19
|
170 <when value="on">
|
|
171 <param name="trimLeft" size="4" type="integer" value="0" label="Left" optional="false"/>
|
|
172 <param name="trimRight" size="4" type="integer" value="0" label="Right" optional="false" help="trims specified number of bases from read ends"/>
|
|
173 </when>
|
|
174 </conditional>
|
|
175
|
|
176 <conditional name="cTrimPhred">
|
|
177 <param name="select" type="select" label="3) Phred-trimming">
|
|
178 <option value="off" selected="true">Off</option>
|
|
179 <option value="on">On</option>
|
|
180 </param>
|
20
|
181 <when value="off">
|
|
182 </when>
|
19
|
183 <when value="on">
|
|
184 <param name="trimPhred" size="4" type="integer" value="10" label="Threshold" optional="false" help="trim right end until specified or higher quality reached"/>
|
|
185 </when>
|
|
186 </conditional>
|
|
187
|
|
188
|
|
189 <conditional name="cBarcodes">
|
|
190 <param name="select" type="select" label="4) Barcode detection">
|
|
191 <option value="off" selected="true">Off</option>
|
|
192 <option value="on">On</option>
|
|
193 </param>
|
20
|
194 <when value="off">
|
|
195 </when>
|
19
|
196 <when value="on">
|
|
197 <param format="fasta" name="barcodes" type="data" label="Barcodes" optional="false"/>
|
|
198 <conditional name="cbReads">
|
|
199 <param name="select" type="select" label="Separate barcode reads">
|
|
200 <option value="no" selected="true">No</option>
|
|
201 <option value="yes">Yes</option>
|
|
202 </param>
|
|
203 <when value="yes">
|
|
204 <param format="fasta,fastq,fastqsanger,fastqsolexa,fastqillumina,csfasta,fastqcssanger" name="bReads" type="data" label="Separate barcode reads" optional="false"/>
|
|
205 </when>
|
|
206 <when value="no">
|
|
207 <param name="bKeep" type="select" label="Remove barcodes within reads">
|
|
208 <option value="" selected="true">Yes</option>
|
|
209 <option value="--barcode-keep">No</option>
|
|
210 </param>
|
|
211 </when>
|
|
212 </conditional>
|
|
213 <param name="bTrimEnd" type="select" label="Trim-end mode" optional="false">
|
|
214 <option value="ANY" selected="true">Any</option>
|
|
215 <option value="RIGHT">Right</option>
|
|
216 <option value="RIGHT_TAIL">Right tail</option>
|
|
217 <option value="LEFT">Left</option>
|
|
218 <option value="LEFT_TAIL">Left tail</option>
|
|
219 </param>
|
|
220 <conditional name="cbTailLen">
|
|
221 <param name="select" type="select" label="Change tail length">
|
|
222 <option value="no" selected="true">No</option>
|
|
223 <option value="yes">Yes</option>
|
|
224 </param>
|
20
|
225 <when value="no">
|
|
226 </when>
|
19
|
227 <when value="yes">
|
|
228 <param name="bTailLen" size="4" type="integer" value="10" label="Tail length" optional="false"/>
|
|
229 </when>
|
|
230 </conditional>
|
|
231
|
|
232 <conditional name="cbMinOverlap">
|
|
233 <param name="select" type="select" label="Change min-overlap" help="default: barcode length">
|
|
234 <option value="no" selected="true">No</option>
|
|
235 <option value="yes">Yes</option>
|
|
236 </param>
|
20
|
237 <when value="no">
|
|
238 </when>
|
19
|
239 <when value="yes">
|
|
240 <param name="bMinOverlap" size="4" type="integer" value="8" label="Min-overlap" optional="false"/>
|
|
241 </when>
|
|
242 </conditional>
|
|
243
|
|
244 <param name="bThresh" size="4" type="integer" value="1" label="Threshold" optional="false" help="allowed mismatches and indels per 10 bases"/>
|
|
245
|
|
246 <conditional name="cbAlignScores">
|
|
247 <param name="select" type="select" label="Modify alignment scores">
|
|
248 <option value="no" selected="true">No</option>
|
|
249 <option value="yes">Yes</option>
|
|
250 </param>
|
20
|
251 <when value="no">
|
|
252 </when>
|
19
|
253 <when value="yes">
|
|
254 <param name="bMatch" size="3" type="integer" value="1" label="Match" optional="false"/>
|
|
255 <param name="bMismatch" size="3" type="integer" value="-1" label="Mismatch" optional="false"/>
|
|
256 <param name="bGap" size="3" type="integer" value="-7" label="Gap" optional="false"/>
|
|
257 </when>
|
|
258 </conditional>
|
|
259 </when>
|
|
260 </conditional>
|
|
261
|
|
262
|
|
263 <conditional name="cAdapters">
|
|
264 <param name="select" type="select" label="5) Adapter removal">
|
|
265 <option value="off" selected="true">Off</option>
|
|
266 <option value="on">On</option>
|
|
267 </param>
|
|
268
|
20
|
269 <when value="off">
|
|
270 </when>
|
19
|
271 <when value="on">
|
|
272 <conditional name="ccAdapters">
|
|
273 <param name="select" type="select" label="Adapter source">
|
|
274 <option value="data" selected="true">Fasta</option>
|
|
275 <option value="seq">Sequence</option>
|
|
276 <!-- <option value="file">File</option> -->
|
|
277 </param>
|
|
278 <when value="data">
|
|
279 <param format="fasta" name="adaptersData" type="data" label="Adapters" optional="false"/>
|
|
280 </when>
|
|
281 <when value="seq">
|
|
282 <param name="adapterSeq" size="40" label="Adapter" type="text" value="AAAAAAAAAAAAAA" optional="false"/>
|
|
283 </when>
|
|
284 <!-- <when value="file">
|
|
285 <param name="adaptersFile" type="file" label="Adapters file" optional="false"/>
|
|
286 </when> -->
|
|
287 </conditional>
|
|
288
|
|
289 <param name="aTrimEnd" type="select" label="Trim-end mode" optional="false">
|
|
290 <option value="ANY">Any</option>
|
|
291 <option value="RIGHT" selected="true">Right</option>
|
|
292 <option value="RIGHT_TAIL">Right tail</option>
|
|
293 <option value="LEFT">Left</option>
|
|
294 <option value="LEFT_TAIL">Left tail</option>
|
|
295 </param>
|
|
296
|
|
297 <conditional name="caTailLen">
|
|
298 <param name="select" type="select" label="Change tail length">
|
|
299 <option value="no" selected="true">No</option>
|
|
300 <option value="yes">Yes</option>
|
|
301 </param>
|
20
|
302 <when value="no">
|
|
303 </when>
|
19
|
304 <when value="yes">
|
|
305 <param name="aTailLen" size="4" type="integer" value="10" label="Tail length" optional="false"/>
|
|
306 </when>
|
|
307 </conditional>
|
|
308
|
|
309 <param name="aMinOverlap" size="4" type="integer" value="1" label="Min-overlap" optional="false"/>
|
|
310 <param name="aThresh" size="4" type="integer" value="3" label="Threshold" optional="false" help="allowed mismatches and indels per 10 bases"/>
|
|
311
|
|
312 <conditional name="caAlignScores">
|
|
313 <param name="select" type="select" label="Modify alignment scores">
|
|
314 <option value="no" selected="true">No</option>
|
|
315 <option value="yes">Yes</option>
|
|
316 </param>
|
20
|
317 <when value="no">
|
|
318 </when>
|
19
|
319 <when value="yes">
|
|
320 <param name="aMatch" size="3" type="integer" value="1" label="Match" optional="false"/>
|
|
321 <param name="aMismatch" size="3" type="integer" value="-1" label="Mismatch" optional="false"/>
|
|
322 <param name="aGap" size="3" type="integer" value="-7" label="Gap" optional="false"/>
|
|
323 </when>
|
|
324 </conditional>
|
|
325 </when>
|
|
326 </conditional>
|
|
327
|
|
328
|
|
329 <conditional name="cTrimLen">
|
|
330 <param name="select" type="select" label="6) Trimming to length">
|
|
331 <option value="off" selected="true">Off</option>
|
|
332 <option value="on">On</option>
|
|
333 </param>
|
20
|
334 <when value="off">
|
|
335 </when>
|
19
|
336 <when value="on">
|
|
337 <param name="trimLen" size="4" type="integer" value="30" label="Length" optional="false" help="trim reads to certain length from right"/>
|
|
338 </when>
|
|
339 </conditional>
|
|
340
|
|
341 <param name="minReadLen" size="4" type="integer" value="18" label="7) Minimum read length" optional="false" help="shorter reads are discarded"/>
|
|
342
|
|
343
|
|
344 <conditional name="cLogging">
|
|
345 <param name="select" type="select" label="Logging and tagging options">
|
|
346 <option value="off" selected="true">Off</option>
|
|
347 <option value="show">Show</option>
|
|
348 </param>
|
20
|
349 <when value="off">
|
|
350 </when>
|
19
|
351 <when value="show">
|
|
352 <param name="logLevel" type="select" label="Alignment logging">
|
|
353 <option value="" selected="true">Off</option>
|
|
354 <option value="--log-level ALL">All</option>
|
|
355 <option value="--log-level MOD">Modified</option>
|
|
356 <option value="--log-level TAB">Tabular</option>
|
|
357 </param>
|
|
358
|
|
359 <param name="singleReads" type="select" label="Single reads">
|
|
360 <option value="" selected="true">Off</option>
|
|
361 <option value="--single-reads">On</option>
|
|
362 </param>
|
|
363
|
|
364 <param name="lenDist" type="select" label="Read length distribution">
|
|
365 <option value="" selected="true">Off</option>
|
|
366 <option value="--length-dist">On</option>
|
|
367 </param>
|
|
368
|
|
369 <param name="fastaOutput" type="select" label="Fasta output">
|
|
370 <option value="" selected="true">Off</option>
|
|
371 <option value="--fasta-output">Always</option>
|
|
372 </param>
|
|
373
|
|
374 <param name="numTags" type="select" label="Number tags">
|
|
375 <option value="" selected="true">Off</option>
|
|
376 <option value="--number-tags">On</option>
|
|
377 </param>
|
|
378
|
|
379 <param name="remTags" type="select" label="Removal tags">
|
|
380 <option value="" selected="true">Off</option>
|
|
381 <option value="--removal-tags">On</option>
|
|
382 </param>
|
|
383
|
|
384 <param name="rndTags" type="select" label="Random tags">
|
|
385 <option value="" selected="true">Off</option>
|
|
386 <option value="--random-tags">On</option>
|
|
387 </param>
|
|
388 </when>
|
|
389 </conditional>
|
|
390
|
|
391 <param name="threads" type="select" label="Threads" help="check availability of cores">
|
|
392 <option value="1" selected="true">1</option>
|
|
393 <option value="2">2</option>
|
|
394 <option value="4">4</option>
|
|
395 </param>
|
|
396
|
|
397 </inputs>
|
|
398
|
|
399 <stdio>
|
|
400 <exit_code range="1:" level="fatal" description="Error!" />
|
|
401 </stdio>
|
|
402
|
|
403 <outputs>
|
|
404 <data format="txt" name="output" metadata_source="reads"/>
|
|
405 </outputs>
|
|
406
|
|
407
|
|
408 <help>
|
|
409
|
|
410 **Description**
|
|
411
|
|
412 Flexbar is a program to preprocess sequencing data. It demultiplexes barcoded runs and removes adapter sequences. Further, basic read trimming and filtering options are provided. Flexbar increases mapping rates and improves genome and transcriptome assemblies. It supports next-generation sequencing data in fasta/q and csfasta/q format from Illumina, Roche 454, and the SOLiD platform. Flexbar is available on the project_ page.
|
|
413
|
|
414 .. _project: https://sourceforge.net/projects/flexbar
|
|
415
|
|
416 ------
|
|
417
|
|
418 **Trim-end modes**
|
|
419
|
|
420 **Any:** longer part of read remains
|
|
421
|
|
422 **Left:** align before or at read end, right part remains
|
|
423
|
|
424 **Right:** align after or at read start, left part remains
|
|
425
|
|
426 **Left tail:** consider first n bases, see tail-length options
|
|
427
|
|
428 **Right tail:** use only last n bases of reads in alignment
|
|
429
|
|
430 ------
|
|
431
|
|
432 **Documentation**
|
|
433
|
|
434 Further documentation is available on the `manual`__ wiki page and via the command line help screen.
|
|
435
|
|
436 .. __: http://sourceforge.net/p/flexbar/wiki
|
|
437
|
|
438 ------
|
|
439
|
|
440 **Reference**
|
|
441
|
|
442 Matthias Dodt, Johannes T. Roehr, Rina Ahmed, Christoph Dieterich: Flexbar — flexible barcode and adapter processing for next-generation sequencing platforms. Biology 2012, 1(3):895-905.
|
|
443
|
|
444 </help>
|
|
445
|
|
446 </tool>
|
|
447
|