comparison bwa.xml @ 2:e29bc5c169bc draft

Uploaded
author devteam
date Fri, 20 Mar 2015 12:09:08 -0400
parents c71dd035971e
children 607ca4b95837
comparison
equal deleted inserted replaced
1:c71dd035971e 2:e29bc5c169bc
1 <?xml version="1.0"?> 1 <?xml version="1.0"?>
2 <tool id="bwa" name="BWA" version="0.1"> 2 <tool id="bwa" name="Map with BWA" version="0.1">
3
4 <requirements>
5 <requirement type="package" version="0.7.10.039ea20639">bwa</requirement>
6 <requirement type="package" version="1.1">samtools</requirement>
7 </requirements>
8 <description>- map short reads (&lt; 100 bp) against reference genome</description> 3 <description>- map short reads (&lt; 100 bp) against reference genome</description>
9 <command>
10
11 #set $reference_fasta_filename = "localref.fa"
12
13 #if str( $reference_source.reference_source_selector ) == "history":
14
15 ln -s "${reference_source.ref_file}" "${reference_fasta_filename}" &amp;&amp;
16
17 ## The following shell commands decide with of the BWA indexing algorithms (IS or BWTSW) will be run
18 ## depending ob the size of the input FASTA dataset
19
20 (
21 size=`stat -c %s "${reference_fasta_filename}" 2&gt;/dev/null`; ## Linux
22 if [ $? -eq 0 ];
23 then
24 if [ \$size -lt 2000000000 ];
25 then
26 bwa index -a is "${reference_fasta_filename}";
27 else
28 bwa index -a bwtsw "${reference_fasta_filename}";
29 fi;
30 fi;
31
32 eval \$(stat -s "${reference_fasta_filename}"); ## OSX
33 if [ $? -eq 0 ];
34 then
35 if [ \$st_size -lt 2000000000 ];
36 then
37 bwa index -a is "${reference_fasta_filename}";
38 echo "Generating BWA index with is algorithm";
39 else
40 bwa index -a bwtsw "${reference_fasta_filename}";
41 echo "Generating BWA index with bwtsw algorithm";
42 fi;
43 fi;
44 ) &amp;&amp;
45
46 #else:
47 #set $reference_fasta_filename = str( $reference_source.ref_file.fields.path )
48 #end if
49
50 ## Begin bwa command line
51
52 ####### Fastq paired
53
54 #if str( $input_type.input_type_selector ) == "paired" or str( $input_type.input_type_selector ) == "paired_collection":
55
56 bwa aln
57 -t "\${GALAXY_SLOTS:-1}"
58
59 @command_options@
60
61 "${reference_fasta_filename}"
62
63 #if str( $input_type.input_type_selector ) == "paired_collection":
64 "${input_type.fastq_input1.forward}"
65 #else
66 "${input_type.fastq_input1}"
67 #end if
68
69 > first.sai &amp;&amp;
70
71 bwa aln
72 -t "\${GALAXY_SLOTS:-1}"
73
74 @command_options@
75
76 "${reference_fasta_filename}"
77
78 #if str( $input_type.input_type_selector ) == "paired_collection":
79 "${input_type.fastq_input1.reverse}"
80 #else
81 "${input_type.fastq_input2}"
82 #end if
83
84 > second.sai &amp;&amp;
85
86 bwa sampe
87
88 #if str( $input_type.adv_pe_options.adv_pe_options_selector) == "True":
89
90 -a ${$input_type.adv_pe_options.a}
91 -o ${$input_type.adv_pe_options.o}
92 -n ${$input_type.adv_pe_options.n}
93 -N ${$input_type.adv_pe_options.N}
94
95 #end if
96
97 @read_group_options@
98
99 #if str( $input_type.input_type_selector ) == "paired_collection":
100
101 "${reference_fasta_filename}" first.sai second.sai "${input_type.fastq_input1.forward}" "${input_type.fastq_input1.reverse}"
102
103 #else:
104
105 "${reference_fasta_filename}" first.sai second.sai "${input_type.fastq_input1}" "${input_type.fastq_input2}"
106
107 #end if
108
109 ####### Fastq single
110
111 #elif str( $input_type.input_type_selector ) == "single":
112
113 bwa aln
114 -t "\${GALAXY_SLOTS:-1}"
115
116 @command_options@
117
118 "${reference_fasta_filename}"
119 "${input_type.fastq_input1}"
120 > first.sai &amp;&amp;
121
122 bwa samse
123
124 #if str( $input_type.adv_se_options.adv_se_options_selector) == "True":
125
126 -n ${$input_type.adv_se_options.n}
127
128 #end if
129
130 @read_group_options@
131
132 "${reference_fasta_filename}" first.sai "${input_type.fastq_input1}"
133
134 ####### BAM paired
135
136 #elif str( $input_type.input_type_selector ) == "paired_bam":
137
138 bwa aln
139 -t "\${GALAXY_SLOTS:-1}"
140 -b
141 -1
142
143 @command_options@
144
145 "${reference_fasta_filename}"
146 "${input_type.bam_input}"
147 > first.sai &amp;&amp;
148
149 bwa aln
150 -t "\${GALAXY_SLOTS:-1}"
151 -b
152 -2
153 @command_options@
154 "${reference_fasta_filename}"
155 "${input_type.bam_input}"
156 > second.sai &amp;&amp;
157
158 bwa sampe
159
160 #if str( $input_type.adv_bam_pe_options.adv_pe_options_selector) == "True":
161
162 -a ${$input_type.adv_bam_pe_options.a}
163 -o ${$input_type.adv_bam_pe_options.o}
164 -n ${$input_type.adv_bam_pe_options.n}
165 -N ${$input_type.adv_bam_pe_options.N}
166
167 #end if
168
169 @read_group_options@
170
171 "${reference_fasta_filename}" first.sai second.sai "${input_type.bam_input}" "${input_type.bam_input}"
172
173 ####### Fastq single ------------ to do next
174
175 #elif str( $input_type.input_type_selector ) == "single_bam":
176
177 bwa aln
178 -t "\${GALAXY_SLOTS:-1}"
179 -b
180 -0
181
182 @command_options@
183
184 "${reference_fasta_filename}"
185 "${input_type.bam_input}"
186 > first.sai &amp;&amp;
187
188 bwa samse
189
190 #if str( $input_type.adv_bam_se_options.adv_se_options_selector) == "True":
191
192 -n ${$input_type.adv_bam_se_options.n}
193
194 #end if
195
196 @read_group_options@
197
198 "${reference_fasta_filename}" first.sai "${input_type.bam_input}"
199
200 #end if
201
202 | samtools view -Sb - > temporary_bam_file.bam &amp;&amp;
203
204 samtools sort -f temporary_bam_file.bam ${bam_output}
205
206
207 </command>
208
209 <macros> 4 <macros>
210 <import>bwa_macros.xml</import> 5 <import>bwa_macros.xml</import>
211 <token name="@command_options@"> 6 <token name="@command_options@">
212 #if str( $analysis_type.analysis_type_selector ) == "illumina": 7 #if str( $analysis_type.analysis_type_selector ) == "full":
213
214 ## do nothing -> just align with default parameters
215
216 #elif str( $analysis_type.analysis_type_selector ) == "full":
217
218 -n ${analysis_type.n} 8 -n ${analysis_type.n}
219 -o ${analysis_type.o} 9 -o ${analysis_type.o}
220 -e ${analysis_type.e} 10 -e ${analysis_type.e}
221 -i ${analysis_type.i} 11 -i ${analysis_type.i}
222 -d ${analysis_type.d} 12 -d ${analysis_type.d}
226 -M ${analysis_type.M} 16 -M ${analysis_type.M}
227 -O ${analysis_type.O} 17 -O ${analysis_type.O}
228 -E ${analysis_type.E} 18 -E ${analysis_type.E}
229 -R ${analysis_type.R} 19 -R ${analysis_type.R}
230 -q ${analysis_type.q} 20 -q ${analysis_type.q}
231 21
232 #if str( $analysis_type.B ): 22 #if str( $analysis_type.B ):
233 -B ${analysis_type.B} 23 -B ${analysis_type.B}
234 #end if 24 #end if
235 25
236 #if str( $analysis_type.L ): 26 #if str( $analysis_type.L ):
237 -B ${analysis_type.L} 27 -B ${analysis_type.L}
238 #end if 28 #end if
239 #end if 29 #end if
240 </token> 30 </token>
241 <token name="@read_group_options@"> 31 <token name="@read_group_options@">
242 32 #if str( $rg.rg_selector ) == "set":
243 #if str( $rg.rg_selector ) == "True": 33 @set_rg_string@
244 34 -r '$rg_string'
245 -r "@RG\tID:$rg.ID\tSM:$rg.SM"
246
247 #end if 35 #end if
248 </token> 36 </token>
249 37
250 <xml name="advanced_pe_options"> 38 <xml name="advanced_pe_options">
251 <param name="adv_pe_options_selector" type="select" label="Set advanced paired end options?" help="Provides additional controls"> 39 <param name="adv_pe_options_selector" type="select" label="Set advanced paired end options?" help="Provides additional controls">
252 <option value="set">Set</option> 40 <option value="set">Set</option>
253 <option value="do_not_set" selected="True">Do not set</option> 41 <option value="do_not_set" selected="True">Do not set</option>
254 </param> 42 </param>
274 <when value="do_not_set"> 62 <when value="do_not_set">
275 <!-- do nothing --> 63 <!-- do nothing -->
276 </when> 64 </when>
277 </xml> 65 </xml>
278 </macros> 66 </macros>
67
68 <requirements>
69 <requirement type="package" version="0.7.10.039ea20639">bwa</requirement>
70 <requirement type="package" version="1.1">samtools</requirement>
71 </requirements>
72 <stdio>
73 <exit_code range="1:" />
74 </stdio>
75 <command>
76 #set $reference_fasta_filename = "localref.fa"
77
78 #if str( $reference_source.reference_source_selector ) == "history":
79 ln -s "${reference_source.ref_file}" "${reference_fasta_filename}" &amp;&amp;
80
81 ## The following shell commands decide with of the BWA indexing algorithms (IS or BWTSW) will be run
82 ## depending ob the size of the input FASTA dataset
83 (
84 size=`stat -c %s "${reference_fasta_filename}" 2&gt;/dev/null`; ## Linux
85 if [ $? -eq 0 ];
86 then
87 if [ "\$size" -lt 2000000000 ];
88 then
89 bwa index -a is "${reference_fasta_filename}";
90 else
91 bwa index -a bwtsw "${reference_fasta_filename}";
92 fi;
93 fi;
94
95 eval \$(stat -s "${reference_fasta_filename}" 2&gt;/dev/null); ## OSX
96 if [ -n "\$st_size" ];
97 then
98 if [ "\$st_size" -lt 2000000000 ];
99 then
100 bwa index -a is "${reference_fasta_filename}";
101 echo "Generating BWA index with is algorithm";
102 else
103 bwa index -a bwtsw "${reference_fasta_filename}";
104 echo "Generating BWA index with bwtsw algorithm";
105 fi;
106 fi;
107 ) &amp;&amp;
108 #else:
109 #set $reference_fasta_filename = str( $reference_source.ref_file.fields.path )
110 #end if
111
112 ## Begin bwa command line
113
114 ####### Fastq paired
115
116 #if str( $input_type.input_type_selector ) == "paired" or str( $input_type.input_type_selector ) == "paired_collection":
117 bwa aln
118 -t "\${GALAXY_SLOTS:-1}"
119
120 @command_options@
121
122 "${reference_fasta_filename}"
123
124 #if str( $input_type.input_type_selector ) == "paired_collection":
125 "${input_type.fastq_input1.forward}"
126 #else
127 "${input_type.fastq_input1}"
128 #end if
129
130 > first.sai &amp;&amp;
131
132 bwa aln
133 -t "\${GALAXY_SLOTS:-1}"
134
135 @command_options@
136
137 "${reference_fasta_filename}"
138
139 #if str( $input_type.input_type_selector ) == "paired_collection":
140 "${input_type.fastq_input1.reverse}"
141 #else
142 "${input_type.fastq_input2}"
143 #end if
144
145 > second.sai &amp;&amp;
146
147 bwa sampe
148
149 #if str( $input_type.adv_pe_options.adv_pe_options_selector) == "True":
150 -a ${$input_type.adv_pe_options.a}
151 -o ${$input_type.adv_pe_options.o}
152 -n ${$input_type.adv_pe_options.n}
153 -N ${$input_type.adv_pe_options.N}
154 #end if
155
156 @read_group_options@
157
158 #if str( $input_type.input_type_selector ) == "paired_collection":
159 "${reference_fasta_filename}" first.sai second.sai "${input_type.fastq_input1.forward}" "${input_type.fastq_input1.reverse}"
160 #else:
161 "${reference_fasta_filename}" first.sai second.sai "${input_type.fastq_input1}" "${input_type.fastq_input2}"
162 #end if
163
164 ####### Fastq single
165
166 #elif str( $input_type.input_type_selector ) == "single":
167 bwa aln
168 -t "\${GALAXY_SLOTS:-1}"
169
170 @command_options@
171
172 "${reference_fasta_filename}"
173 "${input_type.fastq_input1}"
174 > first.sai &amp;&amp;
175
176 bwa samse
177
178 #if str( $input_type.adv_se_options.adv_se_options_selector) == "True":
179 -n ${$input_type.adv_se_options.n}
180 #end if
181
182 @read_group_options@
183
184 "${reference_fasta_filename}" first.sai "${input_type.fastq_input1}"
185
186 ####### BAM paired
187
188 #elif str( $input_type.input_type_selector ) == "paired_bam":
189 bwa aln
190 -t "\${GALAXY_SLOTS:-1}"
191 -b
192 -1
193
194 @command_options@
195
196 "${reference_fasta_filename}"
197 "${input_type.bam_input}"
198 > first.sai &amp;&amp;
199
200 bwa aln
201 -t "\${GALAXY_SLOTS:-1}"
202 -b
203 -2
204 @command_options@
205 "${reference_fasta_filename}"
206 "${input_type.bam_input}"
207 > second.sai &amp;&amp;
208
209 bwa sampe
210
211 #if str( $input_type.adv_bam_pe_options.adv_pe_options_selector) == "True":
212 -a ${$input_type.adv_bam_pe_options.a}
213 -o ${$input_type.adv_bam_pe_options.o}
214 -n ${$input_type.adv_bam_pe_options.n}
215 -N ${$input_type.adv_bam_pe_options.N}
216 #end if
217
218 @read_group_options@
219
220 "${reference_fasta_filename}" first.sai second.sai "${input_type.bam_input}" "${input_type.bam_input}"
221
222 ####### Fastq single ------------ to do next
223
224 #elif str( $input_type.input_type_selector ) == "single_bam":
225 bwa aln
226 -t "\${GALAXY_SLOTS:-1}"
227 -b
228 -0
229
230 @command_options@
231
232 "${reference_fasta_filename}"
233 "${input_type.bam_input}"
234 > first.sai &amp;&amp;
235
236 bwa samse
237
238 #if str( $input_type.adv_bam_se_options.adv_se_options_selector) == "True":
239 -n ${$input_type.adv_bam_se_options.n}
240 #end if
241
242 @read_group_options@
243
244 "${reference_fasta_filename}" first.sai "${input_type.bam_input}"
245 #end if
246
247 | samtools view -Sb - > temporary_bam_file.bam &amp;&amp;
248
249 samtools sort -f temporary_bam_file.bam ${bam_output}
250 </command>
279 251
280 <inputs> 252 <inputs>
281 253
282 <conditional name="reference_source"> 254 <conditional name="reference_source">
283 <param name="reference_source_selector" type="select" label="Load reference genome from"> 255 <param name="reference_source_selector" type="select" label="Load reference genome from">
291 <validator type="no_options" message="No indexes are available" /> 263 <validator type="no_options" message="No indexes are available" />
292 </options> 264 </options>
293 <validator type="no_options" message="A built-in reference genome is not available for the build associated with the selected input file"/> 265 <validator type="no_options" message="A built-in reference genome is not available for the build associated with the selected input file"/>
294 </param> 266 </param>
295 </when> 267 </when>
296 <when value="history"> 268 <when value="history">
297 <param name="ref_file" type="data" format="fasta" label="Use the following dataset as the reference sequence" help="You can upload a FASTA sequence to the history and use it as reference" /> 269 <param name="ref_file" type="data" format="fasta" label="Use the following dataset as the reference sequence" help="You can upload a FASTA sequence to the history and use it as reference" />
298 </when> 270 </when>
299 </conditional> 271 </conditional>
300 <conditional name="input_type"> 272 <conditional name="input_type">
301 <param name="input_type_selector" type="select" label="Select input type" help="Select between fastq and bam datasets and between paired and single end data"> 273 <param name="input_type_selector" type="select" label="Select input type" help="Select between fastq and bam datasets and between paired and single end data">
307 </param> 279 </param>
308 <when value="paired"> 280 <when value="paired">
309 <param name="fastq_input1" type="data" format="fastqsanger" label="Select first set of reads" help="Specify dataset with forward reads"/> 281 <param name="fastq_input1" type="data" format="fastqsanger" label="Select first set of reads" help="Specify dataset with forward reads"/>
310 <param name="fastq_input2" type="data" format="fastqsanger" label="Select second set of reads" help="Specify dataset with reverse reads"/> 282 <param name="fastq_input2" type="data" format="fastqsanger" label="Select second set of reads" help="Specify dataset with reverse reads"/>
311 <conditional name="adv_pe_options"> 283 <conditional name="adv_pe_options">
312 284
313 <expand macro="advanced_pe_options" /> 285 <expand macro="advanced_pe_options" />
314 286
315 </conditional> 287 </conditional>
316 </when> 288 </when>
317 289
318 <when value="paired_collection"> 290 <when value="paired_collection">
319 <param name="fastq_input1" format="fastqsanger" type="data_collection" collection_type="paired" label="Select a paired collection" help="See help section for an explanation of dataset collections"/> 291 <param name="fastq_input1" format="fastqsanger" type="data_collection" collection_type="paired" label="Select a paired collection" help="See help section for an explanation of dataset collections"/>
320 <conditional name="adv_pe_options"> 292 <conditional name="adv_pe_options">
321 293
322 <expand macro="advanced_pe_options" /> 294 <expand macro="advanced_pe_options" />
323 295
324 </conditional> 296 </conditional>
325 </when> 297 </when>
326 298
327
328 <when value="single"> 299 <when value="single">
329 <param name="fastq_input1" type="data" format="fastqsanger" label="Select fastq dataset" help="Specify dataset with single reads"/> 300 <param name="fastq_input1" type="data" format="fastqsanger" label="Select fastq dataset" help="Specify dataset with single reads"/>
330 <conditional name="adv_se_options"> 301 <conditional name="adv_se_options">
331 302
332 <expand macro="advanced_se_options" /> 303 <expand macro="advanced_se_options" />
333 304
334 </conditional> 305 </conditional>
335 </when> 306 </when>
336 307
337 <!-- the difference between single and paired bams is in the <command> tag portion and realated to -0, -1, and -2 options --> 308 <!-- the difference between single and paired bams is in the <command> tag portion and realated to -0, -1, and -2 options -->
338 309
339 <when value="paired_bam"> 310 <when value="paired_bam">
340 <param name="bam_input" type="data" format="bam" label="Select BAM dataset" help="Specify BAM dataset with paired reads"/> 311 <param name="bam_input" type="data" format="bam" label="Select BAM dataset" help="Specify BAM dataset with paired reads"/>
341 <conditional name="adv_bam_pe_options"> 312 <conditional name="adv_bam_pe_options">
342 313
343 <expand macro="advanced_pe_options" /> 314 <expand macro="advanced_pe_options" />
344 315
345 </conditional> 316 </conditional>
346 </when> 317 </when>
347 318
348 <when value="single_bam"> 319 <when value="single_bam">
349 <param name="bam_input" type="data" format="bam" label="Select BAM dataset" help="Specify BAM dataset with single reads"/> 320 <param name="bam_input" type="data" format="bam" label="Select BAM dataset" help="Specify BAM dataset with single reads"/>
350 <conditional name="adv_bam_se_options"> 321 <conditional name="adv_bam_se_options">
351 322
352 <expand macro="advanced_se_options" /> 323 <expand macro="advanced_se_options" />
353 324
354 </conditional> 325 </conditional>
355 </when> 326 </when>
356 327
357 </conditional> 328 </conditional>
358 329
359 <conditional name="rg"> 330 <expand macro="readgroup_params" />
360 <param name="rg_selector" type="select" label="Set readgroups information?" help="Specifying readgroup information can greatly simplify your downstream analyses by allowing combining multiple datasets. See help below for more details"> 331
361 <option value="set">Set</option>
362 <option value="do_not_set" selected="True">Do not set</option>
363 </param>
364 <when value="set">
365 <param name="ID" type="text" value="readgroup1" size="20" label="Specify readgroup ID" help="This value must be unique among multiple samples in your experiment">
366 </param>
367 <param name="SM" type="text" value="blood" size="20" label="Specify readgroup sample name (SM)" help="This value should be descriptive">
368 </param>
369 </when>
370 <when value="do_not_set">
371 <!-- do nothing -->
372 </when>
373 </conditional>
374
375 <conditional name="analysis_type"> 332 <conditional name="analysis_type">
376 <param name="analysis_type_selector" type="select" label="Select analysis mode"> 333 <param name="analysis_type_selector" type="select" label="Select analysis mode">
377 <option value="illumina">1.Simple Illumina mode</option> 334 <option value="illumina">1.Simple Illumina mode</option>
378 <option value="full">2.Full list of options</option> 335 <option value="full">2.Full list of options</option>
379 </param> 336 </param>
380 <when value="illumina"> 337 <when value="illumina">
381 <!-- do nothing --> 338 <!-- do nothing -->
382 </when> 339 </when>
383 <when value="full"> 340 <when value="full">
384 <param name="n" type="text" value="0.04" label="maximum edit distance if the value is integer, or the fraction of missing alignments given 2% uniform base error rate if float. In the latter case, the maximum edit distance is automatically chosen for different read lengths." help="aln -n; default=0.04"/> 341 <param name="n" type="text" value="0.04" label="maximum edit distance if the value is integer, or the fraction of missing alignments given 2% uniform base error rate if float. In the latter case, the maximum edit distance is automatically chosen for different read lengths." help="aln -n; default=0.04"/>
385 <param name="o" type="integer" value="1" label="maximum number or gap openings" help="aln -o; default=1"/> 342 <param name="o" type="integer" value="1" label="maximum number or gap openings" help="aln -o; default=1"/>
386 <param name="e" type="integer" value="-1" label="maximum number of gap extensions" help="aln -e; -1 disables long gaps and invokes k-difference mode; default=-1"/> 343 <param name="e" type="integer" value="-1" label="maximum number of gap extensions" help="aln -e; -1 disables long gaps and invokes k-difference mode; default=-1"/>
387 <param name="i" type="integer" value="5" label="do not put an indel within this many bp towards the ends" help="aln -i; default=5"/> 344 <param name="i" type="integer" value="5" label="do not put an indel within this many bp towards the ends" help="aln -i; default=5"/>
388 <param name="d" type="integer" value="10" label="maximum occurrences for extending a long deletion" help="aln -d; default=10"/> 345 <param name="d" type="integer" value="10" label="maximum occurrences for extending a long deletion" help="aln -d; default=10"/>
393 <param name="O" type="integer" value="11" label="gap open penalty" help="aln -O; default=11"/> 350 <param name="O" type="integer" value="11" label="gap open penalty" help="aln -O; default=11"/>
394 <param name="E" type="integer" value="4" label="gap extension penalty" help="aln -E; default=4"/> 351 <param name="E" type="integer" value="4" label="gap extension penalty" help="aln -E; default=4"/>
395 <param name="R" type="integer" value="30" label="stop searching when there are more than this value of equally best hits" help="aln -R; default=30"/> 352 <param name="R" type="integer" value="30" label="stop searching when there are more than this value of equally best hits" help="aln -R; default=30"/>
396 <param name="q" type="integer" value="0" label="quality threshold for read trimming down to 35bp" help="aln -q; default=0"/> 353 <param name="q" type="integer" value="0" label="quality threshold for read trimming down to 35bp" help="aln -q; default=0"/>
397 <param name="B" type="integer" optional="True" label="length of barcode" help="aln -B; optional parameter"/> 354 <param name="B" type="integer" optional="True" label="length of barcode" help="aln -B; optional parameter"/>
398 <param name="L" type="float" optional="True" label="log-scaled gap penalty for long deletions" help="aln -L; optional parameter"/> 355 <param name="L" type="float" optional="True" label="log-scaled gap penalty for long deletions" help="aln -L; optional parameter"/>
399 </when> 356 </when>
400 </conditional> 357 </conditional>
401 </inputs> 358 </inputs>
402 359
403 <outputs> 360 <outputs>
404 <data format="bam" name="bam_output" label="${tool.name} on ${on_string} (mapped reads in BAM format)"/> 361 <data format="bam" name="bam_output" label="${tool.name} on ${on_string} (mapped reads in BAM format)"/>
405 </outputs> 362 </outputs>
406 363
407 <tests> 364 <tests>
408 <test> 365 <test>
409 <param name="reference_source_selector" value="history" /> 366 <param name="reference_source_selector" value="history" />
410 <param name="ref_file" ftype="fasta" value="bwa-mem-mt-genome.fa"/> 367 <param name="ref_file" ftype="fasta" value="bwa-mem-mt-genome.fa"/>
411 <param name="input_type_selector" value="paired"/> 368 <param name="input_type_selector" value="paired"/>
420 <param name="input_type_selector" value="paired_bam"/> 377 <param name="input_type_selector" value="paired_bam"/>
421 <param name="bam_input" ftype="bam" value="bwa-aln-bam-input.bam"/> 378 <param name="bam_input" ftype="bam" value="bwa-aln-bam-input.bam"/>
422 <param name="analysis_type_selector" value="illumina"/> 379 <param name="analysis_type_selector" value="illumina"/>
423 <output name="bam_output" ftype="bam" file="bwa-aln-test2.bam" lines_diff="2" /> 380 <output name="bam_output" ftype="bam" file="bwa-aln-test2.bam" lines_diff="2" />
424 </test> 381 </test>
382 <test>
383 <param name="reference_source_selector" value="history" />
384 <param name="ref_file" ftype="fasta" value="bwa-mem-mt-genome.fa"/>
385 <param name="input_type_selector" value="paired"/>
386 <param name="fastq_input1" ftype="fastqsanger" value="bwa-mem-fastq1.fq"/>
387 <param name="fastq_input2" ftype="fastqsanger" value="bwa-mem-fastq2.fq"/>
388 <param name="rg_selector" value="set"/>
389 <param name="ID" value="rg1"/>
390 <param name="analysis_type_selector" value="illumina"/>
391 <output name="bam_output" ftype="bam" file="bwa-aln-test3.bam" lines_diff="2" />
392 </test>
425 </tests> 393 </tests>
426 <stdio>
427 <exit_code range="1:" />
428 </stdio>
429 <help> 394 <help>
430
431 **What is does** 395 **What is does**
432 396
433 BWA is a software package for mapping low-divergent sequences against a large reference genome, such as the human genome. The bwa-aln algorithm is designed for Illumina sequence reads up to 100bp. For longer reads use BWA-MEM algorithm distributed as separate Galaxy tool. 397 BWA is a software package for mapping low-divergent sequences against a large reference genome, such as the human genome. The bwa-aln algorithm is designed for Illumina sequence reads up to 100bp. For longer reads use BWA-MEM algorithm distributed as separate Galaxy tool.
434 398
435 This Galaxy tool wraps bwa-aln, bwa-samse and -sampe modules of bwa read mapping tool: 399 This Galaxy tool wraps bwa-aln, bwa-samse and -sampe modules of bwa read mapping tool:
436 400
437 - bwa aln - actual mapper placing reads onto the reference sequence 401 - bwa aln - actual mapper placing reads onto the reference sequence
438 - bwa samse - post-processor converting suffix array coordinates into genome coordinates in SAM format for single reads 402 - bwa samse - post-processor converting suffix array coordinates into genome coordinates in SAM format for single reads
439 - bam sampe - post-processor for paired reads 403 - bam sampe - post-processor for paired reads
440 404
441 Galaxy implementation takes fastq or BAM (unaligned BAM) datasets as input and produces output in BAM (not SAM; in reality SAM produced by the bwa is converted to BAM on the fly by samtools view command) format, which can be further processed using various BAM utilities exiting in Galaxy (BAMTools, SAMTools, Picard). 405 Galaxy implementation takes fastq or BAM (unaligned BAM) datasets as input and produces output in BAM (not SAM; in reality SAM produced by the bwa is converted to BAM on the fly by samtools view command) format, which can be further processed using various BAM utilities exiting in Galaxy (BAMTools, SAMTools, Picard).
442 406
443 ----- 407 -----
444 408
445 **Galaxy-specific option** 409 **Galaxy-specific option**
446 410
447 Galaxy allows three levels of control over bwa-mem options provided by **Select analysis mode** menu option. These are: 411 Galaxy allows three levels of control over bwa-mem options provided by **Select analysis mode** menu option. These are:
448 412
449 1. *Simple Illumina mode*: The simplest possible bwa mem application in which it alignes single or paired-end data to reference using default parameters. It is equivalent to the following command: bwa mem &lt;reference index&gt; &lt;fastq dataset1&gt; [fastq dataset2] 413 1. *Simple Illumina mode*: The simplest possible bwa mem application in which it alignes single or paired-end data to reference using default parameters. It is equivalent to the following command: bwa mem &lt;reference index&gt; &lt;fastq dataset1&gt; [fastq dataset2]
450 2. *Full list of options*: Allows access to all options through Galaxy interface. 414 2. *Full list of options*: Allows access to all options through Galaxy interface.
451 415
452 ------ 416 ------
453 417
454 **bwa-aln options** 418 **bwa-aln options**
455 419
456 Each Galaxy parameter widget corresponds to command line flags listed below:: 420 Each Galaxy parameter widget corresponds to command line flags listed below::
488 452
489 **bwa-sampe options**:: 453 **bwa-sampe options**::
490 454
491 -n INT maximum hits to output for paired reads [3] 455 -n INT maximum hits to output for paired reads [3]
492 -r STR read group header line [null] 456 -r STR read group header line [null]
493
494 457
495 @dataset_collections@ 458 @dataset_collections@
496 459
497 @RG@ 460 @RG@
498 461
499 @info@ 462 @info@
500
501 </help> 463 </help>
502 <citations> 464 <citations>
503 <citation type="doi">10.1093/bioinformatics/btp324</citation> 465 <citation type="doi">10.1093/bioinformatics/btp324</citation>
504 <citation type="doi">10.1093/bioinformatics/btp698</citation> 466 <citation type="doi">10.1093/bioinformatics/btp698</citation>
505 </citations> 467 </citations>