Site Map
Latest Release
- Please cite: Langmead B, Trapnell C, Pop M, Salzberg SL. Ultrafast and memory-efficient alignment of short DNA sequences to the human genome. Genome Biol 10:R25.
- For release updates, subscribe to the mailing list.
Bowtie 1.3.1 | 09/13/21 |
|
|
|
Links
Related Tools
Pre-built indexes
All indexes are for assemblies, not contigs. Unplaced or unlocalized sequences and alternate haplotype assemblies are excluded.
Some unzip programs cannot handle archives >2 GB. If you have problems downloading or unzipping a >2 GB index, try downloading in two parts.
Check .zip file integrity with MD5s.
Publications
- Langmead B, Trapnell C, Pop M, Salzberg SL. Ultrafast and memory-efficient alignment of short DNA sequences to the human genome. Genome Biology 10:R25.
- Langmead B, Schatz M, Lin J, Pop M, Salzberg SL. Searching for SNPs with cloud computing. Genome Biology 10:R134.
- Trapnell C, Pachter L, Salzberg SL, TopHat: discovering splice junctions with RNA-Seq. Bioinformatics 2009 25(9):1105-1111.
Contributors
- Ben Langmead
- Cole Trapnell
- Daehwan Kim
- Rone Charles
- Chris Wilks
- Valentin Antonescu
Related links
Table of Contents
Bowtie 1.3.1
What is Bowtie?
Bowtie is an ultrafast, memory-efficient short read aligner geared toward quickly aligning large sets of short DNA sequences (reads) to large genomes. It aligns 35-base-pair reads to the human genome at a rate of 25 million reads per hour on a typical workstation. Bowtie indexes the genome with a Burrows-Wheeler index to keep its memory footprint small: for the human genome, the index is typically about 2.2 GB (for unpaired alignment) or 2.9 GB (for paired-end alignment). Multiple processors can be used simultaneously to achieve greater alignment speed. Bowtie can also output alignments in the standard SAM format, allowing Bowtie to interoperate with other tools supporting SAM, including the SAMtools consensus, SNP, and indel callers. Bowtie runs on the command line under Windows, Mac OS X, Linux, and Solaris.
Bowtie also forms the basis for other tools, including TopHat: a fast splice junction mapper for RNA-seq reads, Cufflinks: a tool for transcriptome assembly and isoform quantitiation from RNA-seq reads, Crossbow: a cloud-computing software tool for large-scale resequencing data,and Myrna: a cloud computing tool for calculating differential gene expression in large RNA-seq datasets.
If you use Bowtie for your published research, please cite the Bowtie paper.
What isn’t Bowtie?
Bowtie is not a general-purpose alignment tool like MUMmer, BLAST or Vmatch. Bowtie works best when aligning short reads to large genomes, though it supports arbitrarily small reference sequences (e.g. amplicons) and reads as long as 1024 bases. Bowtie is designed to be extremely fast for sets of short reads where (a) many of the reads have at least one good, valid alignment, (b) many of the reads are relatively high-quality, and (c) the number of alignments reported per read is small (close to 1).
Bowtie does not yet report gapped alignments; this is future work.
Obtaining Bowtie
You may download either Bowtie sources or binaries for your platform from the Download section of the Sourceforge project site. Binaries are currently available for 64-bit Intel architectures running Linux, Windows, and Mac OS X.
Building from source
Building Bowtie from source requires a GNU-like environment that includes GCC, GNU Make and other basics. It should be possible to build Bowtie on a vanilla Linux or Mac installation. Bowtie can also be built on Windows using MinGW. We recommend TDM’s MinGW Build. You also must also have MSYS installed.
To build Bowtie, extract the sources, change to the extracted directory, and run GNU make
(usually with the command make
, but sometimes with gmake
) with no arguments. If building with MinGW, run make
from the MSYS command line.
The bowtie
aligner
bowtie
takes an index and a set of reads as input and outputs a list of alignments. Alignments are selected according to a combination of the -v
/-n
/-e
/-l
options (plus the -I
/-X
/--fr
/--rf
/ --ff
options for paired-end alignment), which define which alignments are legal, and the -k
/-a
/-m
/-M
/--best
/--strata
options which define which and how many legal alignments should be reported.
By default, Bowtie enforces an alignment policy similar to Maq’s default quality-aware policy (-n
2 -l
28 -e
70). See the -n alignment mode section of the manual for details about this mode. But Bowtie can also enforce a simpler end-to-end k-difference policy (e.g. with -v
2). See the -v alignment mode section of the manual for details about that mode. The -n alignment mode and the -v alignment mode are mutually exclusive.
Bowtie works best when aligning short reads to large genomes (e.g. human or mouse), though it supports arbitrarily small reference sequences and reads as long as 1024 bases. Bowtie is designed to be very fast for sets of short reads where a) many reads have at least one good, valid alignment, b) many reads are relatively high-quality, c) the number of alignments reported per read is small (close to 1). These criteria are generally satisfied in the context of modern short-read analyses such as RNA-seq, ChIP-seq, other types of -seq, and mammalian resequencing. You may observe longer running times in other research contexts.
If bowtie
is too slow for your application, try some of the performance-tuning hints described in the Performance Tuning section below.
Alignments involving one or more ambiguous reference characters (N
, -
, R
, Y
, etc.) are considered invalid by Bowtie. This is true only for ambiguous characters in the reference; alignments involving ambiguous characters in the read are legal, subject to the alignment policy. Ambiguous characters in the read mismatch all other characters. Alignments that “fall off” the reference sequence are not considered valid.
The process by which bowtie
chooses an alignment to report is randomized in order to avoid “mapping bias” - the phenomenon whereby an aligner systematically fails to report a particular class of good alignments, causing spurious “holes” in the comparative assembly. Whenever bowtie
reports a subset of the valid alignments that exist, it makes an effort to sample them randomly. This randomness flows from a simple seeded pseudo-random number generator and is deterministic in the sense that Bowtie will always produce the same results for the same read when run with the same initial “seed” value (see --seed
option).
In the default mode, bowtie
can exhibit strand bias. Strand bias occurs when input reference and reads are such that (a) some reads align equally well to sites on the forward and reverse strands of the reference, and (b) the number of such sites on one strand is different from the number on the other strand. When this happens for a given read, bowtie
effectively chooses one strand or the other with 50% probability, then reports a randomly-selected alignment for that read from among the sites on the selected strand. This tends to over assign alignments to the sites on the strand with fewer sites and under assign to sites on the strand with more sites. The effect is mitigated, though it may not be eliminated, when reads are longer or when paired-end reads are used. Running Bowtie in --best
mode eliminates strand bias by forcing Bowtie to select one strand or the other with a probability that is proportional to the number of best sites on the strand.
Gapped alignments are not currently supported in Bowtie, but they are supported in Bowtie 2.
The -n
alignment mode
When the -n
option is specified (which is the default), bowtie
determines which alignments are valid according to the following policy, which is similar to Maq’s default policy.
Alignments may have no more than
N
mismatches (whereN
is a number 0-3, set with-n
) in the firstL
bases (whereL
is a number 5 or greater, set with-l
) on the high-quality (left) end of the read. The firstL
bases are called the “seed”.The sum of the Phred quality values at all mismatched positions (not just in the seed) may not exceed
E
(set with-e
). Where qualities are unavailable (e.g. if the reads are from a FASTA file), the Phred quality defaults to 40.
The -n
option is mutually exclusive with the -v
option.
If there are many possible alignments satisfying these criteria, Bowtie gives preference to alignments with fewer mismatches and where the sum from criterion 2 is smaller. When the --best
option is specified, Bowtie guarantees the reported alignment(s) are “best” in terms of these criteria (criterion 1 has priority), and that the alignments are reported in best-to-worst order. Bowtie is somewhat slower when --best
is specified.
Note that Maq internally rounds base qualities to the nearest 10 and rounds qualities greater than 30 to 30. To maintain compatibility, Bowtie does the same. Rounding can be suppressed with the --nomaqround
option.
Bowtie is not fully sensitive in -n
2 and -n
3 modes by default. In these modes Bowtie imposes a “backtracking limit” to limit effort spent trying to find valid alignments for low-quality reads unlikely to have any. This may cause Bowtie to miss some legal 2- and 3-mismatch alignments. The limit is set to a reasonable default (125 without --best
, 800 with --best
), but the user may decrease or increase the limit using the --maxbts
and/or -y
options. -y
mode is relatively slow but guarantees full sensitivity.
The -v
alignment mode
In -v
mode, alignments may have no more than V
mismatches, where V
may be a number from 0 through 3 set using the -v
option. Quality values are ignored. The -v
option is mutually exclusive with the -n
option.
If there are many legal alignments, Bowtie gives preference to alignments with fewer mismatches. When the --best
option is specified, Bowtie guarantees the reported alignment(s) are “best” in terms of the number of mismatches, and that the alignments are reported in best-to-worst order. Bowtie is somewhat slower when --best
is specified.
Strata
In the -n alignment mode, an alignment’s “stratum” is defined as the number of mismatches in the “seed” region, i.e. the leftmost L
bases, where L
is set with the -l
option. In the -v alignment mode, an alignment’s stratum is defined as the total number of mismatches in the entire alignment. Some of Bowtie’s options (e.g. --strata
and -m
use the notion of “stratum” to limit or expand the scope of reportable alignments.
Reporting Modes
With the -k
, -a
, -m
, -M
, --best
and --strata
options, the user can flexibly select which alignments are reported. Below we demonstrate a few ways in which these options can be combined. All examples are using the e_coli
index packaged with Bowtie. The --suppress
option is used to keep the output concise and some output is elided for clarity.
Example 1: -a
$ ./bowtie -a -v 2 e_coli --suppress 1,5,6,7 -c ATGCATCATGCGCCAT
- gi|110640213|ref|NC_008253.1| 148810 10:A>G,13:C>G
- gi|110640213|ref|NC_008253.1| 2852852 8:T>A
- gi|110640213|ref|NC_008253.1| 4930433 4:G>T,6:C>G
- gi|110640213|ref|NC_008253.1| 905664 6:A>G,7:G>T
+ gi|110640213|ref|NC_008253.1| 1093035 2:T>G,15:A>T
Specifying -a
instructs Bowtie to report all valid alignments, subject to the alignment policy: -v
2. In this case, Bowtie finds 5 inexact hits in the E. coli genome; 1 hit (the 2nd one listed) has 1 mismatch, and the other 4 hits have 2 mismatches. Four are on the reverse reference strand and one is on the forward strand. Note that they are not listed in best-to-worst order.
Example 2: -k 3
$ ./bowtie -k 3 -v 2 e_coli --suppress 1,5,6,7 -c ATGCATCATGCGCCAT
- gi|110640213|ref|NC_008253.1| 148810 10:A>G,13:C>G
- gi|110640213|ref|NC_008253.1| 2852852 8:T>A
- gi|110640213|ref|NC_008253.1| 4930433 4:G>T,6:C>G
Specifying -k
3 instructs Bowtie to report up to 3 valid alignments. In this case, a total of 5 valid alignments exist (see Example 1); bowtie
reports 3 out of those 5. -k
can be set to any integer greater than 0.
Example 3: -k 6
$ ./bowtie -k 6 -v 2 e_coli --suppress 1,5,6,7 -c ATGCATCATGCGCCAT
- gi|110640213|ref|NC_008253.1| 148810 10:A>G,13:C>G
- gi|110640213|ref|NC_008253.1| 2852852 8:T>A
- gi|110640213|ref|NC_008253.1| 4930433 4:G>T,6:C>G
- gi|110640213|ref|NC_008253.1| 905664 6:A>G,7:G>T
+ gi|110640213|ref|NC_008253.1| 1093035 2:T>G,15:A>T
Specifying -k
6 instructs Bowtie to report up to 6 valid alignments. In this case, a total of 5 valid alignments exist, so bowtie
reports all 5.
Example 4: default (-k 1
)
$ ./bowtie -v 2 e_coli --suppress 1,5,6,7 -c ATGCATCATGCGCCAT
- gi|110640213|ref|NC_008253.1| 148810 10:A>G,13:C>G
Leaving the reporting options at their defaults causes bowtie
to report the first valid alignment it encounters. Because --best
was not specified, we are not guaranteed that Bowtie will report the best alignment, and in this case it does not (the 1-mismatch alignment from the previous example would have been better). The default reporting mode is equivalent to -k
1.
Example 5: -a --best
$ ./bowtie -a --best -v 2 e_coli --suppress 1,5,6,7 -c ATGCATCATGCGCCAT
- gi|110640213|ref|NC_008253.1| 2852852 8:T>A
+ gi|110640213|ref|NC_008253.1| 1093035 2:T>G,15:A>T
- gi|110640213|ref|NC_008253.1| 905664 6:A>G,7:G>T
- gi|110640213|ref|NC_008253.1| 148810 10:A>G,13:C>G
- gi|110640213|ref|NC_008253.1| 4930433 4:G>T,6:C>G
Specifying -a
--best
results in the same alignments being printed as if just -a
had been specified, but they are guaranteed to be reported in best-to-worst order.
Example 6: -a --best --strata
$ ./bowtie -a --best --strata -v 2 --suppress 1,5,6,7 e_coli -c ATGCATCATGCGCCAT
- gi|110640213|ref|NC_008253.1| 2852852 8:T>A
Specifying --strata
in addition to -a
and --best
causes bowtie
to report only those alignments in the best alignment “stratum”. The alignments in the best stratum are those having the least number of mismatches (or mismatches just in the “seed” portion of the alignment in the case of -n
mode). Note that if --strata
is specified, --best
must also be specified.
Example 7: -a -m 3
$ ./bowtie -a -m 3 -v 2 e_coli -c ATGCATCATGCGCCAT
No alignments
Specifying -m
3 instructs bowtie to refrain from reporting any alignments for reads having more than 3 reportable alignments. The -m
option is useful when the user would like to guarantee that reported alignments are “unique”, for some definition of unique.
Example 1 showed that the read has 5 reportable alignments when -a
and -v
2 are specified, so the -m
3 limit causes bowtie to output no alignments.
Example 8: -a -m 5
$ ./bowtie -a -m 5 -v 2 e_coli --suppress 1,5,6,7 -c ATGCATCATGCGCCAT
- gi|110640213|ref|NC_008253.1| 148810 10:A>G,13:C>G
- gi|110640213|ref|NC_008253.1| 2852852 8:T>A
- gi|110640213|ref|NC_008253.1| 4930433 4:G>T,6:C>G
- gi|110640213|ref|NC_008253.1| 905664 6:A>G,7:G>T
+ gi|110640213|ref|NC_008253.1| 1093035 2:T>G,15:A>T
Specifying -m
5 instructs bowtie to refrain from reporting any alignments for reads having more than 5 reportable alignments. Since the read has exactly 5 reportable alignments, the -m
5 limit allows bowtie
to print them as usual.
Example 9: -a -m 3 --best --strata
$ ./bowtie -a -m 3 --best --strata -v 2 e_coli --suppress 1,5,6,7 -c ATGCATCATGCGCCAT
- gi|110640213|ref|NC_008253.1| 2852852 8:T>A
Specifying -m
3 instructs bowtie to refrain from reporting any alignments for reads having more than 3 reportable alignments. As we saw in Example 6, the read has only 1 reportable alignment when -a
, --best
and --strata
are specified, so the -m
3 limit allows bowtie
to print that alignment as usual.
Intuitively, the -m
option, when combined with the --best
and --strata
options, guarantees a principled, though weaker form of “uniqueness.” A stronger form of uniqueness is enforced when -m
is specified but --best
and --strata
are not.
Paired-end Alignment
bowtie
can align paired-end reads when properly paired read files are specified using the -1
and -2
options (for pairs of raw, FASTA, or FASTQ read files), the --12
option (for Tab-delimited read files), or using the --interleaved
(for interleaved FASTQ). A valid paired-end alignment satisfies these criteria:
- Both mates have a valid alignment according to the alignment policy defined by the
-v
/-n
/-e
/-l
options. - The relative orientation and position of the mates satisfy the constraints defined by the
-I
/-X
/--fr
/--rf
/--ff
options.
Policies governing which paired-end alignments are reported for a given read are specified using the -k
, -a
and -m
options as usual. The --strata
and --best
options do not apply in paired-end mode.
A paired-end alignment is reported as a pair of mate alignments, both on a separate line, where the alignment for each mate is formatted the same as an unpaired (singleton) alignment. The alignment for the mate that occurs closest to the beginning of the reference sequence (the “upstream” mate) is always printed before the alignment for the downstream mate. Reads files containing paired-end reads will sometimes name the reads according to whether they are the #1 or #2 mates by appending a /1
or /2
suffix to the read name. If no such suffix is present in Bowtie’s input, the suffix will be added when Bowtie prints read names in alignments (except in -S
“SAM” mode, where mate information is encoded in the FLAGS
field instead).
Finding a valid paired-end alignment where both mates align to repetitive regions of the reference can be very time-consuming. By default, Bowtie avoids much of this cost by imposing a limit on the number of “tries” it makes to match an alignment for one mate with a nearby alignment for the other. The default limit is 100. This causes bowtie
to miss some valid paired-end alignments where both mates lie in repetitive regions, but the user may use the --pairtries
or -y
options to increase Bowtie’s sensitivity as desired.
Paired-end alignments where one mate’s alignment is entirely contained within the other’s are considered invalid.
Because Bowtie uses an in-memory representation of the original reference string when finding paired-end alignments, its memory footprint is larger when aligning paired-end reads. For example, the human index has a memory footprint of about 2.2 GB in single-end mode and 2.9 GB in paired-end mode.
Wrapper scripts
The bowtie
, bowtie-build
and bowtie-inspect
executables are actually wrapper scripts that call binary programs as appropriate. The wrappers shield users from having to distinguish between “small” and “large” index formats, discussed briefly in the following section. The appropriate index type is selected based on the input size.
It is recommended that you always run the bowtie wrappers and not run the binaries directly.
Small and large indexes
bowtie-build
can index reference genomes of any size. For genomes less than about 4 billion nucleotides in length, bowtie-build
builds a “small” index using 32-bit numbers in various parts of the index. When the genome is longer, bowtie-build
builds a “large” index using 64-bit numbers. Small indexes are stored in files with the .ebwt
extension, and large indexes are stored in files with the .ebwtl
extension. The user need not worry about whether a particular index is small or large; the wrapper scripts will automatically build and use the appropriate index.
Performance Tuning
If your computer has multiple processors/cores, use
--threads
--threads
option causes Bowtie to launch a specified number of parallel threads. Each thread runs on a different processor/core. For alignment, this increases alignment throughput by approximately a multiple of the number of threads (though in practice, it is somewhat worse than linear). For index building, using multiple threads decreases building time.If reporting many alignments per read, try tweaking
bowtie-build --offrate
If you are using the
-k
,-a
or-m
options and Bowtie is reporting many alignments per read (an average of more than about 10 per read) and you have some memory to spare, using an index with a denser SA sample can speed things up considerably.To do this, specify a smaller-than-default
-o
/--offrate
value when runningbowtie-build
. A denser SA sample yields a larger index, but is also particularly effective at speeding up alignment when many alignments are reported per read. For example, decreasing the index’s-o
/--offrate
by 1 could as much as double alignment performance, and decreasing by 2 could quadruple alignment performance, etc.On the other hand, decreasing
-o
/--offrate
increases the size of the Bowtie index, both on disk and in memory when aligning reads. At the default-o
/--offrate
of 5, the SA sample for the human genome occupies about 375 MB of memory when aligning reads. Decreasing the-o
/--offrate
by 1 doubles the memory taken by the SA sample, and decreasing by 2 quadruples the memory taken, etc.If bowtie “thrashes”, try increasing
bowtie --offrate
If
bowtie
runs very slow on a low-memory machine (with less than about 4 GB of memory), then try settingbowtie
-o
/--offrate
to a larger value.bowtie-build
’s default-o
/--offrate
is 5 and all pre-built indexes available from the Bowtie website are built with-o
/--offrate
5; so ifbowtie
thrashes when querying such an index, try usingbowtie
--offrate
6. Ifbowtie
still thrashes, trybowtie
--offrate
7, etc. A higher-o
/--offrate
causesbowtie
to use a sparser sample of the suffix array than is stored in the index; this saves memory but makes alignment reporting slower (which is especially slow when using-a
or large-k
or-m
).
Command Line
Usage:
bowtie [options]* -x <ebwt> {-1 <m1> -2 <m2> | --12 <r> | --interleaved <i> | <s>} [<hit>]
Main arguments
|
The basename of the Bowtie, or Bowtie 2, index to be searched. The basename is the name of any of the index files up to but not including the final |
|
Comma-separated list of files containing the #1 mates (filename usually includes |
|
Comma-separated list of files containing the #2 mates (filename usually includes |
|
Comma-separated list of files containing a mix of unpaired and paired-end reads in Tab-delimited format. Tab-delimited format is a 1-read-per-line format where unpaired reads consist of a read name, sequence and quality string each separated by tabs. A paired-end read consists of a read name, sequence of the #1 mate, quality values of the #1 mate, sequence of the #2 mate, and quality values of the #2 mate separated by tabs. Quality values can be expressed using any of the scales supported in FASTQ files. Reads may be a mix of different lengths and paired-end and unpaired reads may be intermingled in the same file. If |
|
A comma-separated list of interleaved paired-end FASTQ files, where the records for the mate #1s are interleaved with the records for the mate #2s. Reads may be a mix of different lengths. If |
|
A comma-separated list of files containing unpaired reads to be aligned, or, if |
|
File to write alignments to. By default, alignments are written to the “standard out” filehandle (i.e. the console). |
Options
Input
|
The query input files (specified either as |
|
The query input files (specified either as |
|
Reads are substrings (k-mers) extracted from a FASTA file |
|
The query input files (specified either as |
|
The query sequences are given on command line. I.e. |
|
Skip (i.e. do not align) the first |
|
Only align the first |
|
Trim |
|
Trim |
|
Input qualities are ASCII chars equal to the Phred quality plus 33. Default: on. |
|
Input qualities are ASCII chars equal to the Phred quality plus 64. Default: off. |
|
Convert input qualities from Solexa (which can be negative) to Phred (which can’t). This is usually the right option for use with (unconverted) reads emitted by GA Pipeline versions prior to 1.3. Default: off. |
|
Same as |
|
Quality values are represented in the read input file as space-separated ASCII integers, e.g., |
|
Force usage of a ‘large’ index (those ending in ‘.ebwtl’), even if a small one is present. Default: off. |
Alignment
|
Report alignments with at most |
|
Maximum number of mismatches permitted in the “seed”, i.e. the first |
|
Maximum permitted total of quality values at all mismatched read positions throughout the entire alignment, not just in the “seed”. The default is 70. Like Maq, |
|
The “seed length”; i.e., the number of bases on the high-quality end of the read to which the |
|
Maq accepts quality values in the Phred quality scale, but internally rounds values to the nearest 10, with a maximum of 30. By default, |
|
The minimum insert size for valid paired-end alignments. E.g. if |
|
The maximum insert size for valid paired-end alignments. E.g. if |
|
The upstream/downstream mate orientations for a valid paired-end alignment against the forward reference strand. E.g., if |
|
Normally, Bowtie will not reported a paired-end alignment for a pair when the two ends overlap exactly the same reference interval, or if the alignment interval for one is contained within the other. This option causes Bowtie to report such cases as normal paired-end alignments. |
|
If |
|
The maximum number of backtracks permitted when aligning a read in |
|
For paired-end alignment, this is the maximum number of attempts |
|
Try as hard as possible to find valid alignments when they exist, including paired-end alignments. This is equivalent to specifying very high values for the |
|
The number of megabytes of memory a given thread is given to store path descriptors in |
|
Part of bowtie’s batch parsing and used to specify the number of reads that bowtie will consume from the input file at once. Default: 16 |
Reporting
|
Report up to |
|
Report all valid alignments per read or pair (default: off). Validity of alignments is determined by the alignment policy (combined effects of |
|
Suppress all alignments for a particular read or pair if more than |
|
Behaves like |
|
Make Bowtie guarantee that reported singleton alignments are “best” in terms of stratum (i.e. number of mismatches, or mismatches in the seed in the case of |
|
If many valid alignments exist and are reportable (e.g. are not disallowed via the |
Output
|
Print the amount of wall-clock time taken by each phase. |
|
When outputting alignments in Bowtie format, consider the first base of a reference sequence to have offset |
|
Print nothing besides alignments. |
|
When a reference sequence is referred to in a reported alignment, refer to it by 0-based index (its offset into the list of references that were indexed) rather than by name. |
|
Write all reads for which at least one alignment was reported to a file with name |
|
Write all reads that could not be aligned to a file with name |
|
Write all reads with a number of valid alignments exceeding the limit set with the |
|
Suppress columns of output in the default output mode. E.g. if |
|
Print the full reference sequence name, including whitespace, in alignment output. By default |
SAM
|
Print alignments in SAM format. See the SAM output section of the manual for details. To suppress all SAM headers, use |
|
If an alignment is non-repetitive (according to |
|
Suppress header lines (starting with |
|
Suppress |
|
Add |
|
Suppress SAM records for reads that failed to align. |
Performance
|
Override the offrate of the index with |
|
Launch |
|
Guarantees that output SAM records are printed in an order corresponding to the order of the reads in the original input file, even when |
|
Use memory-mapped I/O to load the index, rather than normal C file I/O. Memory-mapping the index allows many concurrent |
|
Use shared memory to load the index, rather than normal C file I/O. Using shared memory allows many concurrent bowtie processes on the same computer to share the same memory image of the index (i.e. you pay the memory overhead just once). This facilitates memory-efficient parallelization of |
Other
|
Use |
|
Print verbose output (for debugging). |
|
Print version information and quit. |
|
Print usage information and quit. |
Default bowtie
output
bowtie
outputs one alignment per line. Each line is a collection of 8 fields separated by tabs; from left to right, the fields are:
Name of read that aligned.
Note that the [SAM specification] disallows whitespace in the read name. If the read name contains any whitespace characters, Bowtie 2 will truncate the name at the first whitespace character. This is similar to the behavior of other tools.
Reference strand aligned to,
+
for forward strand,-
for reverseName of reference sequence where alignment occurs, or numeric ID if no name was provided
0-based offset into the forward reference strand where leftmost character of the alignment occurs
Read sequence (reverse-complemented if orientation is
-
).ASCII-encoded read qualities (reversed if orientation is
-
). The encoded quality values are on the Phred scale and the encoding is ASCII-offset by 33 (ASCII char!
).If
-M
was specified and the prescribed ceiling was exceeded for this read, this column contains the value of the ceiling, indicating that at least that many valid alignments were found in addition to the one reported.Otherwise, this column contains the number of other instances where the same sequence aligned against the same reference characters as were aligned against in the reported alignment. This is not the number of other places the read aligns with the same number of mismatches. The number in this column is generally not a good proxy for that number (e.g., the number in this column may be ‘0’ while the number of other alignments with the same number of mismatches might be large).
Comma-separated list of mismatch descriptors. If there are no mismatches in the alignment, this field is empty. A single descriptor has the format offset:reference-base>read-base. The offset is expressed as a 0-based offset from the high-quality (5’) end of the read.
SAM bowtie
output
Following is a brief description of the SAM format as output by bowtie
when the -S
/--sam
option is specified. For more details, see the SAM format specification.
When -S
/--sam
is specified, bowtie
prints a SAM header with @HD
, @SQ
and @PG
lines. When one or more --sam-RG
arguments are specified, bowtie
will also print an @RG
line that includes all user-specified --sam-RG
tokens separated by tabs.
Each subsequent line corresponds to a read or an alignment. Each line is a collection of at least 12 fields separated by tabs; from left to right, the fields are:
Name of read that aligned
Sum of all applicable flags. Flags relevant to Bowtie are:
1
The read is one of a pair
2
The alignment is one end of a proper paired-end alignment
4
The read has no reported alignments
8
The read is one of a pair and has no reported alignments
16
The alignment is to the reverse reference strand
32
The other mate in the paired-end alignment is aligned to the reverse reference strand
64
The read is the first (#1) mate in a pair
128
The read is the second (#2) mate in a pair
Thus, an unpaired read that aligns to the reverse reference strand will have flag 16. A paired-end read that aligns and is the first mate in the pair will have flag 83 (= 64 + 16 + 2 + 1).
Name of reference sequence where alignment occurs, or ordinal ID if no name was provided
1-based offset into the forward reference strand where leftmost character of the alignment occurs
Mapping quality
CIGAR string representation of alignment
Name of reference sequence where mate’s alignment occurs. Set to
=
if the mate’s reference sequence is the same as this alignment’s, or*
if there is no mate.1-based offset into the forward reference strand where leftmost character of the mate’s alignment occurs. Offset is 0 if there is no mate.
Inferred insert size. Size is negative if the mate’s alignment occurs upstream of this alignment. Size is 0 if there is no mate.
Read sequence (reverse-complemented if aligned to the reverse strand)
ASCII-encoded read qualities (reverse-complemented if the read aligned to the reverse strand). The encoded quality values are on the Phred quality scale and the encoding is ASCII-offset by 33 (ASCII char
!
), similarly to a FASTQ file.Optional fields. Fields are tab-separated. For descriptions of all possible optional fields, see the SAM format specification.
bowtie
outputs some of these optional fields for each alignment, depending on the type of the alignment:
|
For aligned reads, |
|
Aligned read belongs to stratum |
|
For a read with no reported alignments, |
The bowtie-build
indexer
bowtie-build
builds a Bowtie index from a set of DNA sequences. bowtie-build
outputs a set of 6 files with suffixes .1.ebwt
, .2.ebwt
, .3.ebwt
, .4.ebwt
, .rev.1.ebwt
, and .rev.2.ebwt
. (If the total length of all the input sequences is greater than about 4 billion, then the index files will end in ebwtl
instead of ebwt
.) These files together constitute the index: they are all that is needed to align reads to that reference. The original sequence files are no longer used by Bowtie once the index is built.
Use of Karkkainen’s blockwise algorithm allows bowtie-build
to trade off between running time and memory usage. bowtie-build
has three options governing how it makes this trade: -p
/--packed
, --bmax
/--bmaxdivn
, and --dcv
. By default, bowtie-build
will automatically search for the settings that yield the best running time without exhausting memory. This behavior can be disabled using the -a
/--noauto
option.
The indexer provides options pertaining to the “shape” of the index, e.g. --offrate
governs the fraction of Burrows-Wheeler rows that are “marked” (i.e., the density of the suffix-array sample; see the original FM Index paper for details). All of these options are potentially profitable trade-offs depending on the application. They have been set to defaults that are reasonable for most cases according to our experiments. See Performance Tuning for details.
The Bowtie index is based on the FM Index of Ferragina and Manzini, which in turn is based on the Burrows-Wheeler transform. The algorithm used to build the index is based on the blockwise algorithm of Karkkainen.
Command Line
Usage:
bowtie-build [options]* <reference_in> <ebwt_base>
Main arguments
|
A comma-separated list of FASTA files containing the reference sequences to be aligned to, or, if |
|
The basename of the index files to write. By default, |
Options
|
The reference input files (specified as |
|
The reference sequences are given on the command line. I.e. |
|
Disable the default behavior whereby |
|
Use a packed (2-bits-per-nucleotide) representation for DNA strings. This saves memory but makes indexing 2-3 times slower. Default: off. This is configured automatically by default; use |
|
The maximum number of suffixes allowed in a block. Allowing more suffixes per block makes indexing faster, but increases peak memory usage. Setting this option overrides any previous setting for |
|
The maximum number of suffixes allowed in a block, expressed as a fraction of the length of the reference. Setting this option overrides any previous setting for |
|
Use |
|
Disable use of the difference-cover sample. Suffix sorting becomes quadratic-time in the worst case (where the worst case is an extremely repetitive reference). Default: off. |
|
Do not build the |
|
Build only the |
|
To map alignments back to positions on the reference sequences, it’s necessary to annotate (“mark”) some or all of the Burrows-Wheeler rows with their corresponding location on the genome. |
|
The ftab is the lookup table used to calculate an initial Burrows-Wheeler range with respect to the first |
|
Launch |
|
Convert Ns in the reference sequence to As before building the index. By default, Ns are simply excluded from the index and |
|
Endianness to use when serializing integers to the index file. Default: little-endian (recommended for Intel- and AMD-based architectures). |
|
Use |
|
|
|
Print usage information and quit. |
|
Print version information and quit. |
The bowtie-inspect
index inspector
bowtie-inspect
extracts information from a Bowtie index about what kind of index it is and what reference sequences were used to build it. When run without any options, the tool will output a FASTA file containing the sequences of the original references (with all non-A
/C
/G
/T
characters converted to N
s). It can also be used to extract just the reference sequence names using the -n
/--names
option or a more verbose summary using the -s
/--summary
option.
Command Line
Usage:
bowtie-inspect [options]* <ebwt_base>
Main arguments
|
The basename of the Bowtie or Bowtie 2 index to be inspected. The basename is name of any of the index files but with the |
Options
|
When printing FASTA output, output a newline character every |
|
Print reference sequence names, one per line, and quit. |
|
Print a summary that includes information about index settings, as well as the names and lengths of the input sequences. The summary has this format:
Fields are separated by tabs. |
|
By default, when |
|
Print verbose output (for debugging). |
|
Print version information and quit. |
|
Print usage information and quit. |