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