comparison flexbar_dsc.xml @ 28:3d608b751bc4 draft

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