Mercurial > repos > devteam > bowtie2
comparison bowtie2_wrapper.xml @ 11:fa69d5a7b8c8 draft
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/bowtie2 commit d0e857ba2691ca15b6239890baf98dbe7bc3ccbd
| author | devteam |
|---|---|
| date | Tue, 03 Jan 2017 10:50:44 -0500 |
| parents | fed480fea9f0 |
| children | ed052d843da7 |
comparison
equal
deleted
inserted
replaced
| 10:fed480fea9f0 | 11:fa69d5a7b8c8 |
|---|---|
| 1 <tool id="bowtie2" name="Bowtie2" version="2.2.6.1"> | 1 <tool id="bowtie2" name="Bowtie2" version="2.2.8"> |
| 2 <description>- map reads against reference genome</description> | 2 <description>- map reads against reference genome</description> |
| 3 <macros> | 3 <macros> |
| 4 <import>read_group_macros.xml</import> | 4 <import>read_group_macros.xml</import> |
| 5 </macros> | 5 </macros> |
| 6 <requirements> | |
| 7 <requirement type="package" version="2.2.8">bowtie2</requirement> | |
| 8 <requirement type="package" version="1.3.1">samtools</requirement> | |
| 9 </requirements> | |
| 6 <version_command>bowtie2 --version</version_command> | 10 <version_command>bowtie2 --version</version_command> |
| 7 <requirements> | 11 <command detect_errors="exit_code"><![CDATA[ |
| 8 <requirement type="package" version="2.2.6">bowtie2</requirement> | |
| 9 <requirement type="package" version="1.2">samtools</requirement> | |
| 10 </requirements> | |
| 11 <command> | |
| 12 | |
| 13 ## prepare bowtie2 index | 12 ## prepare bowtie2 index |
| 14 #set index_path = '' | 13 #set index_path = '' |
| 15 #if str($reference_genome.source) == "history": | 14 #if str($reference_genome.source) == "history": |
| 16 bowtie2-build "$reference_genome.own_file" genome && | 15 bowtie2-build --threads \${GALAXY_SLOTS:-4} '$reference_genome.own_file' genome && |
| 17 ln -s "$reference_genome.own_file" genome.fa && | 16 ln -s -f '$reference_genome.own_file' genome.fa && |
| 18 #set index_path = 'genome' | 17 #set index_path = 'genome' |
| 19 #else: | 18 #else: |
| 20 #set index_path = $reference_genome.index.fields.path | 19 #set index_path = '$reference_genome.index.fields.path' |
| 21 #end if | 20 #end if |
| 22 | 21 |
| 23 ## execute bowtie2 | 22 ## execute bowtie2 |
| 24 | 23 |
| 25 bowtie2 | 24 bowtie2 |
| 26 | 25 |
| 27 ## number of threads | 26 ## number of threads |
| 28 -p \${GALAXY_SLOTS:-4} | 27 -p \${GALAXY_SLOTS:-4} |
| 29 | 28 |
| 30 ## index file path | 29 ## index file path |
| 31 -x $index_path | 30 -x '$index_path' |
| 32 | 31 |
| 33 ## Fastq inputs | 32 ## Fastq inputs |
| 34 #if str( $library.type ) == "single": | 33 #if str( $library.type ) == "single": |
| 35 -U "${library.input_1}" | 34 -U '${library.input_1}' |
| 36 #if str( $library.unaligned_file ) == "true": | 35 #if str( $library.unaligned_file ) == "true": |
| 37 --un $output_unaligned_reads_l | 36 --un '$output_unaligned_reads_l' |
| 37 #end if | |
| 38 #if str( $library.aligned_file ) == "true": | |
| 39 --al '$output_aligned_reads_l' | |
| 38 #end if | 40 #end if |
| 39 #elif str( $library.type ) == "paired": | 41 #elif str( $library.type ) == "paired": |
| 40 -1 "${library.input_1}" | 42 -1 '${library.input_1}' |
| 41 -2 "${library.input_2}" | 43 -2 '${library.input_2}' |
| 42 #if str( $library.paired_options.paired_options_selector ) == "yes": | 44 #if str( $library.paired_options.paired_options_selector ) == "yes": |
| 43 -I "${library.paired_options.I}" | 45 -I "${library.paired_options.I}" |
| 44 -X "${library.paired_options.X}" | 46 -X "${library.paired_options.X}" |
| 45 ${library.paired_options.fr_rf_ff} | 47 ${library.paired_options.fr_rf_ff} |
| 46 ${library.paired_options.no_mixed} | 48 ${library.paired_options.no_mixed} |
| 49 ${library.paired_options.no_contain} | 51 ${library.paired_options.no_contain} |
| 50 ${library.paired_options.no_overlap} | 52 ${library.paired_options.no_overlap} |
| 51 #end if | 53 #end if |
| 52 #if str( $library.unaligned_file ) == "true": | 54 #if str( $library.unaligned_file ) == "true": |
| 53 --un-conc $output_unaligned_reads_l | 55 --un-conc $output_unaligned_reads_l |
| 56 #end if | |
| 57 #if str( $library.aligned_file ) == "true": | |
| 58 --al-conc $output_aligned_reads_l | |
| 54 #end if | 59 #end if |
| 55 #else | 60 #else |
| 56 ## prepare collection | 61 ## prepare collection |
| 57 -1 $library.input_1.forward | 62 -1 $library.input_1.forward |
| 58 -2 $library.input_1.reverse | 63 -2 $library.input_1.reverse |
| 65 ${library.paired_options.dovetail} | 70 ${library.paired_options.dovetail} |
| 66 ${library.paired_options.no_contain} | 71 ${library.paired_options.no_contain} |
| 67 ${library.paired_options.no_overlap} | 72 ${library.paired_options.no_overlap} |
| 68 #end if | 73 #end if |
| 69 #if str( $library.unaligned_file ) == "true": | 74 #if str( $library.unaligned_file ) == "true": |
| 70 --un-conc $output_unaligned_reads_l | 75 --un-conc '$output_unaligned_reads_l' |
| 71 #end if | 76 #end if |
| 72 #end if | 77 #end if |
| 73 | 78 |
| 74 ## Read group information. | 79 ## Read group information. |
| 75 @define_read_group_helpers@ | 80 @define_read_group_helpers@ |
| 167 ${analysis_type.cline} | 172 ${analysis_type.cline} |
| 168 #end if | 173 #end if |
| 169 | 174 |
| 170 ## mapping stats (i.e. stderr from bowtie2) | 175 ## mapping stats (i.e. stderr from bowtie2) |
| 171 #if $save_mapping_stats | 176 #if $save_mapping_stats |
| 172 2> "$mapping_stats" | 177 2> '$mapping_stats' |
| 173 #end if | 178 #end if |
| 174 | 179 |
| 175 ## output file | 180 ## output file |
| 176 #if ( str( $analysis_type.analysis_type_selector ) != "full" or str( $analysis_type.sam_opt ) != "true" ): | 181 #if ( str( $analysis_type.analysis_type_selector ) != "full" or str( $analysis_type.sam_opt ) != "true" ): |
| 177 | samtools view -Su - | samtools sort -o - - > $output | 182 | samtools sort -O bam -o '$output' |
| 178 #else | 183 #else |
| 179 > $output_sam | 184 > '$output_sam' |
| 180 #end if | 185 #end if |
| 181 | 186 |
| 182 ## rename unaligned sequence files | 187 ## rename unaligned sequence files |
| 183 #if $library.type == "paired" and $output_unaligned_reads_l and $output_unaligned_reads_r: | 188 #if $library.type == "paired" and $output_unaligned_reads_l and $output_unaligned_reads_r: |
| 184 #from os.path import splitext | 189 #from os.path import splitext |
| 185 #set _unaligned_root, _unaligned_ext = splitext( str( $output_unaligned_reads_l ) ) | 190 #set _unaligned_root, _unaligned_ext = splitext( str( $output_unaligned_reads_l ) ) |
| 186 && mv "${ _unaligned_root }.1${_unaligned_ext}" "${ output_unaligned_reads_l }" | 191 && mv "${ _unaligned_root }.1${_unaligned_ext}" '$output_unaligned_reads_l' |
| 187 && mv "${ _unaligned_root }.2${_unaligned_ext}" "${ output_unaligned_reads_r }" | 192 && mv "${ _unaligned_root }.2${_unaligned_ext}" '$output_unaligned_reads_r' |
| 188 #end if | 193 #end if |
| 189 | 194 #if $library.type == "paired" and $output_aligned_reads_l and $output_aligned_reads_r: |
| 190 </command> | 195 #from os.path import splitext |
| 191 <!-- basic error handling --> | 196 #set _aligned_root, _aligned_ext = splitext( str( $output_aligned_reads_l ) ) |
| 192 <stdio> | 197 && mv "${ _aligned_root }.1${_aligned_ext}" '$output_aligned_reads_l' |
| 193 <exit_code range="1:" level="fatal" description="Tool exception" /> | 198 && mv "${ _aligned_root }.2${_aligned_ext}" '$output_aligned_reads_r' |
| 194 </stdio> | 199 #end if |
| 195 | 200 |
| 201 ]]></command> | |
| 196 <inputs> | 202 <inputs> |
| 197 <!-- single/paired --> | 203 <!-- single/paired --> |
| 198 <conditional name="library"> | 204 <conditional name="library"> |
| 199 <param name="type" type="select" label="Is this single or paired library"> | 205 <param name="type" type="select" label="Is this single or paired library"> |
| 200 <option value="single">Single-end</option> | 206 <option value="single">Single-end</option> |
| 203 </param> | 209 </param> |
| 204 | 210 |
| 205 <when value="single"> | 211 <when value="single"> |
| 206 <param name="input_1" format="fastqsanger" type="data" label="FASTQ file" help="Must be of datatype "fastqsanger"" /> | 212 <param name="input_1" format="fastqsanger" type="data" label="FASTQ file" help="Must be of datatype "fastqsanger"" /> |
| 207 <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 <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" /> |
| 214 <param name="aligned_file" type="boolean" truevalue="true" falsevalue="false" checked="False" label="Write aligned reads (in fastq format) to separate file(s)" help="--al/--al-conc; This triggers --al parameter for single reads and --al-conc for paired reads" /> | |
| 208 </when> | 215 </when> |
| 209 <when value="paired"> | 216 <when value="paired"> |
| 210 <param name="input_1" format="fastqsanger" type="data" label="FASTQ file #1" help="Must be of datatype "fastqsanger"" /> | 217 <param name="input_1" format="fastqsanger" type="data" label="FASTQ file #1" help="Must be of datatype "fastqsanger"" /> |
| 211 <param name="input_2" format="fastqsanger" type="data" label="FASTQ file #2" help="Must be of datatype "fastqsanger"" /> | 218 <param name="input_2" format="fastqsanger" type="data" label="FASTQ file #2" help="Must be of datatype "fastqsanger"" /> |
| 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" /> | 219 <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" /> |
| 220 <param name="aligned_file" type="boolean" truevalue="true" falsevalue="false" checked="False" label="Write aligned reads (in fastq format) to separate file(s)" help="--al/--al-conc; This triggers --al parameter for single reads and --al-conc for paired reads" /> | |
| 213 <conditional name="paired_options"> | 221 <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"> | 222 <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> | 223 <option value="no" selected="True">No</option> |
| 216 <option value="yes">Yes</option> | 224 <option value="yes">Yes</option> |
| 217 </param> | 225 </param> |
| 235 </conditional> | 243 </conditional> |
| 236 </when> | 244 </when> |
| 237 <when value="paired_collection"> | 245 <when value="paired_collection"> |
| 238 <param name="input_1" format="fastqsanger" type="data_collection" collection_type="paired" label="FASTQ Paired Dataset" help="Must be of datatype "fastqsanger"" /> | 246 <param name="input_1" format="fastqsanger" type="data_collection" collection_type="paired" label="FASTQ Paired Dataset" help="Must be of datatype "fastqsanger"" /> |
| 239 <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" /> | 247 <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" /> |
| 248 <param name="aligned_file" type="boolean" truevalue="true" falsevalue="false" checked="False" label="Write aligned reads (in fastq format) to separate file(s)" help="--al/--al-conc; This triggers --al parameter for single reads and --al-conc for paired reads" /> | |
| 240 <conditional name="paired_options"> | 249 <conditional name="paired_options"> |
| 241 <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"> | 250 <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"> |
| 242 <option value="no" selected="True">No</option> | 251 <option value="no" selected="True">No</option> |
| 243 <option value="yes">Yes</option> | 252 <option value="yes">Yes</option> |
| 244 </param> | 253 </param> |
| 260 <!-- do nothing --> | 269 <!-- do nothing --> |
| 261 </when> | 270 </when> |
| 262 </conditional> | 271 </conditional> |
| 263 </when> | 272 </when> |
| 264 </conditional> | 273 </conditional> |
| 265 | 274 |
| 266 <!-- reference genome --> | 275 <!-- reference genome --> |
| 267 <conditional name="reference_genome"> | 276 <conditional name="reference_genome"> |
| 268 <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"> | 277 <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"> |
| 269 <option value="indexed">Use a built-in genome index</option> | 278 <option value="indexed">Use a built-in genome index</option> |
| 270 <option value="history">Use a genome from the history and build index</option> | 279 <option value="history">Use a genome from the history and build index</option> |
| 276 <validator type="no_options" message="No indexes are available for the selected input dataset"/> | 285 <validator type="no_options" message="No indexes are available for the selected input dataset"/> |
| 277 </options> | 286 </options> |
| 278 </param> | 287 </param> |
| 279 </when> | 288 </when> |
| 280 <when value="history"> | 289 <when value="history"> |
| 281 <param name="own_file" type="data" format="fasta" metadata_name="dbkey" label="Select reference genome" /> | 290 <param name="own_file" type="data" format="fasta" label="Select reference genome" /> |
| 282 </when> | 291 </when> |
| 283 </conditional> | 292 </conditional> |
| 284 | 293 |
| 285 <!-- read group settings --> | 294 <!-- read group settings --> |
| 286 <expand macro="read_group_conditional" /> | 295 <expand macro="read_group_conditional" /> |
| 287 <conditional name="analysis_type"> | 296 <conditional name="analysis_type"> |
| 288 <param name="analysis_type_selector" type="select" label="Select analysis mode"> | 297 <param name="analysis_type_selector" type="select" label="Select analysis mode"> |
| 289 <option value="simple">1: Default setting only</option> | 298 <option value="simple">1: Default setting only</option> |
| 334 <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"/> | 343 <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"/> |
| 335 <param name="i" type="text" value="S,1,1.15" 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`"/> | 344 <param name="i" type="text" value="S,1,1.15" 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`"/> |
| 336 <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`"/> | 345 <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`"/> |
| 337 <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"/> | 346 <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"/> |
| 338 <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"/> | 347 <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"/> |
| 339 <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"/> | 348 <param name="ignore_quals" type="boolean" truevalue="--ignore-quals" falsevalue="" 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"/> |
| 340 <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"/> | 349 <param name="nofw" type="boolean" truevalue="--nofw" falsevalue="" 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"/> |
| 341 <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"/> | 350 <param name="norc" type="boolean" truevalue="--norc" falsevalue="" 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"/> |
| 342 <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"/> | 351 <param name="no_1mm_upfront" type="boolean" truevalue="--no-1mm-upfront" falsevalue="" 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"/> |
| 343 <conditional name="align_mode"> | 352 <conditional name="align_mode"> |
| 344 <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"> | 353 <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"> |
| 345 <option value="end-to-end" selected="True">End to End (--end-to-end)</option> | 354 <option value="end-to-end" selected="True">End to End (--end-to-end)</option> |
| 346 <option value="local">Local (--local)</option> | 355 <option value="local">Local (--local)</option> |
| 347 </param> | 356 </param> |
| 402 </when> | 411 </when> |
| 403 <when value="no"> | 412 <when value="no"> |
| 404 <!-- do nothing --> | 413 <!-- do nothing --> |
| 405 </when> | 414 </when> |
| 406 </conditional> | 415 </conditional> |
| 407 | 416 |
| 408 <conditional name="sam_options"> | 417 <conditional name="sam_options"> |
| 409 <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"> | 418 <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"> |
| 410 <option value="yes">Yes</option> | 419 <option value="yes">Yes</option> |
| 411 <option value="no" selected="true">No</option> | 420 <option value="no" selected="true">No</option> |
| 412 </param> | 421 </param> |
| 437 </conditional> | 446 </conditional> |
| 438 <param name="save_mapping_stats" type="boolean" checked="False" label="Save the bowtie2 mapping statistics to the history" /> | 447 <param name="save_mapping_stats" type="boolean" checked="False" label="Save the bowtie2 mapping statistics to the history" /> |
| 439 </inputs> | 448 </inputs> |
| 440 | 449 |
| 441 <!-- define outputs --> | 450 <!-- define outputs --> |
| 442 | 451 |
| 443 <outputs> | 452 <outputs> |
| 444 | 453 |
| 445 <data format="fastqsanger" name="output_unaligned_reads_l" label="${tool.name} on ${on_string}: unaligned reads (L)" > | 454 <data format="fastqsanger" name="output_unaligned_reads_l" label="${tool.name} on ${on_string}: unaligned reads (L)" > |
| 446 <filter>library['unaligned_file'] is True</filter> | 455 <filter>library['unaligned_file'] is True</filter> |
| 447 <actions> | 456 <actions> |
| 448 <conditional name="library.type"> | 457 <conditional name="library.type"> |
| 449 <when value="single"> | 458 <when value="single"> |
| 457 </action> | 466 </action> |
| 458 </when> | 467 </when> |
| 459 <when value="paired_collection"> | 468 <when value="paired_collection"> |
| 460 <action type="format"> | 469 <action type="format"> |
| 461 <option type="from_param" name="library.input_1" param_attribute="forward.ext" /> | 470 <option type="from_param" name="library.input_1" param_attribute="forward.ext" /> |
| 471 </action> | |
| 472 </when> | |
| 473 </conditional> | |
| 474 </actions> | |
| 475 </data> | |
| 476 <data format="fastqsanger" name="output_aligned_reads_l" label="${tool.name} on ${on_string}: aligned reads (L)" > | |
| 477 <filter>library['aligned_file'] is True</filter> | |
| 478 <actions> | |
| 479 <conditional name="library.type"> | |
| 480 <when value="single"> | |
| 481 <action type="format"> | |
| 482 <option type="from_param" name="library.input_1" param_attribute="ext" /> | |
| 483 </action> | |
| 484 </when> | |
| 485 <when value="paired"> | |
| 486 <action type="format"> | |
| 487 <option type="from_param" name="library.input_1" param_attribute="ext" /> | |
| 488 </action> | |
| 489 </when> | |
| 490 <when value="paired_collection"> | |
| 491 <action type="format"> | |
| 492 <option type="from_param" name="library.input_1" param_attribute="forward.ext" /> | |
| 493 </action> | |
| 494 </when> | |
| 495 </conditional> | |
| 496 </actions> | |
| 497 </data> | |
| 498 <data format="fastqsanger" name="output_aligned_reads_r" label="${tool.name} on ${on_string}: aligned reads (R)"> | |
| 499 <filter>( library['type'] == "paired" or library['type'] == "paired_collection" ) and library['aligned_file'] is True</filter> | |
| 500 <actions> | |
| 501 <conditional name="library.type"> | |
| 502 <when value="paired"> | |
| 503 <action type="format"> | |
| 504 <option type="from_param" name="library.input_2" param_attribute="ext" /> | |
| 505 </action> | |
| 506 </when> | |
| 507 <when value="paired_collection"> | |
| 508 <action type="format"> | |
| 509 <option type="from_param" name="library.input_1" param_attribute="reverse.ext" /> | |
| 462 </action> | 510 </action> |
| 463 </when> | 511 </when> |
| 464 </conditional> | 512 </conditional> |
| 465 </actions> | 513 </actions> |
| 466 </data> | 514 </data> |
| 479 </action> | 527 </action> |
| 480 </when> | 528 </when> |
| 481 </conditional> | 529 </conditional> |
| 482 </actions> | 530 </actions> |
| 483 </data> | 531 </data> |
| 484 | 532 |
| 485 <data format="bam" name="output" label="${tool.name} on ${on_string}: aligned reads (sorted BAM)"> | 533 <data format="bam" name="output" label="${tool.name} on ${on_string}: aligned reads (sorted BAM)"> |
| 486 <filter>analysis_type['analysis_type_selector'] == "simple" or analysis_type['sam_opt'] is False</filter> | 534 <filter>analysis_type['analysis_type_selector'] == "simple" or analysis_type['sam_opt'] is False</filter> |
| 487 <actions> | 535 <actions> |
| 488 <conditional name="reference_genome.source"> | 536 <conditional name="reference_genome.source"> |
| 489 <when value="indexed"> | 537 <when value="indexed"> |
| 574 <output name="output" file="bowtie2-test1.bam" ftype="bam" lines_diff="2"/> | 622 <output name="output" file="bowtie2-test1.bam" ftype="bam" lines_diff="2"/> |
| 575 <output name="mapping_stats" file="bowtie2-stats.out" ftype="txt"/> | 623 <output name="mapping_stats" file="bowtie2-stats.out" ftype="txt"/> |
| 576 </test> | 624 </test> |
| 577 </tests> | 625 </tests> |
| 578 | 626 |
| 579 <help> | 627 <help><![CDATA[ |
| 580 | 628 |
| 581 **Bowtie2 Overview** | 629 **Bowtie2 Overview** |
| 582 | 630 |
| 583 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. | 631 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. |
| 584 Majority of information in this page is derived from an excellent `Bowtie2 manual`_ written by Ben Langmead. | 632 Majority of information in this page is derived from an excellent `Bowtie2 manual`_ written by Ben Langmead. |
| 585 | 633 |
| 586 .. _Bowtie2: http://bowtie-bio.sourceforge.net/bowtie2/ | 634 .. _Bowtie2: http://bowtie-bio.sourceforge.net/bowtie2/ |
| 587 .. _`Bowtie2 manual`: http://bowtie-bio.sourceforge.net/bowtie2/manual.shtml | 635 .. _`Bowtie2 manual`: http://bowtie-bio.sourceforge.net/bowtie2/manual.shtml |
| 591 | 639 |
| 592 **Selecting reference genomes for Bowtie2** | 640 **Selecting reference genomes for Bowtie2** |
| 593 | 641 |
| 594 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: | 642 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: |
| 595 | 643 |
| 596 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. | 644 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. |
| 597 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. | 645 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. |
| 598 | 646 |
| 599 If your genome of interest is not listed here you have two choices: | 647 If your genome of interest is not listed here you have two choices: |
| 600 | 648 |
| 601 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 | 649 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 |
| 602 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. | 650 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. |
| 603 | 651 |
| 617 | 665 |
| 618 ------ | 666 ------ |
| 619 | 667 |
| 620 **Input options**:: | 668 **Input options**:: |
| 621 | 669 |
| 622 -s/--skip <int> | 670 -s/--skip <int> |
| 623 Skip (i.e. do not align) the first `<int>` reads or pairs in the input. | 671 Skip (i.e. do not align) the first `<int>` reads or pairs in the input. |
| 624 | 672 |
| 625 -u/--qupto <int> | 673 -u/--qupto <int> |
| 626 Align the first `<int>` reads or read pairs from the input (after the | 674 Align the first `<int>` reads or read pairs from the input (after the |
| 627 `-s`/`--skip` reads or pairs have been skipped), then stop. Default: no limit. | 675 `-s`/`--skip` reads or pairs have been skipped), then stop. Default: no limit. |
| 628 | 676 |
| 629 -5/--trim5 <int> | 677 -5/--trim5 <int> |
| 630 Trim `<int>` bases from 5' (left) end of each read before alignment (default: 0). | 678 Trim `<int>` bases from 5' (left) end of each read before alignment (default: 0). |
| 631 | 679 |
| 632 -3/--trim3 <int> | 680 -3/--trim3 <int> |
| 633 Trim `<int>` bases from 3' (right) end of each read before alignment (default: 0). | 681 Trim `<int>` bases from 3' (right) end of each read before alignment (default: 0). |
| 634 | 682 |
| 635 --phred33 | 683 --phred33 |
| 636 Input qualities are ASCII chars equal to the Phred quality plus 33. This is | 684 Input qualities are ASCII chars equal to the Phred quality plus 33. This is |
| 637 also called the "Phred+33" encoding, which is used by the very latest Illumina | 685 also called the "Phred+33" encoding, which is used by the very latest Illumina |
| 638 pipelines. | 686 pipelines. |
| 648 | 696 |
| 649 --int-quals | 697 --int-quals |
| 650 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`.... | 698 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`.... |
| 651 Integers are treated as being on the Phred quality scale unless | 699 Integers are treated as being on the Phred quality scale unless |
| 652 `--solexa-quals` is also specified. Default: off. | 700 `--solexa-quals` is also specified. Default: off. |
| 653 | 701 |
| 654 ------ | 702 ------ |
| 655 | 703 |
| 656 **Presets in `--end-to-end` mode**:: | 704 **Presets in `--end-to-end` mode**:: |
| 657 | 705 |
| 658 --very-fast | 706 --very-fast |
| 659 Same as: `-D 5 -R 1 -N 0 -L 22 -i S,0,2.50` | 707 Same as: `-D 5 -R 1 -N 0 -L 22 -i S,0,2.50` |
| 660 | 708 |
| 661 --fast | 709 --fast |
| 662 Same as: `-D 10 -R 2 -N 0 -L 22 -i S,0,2.50` | 710 Same as: `-D 10 -R 2 -N 0 -L 22 -i S,0,2.50` |
| 663 | 711 |
| 664 --sensitive | 712 --sensitive |
| 665 Same as: `-D 15 -R 2 -L 22 -i S,1,1.15` (default in `--end-to-end` mode) | 713 Same as: `-D 15 -R 2 -L 22 -i S,1,1.15` (default in `--end-to-end` mode) |
| 666 | 714 |
| 667 --very-sensitive | 715 --very-sensitive |
| 668 Same as: `-D 20 -R 3 -N 0 -L 20 -i S,1,0.50` | 716 Same as: `-D 20 -R 3 -N 0 -L 20 -i S,1,0.50` |
| 680 --sensitive-local | 728 --sensitive-local |
| 681 Same as: `-D 15 -R 2 -N 0 -L 20 -i S,1,0.75` (default in `--local` mode) | 729 Same as: `-D 15 -R 2 -N 0 -L 20 -i S,1,0.75` (default in `--local` mode) |
| 682 | 730 |
| 683 --very-sensitive-local | 731 --very-sensitive-local |
| 684 Same as: `-D 20 -R 3 -N 0 -L 20 -i S,1,0.50` | 732 Same as: `-D 20 -R 3 -N 0 -L 20 -i S,1,0.50` |
| 685 | 733 |
| 686 ------ | 734 ------ |
| 687 | 735 |
| 688 **Alignment options**:: | 736 **Alignment options**:: |
| 689 | 737 |
| 690 -N <int> | 738 -N <int> |
| 691 Sets the number of mismatches to allowed in a seed alignment during multiseed | 739 Sets the number of mismatches to allowed in a seed alignment during multiseed |
| 692 alignment. Can be set to 0 or 1. Setting this higher makes alignment slower | 740 alignment. Can be set to 0 or 1. Setting this higher makes alignment slower |
| 693 (often much slower) but increases sensitivity. Default: 0. | 741 (often much slower) but increases sensitivity. Default: 0. |
| 694 | 742 |
| 695 -L <int> | 743 -L <int> |
| 696 Sets the length of the seed substrings to align during multiseed alignment. | 744 Sets the length of the seed substrings to align during multiseed alignment. |
| 697 Smaller values make alignment slower but more sensitive. Default: the | 745 Smaller values make alignment slower but more sensitive. Default: the |
| 698 `--sensitive` preset is used by default, which sets `-L` to 22 in | 746 `--sensitive` preset is used by default, which sets `-L` to 22 in |
| 699 `--end-to-end` mode and to 20 in `--local` mode. | 747 `--end-to-end` mode and to 20 in `--local` mode. |
| 700 | 748 |
| 701 -i <func> | 749 -i <func> |
| 702 Sets a function governing the interval between seed substrings to use during | 750 Sets a function governing the interval between seed substrings to use during |
| 703 multiseed alignment. For instance, if the read has 30 characers, and seed | 751 multiseed alignment. For instance, if the read has 30 characers, and seed |
| 704 length is 10, and the seed interval is 6, the seeds extracted will be: | 752 length is 10, and the seed interval is 6, the seeds extracted will be: |
| 705 | 753 |
| 706 Read: TAGCTACGCTCTACGCTATCATGCATAAAC | 754 Read: TAGCTACGCTCTACGCTATCATGCATAAAC |
| 720 If the function returns a result less than | 768 If the function returns a result less than |
| 721 1, it is rounded up to 1. Default: the `--sensitive` preset is used by | 769 1, it is rounded up to 1. Default: the `--sensitive` preset is used by |
| 722 default, which sets `-i` to `S,1,1.15` in `--end-to-end` mode to `-i S,1,0.75` | 770 default, which sets `-i` to `S,1,1.15` in `--end-to-end` mode to `-i S,1,0.75` |
| 723 in `--local` mode. | 771 in `--local` mode. |
| 724 | 772 |
| 725 --n-ceil <func> | 773 --n-ceil <func> |
| 726 Sets a function governing the maximum number of ambiguous characters (usually | 774 Sets a function governing the maximum number of ambiguous characters (usually |
| 727 `N`s and/or `.`s) allowed in a read as a function of read length. For instance, | 775 `N`s and/or `.`s) allowed in a read as a function of read length. For instance, |
| 728 specifying `-L,0,0.15` sets the N-ceiling function `f` to `f(x) = 0 + 0.15 * x`, | 776 specifying `-L,0,0.15` sets the N-ceiling function `f` to `f(x) = 0 + 0.15 * x`, |
| 729 where x is the read length. Reads exceeding this ceiling are filtered out. | 777 where x is the read length. Reads exceeding this ceiling are filtered out. |
| 730 Default: `L,0,0.15`. | 778 Default: `L,0,0.15`. |
| 731 | 779 |
| 732 --dpad <int> | 780 --dpad <int> |
| 733 "Pads" dynamic programming problems by `<int>` columns on either side to allow | 781 "Pads" dynamic programming problems by `<int>` columns on either side to allow |
| 734 gaps. Default: 15. | 782 gaps. Default: 15. |
| 735 | 783 |
| 736 --gbar <int> | 784 --gbar <int> |
| 737 Disallow gaps within `<int>` positions of the beginning or end of the read. | 785 Disallow gaps within `<int>` positions of the beginning or end of the read. |
| 738 Default: 4. | 786 Default: 4. |
| 739 | 787 |
| 740 --ignore-quals | 788 --ignore-quals |
| 741 When calculating a mismatch penalty, always consider the quality value at the | 789 When calculating a mismatch penalty, always consider the quality value at the |
| 742 mismatched position to be the highest possible, regardless of the actual value. | 790 mismatched position to be the highest possible, regardless of the actual value. |
| 743 I.e. input is treated as though all quality values are high. This is also the | 791 I.e. input is treated as though all quality values are high. This is also the |
| 744 default behavior when the input doesn't specify quality values (e.g. in `-f`, | 792 default behavior when the input doesn't specify quality values (e.g. in `-f`, |
| 745 `-r`, or `-c` modes). | 793 `-r`, or `-c` modes). |
| 746 | 794 |
| 747 --nofw/--norc | 795 --nofw/--norc |
| 749 the forward (Watson) reference strand. If `--norc` is specified, `bowtie2` will | 797 the forward (Watson) reference strand. If `--norc` is specified, `bowtie2` will |
| 750 not attempt to align unpaired reads against the reverse-complement (Crick) | 798 not attempt to align unpaired reads against the reverse-complement (Crick) |
| 751 reference strand. In paired-end mode, `--nofw` and `--norc` pertain to the | 799 reference strand. In paired-end mode, `--nofw` and `--norc` pertain to the |
| 752 fragments; i.e. specifying `--nofw` causes `bowtie2` to explore only those | 800 fragments; i.e. specifying `--nofw` causes `bowtie2` to explore only those |
| 753 paired-end configurations corresponding to fragments from the reverse-complement | 801 paired-end configurations corresponding to fragments from the reverse-complement |
| 754 (Crick) strand. Default: both strands enabled. | 802 (Crick) strand. Default: both strands enabled. |
| 755 | 803 |
| 756 --no-1mm-upfront | 804 --no-1mm-upfront |
| 757 By default, Bowtie 2 will attempt to find either an exact or a 1-mismatch | 805 By default, Bowtie 2 will attempt to find either an exact or a 1-mismatch |
| 758 end-to-end alignment for the read *before* trying the multiseed heuristic. Such | 806 end-to-end alignment for the read *before* trying the multiseed heuristic. Such |
| 759 alignments can be found very quickly, and many short read alignments have exact or | 807 alignments can be found very quickly, and many short read alignments have exact or |
| 780 `--ma` is used in this mode, and the best possible alignment score is equal to | 828 `--ma` is used in this mode, and the best possible alignment score is equal to |
| 781 the match bonus (`--ma`) times the length of the read. Specifying `--local` | 829 the match bonus (`--ma`) times the length of the read. Specifying `--local` |
| 782 and one of the presets (e.g. `--local --very-fast`) is equivalent to specifying | 830 and one of the presets (e.g. `--local --very-fast`) is equivalent to specifying |
| 783 the local version of the preset (`--very-fast-local`). This is mutually | 831 the local version of the preset (`--very-fast-local`). This is mutually |
| 784 exclusive with `--end-to-end`. `--end-to-end` is the default mode. | 832 exclusive with `--end-to-end`. `--end-to-end` is the default mode. |
| 785 | 833 |
| 786 ----- | 834 ----- |
| 787 | 835 |
| 788 **Scoring options**:: | 836 **Scoring options**:: |
| 789 | 837 |
| 790 --ma <int> | 838 --ma <int> |
| 791 Sets the match bonus. In `--local` mode `<int>` is added to the alignment | 839 Sets the match bonus. In `--local` mode `<int>` is added to the alignment |
| 792 score for each position where a read character aligns to a reference character | 840 score for each position where a read character aligns to a reference character |
| 793 and the characters match. Not used in `--end-to-end` mode. Default: 2. | 841 and the characters match. Not used in `--end-to-end` mode. Default: 2. |
| 794 | 842 |
| 795 --mp MX,MN | 843 --mp MX,MN |
| 796 Sets the maximum (`MX`) and minimum (`MN`) mismatch penalties, both integers. A | 844 Sets the maximum (`MX`) and minimum (`MN`) mismatch penalties, both integers. A |
| 799 aligns to a reference character, the characters do not match, and neither is an | 847 aligns to a reference character, the characters do not match, and neither is an |
| 800 `N`. If `--ignore-quals` is specified, the number subtracted quals `MX`. | 848 `N`. If `--ignore-quals` is specified, the number subtracted quals `MX`. |
| 801 Otherwise, the number subtracted is `MN + floor( (MX-MN)(MIN(Q, 40.0)/40.0) )` | 849 Otherwise, the number subtracted is `MN + floor( (MX-MN)(MIN(Q, 40.0)/40.0) )` |
| 802 where Q is the Phred quality value. Default: `MX` = 6, `MN` = 2. | 850 where Q is the Phred quality value. Default: `MX` = 6, `MN` = 2. |
| 803 | 851 |
| 804 --np <int> | 852 --np <int> |
| 805 Sets penalty for positions where the read, reference, or both, contain an | 853 Sets penalty for positions where the read, reference, or both, contain an |
| 806 ambiguous character such as `N`. Default: 1. | 854 ambiguous character such as `N`. Default: 1. |
| 807 | 855 |
| 808 --rdg <int1>,<int2> | 856 --rdg <int1>,<int2> |
| 809 Sets the read gap open (`<int1>`) and extend (`<int2>`) penalties. A read gap of | 857 Sets the read gap open (`<int1>`) and extend (`<int2>`) penalties. A read gap of |
| 810 length N gets a penalty of `<int1>` + N * `<int2>`. Default: 5, 3. | 858 length N gets a penalty of `<int1>` + N * `<int2>`. Default: 5, 3. |
| 811 | 859 |
| 812 --rfg <int1>,<int2> | 860 --rfg <int1>,<int2> |
| 813 Sets the reference gap open (`<int1>`) and extend (`<int2>`) penalties. A | 861 Sets the reference gap open (`<int1>`) and extend (`<int2>`) penalties. A |
| 814 reference gap of length N gets a penalty of `<int1>` + N * `<int2>`. Default: | 862 reference gap of length N gets a penalty of `<int1>` + N * `<int2>`. Default: |
| 815 5, 3. | 863 5, 3. |
| 816 | 864 |
| 817 --score-min <func> | 865 --score-min <func> |
| 818 Sets a function governing the minimum alignment score needed for an alignment to | 866 Sets a function governing the minimum alignment score needed for an alignment to |
| 819 be considered "valid" (i.e. good enough to report). This is a function of read | 867 be considered "valid" (i.e. good enough to report). This is a function of read |
| 820 length. For instance, specifying `L,0,-0.6` sets the minimum-score function `f` | 868 length. For instance, specifying `L,0,-0.6` sets the minimum-score function `f` |
| 821 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 | 869 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 |
| 822 the default in `--local` mode is `G,20,8`. | 870 the default in `--local` mode is `G,20,8`. |
| 823 | 871 |
| 824 ----- | 872 ----- |
| 825 | 873 |
| 826 **Reporting options**:: | 874 **Reporting options**:: |
| 827 | 875 |
| 828 -k <int> | 876 -k <int> |
| 829 By default, `bowtie2` searches for distinct, valid alignments for each read. | 877 By default, `bowtie2` searches for distinct, valid alignments for each read. |
| 830 When it finds a valid alignment, it continues looking for alignments that are | 878 When it finds a valid alignment, it continues looking for alignments that are |
| 831 nearly as good or better. The best alignment found is reported (randomly | 879 nearly as good or better. The best alignment found is reported (randomly |
| 832 selected from among best if tied). Information about the best alignments is | 880 selected from among best if tied). Information about the best alignments is |
| 833 used to estimate mapping quality and to set SAM optional fields, such as | 881 used to estimate mapping quality and to set SAM optional fields, such as |
| 834 `AS:i` and `XS:i`. | 882 `AS:i` and `XS:i`. |
| 835 | 883 |
| 836 When `-k` is specified, however, `bowtie2` behaves differently. Instead, it | 884 When `-k` is specified, however, `bowtie2` behaves differently. Instead, it |
| 837 searches for at most `<int>` distinct, valid alignments for each read. The | 885 searches for at most `<int>` distinct, valid alignments for each read. The |
| 838 search terminates when it can't find more distinct valid alignments, or when it | 886 search terminates when it can't find more distinct valid alignments, or when it |
| 839 finds `<int>`, whichever happens first. All alignments found are reported in | 887 finds `<int>`, whichever happens first. All alignments found are reported in |
| 840 descending order by alignment score. The alignment score for a paired-end | 888 descending order by alignment score. The alignment score for a paired-end |
| 841 alignment equals the sum of the alignment scores of the individual mates. Each | 889 alignment equals the sum of the alignment scores of the individual mates. Each |
| 842 reported read or pair alignment beyond the first has the SAM 'secondary' bit | 890 reported read or pair alignment beyond the first has the SAM 'secondary' bit |
| 843 (which equals 256) set in its FLAGS field. For reads that have more than | 891 (which equals 256) set in its FLAGS field. For reads that have more than |
| 844 `<int>` distinct, valid alignments, `bowtie2` does not guarantee that the | 892 `<int>` distinct, valid alignments, `bowtie2` does not guarantee that the |
| 845 `<int>` alignments reported are the best possible in terms of alignment score. | 893 `<int>` alignments reported are the best possible in terms of alignment score. |
| 846 `-k` is mutually exclusive with `-a`. | 894 `-k` is mutually exclusive with `-a`. |
| 847 | 895 |
| 848 Note: Bowtie 2 is not designed with large values for `-k` in mind, and when | 896 Note: Bowtie 2 is not designed with large values for `-k` in mind, and when |
| 849 aligning reads to long, repetitive genomes large `-k` can be very, very slow. | 897 aligning reads to long, repetitive genomes large `-k` can be very, very slow. |
| 850 | 898 |
| 852 Like `-k` but with no upper limit on number of alignments to search for. `-a` | 900 Like `-k` but with no upper limit on number of alignments to search for. `-a` |
| 853 is mutually exclusive with `-k`. | 901 is mutually exclusive with `-k`. |
| 854 | 902 |
| 855 Note: Bowtie 2 is not designed with `-a` mode in mind, and when | 903 Note: Bowtie 2 is not designed with `-a` mode in mind, and when |
| 856 aligning reads to long, repetitive genomes this mode can be very, very slow. | 904 aligning reads to long, repetitive genomes this mode can be very, very slow. |
| 857 | 905 |
| 858 ----- | 906 ----- |
| 859 | 907 |
| 860 **Effort options**:: | 908 **Effort options**:: |
| 861 | 909 |
| 862 -D <int> | 910 -D <int> |
| 863 Up to `<int>` consecutive seed extension attempts can "fail" before Bowtie 2 | 911 Up to `<int>` consecutive seed extension attempts can "fail" before Bowtie 2 |
| 864 moves on, using the alignments found so far. A seed extension "fails" if it | 912 moves on, using the alignments found so far. A seed extension "fails" if it |
| 865 does not yield a new best or a new second-best alignment. This limit is | 913 does not yield a new best or a new second-best alignment. This limit is |
| 866 automatically adjusted up when -k or -a are specified. Default: 15. | 914 automatically adjusted up when -k or -a are specified. Default: 15. |
| 867 | 915 |
| 868 -R <int> | 916 -R <int> |
| 869 `<int>` is the maximum number of times Bowtie 2 will "re-seed" reads with | 917 `<int>` is the maximum number of times Bowtie 2 will "re-seed" reads with |
| 870 repetitive seeds. When "re-seeding," Bowtie 2 simply chooses a new set of reads | 918 repetitive seeds. When "re-seeding," Bowtie 2 simply chooses a new set of reads |
| 871 (same length, same number of mismatches allowed) at different offsets and | 919 (same length, same number of mismatches allowed) at different offsets and |
| 872 searches for more alignments. A read is considered to have repetitive seeds if | 920 searches for more alignments. A read is considered to have repetitive seeds if |
| 873 the total number of seed hits divided by the number of seeds that aligned at | 921 the total number of seed hits divided by the number of seeds that aligned at |
| 874 least once is greater than 300. Default: 2. | 922 least once is greater than 300. Default: 2. |
| 875 | 923 |
| 876 ----- | 924 ----- |
| 877 | 925 |
| 878 **Paired-end options**:: | 926 **Paired-end options**:: |
| 879 | 927 |
| 880 -I/--minins <int> | 928 -I/--minins <int> |
| 881 The minimum fragment length for valid paired-end alignments. E.g. if `-I 60` is | 929 The minimum fragment length for valid paired-end alignments. E.g. if `-I 60` is |
| 882 specified and a paired-end alignment consists of two 20-bp alignments in the | 930 specified and a paired-end alignment consists of two 20-bp alignments in the |
| 883 appropriate orientation with a 20-bp gap between them, that alignment is | 931 appropriate orientation with a 20-bp gap between them, that alignment is |
| 884 considered valid (as long as `-X` is also satisfied). A 19-bp gap would not | 932 considered valid (as long as `-X` is also satisfied). A 19-bp gap would not |
| 885 be valid in that case. If trimming options `-3` or `-5` are also used, the | 933 be valid in that case. If trimming options `-3` or `-5` are also used, the |
| 889 run. This is because larger differences bewteen `-I` and `-X` require that | 937 run. This is because larger differences bewteen `-I` and `-X` require that |
| 890 Bowtie 2 scan a larger window to determine if a concordant alignment exists. | 938 Bowtie 2 scan a larger window to determine if a concordant alignment exists. |
| 891 For typical fragment length ranges (200 to 400 nucleotides), Bowtie 2 is very | 939 For typical fragment length ranges (200 to 400 nucleotides), Bowtie 2 is very |
| 892 efficient. | 940 efficient. |
| 893 | 941 |
| 894 Default: 0 (essentially imposing no minimum) | 942 Default: 0 (essentially imposing no minimum) |
| 895 | 943 |
| 896 -X/--maxins <int> | 944 -X/--maxins <int> |
| 897 The maximum fragment length for valid paired-end alignments. E.g. if `-X 100` | 945 The maximum fragment length for valid paired-end alignments. E.g. if `-X 100` |
| 898 is specified and a paired-end alignment consists of two 20-bp alignments in the | 946 is specified and a paired-end alignment consists of two 20-bp alignments in the |
| 899 proper orientation with a 60-bp gap between them, that alignment is considered | 947 proper orientation with a 60-bp gap between them, that alignment is considered |
| 900 valid (as long as `-I` is also satisfied). A 61-bp gap would not be valid in | 948 valid (as long as `-I` is also satisfied). A 61-bp gap would not be valid in |
| 901 that case. If trimming options `-3` or `-5` are also used, the `-X` | 949 that case. If trimming options `-3` or `-5` are also used, the `-X` |
| 943 Default: a mate can contain the other in a concordant alignment. | 991 Default: a mate can contain the other in a concordant alignment. |
| 944 | 992 |
| 945 --no-overlap | 993 --no-overlap |
| 946 If one mate alignment overlaps the other at all, consider that to be | 994 If one mate alignment overlaps the other at all, consider that to be |
| 947 non-concordant. Default: mates can overlap in a concordant alignment. | 995 non-concordant. Default: mates can overlap in a concordant alignment. |
| 948 | 996 |
| 949 ------ | 997 ------ |
| 950 | 998 |
| 951 **SAM options**:: | 999 **SAM options**:: |
| 952 | 1000 |
| 953 --rg-id <text> | 1001 --rg-id <text> |
| 954 Set the read group ID to `<text>`. This causes the SAM `@RG` header line to be | 1002 Set the read group ID to `<text>`. This causes the SAM `@RG` header line to be |
| 955 printed, with `<text>` as the value associated with the `ID:` tag. It also | 1003 printed, with `<text>` as the value associated with the `ID:` tag. It also |
| 956 causes the `RG:Z:` extra field to be attached to each SAM output record, with | 1004 causes the `RG:Z:` extra field to be attached to each SAM output record, with |
| 957 value set to `<text>`. | 1005 value set to `<text>`. |
| 958 | 1006 |
| 959 --rg <text> | 1007 --rg <text> |
| 960 Add `<text>` (usually of the form `TAG:VAL`, e.g. `SM:Pool1`) as a field on the | 1008 Add `<text>` (usually of the form `TAG:VAL`, e.g. `SM:Pool1`) as a field on the |
| 961 `@RG` header line. Note: in order for the `@RG` line to appear, `--rg-id` | 1009 `@RG` header line. Note: in order for the `@RG` line to appear, `--rg-id` |
| 962 must also be specified. This is because the `ID` tag is required by the SAM | 1010 must also be specified. This is because the `ID` tag is required by the SAM |
| 963 Specification. Specify `--rg` multiple times to set multiple fields. See the | 1011 Specification. Specify `--rg` multiple times to set multiple fields. See the |
| 964 SAM Specification for details about what fields are legal. | 1012 SAM Specification for details about what fields are legal. |
| 965 | 1013 |
| 966 --omit-sec-seq | 1014 --omit-sec-seq |
| 967 When printing secondary alignments, Bowtie 2 by default will write out the `SEQ` | 1015 When printing secondary alignments, Bowtie 2 by default will write out the `SEQ` |
| 968 and `QUAL` strings. Specifying this option causes Bowtie 2 to print an asterix | 1016 and `QUAL` strings. Specifying this option causes Bowtie 2 to print an asterix |
| 969 in those fields instead. | 1017 in those fields instead. |
| 970 | 1018 |
| 971 ----- | 1019 ----- |
| 972 | 1020 |
| 973 **Other options**:: | 1021 **Other options**:: |
| 974 | 1022 |
| 975 --reorder | 1023 --reorder |
| 978 than 1. Specifying `--reorder` and setting `-p` greater than 1 causes Bowtie | 1026 than 1. Specifying `--reorder` and setting `-p` greater than 1 causes Bowtie |
| 979 2 to run somewhat slower and use somewhat more memory then if `--reorder` were | 1027 2 to run somewhat slower and use somewhat more memory then if `--reorder` were |
| 980 not specified. Has no effect if `-p` is set to 1, since output order will | 1028 not specified. Has no effect if `-p` is set to 1, since output order will |
| 981 naturally correspond to input order in that case. | 1029 naturally correspond to input order in that case. |
| 982 | 1030 |
| 983 --seed <int> | 1031 --seed <int> |
| 984 Use `<int>` as the seed for pseudo-random number generator. Default: 0. | 1032 Use `<int>` as the seed for pseudo-random number generator. Default: 0. |
| 985 | 1033 |
| 986 --non-deterministic | 1034 --non-deterministic |
| 987 Normally, Bowtie 2 re-initializes its pseudo-random generator for each read. It | 1035 Normally, Bowtie 2 re-initializes its pseudo-random generator for each read. It |
| 988 seeds the generator with a number derived from (a) the read name, (b) the | 1036 seeds the generator with a number derived from (a) the read name, (b) the |
| 989 nucleotide sequence, (c) the quality sequence, (d) the value of the `--seed` | 1037 nucleotide sequence, (c) the quality sequence, (d) the value of the `--seed` |
| 994 current time. This means that Bowtie 2 will not necessarily report the same | 1042 current time. This means that Bowtie 2 will not necessarily report the same |
| 995 alignment for two identical reads. This is counter-intuitive for some users, | 1043 alignment for two identical reads. This is counter-intuitive for some users, |
| 996 but might be more appropriate in situations where the input consists of many | 1044 but might be more appropriate in situations where the input consists of many |
| 997 identical reads. | 1045 identical reads. |
| 998 | 1046 |
| 999 </help> | 1047 ]]></help> |
| 1000 <citations> | 1048 <citations> |
| 1001 <citation type="doi">10.1186/gb-2009-10-3-r25</citation> | 1049 <citation type="doi">10.1186/gb-2009-10-3-r25</citation> |
| 1002 <citation type="doi">10.1038/nmeth.1923</citation> | 1050 <citation type="doi">10.1038/nmeth.1923</citation> |
| 1003 </citations> | 1051 </citations> |
| 1004 </tool> | 1052 </tool> |
