comparison bwa-mem.xml @ 2:e29bc5c169bc draft

Uploaded
author devteam
date Fri, 20 Mar 2015 12:09:08 -0400
parents c71dd035971e
children ac30bfd3e2a8
comparison
equal deleted inserted replaced
1:c71dd035971e 2:e29bc5c169bc
1 <?xml version="1.0"?> 1 <?xml version="1.0"?>
2 <tool id="bwa_mem" name="BWA-MEM" version="0.1"> 2 <tool id="bwa_mem" name="Map with BWA-MEM" version="0.2.1">
3 3 <description>- map medium and long reads (&gt; 100 bp) against reference genome</description>
4 <macros> 4 <macros>
5 <import>bwa_macros.xml</import> 5 <import>bwa_macros.xml</import>
6 </macros> 6 </macros>
7
8 <requirements> 7 <requirements>
9 <requirement type="package" version="0.7.10.039ea20639">bwa</requirement> 8 <requirement type="package" version="0.7.10.039ea20639">bwa</requirement>
10 <requirement type="package" version="1.1">samtools</requirement> 9 <requirement type="package" version="1.1">samtools</requirement>
11 </requirements> 10 </requirements>
12 <description>- map medium and long reads (&gt; 100 bp) against reference genome</description> 11 <stdio>
12 <exit_code range="1:" />
13 </stdio>
13 <command> 14 <command>
14
15 #set $reference_fasta_filename = "localref.fa" 15 #set $reference_fasta_filename = "localref.fa"
16 16
17 #if str( $reference_source.reference_source_selector ) == "history": 17 #if str( $reference_source.reference_source_selector ) == "history":
18
19 ln -s "${reference_source.ref_file}" "${reference_fasta_filename}" &amp;&amp; 18 ln -s "${reference_source.ref_file}" "${reference_fasta_filename}" &amp;&amp;
20 19
21 ## The following shell commands decide with of the BWA indexing algorithms (IS or BWTSW) will be run 20 ## The following shell commands decide with of the BWA indexing algorithms (IS or BWTSW) will be run
22 ## depending ob the size of the input FASTA dataset 21 ## depending ob the size of the input FASTA dataset
23
24 ( 22 (
25 size=`stat -c %s "${reference_fasta_filename}" 2&gt;/dev/null`; ## Linux 23 size=`stat -c %s "${reference_fasta_filename}" 2&gt;/dev/null`; ## Linux
26 if [ $? -eq 0 ]; 24 if [ $? -eq 0 ];
27 then 25 then
28 if [ \$size -lt 2000000000 ]; 26 if [ "\$size" -lt 2000000000 ];
29 then 27 then
30 bwa index -a is "${reference_fasta_filename}"; 28 bwa index -a is "${reference_fasta_filename}";
31 echo "Generating BWA index with is algorithm"; 29 echo "Generating BWA index with is algorithm";
32 else 30 else
33 bwa index -a bwtsw "${reference_fasta_filename}"; 31 bwa index -a bwtsw "${reference_fasta_filename}";
34 echo "Generating BWA index with bwtsw algorithm"; 32 echo "Generating BWA index with bwtsw algorithm";
35 fi; 33 fi;
36 fi; 34 fi;
37 35
38 eval \$(stat -s "${reference_fasta_filename}"); ## OSX 36 eval \$(stat -s "${reference_fasta_filename}" 2&gt;/dev/null); ## OSX
39 if [ $? -eq 0 ]; 37 if [ -n "\$st_size" ];
40 then 38 then
41 if [ \$st_size -lt 2000000000 ]; 39 if [ "\$st_size" -lt 2000000000 ];
42 then 40 then
43 bwa index -a is "${reference_fasta_filename}"; 41 bwa index -a is "${reference_fasta_filename}";
44 echo "Generating BWA index with is algorithm"; 42 echo "Generating BWA index with is algorithm";
45 else 43 else
46 bwa index -a bwtsw "${reference_fasta_filename}"; 44 bwa index -a bwtsw "${reference_fasta_filename}";
47 echo "Generating BWA index with bwtsw algorithm"; 45 echo "Generating BWA index with bwtsw algorithm";
48 fi; 46 fi;
49 fi; 47 fi;
50 ) &amp;&amp; 48 ) &amp;&amp;
51 49
52 #else: 50 #else:
53 #set $reference_fasta_filename = str( $reference_source.ref_file.fields.path ) 51 #set $reference_fasta_filename = str( $reference_source.ref_file.fields.path )
54 #end if 52 #end if
55 53
56 ## Begin BWA-MEM command line 54 ## Begin BWA-MEM command line
57 55
58 bwa mem 56 bwa mem
59 -t "\${GALAXY_SLOTS:-1}" 57 -t "\${GALAXY_SLOTS:-1}"
60 -v 1 ## Verbosity is set to 1 (errors only) 58 -v 1 ## Verbosity is set to 1 (errors only)
61 59
62 #if str( $fastq_input.fastq_input_selector ) == "paired_iv": ## For interleaved fastq files set -p option 60 #if str( $fastq_input.fastq_input_selector ) == "paired_iv": ## For interleaved fastq files set -p option
63 -p 61 -p
64 #if str( $fastq_input.iset_stats ): ## check that insert statistics is used 62 #if str( $fastq_input.iset_stats ): ## check that insert statistics is used
65 -I "${fastq_input.iset_stats}" 63 -I "${fastq_input.iset_stats}"
66 #end if 64 #end if
67 #end if 65 #end if
68 66
69 #if str( $analysis_type.analysis_type_selector ) == "pacbio": 67 #if str( $analysis_type.analysis_type_selector ) == "pacbio":
70 -x 68 -x pacbio
71
72 #elif str( $analysis_type.analysis_type_selector ) == "full": 69 #elif str( $analysis_type.analysis_type_selector ) == "full":
73 70 #if str( $analysis_type.algorithmic_options.algorithmic_options_selector ) == "set": ## Algorithmic options
74 #if str( $analysis_type.algorithmic_options.algorithmic_options_selector ) == "True": ## Algorithmic options
75
76 -k "${analysis_type.algorithmic_options.k}" 71 -k "${analysis_type.algorithmic_options.k}"
77 -w "${analysis_type.algorithmic_options.w}" 72 -w "${analysis_type.algorithmic_options.w}"
78 -d "${analysis_type.algorithmic_options.d}" 73 -d "${analysis_type.algorithmic_options.d}"
79 -r "${analysis_type.algorithmic_options.r}" 74 -r "${analysis_type.algorithmic_options.r}"
80 -y "${analysis_type.algorithmic_options.y}" 75 -y "${analysis_type.algorithmic_options.y}"
83 -W "${analysis_type.algorithmic_options.W}" 78 -W "${analysis_type.algorithmic_options.W}"
84 -m "${analysis_type.algorithmic_options.m}" 79 -m "${analysis_type.algorithmic_options.m}"
85 ${analysis_type.algorithmic_options.S} 80 ${analysis_type.algorithmic_options.S}
86 ${analysis_type.algorithmic_options.P} 81 ${analysis_type.algorithmic_options.P}
87 ${analysis_type.algorithmic_options.e} 82 ${analysis_type.algorithmic_options.e}
88 83 #end if
89 #end if 84
90 85 #if str( $analysis_type.scoring_options.scoring_options_selector ) == "set": ## Scoring options
91 #if str( $analysis_type.scoring_options.scoring_options_selector ) == "True": ## Scoring options
92
93 -A "${analysis_type.scoring_options.A}" 86 -A "${analysis_type.scoring_options.A}"
94 -B "${analysis_type.scoring_options.B}" 87 -B "${analysis_type.scoring_options.B}"
95 -O "${analysis_type.scoring_options.O}" 88 -O "${analysis_type.scoring_options.O}"
96 -E "${analysis_type.scoring_options.E}" 89 -E "${analysis_type.scoring_options.E}"
97 -L "${analysis_type.scoring_options.L}" 90 -L "${analysis_type.scoring_options.L}"
98 -U "${analysis_type.scoring_options.U}" 91 -U "${analysis_type.scoring_options.U}"
99 92 #end if
100 #end if 93
101 94 #if str( $analysis_type.io_options.io_options_selector ) == "set": ## IO options
102 #if str( $analysis_type.io_options.io_options_selector ) == "True": ## IO options
103
104 -T "${analysis_type.io_options.T}" 95 -T "${analysis_type.io_options.T}"
105 -h "${analysis_type.io_options.h}" 96 -h "${analysis_type.io_options.h}"
106 ${analysis_type.io_options.a} 97 ${analysis_type.io_options.a}
107 ${analysis_type.io_options.C} 98 ${analysis_type.io_options.C}
108 ${analysis_type.io_options.V} 99 ${analysis_type.io_options.V}
109 ${analysis_type.io_options.Y} 100 ${analysis_type.io_options.Y}
110 ${analysis_type.io_options.M} 101 ${analysis_type.io_options.M}
111 102 #end if
112 #end if 103
113 104 #end if
114 #end if 105
115 106 #if str( $rg.rg_selector ) == "set":
116 #if str( $rg.rg_selector ) == "True": 107 @set_rg_string@
117 -R "@RG\tID:$rg.ID\tSM:$rg.SM" 108 -R '$rg_string'
118 #end if 109 #end if
119 110
120 #if str( $fastq_input.fastq_input_selector ) == "paired": 111 #if str( $fastq_input.fastq_input_selector ) == "paired":
121
122 #if str( $fastq_input.iset_stats ): ## check that insert statistics is used 112 #if str( $fastq_input.iset_stats ): ## check that insert statistics is used
123 -I "${fastq_input.iset_stats}" 113 -I "${fastq_input.iset_stats}"
124 #end if 114 #end if
125 115
126 "${reference_fasta_filename}" 116 "${reference_fasta_filename}"
127
128 "${fastq_input.fastq_input1}" "${fastq_input.fastq_input2}" 117 "${fastq_input.fastq_input1}" "${fastq_input.fastq_input2}"
129
130 #elif str( $fastq_input.fastq_input_selector ) == "paired_collection": 118 #elif str( $fastq_input.fastq_input_selector ) == "paired_collection":
131
132 #if str( $fastq_input.iset_stats ): ## check that insert statistics is used 119 #if str( $fastq_input.iset_stats ): ## check that insert statistics is used
133 -I "${fastq_input.iset_stats}" 120 -I "${fastq_input.iset_stats}"
134 #end if 121 #end if
135 122
136
137 "${reference_fasta_filename}" 123 "${reference_fasta_filename}"
138
139 "${fastq_input.fastq_input1.forward}" "${fastq_input.fastq_input1.reverse}" 124 "${fastq_input.fastq_input1.forward}" "${fastq_input.fastq_input1.reverse}"
140
141 #else: 125 #else:
142
143
144 "${reference_fasta_filename}" 126 "${reference_fasta_filename}"
145
146 "${fastq_input.fastq_input1}" 127 "${fastq_input.fastq_input1}"
147 128 #end if
148 #end if 129
149
150 | samtools view -Sb - > temporary_bam_file.bam &amp;&amp; 130 | samtools view -Sb - > temporary_bam_file.bam &amp;&amp;
151 131
152 samtools sort -f temporary_bam_file.bam ${bam_output} 132 samtools sort -f temporary_bam_file.bam ${bam_output}
153
154 </command> 133 </command>
155 134
156 <inputs> 135 <inputs>
157 136
158 <conditional name="reference_source"> 137 <conditional name="reference_source">
159 <param name="reference_source_selector" type="select" label="Load reference genome from"> 138 <param name="reference_source_selector" type="select" label="Load reference genome from">
160 <option value="cached">Local cache</option> 139 <option value="cached">Local cache</option>
167 <validator type="no_options" message="No indexes are available" /> 146 <validator type="no_options" message="No indexes are available" />
168 </options> 147 </options>
169 <validator type="no_options" message="A built-in reference genome is not available for the build associated with the selected input file"/> 148 <validator type="no_options" message="A built-in reference genome is not available for the build associated with the selected input file"/>
170 </param> 149 </param>
171 </when> 150 </when>
172 <when value="history"> 151 <when value="history">
173 <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" /> 152 <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" />
174 </when> 153 </when>
175 </conditional> 154 </conditional>
176 <conditional name="fastq_input"> 155 <conditional name="fastq_input">
177 <param name="fastq_input_selector" type="select" label="Single or Paired-end reads" help="Select between paired and single end data"> 156 <param name="fastq_input_selector" type="select" label="Single or Paired-end reads" help="Select between paired and single end data">
186 <param name="iset_stats" type="text" optional="True" size="10" label="Enter mean, standerd deviation, max, and min for insert lengths." help="-I; This parameter is only used for paired reads. Only mean is required while sd, max, and min will be inferred. Examples: both &quot;250&quot; and &quot;250,25&quot; will work while &quot;250,,10&quot; will not. See below for details."> 165 <param name="iset_stats" type="text" optional="True" size="10" label="Enter mean, standerd deviation, max, and min for insert lengths." help="-I; This parameter is only used for paired reads. Only mean is required while sd, max, and min will be inferred. Examples: both &quot;250&quot; and &quot;250,25&quot; will work while &quot;250,,10&quot; will not. See below for details.">
187 <sanitizer invalid_char=""> 166 <sanitizer invalid_char="">
188 <valid initial="string.digits"><add value=","/> </valid> 167 <valid initial="string.digits"><add value=","/> </valid>
189 </sanitizer> 168 </sanitizer>
190 </param> 169 </param>
191 </when> 170 </when>
192 <when value="single"> 171 <when value="single">
193 <param name="fastq_input1" type="data" format="fastqsanger" label="Select fastq dataset" help="Specify dataset with single reads"/> 172 <param name="fastq_input1" type="data" format="fastqsanger" label="Select fastq dataset" help="Specify dataset with single reads"/>
194 </when> 173 </when>
195 <when value="paired_collection"> 174 <when value="paired_collection">
196 <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"/> 175 <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"/>
199 <valid initial="string.digits"><add value=","/> </valid> 178 <valid initial="string.digits"><add value=","/> </valid>
200 </sanitizer> 179 </sanitizer>
201 </param> 180 </param>
202 </when> 181 </when>
203 <when value="paired_iv"> 182 <when value="paired_iv">
204 <param name="fastq_input1" type="data" format="fastqsanger" label="Select fastq dataset" help="Specify dataset with interleaved reads"/> 183 <param name="fastq_input1" type="data" format="fastqsanger" label="Select fastq dataset" help="Specify dataset with interleaved reads"/>
205 <param name="iset_stats" type="text" optional="True" size="10" label="Enter mean, standerd deviation, max, and min for insert lengths." help="-I; This parameter is only used for paired reads. Only mean is required while sd, max, and min will be inferred. Examples: both &quot;250&quot; and &quot;250,25&quot; will work while &quot;250,,10&quot; will not. See below for details."> 184 <param name="iset_stats" type="text" optional="True" size="10" label="Enter mean, standerd deviation, max, and min for insert lengths." help="-I; This parameter is only used for paired reads. Only mean is required while sd, max, and min will be inferred. Examples: both &quot;250&quot; and &quot;250,25&quot; will work while &quot;250,,10&quot; will not. See below for details.">
206 <sanitizer invalid_char=""> 185 <sanitizer invalid_char="">
207 <valid initial="string.digits"><add value=","/> </valid> 186 <valid initial="string.digits"><add value=","/> </valid>
208 </sanitizer> 187 </sanitizer>
209 </param> 188 </param>
210 </when> 189 </when>
211 </conditional> 190 </conditional>
212 191
213 192 <expand macro="readgroup_params" />
214 <conditional name="rg"> 193
215 <param name="rg_selector" type="select" label="Set read groups information?" help="Specifying readgroup information can greatly simplify your downstream analyses by allowing combining multiple datasets. See help below for more details">
216 <option value="set">Set</option>
217 <option value="do_not_set" selected="True">Do not set</option>
218 </param>
219 <when value="set">
220 <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">
221 </param>
222 <param name="SM" type="text" value="blood" size="20" label="Specify readgroup sample name (SM)" help="This value should be descriptive">
223 </param>
224 </when>
225 <when value="do_not_set">
226 <!-- do nothing -->
227 </when>
228 </conditional>
229
230 <conditional name="analysis_type"> 194 <conditional name="analysis_type">
231 <param name="analysis_type_selector" type="select" label="Select analysis mode"> 195 <param name="analysis_type_selector" type="select" label="Select analysis mode">
232 <option value="illumina">1.Simple Illumina mode</option> 196 <option value="illumina">Simple Illumina mode</option>
233 <option value="pacbio">2.PacBio mode</option> 197 <option value="pacbio">PacBio mode (-x pacbio)</option>
234 <option value="full">3.Full list of options</option> 198 <option value="full">Full list of options</option>
235 </param> 199 </param>
236 <when value="illumina"> 200 <when value="illumina">
237 <!-- do nothing --> 201 <!-- do nothing -->
238 </when> 202 </when>
239 <when value="pacbio"> 203 <when value="pacbio">
244 <param name="algorithmic_options_selector" type="select" label="Set algorithmic options?" help="Sets -k, -w, -d, -r, -y, -c, -D, -W, -m, -S, -P, and -e options."> 208 <param name="algorithmic_options_selector" type="select" label="Set algorithmic options?" help="Sets -k, -w, -d, -r, -y, -c, -D, -W, -m, -S, -P, and -e options.">
245 <option value="set">Set</option> 209 <option value="set">Set</option>
246 <option value="do_not_set" selected="True">Do not set</option> 210 <option value="do_not_set" selected="True">Do not set</option>
247 </param> 211 </param>
248 <when value="set"> 212 <when value="set">
249 <param name="k" type="integer" value="19" label="minimum seed length" help="-k; default=19"/> 213 <param name="k" type="integer" value="19" label="Minimum seed length" help="-k; default=19"/>
250 <param name="w" type="integer" value="100" label="band width for banded alignment" help="-w; default=100"/> 214 <param name="w" type="integer" value="100" label="Band width for banded alignment" help="-w; default=100"/>
251 <param name="d" type="integer" value="100" label="off-diagonal X-dropoff" help="-d; default=100"/> 215 <param name="d" type="integer" value="100" label="Off-diagonal X-dropoff" help="-d; default=100"/>
252 <param name="r" type="float" value="1.5" label="look for internal seeds inside a seed longer than -k * THIS VALUE" help="-r; default=1.5"/> 216 <param name="r" type="float" value="1.5" label="Look for internal seeds inside a seed longer than -k * THIS VALUE" help="-r; default=1.5; This is a key heuristic parameter for tuning the performance. Larger value yields fewer seeds, which leads to faster alignment speed but lower accuracy" />
253 <param name="y" type="integer" value="0" label="find maximum exact matches (MEMs) longer than -k * -r with size less than THIS VALUE" help="-y; default=0"/> 217 <param name="y" type="integer" value="20" label="Seed occurrence for the 3rd round seeding" help="-y; default=20" />
254 <param name="c" type="integer" value="500" label="skip seeds with more than that many occurrences" help="-c; default=500"/> 218 <param name="c" type="integer" value="500" label="Skip seeds with more than that many occurrences" help="-c; default=500"/>
255 <param name="D" type="float" value="0.5" label="drop chains shorter than this fraction of the longest overlapping chain" help="-D; default=0.5"/> 219 <param name="D" type="float" value="0.5" label="Drop chains shorter than this fraction of the longest overlapping chain" help="-D; default=0.5"/>
256 <param name="W" type="integer" value="0" label="discard a chain if seeded bases shorter than" help="-W; default=0"/> 220 <param name="W" type="integer" value="0" label="Discard a chain if seeded bases shorter than THIS VALUE" help="-W; default=0"/>
257 <param name="m" type="integer" value="50" label="perform at most this many rounds of mate rescues for each read" help="-m; default=50"/> 221 <param name="m" type="integer" value="50" label="Perform at most this many rounds of mate rescues for each read" help="-m; default=50"/>
258 <param name="S" type="boolean" truevalue="-S" falsevalue="" label="skip mate rescue" help="-S"/> 222 <param name="S" type="boolean" truevalue="-S" falsevalue="" label="Skip mate rescue" help="-S"/>
259 <param name="P" type="boolean" truevalue="-P" falsevalue="" label="skip pairing; mate rescue performed unless -S also in use" help="-P"/> 223 <param name="P" type="boolean" truevalue="-P" falsevalue="" label="Skip pairing; mate rescue performed unless -S also in use" help="-P"/>
260 <param name="e" type="boolean" truevalue="-e" falsevalue="" label="discard full-length exact matches" help="-e"/> 224 <param name="e" type="boolean" truevalue="-e" falsevalue="" label="Discard full-length exact matches" help="-e"/>
261 </when> 225 </when>
262 <when value="do_not_set"> 226 <when value="do_not_set">
263 <!-- do nothing --> 227 <!-- do nothing -->
264 </when> 228 </when>
265 </conditional> 229 </conditional>
266 230
267 <conditional name="scoring_options"> 231 <conditional name="scoring_options">
268 <param name="scoring_options_selector" type="select" label="Set scoring options?" help="Sets -A, -B, -O, -E, -L, and -U options."> 232 <param name="scoring_options_selector" type="select" label="Set scoring options?" help="Sets -A, -B, -O, -E, -L, and -U options.">
269 <option value="set">Set</option> 233 <option value="set">Set</option>
270 <option value="do_not_set" selected="True">Do not set</option> 234 <option value="do_not_set" selected="True">Do not set</option>
271 </param> 235 </param>
272 <when value="set"> 236 <when value="set">
273 <param name="A" type="integer" value="1" label="score for a sequence match" help="-A; scales options -T, -d, -B, -O, -E, -L, and -U; default=1"/> 237 <param name="A" type="integer" value="1" label="Score for a sequence match" help="-A; scales options -T, -d, -B, -O, -E, -L, and -U unless overridden; default=1"/>
274 <param name="B" type="integer" value="4" label="penalty for mismatch" help="-B; default=4"/> 238 <param name="B" type="integer" value="4" label="Penalty for a mismatch" help="-B; default=4"/>
275 <param name="O" type="text" value="6,6" label="gap open penalty for deletions and insertions" help="-O; default=6,6"> 239 <param name="O" type="text" value="6,6" label="Gap open penalties for deletions and insertions" help="-O; default=6,6">
276 <sanitizer invalid_char=""> 240 <sanitizer invalid_char="">
277 <valid initial="string.digits"><add value=","/> </valid> 241 <valid initial="string.digits"><add value=","/> </valid>
278 </sanitizer> 242 </sanitizer>
279 </param> 243 </param>
280 <param name="E" type="text" value="1,1" label="gap extension penalty; a gap of size k cost &#39;-O + -E*k&#39; " help="-E; default=1,1"> 244 <param name="E" type="text" value="1,1" label="Gap extension penalties; a gap of size k cost &#39;-O + -E*k&#39;. If two numbers are specified, the first is the penalty of extending a deletion and the second for extending an insertion" help="-E; default=1,1">
281 <sanitizer invalid_char=""> 245 <sanitizer invalid_char="">
282 <valid initial="string.digits"><add value=","/> </valid> 246 <valid initial="string.digits"><add value=","/> </valid>
283 </sanitizer> 247 </sanitizer>
284 </param> 248 </param>
285 <param name="L" type="text" value="5,5" label="penalty for 5&#39;-end and 3&#39;-end clipping" help="-L; default=5,5"> 249 <param name="L" type="text" value="5,5" label="Penalties for 5&#39;-end and 3&#39;-end clipping" help="-L; default=5,5; When performing Smith-Waterman extension, BWA-MEM keeps track of the best score reaching the end of query. If this score is larger than the best Smith-Waterman score minus the clipping penalty, clipping will not be applied. Note that in this case, the SAM AS tag reports the best Smith-Waterman score; clipping penalty is not deduced">
286 <sanitizer invalid_char=""> 250 <sanitizer invalid_char="">
287 <valid initial="string.digits"><add value=","/> </valid> 251 <valid initial="string.digits"><add value=","/> </valid>
288 </sanitizer> 252 </sanitizer>
289 </param> 253 </param>
290 <param name="U" type="integer" value="17" label="penalty for an unpaired read pair" help="-U; default=17"/> 254 <param name="U" type="integer" value="17" label="Penalty for an unpaired read pair" help="-U; default=17"/>
291 </when> 255 </when>
292 <when value="do_not_set"> 256 <when value="do_not_set">
293 <!-- do nothing --> 257 <!-- do nothing -->
294 </when> 258 </when>
295 </conditional> 259 </conditional>
296 260
297 <conditional name="io_options"> 261 <conditional name="io_options">
298 <param name="io_options_selector" type="select" label="Set input/output options" help="Sets -T, -h, -a, -C, -V, -Y, and -M options."> 262 <param name="io_options_selector" type="select" label="Set input/output options" help="Sets -T, -h, -a, -C, -V, -Y, and -M options.">
299 <option value="set">Set</option> 263 <option value="set">Set</option>
300 <option value="do_not_set" selected="True">Do not set</option> 264 <option value="do_not_set" selected="True">Do not set</option>
301 </param> 265 </param>
302 <when value="set"> 266 <when value="set">
303 <param name="T" type="integer" value="30" label="minimum score to output" help="-T; default=30"/> 267 <param name="T" type="integer" value="30" label="Minimum score to output" help="-T; default=30"/>
304 <param name="h" type="integer" value="5" label="if there are this many hits with score >80% of the max score, output all in XA tag" help="-h; default=5"/> 268 <param name="h" type="integer" value="5" label="If there are less than THIS VALUE hits with score &gt;80% of the max score, output them all in the XA tag" help="-h; default=5" />
305 <param name="a" type="boolean" truevalue="-a" falsevalue="" label="output all alignments for single-ends or unpaired paired-ends" help="-a"/> 269 <param name="a" type="boolean" truevalue="-a" falsevalue="" label="Output all alignments for single-ends or unpaired paired-ends" help="-a; These alignments will be flagged as secondary alignments"/>
306 <param name="C" type="boolean" truevalue="-C" falsevalue="" label="append FASTA/FASTQ comment to BAM output" help="-C"/> 270 <param name="C" type="boolean" truevalue="-C" falsevalue="" label="Append FASTA/FASTQ comment to BAM output" help="-C"/>
307 <param name="V" type="boolean" truevalue="-V" falsevalue="" label="output the reference FASTA header in the XR tag" help="-C"/> 271 <param name="V" type="boolean" truevalue="-V" falsevalue="" label="Output the reference FASTA header in the XR tag" help="-C"/>
308 <param name="Y" type="boolean" truevalue="-Y" falsevalue="" label="use soft clipping for supplementary alignments" help="-Y"/> 272 <param name="Y" type="boolean" truevalue="-Y" falsevalue="" label="Use soft clipping for supplementary alignments" help="-Y; By default, BWA-MEM uses soft clipping for the primary alignment and hard clipping for supplementary alignments" />
309 <param name="M" type="boolean" truevalue="-M" falsevalue="" label="mark shorter split hits as secondary" help="-M"/> 273 <param name="M" type="boolean" truevalue="-M" falsevalue="" label="Mark shorter split hits of a chimeric alignment in the FLAG field as 'secondary alignment' instead of 'supplementary alignment'" help="-M; For Picard&lt;1.96 compatibility" />
310 </when> 274 </when>
311 <when value="do_not_set"> 275 <when value="do_not_set">
312 <!-- do nothing --> 276 <!-- do nothing -->
313 </when> 277 </when>
314 </conditional> 278 </conditional>
315 </when> 279 </when>
316 </conditional> 280 </conditional>
317 </inputs> 281 </inputs>
318 282
319 <outputs> 283 <outputs>
320 <data format="bam" name="bam_output" label="${tool.name} on ${on_string} (mapped reads in BAM format)"/> 284 <data format="bam" name="bam_output" label="${tool.name} on ${on_string} (mapped reads in BAM format)"/>
321 </outputs> 285 </outputs>
322 286
323 <tests> 287 <tests>
324 <test> 288 <test>
325 <param name="reference_source_selector" value="history" /> 289 <param name="reference_source_selector" value="history" />
326 <param name="ref_file" ftype="fasta" value="bwa-mem-mt-genome.fa"/> 290 <param name="ref_file" ftype="fasta" value="bwa-mem-mt-genome.fa"/>
327 <param name="fastq_input_selector" value="paired"/> 291 <param name="fastq_input_selector" value="paired"/>
328 <param name="fastq_input1" ftype="fastqsanger" value="bwa-mem-fastq1.fq"/> 292 <param name="fastq_input1" ftype="fastqsanger" value="bwa-mem-fastq1.fq"/>
329 <param name="fastq_input2" ftype="fastqsanger" value="bwa-mem-fastq2.fq"/> 293 <param name="fastq_input2" ftype="fastqsanger" value="bwa-mem-fastq2.fq"/>
330 <param name="analysis_type_selector" value="illumina"/> 294 <param name="analysis_type_selector" value="illumina"/>
331 <output name="bam_output" ftype="bam" file="bwa-mem-test1.bam" lines_diff="2" /> 295 <output name="bam_output" ftype="bam" file="bwa-mem-test1.bam" lines_diff="2" />
332 </test> 296 </test>
297 <test>
298 <param name="reference_source_selector" value="history" />
299 <param name="ref_file" ftype="fasta" value="bwa-mem-mt-genome.fa"/>
300 <param name="fastq_input_selector" value="paired"/>
301 <param name="fastq_input1" ftype="fastqsanger" value="bwa-mem-fastq1.fq"/>
302 <param name="fastq_input2" ftype="fastqsanger" value="bwa-mem-fastq2.fq"/>
303 <param name="rg_selector" value="set"/>
304 <param name="ID" value="rg1"/>
305 <param name="analysis_type_selector" value="illumina"/>
306 <output name="bam_output" ftype="bam" file="bwa-mem-test2.bam" lines_diff="2" />
307 </test>
333 </tests> 308 </tests>
334 <stdio>
335 <exit_code range="1:" />
336 </stdio>
337 <help> 309 <help>
338
339 **What is does** 310 **What is does**
340 311
341 From http://arxiv.org/abs/1303.3997: 312 From http://arxiv.org/abs/1303.3997:
342 313
343 BWA-MEM is a new alignment algorithm for aligning sequence reads or long query sequences against a large reference genome such as human. 314 BWA-MEM is a new alignment algorithm for aligning sequence reads or long query sequences against a large reference genome such as human.
356 Galaxy allows four levels of control over bwa-mem options provided by **Select analysis mode** menu option. These are: 327 Galaxy allows four levels of control over bwa-mem options provided by **Select analysis mode** menu option. These are:
357 328
358 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] 329 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]
359 2. *PacBio mode*: The mode adjusted specifically for mapping of long PacBio subreads. Equivalent to the following command: bwa mem -k17 -W40 -r10 -A1 -B1 -O1 -E1 -L0 &lt;reference index&gt; &lt;PacBio dataset in fastq format&gt; 330 2. *PacBio mode*: The mode adjusted specifically for mapping of long PacBio subreads. Equivalent to the following command: bwa mem -k17 -W40 -r10 -A1 -B1 -O1 -E1 -L0 &lt;reference index&gt; &lt;PacBio dataset in fastq format&gt;
360 3. *Full list of options*: Allows access to all options through Galaxy interface. 331 3. *Full list of options*: Allows access to all options through Galaxy interface.
361 332
362 ------ 333 ------
363 334
364 **BWA MEM options** 335 **BWA MEM options**
365 336
366 Each Galaxy parameter widget corresponds to command line flags listed below: 337 Each Galaxy parameter widget corresponds to command line flags listed below:
405 376
406 -I FLOAT[,FLOAT[,INT[,INT]]] 377 -I FLOAT[,FLOAT[,INT[,INT]]]
407 specify the mean, standard deviation (10% of the mean if absent), max 378 specify the mean, standard deviation (10% of the mean if absent), max
408 (4 sigma from the mean if absent) and min of the insert size distribution. 379 (4 sigma from the mean if absent) and min of the insert size distribution.
409 FR orientation only. [inferred] 380 FR orientation only. [inferred]
410
411 381
412 @dataset_collections@ 382 @dataset_collections@
413 383
414 @RG@ 384 @RG@
415 385
416 @info@ 386 @info@
417
418
419
420 </help> 387 </help>
421 <citations> 388 <citations>
422 <citation type="doi">10.1093/bioinformatics/btp324</citation> 389 <citation type="doi">10.1093/bioinformatics/btp324</citation>
423 <citation type="doi">10.1093/bioinformatics/btp698</citation> 390 <citation type="doi">10.1093/bioinformatics/btp698</citation>
424 <citation type="bibtex">@misc{1303.3997, 391 <citation type="bibtex">@misc{1303.3997,