comparison flexbar_dsc.xml @ 23:84d743632f5a draft

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