3
|
1 <tool id="bowtie2" name="Bowtie2" version="0.4">
|
2
|
2 <!-- Wrapper compatible with Bowtie version 2.2.4 -->
|
|
3 <description>- map reads against reference genome</description>
|
0
|
4 <version_command>bowtie2 --version</version_command>
|
|
5 <requirements>
|
2
|
6 <requirement type="package" version="2.2.4">bowtie2</requirement>
|
0
|
7 <requirement type="package" version="0.1.18">samtools</requirement>
|
|
8 </requirements>
|
|
9 <command>
|
2
|
10
|
0
|
11 ## prepare bowtie2 index
|
|
12 #set index_path = ''
|
|
13 #if str($reference_genome.source) == "history":
|
2
|
14 bowtie2-build "$reference_genome.own_file" genome &&
|
|
15 ln -s "$reference_genome.own_file" genome.fa &&
|
0
|
16 #set index_path = 'genome'
|
|
17 #else:
|
|
18 #set index_path = $reference_genome.index.fields.path
|
|
19 #end if
|
|
20
|
|
21 ## execute bowtie2
|
2
|
22
|
0
|
23 bowtie2
|
|
24
|
|
25 ## number of threads
|
|
26 -p \${GALAXY_SLOTS:-4}
|
|
27
|
|
28 ## index file path
|
|
29 -x $index_path
|
|
30
|
|
31
|
2
|
32 ## Fastq inputs
|
|
33 #if str( $library.type ) == "single":
|
3
|
34 -U "${library.input_1}"
|
2
|
35 #if str( $library.unaligned_file ) == "true":
|
0
|
36 --un $output_unaligned_reads_l
|
|
37 #end if
|
2
|
38 #elif str( $library.type ) == "paired":
|
3
|
39 -1 "${library.input_1}"
|
|
40 -2 "${library.input_2}"
|
2
|
41 #if str( $library.paired_options.paired_options_selector ) == "yes":
|
|
42 -I "${library.paired_options.I}"
|
|
43 -X "${library.paired_options.X}"
|
|
44 ${library.paired_options.fr_rf_ff}
|
|
45 ${library.paired_options.no_mixed}
|
|
46 ${library.paired_options.no_discordant}
|
|
47 ${library.paired_options.dovetail}
|
|
48 ${library.paired_options.no_contain}
|
|
49 ${library.paired_options.no_overlap}
|
|
50 #end if
|
|
51 #if str( $library.unaligned_file ) == "true":
|
|
52 --un-conc $output_unaligned_reads_l
|
|
53 #end if
|
0
|
54 #else
|
2
|
55 ## prepare collection
|
|
56 -1 $library.input_1.forward
|
|
57 -2 $library.input_1.reverse
|
|
58 #if str( $library.paired_options.paired_options_selector ) == "yes":
|
|
59 -I "${library.paired_options.I}"
|
|
60 -X "${library.paired_options.X}"
|
|
61 ${library.paired_options.fr_rf_ff}
|
|
62 ${library.paired_options.no_mixed}
|
|
63 ${library.paired_options.no_discordant}
|
|
64 ${library.paired_options.dovetail}
|
|
65 ${library.paired_options.no_contain}
|
|
66 ${library.paired_options.no_overlap}
|
|
67 #end if
|
|
68 #if str( $library.unaligned_file ) == "true":
|
0
|
69 --un-conc $output_unaligned_reads_l
|
|
70 #end if
|
|
71 #end if
|
|
72
|
2
|
73 ## Readgroups
|
|
74 #if str( $read_group.read_group_selector ) == "yes":
|
|
75 --rg-id "${read_group.rgid}"
|
|
76 --rg "SM:${read_group.rgsm}"
|
|
77 --rg "LB:${read_group.rglb}"
|
|
78 --rg "PL:${read_group.rgpl}"
|
|
79 #end if
|
0
|
80
|
2
|
81 ## Analysis type
|
|
82 #if ( str( $analysis_type.analysis_type_selector ) == "simple" and str( $analysis_type.presets ) != "no_presets" ):
|
|
83 $analysis_type.presets
|
|
84 #elif str( $analysis_type.analysis_type_selector ) == "full":
|
|
85 #if str( $analysis_type.input_options.input_options_selector ) == "yes":
|
|
86 --skip "${analysis_type.input_options.skip}"
|
|
87 --qupto "${analysis_type.input_options.qupto}"
|
|
88 --trim5 "${analysis_type.input_options.trim5}"
|
|
89 --trim3 "${analysis_type.input_options.trim3}"
|
|
90 ${analysis_type.input_options.qv_encoding}
|
3
|
91 ${analysis_type.input_options.solexa_quals}
|
|
92 ${analysis_type.input_options.int_quals}
|
0
|
93 #end if
|
2
|
94
|
|
95 #if str( $analysis_type.alignment_options.alignment_options_selector ) == "yes":
|
3
|
96 -N "${analysis_type.alignment_options.N}"
|
|
97 -L "${analysis_type.alignment_options.L}"
|
|
98 -i "${analysis_type.alignment_options.i}"
|
|
99 --n-ceil "${analysis_type.alignment_options.n_ceil}"
|
|
100 --dpad "${analysis_type.alignment_options.dpad}"
|
|
101 --gbar "${analysis_type.alignment_options.gbar}"
|
|
102 ${analysis_type.alignment_options.ignore_quals}
|
2
|
103 ${analysis_type.alignment_options.nofw}
|
|
104 ${analysis_type.alignment_options.norc}
|
|
105 ${analysis_type.alignment_options.no_1mm_upfront}
|
|
106 #if str( $analysis_type.alignment_options.align_mode.align_mode_selector ) == "end-to-end":
|
|
107 --end-to-end
|
3
|
108 --score-min "${analysis_type.alignment_options.align_mode.score_min_ete}"
|
2
|
109 #elif str( $analysis_type.alignment_options.align_mode.align_mode_selector ) == "local":
|
|
110 --local
|
3
|
111 --score-min "${analysis_type.alignment_options.align_mode.score_min_loc}"
|
2
|
112 #end if
|
|
113 #end if
|
|
114
|
|
115 #if str( $analysis_type.scoring_options.scoring_options_selector ) == "yes":
|
3
|
116 #if ( str( $analysis_type.alignment_options.alignment_options_selector ) == "yes" and str( $analysis_type.alignment_options.align_mode.align_mode_selector ) == "local" ):
|
|
117 --ma "${analysis_type.scoring_options.ma}"
|
|
118 #end if
|
2
|
119 --mp "${analysis_type.scoring_options.mp}"
|
|
120 --np "${analysis_type.scoring_options.np}"
|
|
121 --rdg "${analysis_type.scoring_options.rdg_read_open},${analysis_type.scoring_options.rdg_read_extend}"
|
|
122 --rfg "${analysis_type.scoring_options.rfg_ref_open},${analysis_type.scoring_options.rfg_ref_extend}"
|
|
123 #end if
|
|
124
|
|
125 #if str( $analysis_type.reporting_options.reporting_options_selector ) == "k":
|
|
126 -k "${analysis_type.reporting_options.k}"
|
|
127 #elif str( $analysis_type.reporting_options.reporting_options_selector ) == "a":
|
|
128 -a
|
|
129 #end if
|
|
130
|
|
131 #if str( $analysis_type.effort_options.effort_options_selector ) == "yes":
|
|
132 -D "${analysis_type.effort_options.D}"
|
|
133 -R "${analysis_type.effort_options.R}"
|
|
134 #end if
|
|
135
|
|
136 #if str( $analysis_type.sam_options.sam_options_selector ) == "yes":
|
3
|
137 ${analysis_type.sam_options.no_unal}
|
|
138 ${analysis_type.sam_options.omit_sec_seq}
|
2
|
139 #end if
|
|
140
|
|
141 #if str( $analysis_type.other_options.other_options_selector ) == "yes":
|
3
|
142 ${analysis_type.other_options.non_deterministic}
|
2
|
143 --seed "${analysis_type.other_options.seed}"
|
0
|
144 #end if
|
|
145
|
2
|
146 #elif str( $analysis_type.analysis_type_selector ) == "cline":
|
|
147 ${analysis_type.cline}
|
|
148 #end if
|
0
|
149
|
2
|
150 ## view/sort and output BAM file
|
0
|
151 | samtools view -Su - | samtools sort -o - - > $output
|
3
|
152
|
0
|
153 ## rename unaligned sequence files
|
|
154 #if $library.type == "paired" and $output_unaligned_reads_l and $output_unaligned_reads_r:
|
|
155 #set left = str($output_unaligned_reads_l).replace( '.dat', '.1.dat' )
|
|
156 #set right = str($output_unaligned_reads_l).replace( '.dat', '.2.dat' )
|
|
157
|
|
158 ; mv $left $output_unaligned_reads_l;
|
|
159 mv $right $output_unaligned_reads_r
|
|
160 #end if
|
2
|
161
|
0
|
162 </command>
|
|
163
|
|
164 <!-- basic error handling -->
|
|
165 <stdio>
|
|
166 <exit_code range="1:" level="fatal" description="Tool exception" />
|
|
167 </stdio>
|
|
168
|
|
169 <inputs>
|
|
170 <!-- single/paired -->
|
|
171 <conditional name="library">
|
2
|
172 <param name="type" type="select" label="Is this single or paired library">
|
0
|
173 <option value="single">Single-end</option>
|
|
174 <option value="paired">Paired-end</option>
|
2
|
175 <option value="paired_collection">Paired-end Dataset Collection</option>
|
0
|
176 </param>
|
2
|
177
|
0
|
178 <when value="single">
|
|
179 <param name="input_1" format="fastqsanger" type="data" label="FASTQ file" help="Nucleotide-space: Must have Sanger-scaled quality values with ASCII offset 33"/>
|
2
|
180 <param name="unaligned_file" type="boolean" truevalue="true" falsevalue="false" checked="False" label="Write unaligned reads (in fastq format) to separate file(s)" help="--un/--un-conc; This triggers --un parameter for single reads and --un-conc for paired reads" />
|
0
|
181 </when>
|
|
182 <when value="paired">
|
|
183 <param name="input_1" format="fastqsanger" type="data" label="FASTQ file" help="Nucleotide-space: Must have Sanger-scaled quality values with ASCII offset 33" />
|
|
184 <param name="input_2" format="fastqsanger" type="data" label="FASTQ file" help="Nucleotide-space: Must have Sanger-scaled quality values with ASCII offset 33" />
|
2
|
185 <param name="unaligned_file" type="boolean" truevalue="true" falsevalue="false" checked="False" label="Write unaligned reads (in fastq format) to separate file(s)" help="--un/--un-conc; This triggers --un parameter for single reads and --un-conc for paired reads" />
|
|
186 <conditional name="paired_options">
|
|
187 <param name="paired_options_selector" type="select" label="Do you want to set paired-end options?" help="See "Alignment Options" section of Help below for information">
|
|
188 <option value="no" selected="True">No</option>
|
|
189 <option value="yes">Yes</option>
|
|
190 </param>
|
|
191 <when value="yes">
|
|
192 <param name="I" type="integer" value="0" min="0" label="Set the minimum fragment length for valid paired-end alignments" help="-I/--minins; E.g. if `-I 60` is specified and a paired-end alignment consists of two 20-bp alignments in the appropriate orientation with a 20-bp gap between them, that alignment is considered valid (as long as `-X` is also satisfied). A 19-bp gap would not be valid in that case. If trimming options `-3` or `-5` are also used, the `-I` constraint is applied with respect to the untrimmed mates. The larger the difference between `-I` and `-X`, the slower Bowtie 2 will run. This is because larger differences bewteen `-I` and `-X` require that Bowtie 2 scan a larger window to determine if a concordant alignment exists. For typical fragment length ranges (200 to 400 nucleotides), Bowtie 2 is very efficient. Default=0"/>
|
3
|
193 <param name="X" type="integer" value="500" min="0" label="Set the maximum fragment length for valid paired-end alignments" help="-X/--maxins; E.g. if `-X 100` is specified and a paired-end alignment consists of two 20-bp alignments in the proper orientation with a 60-bp gap between them, that alignment is considered valid (as long as `-I` is also satisfied). A 61-bp gap would not be valid in that case. If trimming options `-3` or `-5` are also used, the `-X` constraint is applied with respect to the untrimmed mates, not the trimmed mates; Default=500"/>
|
|
194 <param name="fr_rf_ff" type="select" display="radio" label="Select the upstream/downstream mate orientations for a valid paired-end alignment against the forward reference strand" help="--fr, --rf, or --ff; E.g., if `--fr` is specified and there is a candidate paired-end alignment where mate 1 appears upstream of the reverse complement of mate 2 and the fragment length constraints (`-I` and `-X`) are met, that alignment is valid. Also, if mate 2 appears upstream of the reverse complement of mate 1 and all other constraints are met, that too is valid. `--rf` likewise requires that an upstream mate1 be reverse-complemented and a downstream mate2 be forward-oriented. `--ff` requires both an upstream mate 1 and a downstream mate 2 to be forward-oriented; Default=--fr (appropriate for Illumina's Paired-end Sequencing Assay)">
|
2
|
195 <option value="--fr" selected="True">--fr</option>
|
3
|
196 <option value="--rf">--rf</option>
|
2
|
197 <option value="--ff">--ff</option>
|
|
198 </param>
|
|
199 <param name="no_mixed" type="boolean" truevalue="--no-mixed" falsevalue="" checked="False" label="Disable no-mixed behavior" help="--no-mixed; By default, when `bowtie2` cannot find a concordant or discordant alignment for a pair, it then tries to find alignments for the individual mates; default=False"/>
|
|
200 <param name="no_discordant" type="boolean" truevalue="--no-discordant" falsevalue="" checked="False" label="Disable no-discordant behavior" help="--no-discordant; By default, `bowtie2` looks for discordant alignments if it cannot find any concordant alignments. A discordant alignment is an alignment where both mates align uniquely, but that does not satisfy the paired-end constraints (`--fr`/`--rf`/`--ff`, `-I`, `-X`); default=False"/>
|
3
|
201 <param name="dovetail" type="boolean" truevalue="--dovetail" falsevalue="" checked="False" label="Allow mate dovetailing" help="--dovetail; If the mates `dovetail`, that is if one mate alignment extends past the beginning of the other such that the wrong mate begins upstream, consider that to be concordant. Default=False"/>
|
|
202 <param name="no_contain" type="boolean" truevalue="--no-contain" falsevalue="" checked="False" label="Allow one mate alignment to contain another" help="--no-contain; If one mate alignment contains the other, consider that to be non-concordant. Default=False"/>
|
|
203 <param name="no_overlap" type="boolean" truevalue="--no-overlap" falsevalue="" checked="False" label="Allow mate alignments to overlap" help="--no-overlap; If one mate alignment overlaps the other at all, consider that to be non-concordant. Default=False"/>
|
2
|
204 </when>
|
|
205 <when value="no">
|
|
206 <!-- do nothing -->
|
|
207 </when>
|
|
208 </conditional>
|
|
209 </when>
|
|
210 <when value="paired_collection">
|
|
211 <param name="input_1" format="fastqsanger" type="data_collection" collection_type="paired" label="FASTQ Paired Dataset" help="Nucleotide-space: Must have Sanger-scaled quality values with ASCII offset 33" />
|
|
212 <param name="unaligned_file" type="boolean" truevalue="true" falsevalue="false" checked="False" label="Write unaligned reads (in fastq format) to separate file(s)" help="--un/--un-conc; This triggers --un parameter for single reads and --un-conc for paired reads" />
|
|
213 <conditional name="paired_options">
|
|
214 <param name="paired_options_selector" type="select" label="Do you want to set paired-end options?" help="See "Alignment Options" section of Help below for information">
|
|
215 <option value="no" selected="True">No</option>
|
|
216 <option value="yes">Yes</option>
|
|
217 </param>
|
|
218 <when value="yes">
|
|
219 <param name="I" type="integer" value="0" min="0" label="Set the minimum fragment length for valid paired-end alignments" help="-I/--minins; E.g. if `-I 60` is specified and a paired-end alignment consists of two 20-bp alignments in the appropriate orientation with a 20-bp gap between them, that alignment is considered valid (as long as `-X` is also satisfied). A 19-bp gap would not be valid in that case. If trimming options `-3` or `-5` are also used, the `-I` constraint is applied with respect to the untrimmed mates. The larger the difference between `-I` and `-X`, the slower Bowtie 2 will run. This is because larger differences bewteen `-I` and `-X` require that Bowtie 2 scan a larger window to determine if a concordant alignment exists. For typical fragment length ranges (200 to 400 nucleotides), Bowtie 2 is very efficient. Default=0"/>
|
3
|
220 <param name="X" type="integer" value="500" min="0" label="Set the maximum fragment length for valid paired-end alignments" help="-X/--maxins; E.g. if `-X 100` is specified and a paired-end alignment consists of two 20-bp alignments in the proper orientation with a 60-bp gap between them, that alignment is considered valid (as long as `-I` is also satisfied). A 61-bp gap would not be valid in that case. If trimming options `-3` or `-5` are also used, the `-X` constraint is applied with respect to the untrimmed mates, not the trimmed mates; Default=500"/>
|
|
221 <param name="fr_rf_ff" type="select" display="radio" label="Select the upstream/downstream mate orientations for a valid paired-end alignment against the forward reference strand" help="--fr, --rf, or --ff; E.g., if `--fr` is specified and there is a candidate paired-end alignment where mate 1 appears upstream of the reverse complement of mate 2 and the fragment length constraints (`-I` and `-X`) are met, that alignment is valid. Also, if mate 2 appears upstream of the reverse complement of mate 1 and all other constraints are met, that too is valid. `--rf` likewise requires that an upstream mate1 be reverse-complemented and a downstream mate2 be forward-oriented. `--ff` requires both an upstream mate 1 and a downstream mate 2 to be forward-oriented; Default=--fr (appropriate for Illumina's Paired-end Sequencing Assay)">
|
2
|
222 <option value="--fr" selected="True">--fr</option>
|
3
|
223 <option value="--rf">--rf</option>
|
2
|
224 <option value="--ff">--ff</option>
|
|
225 </param>
|
|
226 <param name="no_mixed" type="boolean" truevalue="--no-mixed" falsevalue="" checked="False" label="Disable no-mixed behavior" help="--no-mixed; By default, when `bowtie2` cannot find a concordant or discordant alignment for a pair, it then tries to find alignments for the individual mates; default=False"/>
|
|
227 <param name="no_discordant" type="boolean" truevalue="--no-discordant" falsevalue="" checked="False" label="Disable no-discordant behavior" help="--no-discordant; By default, `bowtie2` looks for discordant alignments if it cannot find any concordant alignments. A discordant alignment is an alignment where both mates align uniquely, but that does not satisfy the paired-end constraints (`--fr`/`--rf`/`--ff`, `-I`, `-X`); default=False"/>
|
3
|
228 <param name="dovetail" type="boolean" truevalue="--dovetail" falsevalue="" checked="False" label="Allow mate dovetailing" help="--dovetail; If the mates `dovetail`, that is if one mate alignment extends past the beginning of the other such that the wrong mate begins upstream, consider that to be concordant. Default=False"/>
|
|
229 <param name="no_contain" type="boolean" truevalue="--no-contain" falsevalue="" checked="False" label="Allow one mate alignment to contain another" help="--no-contain; If one mate alignment contains the other, consider that to be non-concordant. Default=False"/>
|
|
230 <param name="no_overlap" type="boolean" truevalue="--no-overlap" falsevalue="" checked="False" label="Allow mate alignments to overlap" help="--no-overlap; If one mate alignment overlaps the other at all, consider that to be non-concordant. Default=False"/>
|
2
|
231 </when>
|
|
232 <when value="no">
|
|
233 <!-- do nothing -->
|
|
234 </when>
|
|
235 </conditional>
|
0
|
236 </when>
|
|
237 </conditional>
|
2
|
238
|
0
|
239 <!-- reference genome -->
|
|
240 <conditional name="reference_genome">
|
2
|
241 <param name="source" 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. See `Indexes` section of help below">
|
|
242 <option value="indexed">Use a built-in genome index</option>
|
|
243 <option value="history">Use a genome from the history and build index</option>
|
0
|
244 </param>
|
|
245 <when value="indexed">
|
2
|
246 <param name="index" type="select" label="Select reference genome" help="If your genome of interest is not listed, contact the Galaxy team">
|
0
|
247 <options from_data_table="bowtie2_indexes">
|
|
248 <filter type="sort_by" column="2"/>
|
|
249 <validator type="no_options" message="No indexes are available for the selected input dataset"/>
|
|
250 </options>
|
|
251 </param>
|
|
252 </when>
|
|
253 <when value="history">
|
2
|
254 <param name="own_file" type="data" format="fasta" metadata_name="dbkey" label="Select reference genome" />
|
0
|
255 </when>
|
|
256 </conditional>
|
|
257
|
2
|
258 <!-- read group settings -->
|
0
|
259 <conditional name="read_group">
|
2
|
260 <param name="read_group_selector" type="select" label="Specify the read group for this file?" help="Specifying readgroup information can greatly simplify your downstream analyses by allowing combining multiple datasets. See help below for more details">
|
0
|
261 <option value="yes">Yes</option>
|
|
262 <option value="no" selected="True">No</option>
|
|
263 </param>
|
|
264 <when value="yes">
|
2
|
265 <param name="rgid" type="text" size="25" label="Read group identifier (ID). Each @RG line must have a unique ID. The value of ID is used in the RG tags of alignment records. Must be unique among all read groups in header section." help="--rg-id; Required if RG specified. Read group IDs may be modified when merging SAM files in order to handle collisions." />
|
|
266 <param name="rglb" type="text" size="25" label="Library name (LB)" help="--rg; Required if RG specified" />
|
|
267 <param name="rgpl" type="text" size="25" label="Platform/technology used to produce the reads (PL)" help="--rg; Required if RG specified. Valid values : CAPILLARY, LS454, ILLUMINA, SOLID, HELICOS, IONTORRENT and PACBIO" />
|
|
268 <param name="rgsm" type="text" size="25" label="Sample (SM)" help="--rg; Required if RG specified. Use pool name where a pool is being sequenced" />
|
0
|
269 </when>
|
|
270 <when value="no" />
|
|
271 </conditional>
|
|
272
|
2
|
273 <conditional name="analysis_type">
|
|
274 <param name="analysis_type_selector" type="select" label="Select analysis mode">
|
|
275 <option value="simple">1: Default setting only</option>
|
|
276 <option value="full">2: Full parameter list</option>
|
0
|
277 </param>
|
2
|
278 <when value="simple">
|
|
279 <param name="presets" type="select" display="radio" label="Do you want to use presets?" help="Allow selecting among several preset parameter settings. Choosing between these will result in dramatic changes in runtime. See help below to understand effects of these presets.">
|
|
280 <option value="no_presets" selected="True">No, just use defaults</option>
|
|
281 <option value="--very-fast">Very fast end-to-end (--very-fast)</option>
|
|
282 <option value="--fast">Fast end-to-end (--fast)</option>
|
|
283 <option value="--sensitive">Sensitive end-to-end (--sensitive)</option>
|
|
284 <option value="--very-sensitive">Very sensitive end-to-end (--very-sensitive)</option>
|
|
285 <option value="--very-fast-local">Very fast local (--very-fast-local)</option>
|
|
286 <option value="--fast-local">Fast local (--fast-local)</option>
|
|
287 <option value="--sensitive-local">Sensitive local (--sensitive-local)</option>
|
|
288 <option value="--very-sensitive-local">Very sensitive local (--very-sensitive-local)</option>
|
0
|
289 </param>
|
2
|
290 </when>
|
|
291 <when value="full">
|
|
292 <conditional name="input_options">
|
|
293 <param name="input_options_selector" type="select" label="Do you want to tweak input options?" help="See "Input Options" section of Help below for information">
|
|
294 <option value="yes">Yes</option>
|
|
295 <option value="no" selected="true">No</option>
|
|
296 </param>
|
|
297 <when value="yes">
|
3
|
298 <param name="skip" type="integer" min="0" value="0" label="Skip (i.e. do not align) the first that many reads or pairs in the input" help="-s/--skip; default=0"/>
|
|
299 <param name="qupto" type="integer" min="1" value="100000000" label="Align the first that many reads or read pairs from the input (after the -s/--skip reads or pairs have been skipped), then stop" help="-u/--qupto; for default behavior (no limit) leave this value very large"/>
|
2
|
300 <param name="trim5" type="integer" min="0" value="0" label="Trim that many bases from 5' (left) end of each read before alignment" help="-5/--trim5; default=0"/>
|
|
301 <param name="trim3" type="integer" min="0" value="0" label="Trim that many bases from 3' (right) end of each read before alignment" help="-3/--trim3; default=0"/>
|
|
302 <param name="qv_encoding" type="select" display="radio" label="Select quality score encoding" help="See help below for more details">
|
3
|
303 <option value="--phred33" selected="True">Input qualities are ASCII chars equal to the Phred quality plus 33. This is also called the "Phred+33" encoding, which is used by the very latest Illumina pipelines (--phred33)</option>
|
|
304 <option value="--phred64">Input qualities are ASCII chars equal to the Phred quality plus 64. This is also called the "Phred+64" encoding (--phred64)</option>
|
2
|
305 </param>
|
3
|
306 <param name="solexa_quals" type="boolean" truevalue="--solexa-quals" falsevalue="" checked="False" label="Convert input qualities from Solexa (which can be negative) to Phred (which can't). This scheme was used in older Illumina GA Pipeline versions (prior to 1.3)" help="--solexa-quals; default=False"/>
|
|
307 <param name="int_quals" type="boolean" truevalue="--int-quals" falsevalue="" checked="False" label="Quality values are represented in the read input file as space-separated ASCII integers, e.g., 40 40 30 40..., rather than ASCII characters, e.g., II?I.... Integers are treated as being on the Phred quality scale unless --solexa-quals is also specified" help="--int-quals; default=False"/>
|
2
|
308 </when>
|
|
309 <when value="no">
|
|
310 <!-- do nothing -->
|
|
311 </when>
|
|
312 </conditional>
|
|
313 <conditional name="alignment_options">
|
|
314 <param name="alignment_options_selector" type="select" label="Do you want to tweak alignment options?" help="See "Alignment Options" section of Help below for information">
|
|
315 <option value="yes">Yes</option>
|
|
316 <option value="no" selected="true">No</option>
|
|
317 </param>
|
|
318 <when value="yes">
|
|
319 <param name="N" type="integer" min="0" max="1" value="0" label="Set the number of mismatches to be allowed in a seed alignment during multiseed alignment (see `Multiseed alignment` section of help below)" help="-N; Can be set to 0 or 1. Setting this higher makes alignment slower (often much slower) but increases sensitivity; default=0"/>
|
3
|
320 <param name="L" type="integer" min="0" max="32" value="22" label="Sets the length of the seed substrings to align during multiseed alignment (see `Multiseed alignment` section of help below)" help="-L; Smaller values make alignment slower but more sensitive. Default=22"/>
|
|
321 <param name="i" type="text" value="S,1,1.15" size="10" label="Set a function governing the interval between seed substrings to use during multiseed alignment (see `Multiseed alignment` section of help below). Also see description of this option below in the help section" help="-i; Since it's best to use longer intervals for longer reads, this parameter sets the interval as a function of the read length, rather than a single one-size-fits-all number. For instance, specifying `-i S,1,2.5` sets the interval function `f` to `f(x) = 1 + 2.5 * sqrt(x)`, where x is the read length. If the function returns a result less than 1, it is rounded up to 1. Default=`S,1,1.15`"/>
|
|
322 <param name="n_ceil" type="text" value="L,0,0.15" label="Set a function governing the maximum number of ambiguous characters (usually `N`s and/or `.`s) allowed in a read as a function of read length" help="--n-ceil; For instance, specifying `L,0,0.15` sets the N-ceiling function `f` to `f(x) = 0 + 0.15 * x`, where x is the read length. Reads exceeding this ceiling are filtered out. Default=`L,0,0.15`"/>
|
|
323 <param name="dpad" type="integer" min="0" value="15" label="Pad dynamic programming problems by that many columns on either side to allow gaps" help="--dpad; default=15"/>
|
2
|
324 <param name="gbar" type="integer" min="0" value="4" label="Disallow gaps within that many positions of the beginning or end of the read" help="--gbar; default=4"/>
|
3
|
325 <param name="ignore_quals" type="boolean" truevalue="--ignore-quals" falsevalue="" selected="False" label="When calculating a mismatch penalty, always consider the quality value at the mismatched position to be the highest possible, regardless of the actual value" help="--ignore-quals; input is treated as though all quality values are high; default=False"/>
|
2
|
326 <param name="nofw" type="boolean" truevalue="--nofw" falsevalue="" selected="False" label="Do not attempt to align unpaired reads to the forward (Watson) reference strand" help="In paired-end mode, `--nofw` and `--norc` pertain to the fragments; i.e. specifying `--nofw` causes `bowtie2` to explore only those paired-end configurations corresponding to fragments from the reverse-complement (Crick) strand. Default=False"/>
|
|
327 <param name="norc" type="boolean" truevalue="--norc" falsevalue="" selected="False" label="Do not attempt to align unpaired reads to the reverse (Crick) reference strand" help="In paired-end mode, `--nofw` and `--norc` pertain to the fragments; i.e. specifying `--nofw` causes `bowtie2` to explore only those paired-end configurations corresponding to fragments from the reverse-complement (Crick) strand. Default=False"/>
|
3
|
328 <param name="no_1mm_upfront" type="boolean" truevalue="--no-1mm-upfront" falsevalue="" selected="False" label="Prevent searching for 1-mismatch end-to-end alignments before using the multiseed heuristic (see `Multiseed alignment` section of help below)" help="--no-1mm-upfront; By default, Bowtie 2 will attempt to find either an exact or a 1-mismatch end-to-end alignment for the read *before* trying the multiseed heuristic. Such alignments can be found very quickly, and many short read alignments have exact or near-exact end-to-end alignments. However, this can lead to unexpected alignments when the user also sets options governing the multiseed heuristic, like `-L` and `-N`. For instance, if the user specifies `-N 0` and `-L` equal to the length of the read, the user will be surprised to find 1-mismatch alignments reported. This option prevents Bowtie 2 from searching for 1-mismatch end-to-end alignments before using the multiseed heuristic, which leads to the expected behavior when combined with options such as `-L` and `-N`. This comes at the expense of speed; Default=False"/>
|
2
|
329 <conditional name="align_mode">
|
|
330 <param name="align_mode_selector" type="select" display="radio" label="Select between `--local` and `--end-to-end` alignment modes" help="--local and --end-to-end; see help below for detailed explanation; default=--end-to-end">
|
|
331 <option value="end-to-end" selected="True">End to End (--end-to-end)</option>
|
|
332 <option value="local">Local (--local)</option>
|
|
333 </param>
|
|
334 <when value="end-to-end">
|
3
|
335 <param name="score_min_ete" type="text" value="L,-0.6,-0.6" label="Set a function governing the minimum alignment score needed for an alignment to be considered `valid` (i.e. good enough to report)" help="--score-min; This is a function of read length. For instance, specifying `L,0,-0.6` sets the minimum-score function `f` to `f(x) = 0 + -0.6 * x`, where `x` is the read length. The default in `--end-to-end` mode is `L,-0.6,-0.6` and the default in `--local` mode is `G,20,8`"/>
|
2
|
336 </when>
|
|
337 <when value="local">
|
3
|
338 <param name="score_min_loc" type="text" value="G,20,8" label="Set a function governing the minimum alignment score needed for an alignment to be considered `valid` (i.e. good enough to report)" help="--score-min; This is a function of read length. For instance, specifying `L,0,-0.6` sets the minimum-score function `f` to `f(x) = 0 + -0.6 * x`, where `x` is the read length. The default in `--end-to-end` mode is `L,-0.6,-0.6` and the default in `--local` mode is `G,20,8`"/>
|
2
|
339 </when>
|
|
340 </conditional>
|
|
341 </when>
|
|
342 <when value="no">
|
|
343 <!-- do nothing -->
|
|
344 </when>
|
|
345 </conditional>
|
|
346 <conditional name="scoring_options">
|
|
347 <param name="scoring_options_selector" type="select" label="Do you want to tweak scoring options?" help="See "Scoring Options" section of Help below for information">
|
|
348 <option value="yes">Yes</option>
|
|
349 <option value="no" selected="true">No</option>
|
|
350 </param>
|
|
351 <when value="yes">
|
|
352 <param name="ma" type="integer" value="2" label="Set the match bonus" help="--ma; In `--local` mode match bonus is added to the alignment score for each position where a read character aligns to a reference character and the characters match. Not used in `--end-to-end` mode; Default=2"/>
|
|
353 <param name="mp" type="text" size="10" value="6,2" label="Set the maximum (`MX`) and minimum (`MN`) mismatch penalties, both integers" help="--mp; A number less than or equal to `MX` and greater than or equal to `MN` is subtracted from the alignment score for each position where a read character aligns to a reference character, the characters do not match, and neither is an `N`. If `--ignore-quals` is specified, the number subtracted quals `MX`. Otherwise, the number subtracted is `MN + floor( (MX-MN)(MIN(Q, 40.0)/40.0) )` where Q is the Phred quality value; Default=6,2"/>
|
|
354 <param name="np" type="integer" value="1" label="Sets penalty for positions where the read, reference, or both, contain an ambiguous character such as `N`" help="--np; Default=1"/>
|
|
355 <param name="rdg_read_open" type="integer" value="5" label="Set the read gap opening penalty" help="--rdg; this is the first component of --rdg flag - opening penalty; Default=5"/>
|
|
356 <param name="rdg_read_extend" type="integer" value="3" label="Set the read gap extension penalty" help="--rdg; this is the second component of --rdg flag - extension penalty; Default=3"/>
|
|
357 <param name="rfg_ref_open" type="integer" value="5" label="Set the reference gap opening penalty" help="--rfg; this is the first component of --rfg flag - opening penalty; Default=5"/>
|
|
358 <param name="rfg_ref_extend" type="integer" value="3" label="Set the reference gap extension penalty" help="--rfg; this is the second component of --rfg flag - extension penalty; Default=3"/>
|
|
359 </when>
|
|
360 <when value="no">
|
|
361 <!-- do nothing -->
|
|
362 </when>
|
|
363 </conditional>
|
|
364 <conditional name="reporting_options">
|
|
365 <param name="reporting_options_selector" type="select" label="Do you want to use -a or -k options" help="Make sure you understand implications of setting -k and -a. See "Reporting Options" section of Help below for information on -k and -a options">
|
|
366 <option value="no" selected="true">No, do not set</option>
|
|
367 <option value="k">Set -k option and enter -k value</option>
|
|
368 <option value="a">Set -a option</option>
|
|
369 </param>
|
|
370 <when value="no">
|
|
371 <!-- do nothing -->
|
|
372 </when>
|
3
|
373 <when value="k">
|
|
374 <param name="k" type="integer" min="1" value="1" label="Searches for at most that many distinct, valid alignments for each read" help="-k; see detailed description of this option in the help section below. Note: Bowtie 2 is not designed with large values for `-k` in mind, and when aligning reads to long, repetitive genomes large `-k` can be very, very slow"/>
|
2
|
375 </when>
|
3
|
376 <when value="a">
|
2
|
377 <!-- do nothing here; set -a flag on the command line-->
|
|
378 </when>
|
|
379 </conditional>
|
|
380 <conditional name="effort_options">
|
|
381 <param name="effort_options_selector" type="select" label="Do you want to tweak effort options?" help="See "Effort Options" section of Help below for information">
|
|
382 <option value="yes">Yes</option>
|
|
383 <option value="no" selected="true">No</option>
|
|
384 </param>
|
|
385 <when value="yes">
|
3
|
386 <param name="D" type="integer" value="15" min="0" label="Attempt that many consecutive seed extension attempts to `fail` before Bowtie 2 moves on, using the alignments found so far" help="-D; A seed extension `fails` if it does not yield a new best or a new second-best alignment. This limit is automatically adjusted up when -k or -a are specified. Default=15"/>
|
2
|
387 <param name="R" type="integer" value="2" min="0" label="Set the maximum number of times Bowtie 2 will `re-seed` reads with repetitive seeds" help="When `re-seeding`, Bowtie 2 simply chooses a new set of reads (same length, same number of mismatches allowed) at different offsets and searches for more alignments. A read is considered to have repetitive seeds if the total number of seed hits divided by the number of seeds that aligned at least once is greater than 300. Default=2"/>
|
|
388 </when>
|
|
389 <when value="no">
|
|
390 <!-- do nothing -->
|
|
391 </when>
|
|
392 </conditional>
|
0
|
393
|
2
|
394 <conditional name="sam_options">
|
|
395 <param name="sam_options_selector" type="select" label="Do you want to tweak SAM/BAM Options?" help="See "Output Options" section of Help below for information">
|
|
396 <option value="yes">Yes</option>
|
|
397 <option value="no" selected="true">No</option>
|
|
398 </param>
|
|
399 <when value="yes">
|
3
|
400 <param name="no_unal" type="boolean" truevalue="--no-unal" falsevalue="" label="Suppress SAM records for reads that failed to align" help="--no-unal; Default=False"/>
|
|
401 <param name="omit_sec_seq" type="boolean" truevalue="--omit-sec-seq" falsevalue="" label="Suppress SEQ and QUAL strings for secondary alignments" help="--omit-sec-seq; Default=False"/>
|
2
|
402 </when>
|
|
403 <when value="no">
|
|
404 <!-- do nothing -->
|
|
405 </when>
|
|
406 </conditional>
|
|
407 <conditional name="other_options">
|
|
408 <param name="other_options_selector" type="select" label="Do you want to tweak Other Options?" help="See "Other Options" section of Help below for information">
|
|
409 <option value="yes">Yes</option>
|
|
410 <option value="no" selected="true">No</option>
|
|
411 </param>
|
|
412 <when value="yes">
|
|
413 <param name="seed" type="integer" value="0" min="0" label="Use this number as the seed for pseudo-random number generator" help="--seed; Default=0"/>
|
3
|
414 <param name="non_deterministic" type="boolean" truevalue="--non-deterministic" falsevalue="" label="Re-initialize the pseudo-random generator for each read using the current time" help="--non-deterministic; see Help below for explanation of this option; default=False"/>
|
2
|
415 </when>
|
|
416 <when value="no">
|
|
417 <!-- do nothing -->
|
|
418 </when>
|
|
419 </conditional>
|
0
|
420 </when>
|
|
421 </conditional>
|
|
422 </inputs>
|
|
423
|
|
424 <!-- define outputs -->
|
2
|
425
|
0
|
426 <outputs>
|
2
|
427
|
0
|
428 <data format="fastqsanger" name="output_unaligned_reads_l" label="${tool.name} on ${on_string}: unaligned reads (L)" >
|
2
|
429 <filter>library['unaligned_file'] is True</filter>
|
0
|
430 <actions>
|
|
431 <action type="format">
|
|
432 <option type="from_param" name="library.input_1" param_attribute="ext" />
|
|
433 </action>
|
|
434 </actions>
|
|
435 </data>
|
|
436 <data format="fastqsanger" name="output_unaligned_reads_r" label="${tool.name} on ${on_string}: unaligned reads (R)">
|
2
|
437 <filter>( library['type'] == "paired" or library['type'] == "paired_collection" ) and library['unaligned_file'] is True</filter>
|
0
|
438 <actions>
|
|
439 <action type="format">
|
|
440 <option type="from_param" name="library.input_1" param_attribute="ext" />
|
|
441 </action>
|
|
442 </actions>
|
|
443 </data>
|
2
|
444
|
3
|
445 <data format="bam" name="output" label="${tool.name} on ${on_string}: aligned reads (sorted BAM)">
|
0
|
446 <actions>
|
|
447 <conditional name="reference_genome.source">
|
|
448 <when value="indexed">
|
|
449 <action type="metadata" name="dbkey">
|
|
450 <option type="from_data_table" name="bowtie2_indexes" column="1" offset="0">
|
|
451 <filter type="param_value" column="0" value="#" compare="startswith" keep="False"/>
|
|
452 <filter type="param_value" ref="reference_genome.index" column="0"/>
|
|
453 </option>
|
|
454 </action>
|
|
455 </when>
|
|
456 <when value="history">
|
|
457 <action type="metadata" name="dbkey">
|
|
458 <option type="from_param" name="reference_genome.own_file" param_attribute="dbkey" />
|
|
459 </action>
|
|
460 </when>
|
|
461 </conditional>
|
|
462 </actions>
|
|
463 </data>
|
3
|
464
|
0
|
465 </outputs>
|
|
466
|
|
467 <tests>
|
|
468 <test>
|
|
469 <!-- basic test on single paired default run -->
|
2
|
470 <param name="type" value="paired"/>
|
0
|
471 <param name="selection" value="no"/>
|
2
|
472 <param name="paired_options_selector" value="no"/>
|
0
|
473 <param name="unaligned_file" value="false"/>
|
2
|
474 <param name="analysis_type_selector" value="simple"/>
|
0
|
475 <param name="source" value="history" />
|
2
|
476 <param name="input_1" value="bowtie2-fq1.fq" ftype="fastqsanger"/>
|
|
477 <param name="input_2" value="bowtie2-fq2.fq" ftype="fastqsanger"/>
|
|
478 <param name="own_file" value="bowtie2-ref.fasta" />
|
|
479 <output name="output" file="bowtie2-test1.bam" ftype="bam" lines_diff="2"/>
|
0
|
480 </test>
|
|
481 </tests>
|
|
482
|
|
483 <help>
|
2
|
484
|
0
|
485 **Bowtie2 Overview**
|
|
486
|
2
|
487 Bowtie2_ is an ultrafast and memory-efficient tool for aligning sequencing reads to long reference sequences. It is particularly good at aligning reads of about 50 up to 100s or 1,000s of characters to relatively long (e.g. mammalian) genomes. Bowtie 2 supports gapped, local, and paired-end alignment modes. Galaxy wrapper for Bowtie 2 outputs alignments in `BAM format`_, enabling interoperation with a large number of other tools available at this site.
|
|
488 Majority of information in this page is derived from an excellent `Bowtie2 manual`_ written by Ben Langmead.
|
|
489
|
|
490 .. _Bowtie2: http://bowtie-bio.sourceforge.net/bowtie2/
|
|
491 .. _`Bowtie2 manual`: http://bowtie-bio.sourceforge.net/bowtie2/manual.shtml
|
|
492 .. _`BAM format`: http://samtools.github.io/hts-specs/SAMv1.pdf
|
|
493
|
|
494 -----
|
0
|
495
|
2
|
496 **Selecting reference genomes for Bowtie2**
|
|
497
|
|
498 Galaxy wrapper for Bowtie2 allows you select between precomputed and user-defined indices for reference genomes using **Will you select a reference genome from your history or use a built-in index?** flag. This flag has two options:
|
0
|
499
|
2
|
500 1. **Use a built-in genome index** - when selected (this is default), Galaxy provides the user with **Select reference genome index** dropdown. Genomes listed in this dropdown have been pre-indexed with bowtie2-build utility and are ready to be mapped against.
|
|
501 2. **Use a genome from the history and build index** - when selected, Galaxy provides the user with **Select reference genome sequence** dropdown. This dropdown is populated by all FASTA formatted files listed in your current history. If your genome of interest is uploaded into history it will be shown there. Selecting a genome from this dropdown will cause Galaxy to first transparently index it using bowtie2-build command, and then run mapping with bowtie2.
|
|
502
|
|
503 If your genome of interest is not listed here you have two choices:
|
|
504
|
|
505 1. Contact galaxy team using **Help->Support** link at the top of the interface and let us know that an index needs to be added
|
|
506 2. Upload your genome of interest as a FASTA file to Galaxy history and selected **Use a genome from the history and build index** option.
|
0
|
507
|
|
508 ------
|
|
509
|
2
|
510 .. class:: infomark
|
|
511
|
|
512 **Bowtie2 options**
|
|
513
|
|
514 Galaxy wrapper for Bowtie2 implements most but not all options available through the command line. Supported options are described below.
|
|
515
|
|
516 -----
|
|
517
|
0
|
518 **Inputs**
|
|
519
|
|
520 Bowtie 2 accepts files in Sanger FASTQ format (single or pair-end). Use the FASTQ Groomer to prepare your files.
|
|
521
|
|
522 ------
|
|
523
|
2
|
524 **Input options**::
|
|
525
|
|
526 -s/--skip <int>
|
|
527 Skip (i.e. do not align) the first `<int>` reads or pairs in the input.
|
|
528
|
|
529 -u/--qupto <int>
|
|
530 Align the first `<int>` reads or read pairs from the input (after the
|
|
531 `-s`/`--skip` reads or pairs have been skipped), then stop. Default: no limit.
|
|
532
|
|
533 -5/--trim5 <int>
|
|
534 Trim `<int>` bases from 5' (left) end of each read before alignment (default: 0).
|
0
|
535
|
2
|
536 -3/--trim3 <int>
|
|
537 Trim `<int>` bases from 3' (right) end of each read before alignment (default: 0).
|
|
538
|
|
539 --phred33
|
|
540 Input qualities are ASCII chars equal to the Phred quality plus 33. This is
|
|
541 also called the "Phred+33" encoding, which is used by the very latest Illumina
|
|
542 pipelines.
|
|
543
|
|
544 --phred64
|
3
|
545 Input qualities are ASCII chars equal to the Phred quality plus 64. This is
|
2
|
546 also called the "Phred+64" encoding.
|
0
|
547
|
2
|
548 --solexa-quals
|
|
549 Convert input qualities from Solexa Phred quality (which can be negative) to
|
|
550 Phred Phred quality (which can't). This scheme was used in older Illumina GA
|
|
551 Pipeline versions (prior to 1.3). Default: off.
|
|
552
|
|
553 --int-quals
|
|
554 Quality values are represented in the read input file as space-separated ASCII integers, e.g., `40 40 30 40`..., rather than ASCII characters, e.g., `II?I`....
|
3
|
555 Integers are treated as being on the Phred quality scale unless
|
2
|
556 `--solexa-quals` is also specified. Default: off.
|
|
557
|
|
558 ------
|
|
559
|
|
560 **Presets in `--end-to-end` mode**::
|
|
561
|
|
562 --very-fast
|
|
563 Same as: `-D 5 -R 1 -N 0 -L 22 -i S,0,2.50`
|
|
564
|
|
565 --fast
|
|
566 Same as: `-D 10 -R 2 -N 0 -L 22 -i S,0,2.50`
|
|
567
|
|
568 --sensitive
|
|
569 Same as: `-D 15 -R 2 -L 22 -i S,1,1.15` (default in `--end-to-end` mode)
|
|
570
|
|
571 --very-sensitive
|
|
572 Same as: `-D 20 -R 3 -N 0 -L 20 -i S,1,0.50`
|
0
|
573
|
|
574 ------
|
|
575
|
2
|
576 **Presets options in `--local` mode**::
|
0
|
577
|
2
|
578 --very-fast-local
|
|
579 Same as: `-D 5 -R 1 -N 0 -L 25 -i S,1,2.00`
|
0
|
580
|
2
|
581 --fast-local
|
|
582 Same as: `-D 10 -R 2 -N 0 -L 22 -i S,1,1.75`
|
0
|
583
|
2
|
584 --sensitive-local
|
|
585 Same as: `-D 15 -R 2 -N 0 -L 20 -i S,1,0.75` (default in `--local` mode)
|
0
|
586
|
2
|
587 --very-sensitive-local
|
|
588 Same as: `-D 20 -R 3 -N 0 -L 20 -i S,1,0.50`
|
|
589
|
0
|
590 ------
|
|
591
|
2
|
592 **Alignment options**::
|
|
593
|
|
594 -N <int>
|
3
|
595 Sets the number of mismatches to allowed in a seed alignment during multiseed
|
|
596 alignment. Can be set to 0 or 1. Setting this higher makes alignment slower
|
2
|
597 (often much slower) but increases sensitivity. Default: 0.
|
|
598
|
|
599 -L <int>
|
3
|
600 Sets the length of the seed substrings to align during multiseed alignment.
|
|
601 Smaller values make alignment slower but more sensitive. Default: the
|
|
602 `--sensitive` preset is used by default, which sets `-L` to 22 in
|
|
603 `--end-to-end` mode and to 20 in `--local` mode.
|
2
|
604
|
|
605 -i <func>
|
|
606 Sets a function governing the interval between seed substrings to use during
|
3
|
607 multiseed alignment. For instance, if the read has 30 characers, and seed
|
2
|
608 length is 10, and the seed interval is 6, the seeds extracted will be:
|
|
609
|
|
610 Read: TAGCTACGCTCTACGCTATCATGCATAAAC
|
|
611 Seed 1 fw: TAGCTACGCT
|
|
612 Seed 1 rc: AGCGTAGCTA
|
|
613 Seed 2 fw: CGCTCTACGC
|
|
614 Seed 2 rc: GCGTAGAGCG
|
|
615 Seed 3 fw: ACGCTATCAT
|
|
616 Seed 3 rc: ATGATAGCGT
|
|
617 Seed 4 fw: TCATGCATAA
|
|
618 Seed 4 rc: TTATGCATGA
|
|
619
|
|
620 Since it's best to use longer intervals for longer reads, this parameter sets
|
|
621 the interval as a function of the read length, rather than a single
|
|
622 one-size-fits-all number. For instance, specifying `-i S,1,2.5` sets the
|
|
623 interval function `f` to `f(x) = 1 + 2.5 * sqrt(x)`, where x is the read length.
|
3
|
624 If the function returns a result less than
|
2
|
625 1, it is rounded up to 1. Default: the `--sensitive` preset is used by
|
|
626 default, which sets `-i` to `S,1,1.15` in `--end-to-end` mode to `-i S,1,0.75`
|
|
627 in `--local` mode.
|
|
628
|
|
629 --n-ceil <func>
|
|
630 Sets a function governing the maximum number of ambiguous characters (usually
|
|
631 `N`s and/or `.`s) allowed in a read as a function of read length. For instance,
|
|
632 specifying `-L,0,0.15` sets the N-ceiling function `f` to `f(x) = 0 + 0.15 * x`,
|
3
|
633 where x is the read length. Reads exceeding this ceiling are filtered out.
|
|
634 Default: `L,0,0.15`.
|
2
|
635
|
|
636 --dpad <int>
|
|
637 "Pads" dynamic programming problems by `<int>` columns on either side to allow
|
|
638 gaps. Default: 15.
|
|
639
|
|
640 --gbar <int>
|
|
641 Disallow gaps within `<int>` positions of the beginning or end of the read.
|
|
642 Default: 4.
|
|
643
|
|
644 --ignore-quals
|
|
645 When calculating a mismatch penalty, always consider the quality value at the
|
|
646 mismatched position to be the highest possible, regardless of the actual value.
|
|
647 I.e. input is treated as though all quality values are high. This is also the
|
|
648 default behavior when the input doesn't specify quality values (e.g. in `-f`,
|
|
649 `-r`, or `-c` modes).
|
0
|
650
|
2
|
651 --nofw/--norc
|
|
652 If `--nofw` is specified, `bowtie2` will not attempt to align unpaired reads to
|
|
653 the forward (Watson) reference strand. If `--norc` is specified, `bowtie2` will
|
|
654 not attempt to align unpaired reads against the reverse-complement (Crick)
|
|
655 reference strand. In paired-end mode, `--nofw` and `--norc` pertain to the
|
|
656 fragments; i.e. specifying `--nofw` causes `bowtie2` to explore only those
|
|
657 paired-end configurations corresponding to fragments from the reverse-complement
|
|
658 (Crick) strand. Default: both strands enabled.
|
|
659
|
|
660 --no-1mm-upfront
|
|
661 By default, Bowtie 2 will attempt to find either an exact or a 1-mismatch
|
3
|
662 end-to-end alignment for the read *before* trying the multiseed heuristic. Such
|
2
|
663 alignments can be found very quickly, and many short read alignments have exact or
|
|
664 near-exact end-to-end alignments. However, this can lead to unexpected
|
3
|
665 alignments when the user also sets options governing the multiseed heuristic,
|
2
|
666 like `-L` and `-N`. For instance, if the user specifies `-N 0` and `-L` equal
|
|
667 to the length of the read, the user will be surprised to find 1-mismatch alignments
|
|
668 reported. This option prevents Bowtie 2 from searching for 1-mismatch end-to-end
|
3
|
669 alignments before using the multiseed heuristic, which leads to the expected
|
2
|
670 behavior when combined with options such as `-L` and `-N`. This comes at the
|
|
671 expense of speed.
|
|
672
|
|
673 --end-to-end
|
|
674 In this mode, Bowtie 2 requires that the entire read align from one end to the
|
|
675 other, without any trimming (or "soft clipping") of characters from either end.
|
|
676 The match bonus `--ma` always equals 0 in this mode, so all alignment scores
|
|
677 are less than or equal to 0, and the greatest possible alignment score is 0.
|
|
678 This is mutually exclusive with `--local`. `--end-to-end` is the default mode.
|
0
|
679
|
2
|
680 --local
|
|
681 In this mode, Bowtie 2 does not require that the entire read align from one end
|
|
682 to the other. Rather, some characters may be omitted ("soft clipped") from the
|
|
683 ends in order to achieve the greatest possible alignment score. The match bonus
|
|
684 `--ma` is used in this mode, and the best possible alignment score is equal to
|
|
685 the match bonus (`--ma`) times the length of the read. Specifying `--local`
|
|
686 and one of the presets (e.g. `--local --very-fast`) is equivalent to specifying
|
|
687 the local version of the preset (`--very-fast-local`). This is mutually
|
|
688 exclusive with `--end-to-end`. `--end-to-end` is the default mode.
|
|
689
|
|
690 -----
|
|
691
|
|
692 **Scoring options**::
|
|
693
|
|
694 --ma <int>
|
|
695 Sets the match bonus. In `--local` mode `<int>` is added to the alignment
|
|
696 score for each position where a read character aligns to a reference character
|
|
697 and the characters match. Not used in `--end-to-end` mode. Default: 2.
|
|
698
|
|
699 --mp MX,MN
|
|
700 Sets the maximum (`MX`) and minimum (`MN`) mismatch penalties, both integers. A
|
|
701 number less than or equal to `MX` and greater than or equal to `MN` is
|
|
702 subtracted from the alignment score for each position where a read character
|
|
703 aligns to a reference character, the characters do not match, and neither is an
|
|
704 `N`. If `--ignore-quals` is specified, the number subtracted quals `MX`.
|
|
705 Otherwise, the number subtracted is `MN + floor( (MX-MN)(MIN(Q, 40.0)/40.0) )`
|
|
706 where Q is the Phred quality value. Default: `MX` = 6, `MN` = 2.
|
|
707
|
|
708 --np <int>
|
|
709 Sets penalty for positions where the read, reference, or both, contain an
|
|
710 ambiguous character such as `N`. Default: 1.
|
|
711
|
|
712 --rdg <int1>,<int2>
|
|
713 Sets the read gap open (`<int1>`) and extend (`<int2>`) penalties. A read gap of
|
|
714 length N gets a penalty of `<int1>` + N * `<int2>`. Default: 5, 3.
|
|
715
|
|
716 --rfg <int1>,<int2>
|
|
717 Sets the reference gap open (`<int1>`) and extend (`<int2>`) penalties. A
|
|
718 reference gap of length N gets a penalty of `<int1>` + N * `<int2>`. Default:
|
|
719 5, 3.
|
0
|
720
|
2
|
721 --score-min <func>
|
|
722 Sets a function governing the minimum alignment score needed for an alignment to
|
|
723 be considered "valid" (i.e. good enough to report). This is a function of read
|
|
724 length. For instance, specifying `L,0,-0.6` sets the minimum-score function `f`
|
3
|
725 to `f(x) = 0 + -0.6 * x`, where `x` is the read length. The default in `--end-to-end` mode is `L,-0.6,-0.6` and
|
2
|
726 the default in `--local` mode is `G,20,8`.
|
|
727
|
|
728 -----
|
|
729
|
|
730 **Reporting options**::
|
|
731
|
|
732 -k <int>
|
|
733 By default, `bowtie2` searches for distinct, valid alignments for each read.
|
|
734 When it finds a valid alignment, it continues looking for alignments that are
|
|
735 nearly as good or better. The best alignment found is reported (randomly
|
|
736 selected from among best if tied). Information about the best alignments is
|
|
737 used to estimate mapping quality and to set SAM optional fields, such as
|
|
738 `AS:i` and `XS:i`.
|
|
739
|
|
740 When `-k` is specified, however, `bowtie2` behaves differently. Instead, it
|
|
741 searches for at most `<int>` distinct, valid alignments for each read. The
|
|
742 search terminates when it can't find more distinct valid alignments, or when it
|
|
743 finds `<int>`, whichever happens first. All alignments found are reported in
|
|
744 descending order by alignment score. The alignment score for a paired-end
|
|
745 alignment equals the sum of the alignment scores of the individual mates. Each
|
|
746 reported read or pair alignment beyond the first has the SAM 'secondary' bit
|
|
747 (which equals 256) set in its FLAGS field. For reads that have more than
|
|
748 `<int>` distinct, valid alignments, `bowtie2` does not guarantee that the
|
|
749 `<int>` alignments reported are the best possible in terms of alignment score.
|
|
750 `-k` is mutually exclusive with `-a`.
|
0
|
751
|
2
|
752 Note: Bowtie 2 is not designed with large values for `-k` in mind, and when
|
|
753 aligning reads to long, repetitive genomes large `-k` can be very, very slow.
|
|
754
|
|
755 -a
|
|
756 Like `-k` but with no upper limit on number of alignments to search for. `-a`
|
|
757 is mutually exclusive with `-k`.
|
|
758
|
|
759 Note: Bowtie 2 is not designed with `-a` mode in mind, and when
|
|
760 aligning reads to long, repetitive genomes this mode can be very, very slow.
|
|
761
|
|
762 -----
|
|
763
|
|
764 **Effort options**::
|
|
765
|
|
766 -D <int>
|
|
767 Up to `<int>` consecutive seed extension attempts can "fail" before Bowtie 2
|
|
768 moves on, using the alignments found so far. A seed extension "fails" if it
|
|
769 does not yield a new best or a new second-best alignment. This limit is
|
|
770 automatically adjusted up when -k or -a are specified. Default: 15.
|
|
771
|
|
772 -R <int>
|
|
773 `<int>` is the maximum number of times Bowtie 2 will "re-seed" reads with
|
|
774 repetitive seeds. When "re-seeding," Bowtie 2 simply chooses a new set of reads
|
|
775 (same length, same number of mismatches allowed) at different offsets and
|
|
776 searches for more alignments. A read is considered to have repetitive seeds if
|
|
777 the total number of seed hits divided by the number of seeds that aligned at
|
|
778 least once is greater than 300. Default: 2.
|
|
779
|
|
780 -----
|
|
781
|
|
782 **Paired-end options**::
|
0
|
783
|
2
|
784 -I/--minins <int>
|
|
785 The minimum fragment length for valid paired-end alignments. E.g. if `-I 60` is
|
|
786 specified and a paired-end alignment consists of two 20-bp alignments in the
|
|
787 appropriate orientation with a 20-bp gap between them, that alignment is
|
|
788 considered valid (as long as `-X` is also satisfied). A 19-bp gap would not
|
|
789 be valid in that case. If trimming options `-3` or `-5` are also used, the
|
|
790 `-I` constraint is applied with respect to the untrimmed mates.
|
|
791
|
|
792 The larger the difference between `-I` and `-X`, the slower Bowtie 2 will
|
|
793 run. This is because larger differences bewteen `-I` and `-X` require that
|
|
794 Bowtie 2 scan a larger window to determine if a concordant alignment exists.
|
|
795 For typical fragment length ranges (200 to 400 nucleotides), Bowtie 2 is very
|
|
796 efficient.
|
|
797
|
|
798 Default: 0 (essentially imposing no minimum)
|
|
799
|
|
800 -X/--maxins <int>
|
|
801 The maximum fragment length for valid paired-end alignments. E.g. if `-X 100`
|
|
802 is specified and a paired-end alignment consists of two 20-bp alignments in the
|
|
803 proper orientation with a 60-bp gap between them, that alignment is considered
|
|
804 valid (as long as `-I` is also satisfied). A 61-bp gap would not be valid in
|
|
805 that case. If trimming options `-3` or `-5` are also used, the `-X`
|
|
806 constraint is applied with respect to the untrimmed mates, not the trimmed
|
|
807 mates.
|
|
808
|
|
809 The larger the difference between `-I` and `-X`, the slower Bowtie 2 will
|
|
810 run. This is because larger differences bewteen `-I` and `-X` require that
|
|
811 Bowtie 2 scan a larger window to determine if a concordant alignment exists.
|
|
812 For typical fragment length ranges (200 to 400 nucleotides), Bowtie 2 is very
|
|
813 efficient.
|
|
814
|
|
815 Default: 500.
|
0
|
816
|
2
|
817 --fr/--rf/--ff
|
|
818 The upstream/downstream mate orientations for a valid paired-end alignment
|
|
819 against the forward reference strand. E.g., if `--fr` is specified and there is
|
|
820 a candidate paired-end alignment where mate 1 appears upstream of the reverse
|
|
821 complement of mate 2 and the fragment length constraints (`-I` and `-X`) are
|
|
822 met, that alignment is valid. Also, if mate 2 appears upstream of the reverse
|
|
823 complement of mate 1 and all other constraints are met, that too is valid.
|
|
824 `--rf` likewise requires that an upstream mate1 be reverse-complemented and a
|
|
825 downstream mate2 be forward-oriented. ` --ff` requires both an upstream mate 1
|
|
826 and a downstream mate 2 to be forward-oriented. Default: `--fr` (appropriate
|
|
827 for Illumina's Paired-end Sequencing Assay).
|
|
828
|
|
829 --no-mixed
|
|
830 By default, when `bowtie2` cannot find a concordant or discordant alignment for
|
|
831 a pair, it then tries to find alignments for the individual mates. This option
|
|
832 disables that behavior.
|
0
|
833
|
2
|
834 --no-discordant
|
|
835 By default, `bowtie2` looks for discordant alignments if it cannot find any
|
|
836 concordant alignments. A discordant alignment is an alignment where both mates
|
|
837 align uniquely, but that does not satisfy the paired-end constraints
|
|
838 (`--fr`/`--rf`/`--ff`, `-I`, `-X`). This option disables that behavior.
|
|
839
|
|
840 --dovetail
|
|
841 If the mates "dovetail", that is if one mate alignment extends past the
|
|
842 beginning of the other such that the wrong mate begins upstream, consider that
|
3
|
843 to be concordant. Default: mates cannot dovetail in a concordant alignment.
|
2
|
844
|
|
845 --no-contain
|
|
846 If one mate alignment contains the other, consider that to be non-concordant.
|
3
|
847 Default: a mate can contain the other in a concordant alignment.
|
2
|
848
|
|
849 --no-overlap
|
|
850 If one mate alignment overlaps the other at all, consider that to be
|
3
|
851 non-concordant. Default: mates can overlap in a concordant alignment.
|
2
|
852
|
0
|
853 ------
|
|
854
|
2
|
855 **SAM options**::
|
0
|
856
|
2
|
857 --rg-id <text>
|
|
858 Set the read group ID to `<text>`. This causes the SAM `@RG` header line to be
|
|
859 printed, with `<text>` as the value associated with the `ID:` tag. It also
|
|
860 causes the `RG:Z:` extra field to be attached to each SAM output record, with
|
|
861 value set to `<text>`.
|
0
|
862
|
2
|
863 --rg <text>
|
|
864 Add `<text>` (usually of the form `TAG:VAL`, e.g. `SM:Pool1`) as a field on the
|
|
865 `@RG` header line. Note: in order for the `@RG` line to appear, `--rg-id`
|
3
|
866 must also be specified. This is because the `ID` tag is required by the SAM
|
|
867 Specification. Specify `--rg` multiple times to set multiple fields. See the
|
|
868 SAM Specification for details about what fields are legal.
|
0
|
869
|
2
|
870 --omit-sec-seq
|
|
871 When printing secondary alignments, Bowtie 2 by default will write out the `SEQ`
|
|
872 and `QUAL` strings. Specifying this option causes Bowtie 2 to print an asterix
|
|
873 in those fields instead.
|
|
874
|
|
875 -----
|
0
|
876
|
2
|
877 **Other options**::
|
0
|
878
|
2
|
879 --reorder
|
|
880 Guarantees that output SAM records are printed in an order corresponding to the
|
|
881 order of the reads in the original input file, even when `-p` is set greater
|
|
882 than 1. Specifying `--reorder` and setting `-p` greater than 1 causes Bowtie
|
|
883 2 to run somewhat slower and use somewhat more memory then if `--reorder` were
|
|
884 not specified. Has no effect if `-p` is set to 1, since output order will
|
|
885 naturally correspond to input order in that case.
|
0
|
886
|
2
|
887 --seed <int>
|
|
888 Use `<int>` as the seed for pseudo-random number generator. Default: 0.
|
0
|
889
|
2
|
890 --non-deterministic
|
|
891 Normally, Bowtie 2 re-initializes its pseudo-random generator for each read. It
|
|
892 seeds the generator with a number derived from (a) the read name, (b) the
|
|
893 nucleotide sequence, (c) the quality sequence, (d) the value of the `--seed`
|
|
894 option. This means that if two reads are identical (same name, same
|
|
895 nucleotides, same qualities) Bowtie 2 will find and report the same alignment(s)
|
|
896 for both, even if there was ambiguity. When `--non-deterministic` is specified,
|
|
897 Bowtie 2 re-initializes its pseudo-random generator for each read using the
|
|
898 current time. This means that Bowtie 2 will not necessarily report the same
|
|
899 alignment for two identical reads. This is counter-intuitive for some users,
|
|
900 but might be more appropriate in situations where the input consists of many
|
|
901 identical reads.
|
0
|
902
|
|
903 </help>
|
2
|
904 <citations>
|
|
905 <citation type="doi">10.1186/gb-2009-10-3-r25</citation>
|
|
906 <citation type="doi">10.1038/nmeth.1923</citation>
|
|
907 </citations>
|
0
|
908 </tool>
|