comparison bowtie_wrapper.xml @ 0:0c7e4eadfb3c draft

Uploaded tarball
author devteam
date Mon, 26 Nov 2012 09:43:28 -0500
parents
children e1c59c194b7b
comparison
equal deleted inserted replaced
-1:000000000000 0:0c7e4eadfb3c
1 <tool id="bowtie_wrapper" name="Map with Bowtie for Illumina" version="1.1.2">
2 <requirements>
3 <requirement type='package' version="0.12.7">bowtie</requirement>
4 </requirements>
5 <description></description>
6 <parallelism method="basic"></parallelism>
7 <command interpreter="python">
8 bowtie_wrapper.py
9 ## Hackish setting of number of threads
10 --threads="4"
11 ## Outputs
12 --output=$output
13 #if str( $singlePaired.sPaired ) == "single"
14 #if $output_unmapped_reads_l
15 --output_unmapped_reads=$output_unmapped_reads_l
16 #end if
17 #if $output_suppressed_reads_l
18 --output_suppressed_reads=$output_suppressed_reads_l
19 #end if
20 --galaxy_input_format="${singlePaired.sInput1.ext}"
21 #else
22 #if $output_unmapped_reads_l and $output_unmapped_reads_r
23 --output_unmapped_reads_l=$output_unmapped_reads_l
24 --output_unmapped_reads_r=$output_unmapped_reads_r
25 #end if
26 #if $output_suppressed_reads_l and $output_suppressed_reads_l
27 --output_suppressed_reads_l=$output_suppressed_reads_l
28 --output_suppressed_reads_r=$output_suppressed_reads_r
29 #end if
30 --galaxy_input_format="${singlePaired.pInput1.ext}"
31 #end if
32 ## Inputs
33 --dataType="solexa" ##this indicates that nucleotide base space is used in the wrapper
34 --suppressHeader=$suppressHeader
35 --genomeSource=$refGenomeSource.genomeSource
36 #if $refGenomeSource.genomeSource == "history":
37 ##index already exists
38 #if $refGenomeSource.ownFile.extension.startswith( 'bowtie_' ):
39 ##user previously built
40 --ref="${refGenomeSource.ownFile.extra_files_path}/${refGenomeSource.ownFile.metadata.base_name}"
41 --do_not_build_index
42 #else:
43 ##build index on the fly
44 --ref=$refGenomeSource.ownFile
45 --indexSettings=$refGenomeSource.indexParams.indexSettings
46 #if $refGenomeSource.indexParams.indexSettings == "indexFull":
47 --iautoB=$refGenomeSource.indexParams.autoBehavior.autoB
48 #if $refGenomeSource.indexParams.autoBehavior.autoB == "set":
49 --ipacked=$refGenomeSource.indexParams.autoBehavior.packed
50 --ibmax=$refGenomeSource.indexParams.autoBehavior.bmax
51 --ibmaxdivn=$refGenomeSource.indexParams.autoBehavior.bmaxdivn
52 --idcv=$refGenomeSource.indexParams.autoBehavior.dcv
53 #end if
54 --inodc=$refGenomeSource.indexParams.nodc
55 --inoref=$refGenomeSource.indexParams.noref
56 --ioffrate=$refGenomeSource.indexParams.offrate
57 --iftab=$refGenomeSource.indexParams.ftab
58 --intoa=$refGenomeSource.indexParams.ntoa
59 --iendian=$refGenomeSource.indexParams.endian
60 --iseed=$refGenomeSource.indexParams.seed
61 --icutoff=$refGenomeSource.indexParams.cutoff
62 #end if
63 #end if
64 #else
65 ##use pre-built index
66 --ref="${refGenomeSource.index.fields.path}"
67 #end if
68 --paired=$singlePaired.sPaired
69 #if $singlePaired.sPaired == "single":
70 --input1=$singlePaired.sInput1
71 --params=$singlePaired.sParams.sSettingsType
72 #if $singlePaired.sParams.sSettingsType == "full":
73 --skip=$singlePaired.sParams.sSkip
74 --alignLimit=$singlePaired.sParams.sAlignLimit
75 --trimH=$singlePaired.sParams.sTrimH
76 --trimL=$singlePaired.sParams.sTrimL
77 --mismatchSeed=$singlePaired.sParams.sMismatchSeed
78 --mismatchQual=$singlePaired.sParams.sMismatchQual
79 --seedLen=$singlePaired.sParams.sSeedLen
80 --rounding=$singlePaired.sParams.sRounding
81 --maqSoapAlign=$singlePaired.sParams.sMaqSoapAlign
82 --tryHard=$singlePaired.sParams.sTryHard
83 --valAlign=$singlePaired.sParams.sValAlign
84 --allValAligns=$singlePaired.sParams.sAllValAligns
85 --suppressAlign=$singlePaired.sParams.sSuppressAlign
86 --best=$singlePaired.sParams.sBestOption.sBest
87 #if $singlePaired.sParams.sBestOption.sBest == "doBest":
88 --maxBacktracks=$singlePaired.sParams.sBestOption.sdMaxBacktracks
89 --strata=$singlePaired.sParams.sBestOption.sdStrata
90 #else:
91 --maxBacktracks=$singlePaired.sParams.sBestOption.snMaxBacktracks
92 #end if
93 --offrate=$singlePaired.sParams.sOffrate
94 --seed=$singlePaired.sParams.sSeed
95 #end if
96 #else:
97 --input1=$singlePaired.pInput1
98 --input2=$singlePaired.pInput2
99 --maxInsert=$singlePaired.pMaxInsert
100 --mateOrient=$singlePaired.pMateOrient
101 --params=$singlePaired.pParams.pSettingsType
102 #if $singlePaired.pParams.pSettingsType == "full":
103 --skip=$singlePaired.pParams.pSkip
104 --alignLimit=$singlePaired.pParams.pAlignLimit
105 --trimH=$singlePaired.pParams.pTrimH
106 --trimL=$singlePaired.pParams.pTrimL
107 --mismatchSeed=$singlePaired.pParams.pMismatchSeed
108 --mismatchQual=$singlePaired.pParams.pMismatchQual
109 --seedLen=$singlePaired.pParams.pSeedLen
110 --rounding=$singlePaired.pParams.pRounding
111 --maqSoapAlign=$singlePaired.pParams.pMaqSoapAlign
112 --minInsert=$singlePaired.pParams.pMinInsert
113 --maxAlignAttempt=$singlePaired.pParams.pMaxAlignAttempt
114 --forwardAlign=$singlePaired.pParams.pForwardAlign
115 --reverseAlign=$singlePaired.pParams.pReverseAlign
116 --tryHard=$singlePaired.pParams.pTryHard
117 --valAlign=$singlePaired.pParams.pValAlign
118 --allValAligns=$singlePaired.pParams.pAllValAligns
119 --suppressAlign=$singlePaired.pParams.pSuppressAlign
120 --best=$singlePaired.pParams.pBestOption.pBest
121 #if $singlePaired.pParams.pBestOption.pBest == "doBest":
122 --maxBacktracks=$singlePaired.pParams.pBestOption.pdMaxBacktracks
123 --strata=$singlePaired.pParams.pBestOption.pdStrata
124 #else:
125 --maxBacktracks=$singlePaired.pParams.pBestOption.pnMaxBacktracks
126 #end if
127 --offrate=$singlePaired.pParams.pOffrate
128 --seed=$singlePaired.pParams.pSeed
129 #end if
130 #end if
131 </command>
132 <inputs>
133 <conditional name="refGenomeSource">
134 <param name="genomeSource" type="select" label="Will you select a reference genome from your history or use a built-in index?" help="Built-ins were indexed using default options">
135 <option value="indexed">Use a built-in index</option>
136 <option value="history">Use one from the history</option>
137 </param>
138 <when value="indexed">
139 <param name="index" type="select" label="Select a reference genome" help="if your genome of interest is not listed - contact Galaxy team">
140 <options from_data_table="bowtie_indexes">
141 <filter type="sort_by" column="2" />
142 <validator type="no_options" message="No indexes are available" />
143 </options>
144 </param>
145 </when>
146 <when value="history">
147 <param name="ownFile" type="data" format="bowtie_base_index,fasta" metadata_name="dbkey" label="Select the reference genome" />
148 <conditional name="indexParams">
149 <param name="indexSettings" type="select" label="Choose whether to use Default options for building indices or to Set your own" help="These settings are ignored when using a prebuilt index">
150 <option value="indexPreSet">Default</option>
151 <option value="indexFull">Set your own</option>
152 </param>
153 <when value="indexPreSet" />
154 <when value="indexFull">
155 <conditional name="autoBehavior">
156 <param name="autoB" type="select" label="Choose to use automatic or specified behavior for some parameters (-a)" help="Allows you to set --packed, --bmax, --bmaxdivn, and --dcv">
157 <option value="auto">Automatic behavior</option>
158 <option value="set">Set values (sets --noauto and allows others to be set)</option>
159 </param>
160 <when value="auto" />
161 <when value="set">
162 <param name="packed" type="select" label="Whether or not to use a packed representation for DNA strings (--packed)">
163 <option value="unpacked">Use regular representation</option>
164 <option value="packed">Use packed representation</option>
165 </param>
166 <param name="bmax" type="integer" value="-1" label="Maximum number of suffixes allowed in a block (--bmax)" help="-1 for not specified. Must be at least 1" />
167 <param name="bmaxdivn" type="integer" value="4" label="Maximum number of suffixes allowed in a block as a fraction of the length of the reference (--bmaxdivn)" />
168 <param name="dcv" type="integer" value="1024" label="The period for the difference-cover sample (--dcv)" />
169 </when>
170 </conditional>
171 <param name="nodc" type="select" label="Whether or not to disable the use of the difference-cover sample (--nodc)" help="Suffix sorting becomes quadratic-time in the worst case (with a very repetitive reference)">
172 <option value="dc">Use difference-cover sample</option>
173 <option value="nodc">Disable difference-cover sample</option>
174 </param>
175 <param name="noref" type="select" label="Whether or not to build the part of the reference index used only in paired-end alignment (-r)">
176 <option value="ref">Build all index files</option>
177 <option value="noref">Do not build paired-end alignment index files</option>
178 </param>
179 <param name="offrate" type="integer" value="5" label="How many rows get marked during annotation of some or all of the Burrows-Wheeler rows (-o)" />
180 <param name="ftab" type="integer" value="10" label="The size of the lookup table used to calculate an initial Burrows-Wheeler range with respect to the first n characters of the query (-t)" help="ftab is 4^(n+1) bytes" />
181 <param name="ntoa" type="select" label="Whether or not to convert Ns in the reference sequence to As (--ntoa)">
182 <option value="no">Do not convert Ns</option>
183 <option value="yes">Convert Ns to As</option>
184 </param>
185 <param name="endian" type="select" label="Endianness to use when serializing integers to the index file (--big/--little)" help="Little is most appropriate for Intel- and AMD-based architecture">
186 <option value="little">Little</option>
187 <option value="big">Big</option>
188 </param>
189 <param name="seed" type="integer" value="-1" label="Seed for the pseudorandom number generator (--seed)" help="Use -1 to use default" />
190 <param name="cutoff" type="integer" value="-1" label="Number of first bases of the reference sequence to index (--cutoff)" help="Use -1 to use default" />
191 </when> <!-- indexFull -->
192 </conditional> <!-- indexParams -->
193 </when> <!-- history -->
194 </conditional> <!-- refGenomeSource -->
195 <conditional name="singlePaired">
196 <param name="sPaired" type="select" label="Is this library mate-paired?">
197 <option value="single">Single-end</option>
198 <option value="paired">Paired-end</option>
199 </param>
200 <when value="single">
201 <param name="sInput1" type="data" format="fastqsanger,fastqillumina,fastqsolexa" label="FASTQ file" help="Must have ASCII encoded quality scores"/>
202 <conditional name="sParams">
203 <param name="sSettingsType" type="select" label="Bowtie settings to use" help="For most mapping needs use Commonly used settings. If you want full control use Full parameter list">
204 <option value="preSet">Commonly used</option>
205 <option value="full">Full parameter list</option>
206 </param>
207 <when value="preSet" />
208 <when value="full">
209 <param name="sSkip" type="integer" value="0" label="Skip the first n reads (-s)" />
210 <param name="sAlignLimit" type="integer" value="-1" label="Only align the first n reads (-u)" help="-1 for off" />
211 <param name="sTrimH" type="integer" value="0" label="Trim n bases from high-quality (left) end of each read before alignment (-5)" />
212 <param name="sTrimL" type="integer" value="0" label="Trim n bases from low-quality (right) end of each read before alignment (-3)" />
213 <param name="sMismatchSeed" type="integer" value="2" label="Maximum number of mismatches permitted in the seed (-n)" help="May be 0, 1, 2, or 3" />
214 <param name="sMismatchQual" type="integer" value="70" label="Maximum permitted total of quality values at mismatched read positions (-e)" />
215 <param name="sSeedLen" type="integer" value="28" label="Seed length (-l)" help="Minimum value is 5" />
216 <param name="sRounding" type="select" label="Whether or not to round to the nearest 10 and saturating at 30 (--nomaqround)">
217 <option value="round">Round to nearest 10</option>
218 <option value="noRound">Do not round to nearest 10</option>
219 </param>
220 <param name="sMaqSoapAlign" type="integer" value="-1" label="Number of mismatches for SOAP-like alignment policy (-v)" help="-1 for default MAQ-like alignment policy" />
221 <param name="sTryHard" type="select" label="Whether or not to try as hard as possible to find valid alignments when they exist (-y)" help="Tryhard mode is much slower than regular mode">
222 <option value="noTryHard">Do not try hard</option>
223 <option value="doTryHard">Try hard</option>
224 </param>
225 <param name="sValAlign" type="integer" value="1" label="Report up to n valid alignments per read (-k)" />
226 <param name="sAllValAligns" type="select" label="Whether or not to report all valid alignments per read (-a)">
227 <option value="noAllValAligns">Do not report all valid alignments</option>
228 <option value="doAllValAligns">Report all valid alignments</option>
229 </param>
230 <param name="sSuppressAlign" type="integer" value="-1" label="Suppress all alignments for a read if more than n reportable alignments exist (-m)" help="-1 for no limit" />
231 <param name="sMaxFile" type="boolean" truevalue="true" falsevalue="false" checked="False" label="Write all reads with a number of valid alignments exceeding the limit set with the -m option to a file (--max)" />
232 <param name="sUnmappedFile" type="boolean" truevalue="true" falsevalue="false" checked="False" label="Write all reads that could not be aligned to a file (--un)" />
233 <conditional name="sBestOption">
234 <param name="sBest" type="select" label="Whether or not to make Bowtie guarantee that reported singleton alignments are 'best' in terms of stratum and in terms of the quality values at the mismatched positions (--best)" help="Removes all strand bias. Only affects which alignments are reported by Bowtie. Runs slower with best option">
235 <option value="noBest">Do not use best</option>
236 <option value="doBest">Use best</option>
237 </param>
238 <when value="noBest">
239 <param name="snMaxBacktracks" type="integer" value="125" label="Maximum number of backtracks permitted when aligning a read (--maxbts)" />
240 </when>
241 <when value="doBest">
242 <param name="sdMaxBacktracks" type="integer" value="800" label="Maximum number of backtracks permitted when aligning a read (--maxbts)" />
243 <param name="sdStrata" type="select" label="Whether or not to report only those alignments that fall in the best stratum if many valid alignments exist and are reportable (--strata)">
244 <option value="noStrata">Do not use strata option</option>
245 <option value="doStrata">Use strata option</option>
246 </param>
247 </when>
248 </conditional> <!-- bestOption -->
249 <param name="sOffrate" type="integer" value="-1" label="Override the offrate of the index to n (-o)" help="-1 for default" />
250 <param name="sSeed" type="integer" value="-1" label="Seed for pseudo-random number generator (--seed)" help="-1 for default" />
251 </when> <!-- full -->
252 </conditional> <!-- sParams -->
253 </when> <!-- single -->
254 <when value="paired">
255 <param name="pInput1" type="data" format="fastqsanger,fastqillumina,fastqsolexa" label="Forward FASTQ file" help="Must have ASCII encoded quality scores"/>
256 <param name="pInput2" type="data" format="fastqsanger,fastqillumina,fastqsolexa" label="Reverse FASTQ file" help="File format must match the Forward FASTQ file">
257 <options options_filter_attribute="ext" from_parameter="tool.app.datatypes_registry.datatypes_by_extension" transform_lines="obj.keys()">>
258 <column name="name" index="0"/>
259 <column name="value" index="0"/>
260 <filter type="param_value" ref="pInput1" ref_attribute="ext" column="0"/>
261 </options>
262 </param>
263 <param name="pMaxInsert" type="integer" value="1000" label="Maximum insert size for valid paired-end alignments (-X)" />
264 <param name="pMateOrient" type="select" label="The upstream/downstream mate orientation for valid paired-end alignment against the forward reference strand (--fr/--rf/--ff)">
265 <option value="fr">FR (for Illumina)</option>
266 <option value="rf">RF</option>
267 <option value="ff">FF (for SOLiD)</option>
268 </param>
269 <conditional name="pParams">
270 <param name="pSettingsType" type="select" label="Bowtie settings to use" help="For most mapping needs use Commonly used settings. If you want full control use Full parameter list">
271 <option value="preSet">Commonly used</option>
272 <option value="full">Full parameter list</option>
273 </param>
274 <when value="preSet" />
275 <when value="full">
276 <param name="pSkip" type="integer" value="0" label="Skip the first n pairs (-s)" />
277 <param name="pAlignLimit" type="integer" value="-1" label="Only align the first n pairs (-u)" help="-1 for off" />
278 <param name="pTrimH" type="integer" value="0" label="Trim n bases from high-quality (left) end of each read before alignment (-5)" />
279 <param name="pTrimL" type="integer" value="0" label="Trim n bases from low-quality (right) end of each read before alignment (-3)" />
280 <param name="pMismatchSeed" type="integer" value="2" label="Maximum number of mismatches permitted in the seed (-n)" help="May be 0, 1, 2, or 3" />
281 <param name="pMismatchQual" type="integer" value="70" label="Maximum permitted total of quality values at mismatched read positions (-e)" />
282 <param name="pSeedLen" type="integer" value="28" label="Seed length (-l)" help="Minimum value is 5" />
283 <param name="pRounding" type="select" label="Whether or not to round to the nearest 10 and saturating at 30 (--nomaqround)">
284 <option value="round">Round to nearest 10</option>
285 <option value="noRound">Do not round to nearest 10</option>
286 </param>
287 <param name="pMaqSoapAlign" type="integer" value="-1" label="Number of mismatches for SOAP-like alignment policy (-v)" help="-1 for default MAQ-like alignment policy" />
288 <param name="pMinInsert" type="integer" value="0" label="Minimum insert size for valid paired-end alignments (-I)" />
289 <param name="pMaxAlignAttempt" type="integer" value="100" label="Maximum number of attempts Bowtie will make to match an alignment for one mate with an alignment for the opposite mate (--pairtries)" />
290 <param name="pForwardAlign" type="select" label="Choose whether or not to attempt to align the forward reference strand (--nofw)">
291 <option value="forward">Align against the forward reference strand</option>
292 <option value="noForward">Do not align against the forward reference strand</option>
293 </param>
294 <param name="pReverseAlign" type="select" label="Choose whether or not to align against the reverse-complement reference strand (--norc)">
295 <option value="reverse">Align against the reverse-complement reference strand</option>
296 <option value="noReverse">Do not align against the reverse-complement reference strand</option>
297 </param>
298 <param name="pTryHard" type="select" label="Whether or not to try as hard as possible to find valid alignments when they exist (-y)" help="Tryhard mode is much slower than regular mode">
299 <option value="noTryHard">Do not try hard</option>
300 <option value="doTryHard">Try hard</option>
301 </param>
302 <param name="pValAlign" type="integer" value="1" label="Report up to n valid arguments per pair (-k)" />
303 <param name="pAllValAligns" type="select" label="Whether or not to report all valid alignments per pair (-a)">
304 <option value="noAllValAligns">Do not report all valid alignments</option>
305 <option value="doAllValAligns">Report all valid alignments</option>
306 </param>
307 <param name="pSuppressAlign" type="integer" value="-1" label="Suppress all alignments for a pair if more than n reportable alignments exist (-m)" help="-1 for no limit" />
308 <param name="pMaxFile" type="boolean" truevalue="true" falsevalue="false" checked="False" label="Write all reads with a number of valid alignments exceeding the limit set with the -m option to a file (--max)" />
309 <param name="pUnmappedFile" type="boolean" truevalue="true" falsevalue="false" checked="False" label="Write all reads that could not be aligned to a file (--un)" />
310 <conditional name="pBestOption">
311 <param name="pBest" type="select" label="Whether or not to make Bowtie guarantee that reported singleton alignments are 'best' in terms of stratum and in terms of the quality values at the mismatched positions (--best)" help="Removes all strand bias. Only affects which alignments are reported by Bowtie. Runs slower with best option">
312 <option value="noBest">Do not use best</option>
313 <option value="doBest">Use best</option>
314 </param>
315 <when value="noBest">
316 <param name="pnMaxBacktracks" type="integer" value="125" label="Maximum number of backtracks permitted when aligning a read (--maxbts)" />
317 </when>
318 <when value="doBest">
319 <param name="pdMaxBacktracks" type="integer" value="800" label="Maximum number of backtracks permitted when aligning a read (--maxbts)" />
320 <param name="pdStrata" type="select" label="Whether or not to report only those alignments that fall in the best stratum if many valid alignments exist and are reportable (--strata)">
321 <option value="noStrata">Do not use strata option</option>
322 <option value="doStrata">Use strata option</option>
323 </param>
324 </when>
325 </conditional>
326 <param name="pOffrate" type="integer" value="-1" label="Override the offrate of the index to n (-o)" help="-1 for default" />
327 <param name="pSeed" type="integer" value="-1" label="Seed for pseudo-random number generator (--seed)" help="-1 for default" />
328 </when> <!-- full -->
329 </conditional> <!-- pParams -->
330 </when> <!-- paired -->
331 </conditional> <!-- singlePaired -->
332 <param name="suppressHeader" type="boolean" truevalue="true" falsevalue="false" checked="False" label="Suppress the header in the output SAM file" help="Bowtie produces SAM with several lines of header information by default" />
333 </inputs>
334 <outputs>
335 <data format="sam" name="output" label="${tool.name} on ${on_string}: mapped reads">
336 <actions>
337 <conditional name="refGenomeSource.genomeSource">
338 <when value="indexed">
339 <action type="metadata" name="dbkey">
340 <option type="from_data_table" name="bowtie_indexes" column="1" offset="0">
341 <filter type="param_value" column="0" value="#" compare="startswith" keep="False"/>
342 <filter type="param_value" ref="refGenomeSource.index" column="0"/>
343 </option>
344 </action>
345 </when>
346 <when value="history">
347 <action type="metadata" name="dbkey">
348 <option type="from_param" name="refGenomeSource.ownFile" param_attribute="dbkey" />
349 </action>
350 </when>
351 </conditional>
352 </actions>
353 </data>
354 <data format="fastq" name="output_suppressed_reads_l" label="${tool.name} on ${on_string}: suppressed reads (L)">
355 <filter>((
356 singlePaired['sPaired'] == "single" and
357 singlePaired['sParams']['sSettingsType'] == "full" and
358 singlePaired['sParams']['sMaxFile'] is True
359 ) or (
360 singlePaired['sPaired'] == "paired" and
361 singlePaired['pParams']['pSettingsType'] == "full" and
362 singlePaired['pParams']['pMaxFile'] is True
363 ))
364 </filter>
365 <actions>
366 <conditional name="singlePaired.sPaired">
367 <when value="single">
368 <action type="format">
369 <option type="from_param" name="singlePaired.sInput1" param_attribute="ext" />
370 </action>
371 </when>
372 <when value="paired">
373 <action type="format">
374 <option type="from_param" name="singlePaired.pInput1" param_attribute="ext" />
375 </action>
376 </when>
377 </conditional>
378 </actions>
379 </data>
380 <data format="fastq" name="output_suppressed_reads_r" label="${tool.name} on ${on_string}: suppressed reads (R)">
381 <filter>singlePaired['sPaired'] == "paired"</filter>
382 <filter>singlePaired['pParams']['pSettingsType'] == "full"</filter>
383 <filter>singlePaired['pParams']['pMaxFile'] is True</filter>
384 <actions>
385 <conditional name="singlePaired.sPaired">
386 <when value="single">
387 <action type="format">
388 <option type="from_param" name="singlePaired.sInput1" param_attribute="ext" />
389 </action>
390 </when>
391 <when value="paired">
392 <action type="format">
393 <option type="from_param" name="singlePaired.pInput1" param_attribute="ext" />
394 </action>
395 </when>
396 </conditional>
397 </actions>
398 </data>
399 <data format="fastq" name="output_unmapped_reads_l" label="${tool.name} on ${on_string}: unmapped reads (L)">
400 <filter>
401 ((
402 singlePaired['sPaired'] == "single" and
403 singlePaired['sParams']['sSettingsType'] == "full" and
404 singlePaired['sParams']['sUnmappedFile'] is True
405 ) or (
406 singlePaired['sPaired'] == "paired" and
407 singlePaired['pParams']['pSettingsType'] == "full" and
408 singlePaired['pParams']['pUnmappedFile'] is True
409 ))
410 </filter>
411 <actions>
412 <conditional name="singlePaired.sPaired">
413 <when value="single">
414 <action type="format">
415 <option type="from_param" name="singlePaired.sInput1" param_attribute="ext" />
416 </action>
417 </when>
418 <when value="paired">
419 <action type="format">
420 <option type="from_param" name="singlePaired.pInput1" param_attribute="ext" />
421 </action>
422 </when>
423 </conditional>
424 </actions>
425 </data>
426 <data format="fastq" name="output_unmapped_reads_r" label="${tool.name} on ${on_string}: unmapped reads (R)">
427 <filter>singlePaired['sPaired'] == "paired"</filter>
428 <filter>singlePaired['pParams']['pSettingsType'] == "full"</filter>
429 <filter>singlePaired['pParams']['pUnmappedFile'] is True</filter>
430 <actions>
431 <conditional name="singlePaired.sPaired">
432 <when value="single">
433 <action type="format">
434 <option type="from_param" name="singlePaired.sInput1" param_attribute="ext" />
435 </action>
436 </when>
437 <when value="paired">
438 <action type="format">
439 <option type="from_param" name="singlePaired.pInput1" param_attribute="ext" />
440 </action>
441 </when>
442 </conditional>
443 </actions>
444 </data>
445 </outputs>
446 <tests>
447 <test>
448 <!--
449 Bowtie command:
450 bowtie -q -p 4 -S +sam-nohead chrM_base test-data/bowtie_in2.fastqsanger > bowtie_out6_u.sam
451 sort bowtie_out6_u.sam > bowtie_out6.sam
452 -p is the number of threads, which is hardcoded above. You need to replace the + with 2 dashes.
453 chrM_base needs to be the base location/name of the index files.
454 -->
455 <param name="genomeSource" value="indexed" />
456 <!-- this is the backwards-compatible "unique value" for this index, not an actual path -->
457 <param name="index" value="equCab2chrM" />
458 <param name="sPaired" value="single" />
459 <param name="sInput1" ftype="fastqsanger" value="bowtie_in2.fastqsanger" />
460 <param name="sSettingsType" value="preSet" />
461 <param name="suppressHeader" value="true" />
462 <output name="output" ftype="sam" file="bowtie_out6.sam" sort="True" />
463 </test>
464 <test>
465 <!--
466 Bowtie command:
467 bowtie-build -f test-data/phiX.fasta phiX_base
468 bowtie -q -X 1000 +ff -p 4 -S +sam-nohead -n 2 -e 70 -l 28 +pairtries 100 +maxbts 800 +best +un bowtie_out8_u.fastq phiX_base -1 test-data/bowtie_in5.fastqsanger -2 test-data/bowtie_in6.fastqsanger > bowtie_out7_u.sam
469 sort bowtie_out7_u.sam > bowtie_out7.sam
470 sort bowtie_out8_u_1.sam > bowtie_out8_1.sam
471 sort bowtie_out8_u_2.sam > bowtie_out8_2.sam
472 Then also need to modify bowtie_out8_1.sam and bowtie_out8_2.sam so that all @ lines come before sequence lines.
473 -p is the number of threads, hardcoded above. You need to replace the + with 2 dashes.
474 The two unmapped output files will be named bowtie_out8_1.fastq and bowtie_out8_2.fastq.
475 chrM_base is the index files' location/base name.
476 -->
477 <param name="genomeSource" value="history" />
478 <param name="ownFile" value="phiX.fasta" />
479 <param name="indexSettings" value="indexPreSet" />
480 <param name="sPaired" value="paired" />
481 <param name="pInput1" ftype="fastqsanger" value="bowtie_in5.fastqsanger" />
482 <param name="pInput2" ftype="fastqsanger" value="bowtie_in6.fastqsanger" />
483 <param name="pMaxInsert" value="1000" />
484 <param name="pMateOrient" value="ff" />
485 <param name="pSettingsType" value="full" />
486 <param name="pSkip" value="0" />
487 <param name="pAlignLimit" value="-1" />
488 <param name="pTrimH" value="0" />
489 <param name="pTrimL" value="0" />
490 <param name="pMismatchSeed" value="2" />
491 <param name="pMismatchQual" value="70" />
492 <param name="pSeedLen" value="28" />
493 <param name="pRounding" value="round" />
494 <param name="pMaqSoapAlign" value="-1" />
495 <param name="pMinInsert" value="0" />
496 <param name="pMaxAlignAttempt" value="100" />
497 <param name="pForwardAlign" value="forward" />
498 <param name="pReverseAlign" value="reverse" />
499 <param name="pTryHard" value="noTryHard" />
500 <param name="pValAlign" value="1" />
501 <param name="pAllValAligns" value="noAllValAligns" />
502 <param name="pSuppressAlign" value="-1" />
503 <param name="pUnmappedFile" value="true" />
504 <param name="pMaxFile" value="false" />
505 <param name="pBest" value="doBest" />
506 <param name="pdMaxBacktracks" value="800" />
507 <param name="pdStrata" value="noStrata" />
508 <param name="pOffrate" value="-1" />
509 <param name="pSeed" value="-1" />
510 <param name="suppressHeader" value="true" />
511 <output name="output" ftype="sam" file="bowtie_out7.sam" sort="True" />
512 <output name="output_unmapped_reads_l" ftype="fastqsanger" file="bowtie_out8_1.fastq" sort="True" />
513 <output name="output_unmapped_reads_r" ftype="fastqsanger" file="bowtie_out8_2.fastq" sort="True" />
514 </test>
515 <!-- start testing of non-sanger variant fastq reads -->
516 <test>
517 <param name="genomeSource" value="history" />
518 <param name="ownFile" value="phiX.fasta" />
519 <param name="indexSettings" value="indexPreSet" />
520 <param name="sPaired" value="paired" />
521 <param name="pInput1" ftype="fastqillumina" value="bowtie_in5.fastqillumina" />
522 <param name="pInput2" ftype="fastqillumina" value="bowtie_in6.fastqillumina" />
523 <param name="pMaxInsert" value="1000" />
524 <param name="pMateOrient" value="ff" />
525 <param name="pSettingsType" value="full" />
526 <param name="pSkip" value="0" />
527 <param name="pAlignLimit" value="-1" />
528 <param name="pTrimH" value="0" />
529 <param name="pTrimL" value="0" />
530 <param name="pMismatchSeed" value="2" />
531 <param name="pMismatchQual" value="70" />
532 <param name="pSeedLen" value="28" />
533 <param name="pRounding" value="round" />
534 <param name="pMaqSoapAlign" value="-1" />
535 <param name="pMinInsert" value="0" />
536 <param name="pMaxAlignAttempt" value="100" />
537 <param name="pForwardAlign" value="forward" />
538 <param name="pReverseAlign" value="reverse" />
539 <param name="pTryHard" value="noTryHard" />
540 <param name="pValAlign" value="1" />
541 <param name="pAllValAligns" value="noAllValAligns" />
542 <param name="pSuppressAlign" value="-1" />
543 <param name="pUnmappedFile" value="true" />
544 <param name="pMaxFile" value="false" />
545 <param name="pBest" value="doBest" />
546 <param name="pdMaxBacktracks" value="800" />
547 <param name="pdStrata" value="noStrata" />
548 <param name="pOffrate" value="-1" />
549 <param name="pSeed" value="-1" />
550 <param name="suppressHeader" value="true" />
551 <output name="output" ftype="sam" file="bowtie_out7.sam" sort="True" />
552 <output name="output_unmapped_reads_l" ftype="fastqillumna" file="bowtie_out8_1.fastqillumina.sorted" sort="True" />
553 <output name="output_unmapped_reads_r" ftype="fastqillumna" file="bowtie_out8_2.fastqillumina.sorted" sort="True" />
554 </test>
555 <test>
556 <param name="genomeSource" value="history" />
557 <param name="ownFile" value="phiX.fasta" />
558 <param name="indexSettings" value="indexPreSet" />
559 <param name="sPaired" value="paired" />
560 <param name="pInput1" ftype="fastqsolexa" value="bowtie_in5.fastqsolexa" />
561 <param name="pInput2" ftype="fastqsolexa" value="bowtie_in6.fastqsolexa" />
562 <param name="pMaxInsert" value="1000" />
563 <param name="pMateOrient" value="ff" />
564 <param name="pSettingsType" value="full" />
565 <param name="pSkip" value="0" />
566 <param name="pAlignLimit" value="-1" />
567 <param name="pTrimH" value="0" />
568 <param name="pTrimL" value="0" />
569 <param name="pMismatchSeed" value="2" />
570 <param name="pMismatchQual" value="70" />
571 <param name="pSeedLen" value="28" />
572 <param name="pRounding" value="round" />
573 <param name="pMaqSoapAlign" value="-1" />
574 <param name="pMinInsert" value="0" />
575 <param name="pMaxAlignAttempt" value="100" />
576 <param name="pForwardAlign" value="forward" />
577 <param name="pReverseAlign" value="reverse" />
578 <param name="pTryHard" value="noTryHard" />
579 <param name="pValAlign" value="1" />
580 <param name="pAllValAligns" value="noAllValAligns" />
581 <param name="pSuppressAlign" value="-1" />
582 <param name="pUnmappedFile" value="true" />
583 <param name="pMaxFile" value="false" />
584 <param name="pBest" value="doBest" />
585 <param name="pdMaxBacktracks" value="800" />
586 <param name="pdStrata" value="noStrata" />
587 <param name="pOffrate" value="-1" />
588 <param name="pSeed" value="-1" />
589 <param name="suppressHeader" value="true" />
590 <output name="output" ftype="sam" file="bowtie_out7.sam" sort="True" />
591 <output name="output_unmapped_reads_l" ftype="fastqsolexa" file="bowtie_out8_1.fastqsolexa.sorted" sort="True" />
592 <output name="output_unmapped_reads_r" ftype="fastqsolexa" file="bowtie_out8_2.fastqsolexa.sorted" sort="True" />
593 </test>
594 <!-- end testing of non-sanger variant fastq reads -->
595 <test>
596 <!--
597 Bowtie command:
598 bowtie -q -p 4 -S +sam-nohead -n 2 -e 70 -l 28 +maxbts 125 -y -k 1 chrM_base test-data/bowtie_in2.fastqsanger > bowtie_out9_u.sam
599 sort bowtie_out9_u.sam > bowtie_out9.sam
600 -p is the number of threads, hardcoded above. You need to replace the + with 2 dashes.
601 chrM_base is the index files' location/base name.
602 -->
603 <param name="genomeSource" value="indexed" />
604 <!-- this is the backwards-compatible "unique value" for this index, not an actual path -->
605 <param name="index" value="equCab2chrM" />
606 <param name="sPaired" value="single" />
607 <param name="sInput1" ftype="fastqsanger" value="bowtie_in2.fastqsanger" />
608 <param name="sSettingsType" value="full" />
609 <param name="sSkip" value="0" />
610 <param name="sAlignLimit" value="-1" />
611 <param name="sTrimH" value="0" />
612 <param name="sTrimL" value="0" />
613 <param name="sMismatchSeed" value="2" />
614 <param name="sMismatchQual" value="70" />
615 <param name="sSeedLen" value="28" />
616 <param name="sRounding" value="round" />
617 <param name="sMaqSoapAlign" value="-1" />
618 <param name="sTryHard" value="doTryHard" />
619 <param name="sValAlign" value="1" />
620 <param name="sAllValAligns" value="noAllValAligns" />
621 <param name="sSuppressAlign" value="-1" />
622 <param name="sUnmappedFile" value="false" />
623 <param name="sMaxFile" value="false" />
624 <param name="sBest" value="noBest" />
625 <param name="snMaxBacktracks" value="125" />
626 <param name="sOffrate" value="-1" />
627 <param name="sSeed" value="-1" />
628 <param name="suppressHeader" value="true" />
629 <output name="output" ftype="sam" file="bowtie_out9.sam" sort="True" />
630 </test>
631 <test>
632 <!--
633 Bowtie command:
634 bowtie-build +offrate 5 +ftabchars 10 +little -f test-data/phiX.fasta phiX_base
635 bowtie -q -X 1000 +ff -p 4 -S +sam-nohead phiX_base -1 test-data/bowtie_in5.fastqsanger -2 test-data/bowtie_in6.fastqsanger > bowtie_out10_u.sam
636 sort bowtie_out10_u.sam > bowtie_out10.sam
637 -p is the number of threads, hardcoded above. You need to replace the + with 2 dashes.
638 chrM_base is the index files' location/base name.
639 -->
640 <param name="genomeSource" value="history" />
641 <param name="ownFile" value="phiX.fasta" />
642 <param name="indexSettings" value="indexFull" />
643 <param name="autoB" value="auto" />
644 <param name="nodc" value="dc" />
645 <param name="noref" value="ref" />
646 <param name="offrate" value="5" />
647 <param name="ftab" value="10" />
648 <param name="ntoa" value="no" />
649 <param name="endian" value="little" />
650 <param name="seed" value="-1" />
651 <param name="cutoff" value="-1" />
652 <param name="sPaired" value="paired" />
653 <param name="pInput1" ftype="fastqsanger" value="bowtie_in5.fastqsanger" />
654 <param name="pInput2" ftype="fastqsanger" value="bowtie_in6.fastqsanger" />
655 <param name="pMaxInsert" value="1000" />
656 <param name="pMateOrient" value="ff" />
657 <param name="pSettingsType" value="preSet" />
658 <param name="suppressHeader" value="true" />
659 <output name="output" ftype="sam" file="bowtie_out10.sam" sort="True" />
660 </test>
661 </tests>
662
663 <help>
664
665 **What it does**
666
667 Bowtie_ is a short read aligner designed to be ultrafast and memory-efficient. It is developed by Ben Langmead and Cole Trapnell. Please cite: Langmead B, Trapnell C, Pop M, Salzberg SL. Ultrafast and memory-efficient alignment of short DNA sequences to the human genome. Genome Biology 10:R25.
668
669 .. _Bowtie: http://bowtie-bio.sourceforge.net/index.shtml
670
671 ------
672
673 **Know what you are doing**
674
675 .. class:: warningmark
676
677 There is no such thing (yet) as an automated gearshift in short read mapping. It is all like stick-shift driving in San Francisco. In other words = running this tool with default parameters will probably not give you meaningful results. A way to deal with this is to **understand** the parameters by carefully reading the `documentation`__ and experimenting. Fortunately, Galaxy makes experimenting easy.
678
679 .. __: http://bowtie-bio.sourceforge.net/index.shtml
680
681 ------
682
683 **Input formats**
684
685 Bowtie accepts files in Sanger FASTQ format. Use the FASTQ Groomer to prepare your files.
686
687 ------
688
689 **A Note on Built-in Reference Genomes**
690
691 The default variant for all genomes is "Full", defined as all primary chromosomes (or scaffolds/contigs) including mitochondrial plus associated unmapped, plasmid, and other segments. When only one version of a genome is available in this tool, it represents the default "Full" variant. Some genomes will have more than one variant available. The "Canonical Male" or sometimes simply "Canonical" variant contains the primary chromosomes for a genome. For example a human "Canonical" variant contains chr1-chr22, chrX, chrY, and chrM. The "Canonical Female" variant contains the primary chromosomes excluding chrY.
692
693 ------
694
695 **Outputs**
696
697 The output is in SAM format, and has the following columns::
698
699 Column Description
700 -------- --------------------------------------------------------
701 1 QNAME Query (pair) NAME
702 2 FLAG bitwise FLAG
703 3 RNAME Reference sequence NAME
704 4 POS 1-based leftmost POSition/coordinate of clipped sequence
705 5 MAPQ MAPping Quality (Phred-scaled)
706 6 CIGAR extended CIGAR string
707 7 MRNM Mate Reference sequence NaMe ('=' if same as RNAME)
708 8 MPOS 1-based Mate POSition
709 9 ISIZE Inferred insert SIZE
710 10 SEQ query SEQuence on the same strand as the reference
711 11 QUAL query QUALity (ASCII-33 gives the Phred base quality)
712 12 OPT variable OPTional fields in the format TAG:VTYPE:VALUE
713
714 The flags are as follows::
715
716 Flag Description
717 ------ -------------------------------------
718 0x0001 the read is paired in sequencing
719 0x0002 the read is mapped in a proper pair
720 0x0004 the query sequence itself is unmapped
721 0x0008 the mate is unmapped
722 0x0010 strand of the query (1 for reverse)
723 0x0020 strand of the mate
724 0x0040 the read is the first read in a pair
725 0x0080 the read is the second read in a pair
726 0x0100 the alignment is not primary
727
728 It looks like this (scroll sideways to see the entire example)::
729
730 QNAME FLAG RNAME POS MAPQ CIAGR MRNM MPOS ISIZE SEQ QUAL OPT
731 HWI-EAS91_1_30788AAXX:1:1:1761:343 4 * 0 0 * * 0 0 AAAAAAANNAAAAAAAAAAAAAAAAAAAAAAAAAAACNNANNGAGTNGNNNNNNNGCTTCCCACAGNNCTGG hhhhhhh;;hhhhhhhhhhh^hOhhhhghhhfhhhgh;;h;;hhhh;h;;;;;;;hhhhhhghhhh;;Phhh
732 HWI-EAS91_1_30788AAXX:1:1:1578:331 4 * 0 0 * * 0 0 GTATAGANNAATAAGAAAAAAAAAAATGAAGACTTTCNNANNTCTGNANNNNNNNTCTTTTTTCAGNNGTAG hhhhhhh;;hhhhhhhhhhhhhhhhhhhhhhhhhhhh;;h;;hhhh;h;;;;;;;hhhhhhhhhhh;;hhVh
733
734 -------
735
736 **Bowtie settings**
737
738 All of the options have a default value. You can change any of them. Most of the options in Bowtie have been implemented here.
739
740 ------
741
742 **Bowtie parameter list**
743
744 This is an exhaustive list of Bowtie options:
745
746 For indexing (bowtie-build)::
747
748 -a No auto behavior. Disable the default behavior where bowtie automatically
749 selects values for --bmax/--bmaxdivn/--dcv/--packed parameters according
750 to the memory available. [off]
751 --packed Packing. Use a packed representation for DNA strings. [auto]
752 --bmax INT Suffix maximum. The maximum number of suffixes allowed in a block. [auto]
753 --bmaxdivn INT Suffix maximum fraction. The maximum number of suffixes allowed in a block
754 expressed as a fraction of the length of the reference. [4]
755 --dcv INT Difference-cover sample. Use INT as the period for the difference-cover
756 sample. [1024]
757 --nodc INT No difference-cover sample. Disable the difference-cover sample. [off]
758 -r No reference indexes. Do not build the NAME.3.ebwt and NAME.4.ebwt portions
759 of the index. Used only for paired-end alignment. [off]
760 -o Offrate. How many Burrows-Wheeler rows get marked by the indexer. The
761 indexer will mark every 2^INT rows. The marked rows correspond to rows on
762 the genome. [5]
763 -t INT Ftab. The lookup table used to calculate an initial Burrows-Wheeler range
764 with respect to the first INT characters of the query. Ftab is 4^INT+1
765 bytes. [10]
766 --ntoa N conversion. Convert Ns to As before building the index. Otherwise, Ns are
767 simply excluded from the index and Bowtie will not find alignments that
768 overlap them. [off]
769 --big Endianness. Endianness to use when serializing integers to the index file. [off]
770 --little Endianness. [--little]
771 --seed INT Random seed. Use INT as the seed for the pseudo-random number generator. [off]
772 --cutoff INT Cutoff. Index only the first INT bases of the reference sequences (cumulative
773 across sequences) and ignore the rest. [off]
774
775 For aligning (bowtie)::
776
777 -s INT Skip. Do not align the first INT reads or pairs in the input. [off]
778 -u INT Align limit. Only align the first INT reads/pairs from the input. [no limit]
779 -5 INT High-quality trim. Trim INT bases from the high-quality (left) end of each
780 read before alignment. [0]
781 -3 INT Low-quality trim. Trim INT bases from the low-quality (right) end of each
782 read before alignment. [0]
783 -n INT Mismatch seed. Maximum number of mismatches permitted in the seed (defined
784 with seed length option). Can be 0, 1, 2, or 3. [2]
785 -e INT Mismatch quality. Maximum permitted total of quality values at mismatched
786 read positions. Bowtie rounds quality values to the nearest 10 and saturates
787 at 30. [70]
788 -l INT Seed length. The number of bases on the high-quality end of the read to
789 which the -n ceiling applies. Must be at least 5. [28]
790 --nomaqround Suppress MAQ rounding. Values are internally rounded to the nearest 10 and
791 saturate at 30. This options turns off that rounding. [off]
792 -v INT MAQ- or SOAP-like alignment policy. This option turns off the default
793 MAQ-like alignment policy in favor of a SOAP-like one. End-to-end alignments
794 with at most INT mismatches. [off]
795 -I INT Minimum insert. The minimum insert size for valid paired-end alignments.
796 Does checking on untrimmed reads if -5 or -3 is used. [0]
797 -X INT Maximum insert. The maximum insert size for valid paired-end alignments.
798 Does checking on untrimmed reads if -5 or -3 is used. [250]
799 --fr Mate orientation. The upstream/downstream mate orientations for a valid
800 paired-end alignment against the forward reference strand. [--fr]
801 --rf Mate orientation. [off]
802 --ff Mate orientation. [off]
803 --pairtries INT Maximum alignment attempts for paired-end data. [100]
804 --nofw No forward aligning. Choosing this option means that Bowtie will not attempt
805 to align against the forward reference strand. [off]
806 --norc No reverse-complement aligning. Setting this will mean that Bowtie will not
807 attempt to align against the reverse-complement reference strand. [off]
808 --un FILENAME Write all reads that could not be aligned to file [off]
809 --max FILENAME Write all reads with a number of valid alignments exceeding the limit
810 set with the -m option to file [off]
811 --maxbts INT Maximum backtracks. The maximum number of backtracks permitted when aligning
812 a read in -n 2 or -n 3 mode. [125 without --best] [800 with --best]
813 -y Try hard. Try as hard as possible to find valid alignments when they exist,
814 including paired-end alignments. [off]
815 --chunkmbs INT Thread memory. The number of megabytes of memory a given thread is given to
816 store path descriptors in --best mode. [32]
817 -k INT Valid alignments. The number of valid alignments per read or pair. [off]
818 -a All valid alignments. Choosing this means that all valid alignments per read
819 or pair will be reported. [off]
820 -m INT Suppress alignments. Suppress all alignments for a particular read or pair
821 if more than INT reportable alignments exist for it. [no limit]
822 --best Best mode. Make Bowtie guarantee that reported singleton alignments are
823 "best" in terms of stratum (the number of mismatches) and quality values at
824 mismatched position. [off]
825 --strata Best strata. When running in best mode, report alignments that fall into the
826 best stratum if there are ones falling into more than one. [off]
827 -o INT Offrate override. Override the offrate of the index with INT. Some row
828 markings are discarded when index read into memory. INT must be greater than
829 the value used to build the index (default: 5). [off]
830 --seed INT Random seed. Use INT as the seed for the pseudo-random number generator. [off]
831 --snpphred INT Use INT as the SNP penalty for decoding colorspace alignments. True ratio of
832 SNPs per base in the subject genome. [see --snpfrac]
833 --snpfrac DEC Use DEC as the estimated ratio of SNPs per base when decoding colorspace
834 alignments. [0.001]
835 --col-keepends Keep the extreme-end nucleotides and qualities when decoding colorspace
836 alignments. [off]
837
838 </help>
839 </tool>