[med-svn] [bowtie2] 01/03: New upstream version 2.3.4

Alex Mestiashvili malex-guest at moszumanska.debian.org
Tue Jan 2 15:55:51 UTC 2018


This is an automated email from the git hooks/post-receive script.

malex-guest pushed a commit to branch master
in repository bowtie2.

commit ff979c9064a5f475f7b26f80a40db087dc023cd3
Author: Alexandre Mestiashvili <alex at biotec.tu-dresden.de>
Date:   Tue Jan 2 15:57:48 2018 +0100

    New upstream version 2.3.4
---
 MANUAL                       | 293 ++++++++++++++--------------
 MANUAL.markdown              |  55 ++++--
 Makefile                     | 443 ++++++++++++++++++++++---------------------
 NEWS                         |  16 ++
 VERSION                      |   2 +-
 aligner_seed.h               |   2 +-
 blockwise_sa.h               |   2 +-
 bowtie2                      |  28 ++-
 bowtie2-build                |  68 +++----
 bowtie2-inspect              |  56 +++---
 bt2_search.cpp               |  36 ++--
 doc/manual.html              | 241 ++++++++++++-----------
 doc/website/manual.ssi       | 210 ++++++++++----------
 doc/website/recent_news.ssi  |   9 +
 doc/website/rhsidebar.ssi    |   4 +-
 ds.h                         |   2 +-
 filebuf.h                    |  18 +-
 outq.h                       |  11 +-
 pat.cpp                      |   2 +-
 scripts/test/simple_tests.pl |  25 ++-
 scripts/test/simple_tests.sh |   9 +-
 21 files changed, 839 insertions(+), 693 deletions(-)

diff --git a/MANUAL b/MANUAL
index 2360447..f8a528a 100644
--- a/MANUAL
+++ b/MANUAL
@@ -8,7 +8,7 @@ What is Bowtie 2?
 Bowtie 2 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 indexes the genome
+relatively long (e.g. mammalian) genomes. Bowtie 2 indexes the genome
 with an FM Index (based on the Burrows-Wheeler Transform or BWT) to keep
 its memory footprint small: for the human genome, its memory footprint
 is typically around 3.2 gigabytes of RAM. Bowtie 2 supports gapped,
@@ -22,7 +22,7 @@ Mac OS X and Linux.
 
 Bowtie 2 is often the first step in pipelines for comparative genomics,
 including for variation calling, ChIP-seq, RNA-seq, BS-seq. Bowtie 2 and
-Bowtie (also called "Bowtie 1" here) are also tightly integrated into
+Bowtie (also called “Bowtie 1” here) are also tightly integrated into
 some tools, including TopHat: a fast splice junction mapper for RNA-seq
 reads, RNA-seq reads, Crossbow: a cloud-enabled software tool for
 analyzing resequencing data, and Myrna: a cloud-enabled software tool
@@ -44,7 +44,7 @@ The chief differences between Bowtie 1 and Bowtie 2 are:
 
 1.  For reads longer than about 50 bp Bowtie 2 is generally faster, more
     sensitive, and uses less memory than Bowtie 1. For relatively short
-    reads (e.g. less than 50 bp) Bowtie 1 is sometimes faster and/or
+    reads ( e.g. less than 50 bp) Bowtie 1 is sometimes faster and/or
     more sensitive.
 
 2.  Bowtie 2 supports gapped alignment with affine gap penalties. Number
@@ -52,9 +52,9 @@ The chief differences between Bowtie 1 and Bowtie 2 are:
     configurable scoring scheme. Bowtie 1 finds just ungapped
     alignments.
 
-3.  Bowtie 2 supports local alignment, which doesn't require reads to
-    align end-to-end. Local alignments might be "trimmed" ("soft
-    clipped") at one or both extremes in a way that optimizes alignment
+3.  Bowtie 2 supports local alignment, which doesn’t require reads to
+    align end-to-end. Local alignments might be “trimmed” (“soft
+    clipped”) at one or both extremes in a way that optimizes alignment
     score. Bowtie 2 also supports end-to-end alignment which, like
     Bowtie 1, requires that the read align entirely.
 
@@ -64,13 +64,13 @@ The chief differences between Bowtie 1 and Bowtie 2 are:
 5.  Bowtie 2 allows alignments to overlap ambiguous characters (e.g. Ns)
     in the reference. Bowtie 1 does not.
 
-6.  Bowtie 2 does away with Bowtie 1's notion of alignment "stratum",
-    and its distinction between "Maq-like" and "end-to-end" modes. In
+6.  Bowtie 2 does away with Bowtie 1’s notion of alignment “stratum”,
+    and its distinction between “Maq-like” and “end-to-end” modes. In
     Bowtie 2 all alignments lie along a continuous spectrum of alignment
     scores where the scoring scheme, similar to Needleman-Wunsch and
     Smith-Waterman.
 
-7.  Bowtie 2's paired-end alignment is more flexible. E.g. for pairs
+7.  Bowtie 2’s paired-end alignment is more flexible. E.g. for pairs
     that do not align in a paired fashion, Bowtie 2 attempts to find
     unpaired alignments for each mate.
 
@@ -79,24 +79,24 @@ The chief differences between Bowtie 1 and Bowtie 2 are:
 
 9.  Bowtie 2 does not align colorspace reads.
 
-Bowtie 2 is not a "drop-in" replacement for Bowtie 1. Bowtie 2's
+Bowtie 2 is not a “drop-in” replacement for Bowtie 1. Bowtie 2’s
 command-line arguments and genome index format are both different from
-Bowtie 1's.
+Bowtie 1’s.
 
 
-What isn't Bowtie 2?
+What isn’t Bowtie 2?
 
 Bowtie 1 and Bowtie 2 are not general-purpose alignment tools like
 MUMmer, BLAST or Vmatch. Bowtie 2 works best when aligning to large
-genomes, though it supports arbitrarily small reference sequences (e.g.
-amplicons). It handles very long reads (i.e. upwards of 10s or 100s of
-kilobases), but it is optimized for the read lengths and error modes
-yielded by recent sequencers, such as the Illumina HiSeq 2000, Roche
-454, and Ion Torrent instruments.
+genomes, though it supports arbitrarily small reference sequences
+(e.g. amplicons). It handles very long reads (i.e. upwards of 10s or
+100s of kilobases), but it is optimized for the read lengths and error
+modes yielded by recent sequencers, such as the Illumina HiSeq 2000,
+Roche 454, and Ion Torrent instruments.
 
-If your goal is to align two very large sequences (e.g. two genomes),
+If your goal is to align two very large sequences (e.g. two genomes),
 consider using MUMmer. If your goal is very sensitive alignment to a
-relatively short reference sequence (e.g. a bacterial genome), this can
+relatively short reference sequence (e.g. a bacterial genome), this can
 be done with Bowtie 2 but you may want to consider using tools like
 NUCmer, BLAT, or BLAST. These tools can be extremely slow when the
 reference genome is long, but are often adequate when the reference is
@@ -105,11 +105,11 @@ short.
 Bowtie 2 does not support alignment of colorspace reads.
 
 
-What does it mean that some older Bowtie 2 versions are "beta"?
+What does it mean that some older Bowtie 2 versions are “beta”?
 
-We said those Bowtie 2 versions were in "beta" to convey that it was not
+We said those Bowtie 2 versions were in “beta” to convey that it was not
 as polished as a tool that had been around for a while, and was still in
-flux. Since version 2.0.1, we declared Bowtie 2 was no longer "beta".
+flux. Since version 2.0.1, we declared Bowtie 2 was no longer “beta”.
 
 
 
@@ -120,7 +120,7 @@ Download Bowtie 2 sources and binaries from the Download section of the
 Sourceforge site. Binaries are available for the Intel x86_64
 architecture running Linux, Mac OS X, and Windows. If you plan to
 compile Bowtie 2 yourself, make sure to get the source package, i.e.,
-the filename that ends in "-source.zip".
+the filename that ends in “-source.zip”.
 
 
 Building from source
@@ -134,7 +134,7 @@ worth investigating popular MinGW personal builds since these are coming
 already prepared with most of the toolchains needed.
 
 First, download the source package from the sourceforge site. Make sure
-you're getting the source package; the file downloaded should end in
+you’re getting the source package; the file downloaded should end in
 -source.zip. Unzip the file, change to the unzipped directory, and build
 the Bowtie 2 tools by running GNU make (usually with the command make,
 but sometimes with gmake) with no arguments. If building with MinGW, run
@@ -160,7 +160,7 @@ By adding your new Bowtie 2 directory to your PATH environment variable,
 you ensure that whenever you run bowtie2, bowtie2-build or
 bowtie2-inspect from the command line, you will get the version you just
 installed without having to specify the entire path. This is recommended
-for most users. To do this, follow your operating system's instructions
+for most users. To do this, follow your operating system’s instructions
 for adding the directory to your PATH.
 
 If you would like to install Bowtie 2 by copying the Bowtie 2 executable
@@ -177,11 +177,11 @@ THE bowtie2 ALIGNER
 bowtie2 takes a Bowtie 2 index and a set of sequencing read files and
 outputs a set of alignments in SAM format.
 
-"Alignment" is the process by which we discover how and where the read
-sequences are similar to the reference sequence. An "alignment" is a
-result from this process, specifically: an alignment is a way of "lining
-up" some or all of the characters in the read with some characters from
-the reference in a way that reveals how they're similar. For example:
+“Alignment” is the process by which we discover how and where the read
+sequences are similar to the reference sequence. An “alignment” is a
+result from this process, specifically: an alignment is a way of “lining
+up” some or all of the characters in the read with some characters from
+the reference in a way that reveals how they’re similar. For example:
 
       Read:      GACTGGGCGATCTCGACTTCG
                  |||||  |||||||||| |||
@@ -191,7 +191,7 @@ Where dash symbols represent gaps and vertical bars show where aligned
 characters match.
 
 We use alignment to make an educated guess as to where a read originated
-with respect to the reference genome. It's not always possible to
+with respect to the reference genome. It’s not always possible to
 determine this with certainty. For instance, if the reference genome
 contains several long stretches of As (AAAAAAAAA etc.) and the read
 sequence is a short stretch of As (AAAAAAA), we cannot know for certain
@@ -202,16 +202,16 @@ End-to-end alignment versus local alignment
 
 By default, Bowtie 2 performs end-to-end read alignment. That is, it
 searches for alignments involving all of the read characters. This is
-also called an "untrimmed" or "unclipped" alignment.
+also called an “untrimmed” or “unclipped” alignment.
 
-When the --local option is specified, Bowtie 2 performs local read
-alignment. In this mode, Bowtie 2 might "trim" or "clip" some read
+When the –local option is specified, Bowtie 2 performs local read
+alignment. In this mode, Bowtie 2 might “trim” or “clip” some read
 characters from one or both ends of the alignment if doing so maximizes
 the alignment score.
 
 End-to-end alignment example
 
-The following is an "end-to-end" alignment because it involves all the
+The following is an “end-to-end” alignment because it involves all the
 characters in the read. Such an alignment can be produced by Bowtie 2 in
 either end-to-end mode or in local mode.
 
@@ -225,9 +225,9 @@ either end-to-end mode or in local mode.
 
 Local alignment example
 
-The following is a "local" alignment because some of the characters at
+The following is a “local” alignment because some of the characters at
 the ends of the read do not participate. In this case, 4 characters are
-omitted (or "soft trimmed" or "soft clipped") from the beginning and 3
+omitted (or “soft trimmed” or “soft clipped”) from the beginning and 3
 characters are omitted from the end. This sort of alignment can be
 produced by Bowtie 2 only in local mode.
 
@@ -283,7 +283,7 @@ the read and the reference.
 
 Valid alignments meet or exceed the minimum score threshold
 
-For an alignment to be considered "valid" (i.e. "good enough") by Bowtie
+For an alignment to be considered “valid” (i.e. “good enough”) by Bowtie
 2, it must have an alignment score no less than the minimum score
 threshold. The threshold is configurable and is expressed as a function
 of the read length. In end-to-end alignment mode, the default minimum
@@ -305,13 +305,13 @@ the others.
 Aligners characterize their degree of confidence in the point of origin
 by reporting a mapping quality: a non-negative integer Q = -10 log10 p,
 where p is an estimate of the probability that the alignment does not
-correspond to the read's true point of origin. Mapping quality is
+correspond to the read’s true point of origin. Mapping quality is
 sometimes abbreviated MAPQ, and is recorded in the SAM MAPQ field.
 
-Mapping quality is related to "uniqueness." We say an alignment is
+Mapping quality is related to “uniqueness.” We say an alignment is
 unique if it has a much higher alignment score than all the other
-possible alignments. The bigger the gap between the best alignment's
-score and the second-best alignment's score, the more unique the best
+possible alignments. The bigger the gap between the best alignment’s
+score and the second-best alignment’s score, the more unique the best
 alignment, and the higher its mapping quality should be.
 
 Accurate mapping qualities are useful for downstream tools like variant
@@ -323,23 +323,23 @@ that the read truly originated elsewhere.
 
 Aligning pairs
 
-A "paired-end" or "mate-pair" read consists of pair of mates, called
+A “paired-end” or “mate-pair” read consists of pair of mates, called
 mate 1 and mate 2. Pairs come with a prior expectation about (a) the
 relative orientation of the mates, and (b) the distance separating them
 on the original DNA molecule. Exactly what expectations hold for a given
 dataset depends on the lab procedures used to generate the data. For
-example, a common lab procedure for producing pairs is Illumina's
+example, a common lab procedure for producing pairs is Illumina’s
 Paired-end Sequencing Assay, which yields pairs with a relative
-orientation of FR ("forward, reverse") meaning that if mate 1 came from
+orientation of FR (“forward, reverse”) meaning that if mate 1 came from
 the Watson strand, mate 2 very likely came from the Crick strand and
 vice versa. Also, this protocol yields pairs where the expected genomic
 distance from end to end is about 200-500 base pairs.
 
-For simplicity, this manual uses the term "paired-end" to refer to any
+For simplicity, this manual uses the term “paired-end” to refer to any
 pair of reads with some expected relative orientation and distance.
 Depending on the protocol, these might actually be referred to as
-"paired-end" or "mate-paired." Also, we always refer to the individual
-sequences making up the pair as "mates."
+“paired-end” or “mate-paired.” Also, we always refer to the individual
+sequences making up the pair as “mates.”
 
 Paired inputs
 
@@ -354,7 +354,7 @@ take the paired nature of the reads into account when aligning them.
 Paired SAM output
 
 When Bowtie 2 prints a SAM alignment for a pair, it prints two records
-(i.e. two lines of output), one for each mate. The first record
+(i.e. two lines of output), one for each mate. The first record
 describes the alignment for mate 1 and the second record describes the
 alignment for mate 2. In both records, some of the fields of the SAM
 record describe various properties of the alignment; for instance, the
@@ -364,21 +364,21 @@ indicates the inferred length of the DNA fragment from which the two
 mates were sequenced. See the SAM specification for more details
 regarding these fields.
 
-Concordant pairs match pair expectations, discordant pairs don't
+Concordant pairs match pair expectations, discordant pairs don’t
 
 A pair that aligns with the expected relative mate orientation and with
 the expected range of distances between mates is said to align
-"concordantly". If both mates have unique alignments, but the alignments
-do not match paired-end expectations (i.e. the mates aren't in the
-expected relative orientation, or aren't within the expected distance
-range, or both), the pair is said to align "discordantly". Discordant
+“concordantly”. If both mates have unique alignments, but the alignments
+do not match paired-end expectations (i.e. the mates aren’t in the
+expected relative orientation, or aren’t within the expected distance
+range, or both), the pair is said to align “discordantly”. Discordant
 alignments may be of particular interest, for instance, when seeking
 structural variants.
 
 The expected relative orientation of the mates is set using the --ff,
 --fr, or --rf options. The expected range of inter-mates distances (as
-measured from the furthest extremes of the mates; also called "outer
-distance") is set with the -I and -X options. Note that setting -I and
+measured from the furthest extremes of the mates; also called “outer
+distance”) is set with the -I and -X options. Note that setting -I and
 -X far apart makes Bowtie 2 slower. See documentation for -I and -X.
 
 To declare that a pair aligns discordantly, Bowtie 2 requires that both
@@ -393,7 +393,7 @@ Mixed mode: paired where possible, unpaired otherwise
 
 If Bowtie 2 cannot find a paired-end alignment for a pair, by default it
 will go on to look for unpaired alignments for the constituent mates.
-This is called "mixed mode." To disable mixed mode, set the --no-mixed
+This is called “mixed mode.” To disable mixed mode, set the --no-mixed
 option.
 
 Bowtie 2 runs a little faster in --no-mixed mode, but will only consider
@@ -422,8 +422,8 @@ Some SAM optional fields describe more paired-end properties
 The last several fields of each SAM record usually contain SAM optional
 fields, which are simply tab-separated strings conveying additional
 information about the reads and alignments. A SAM optional field is
-formatted like this: "XP:i:1" where "XP" is the TAG, "i" is the TYPE
-("integer" in this case), and "1" is the VALUE. See the SAM
+formatted like this: “XP:i:1” where “XP” is the TAG, “i” is the TYPE
+(“integer” in this case), and “1” is the VALUE. See the SAM
 specification for details regarding SAM optional fields.
 
 Mates can overlap, contain, or dovetail each other
@@ -438,7 +438,7 @@ mate 2.)
     Mate 2:                               TGTTTGGGGTGACACATTACGCGTCTTTGAC
     Reference: GCAGATTATATGAGTCAGCTACGATATTGTTTGGGGTGACACATTACGCGTCTTTGAC
 
-It's also possible, though unusual, for one mate alignment to contain
+It’s also possible, though unusual, for one mate alignment to contain
 the other, as in these examples:
 
     Mate 1:    GCAGATTATATGAGTCAGCTACGATATTGTTTGGGGTGACACATTACGC
@@ -449,16 +449,16 @@ the other, as in these examples:
     Mate 2:                      CTACGATATTGTTTGGGGTGAC
     Reference: GCAGATTATATGAGTCAGCTACGATATTGTTTGGGGTGACACATTACGCGTCTTTGAC
 
-And it's also possible, though unusual, for the mates to "dovetail",
-with the mates seemingly extending "past" each other as in this example:
+And it’s also possible, though unusual, for the mates to “dovetail”,
+with the mates seemingly extending “past” each other as in this example:
 
     Mate 1:                 GTCAGCTACGATATTGTTTGGGGTGACACATTACGC
     Mate 2:            TATGAGTCAGCTACGATATTGTTTGGGGTGACACAT                   
     Reference: GCAGATTATATGAGTCAGCTACGATATTGTTTGGGGTGACACATTACGCGTCTTTGAC
 
-In some situations, it's desirable for the aligner to consider all these
-cases as "concordant" as long as other paired-end constraints are not
-violated. Bowtie 2's default behavior is to consider overlapping and
+In some situations, it’s desirable for the aligner to consider all these
+cases as “concordant” as long as other paired-end constraints are not
+violated. Bowtie 2’s default behavior is to consider overlapping and
 containing as being consistent with concordant alignment. By default,
 dovetailing is considered inconsistent with concordant alignment.
 
@@ -475,7 +475,7 @@ The reporting mode governs how many alignments Bowtie 2 looks for, and
 how to report them. Bowtie 2 has three distinct reporting modes. The
 default reporting mode is similar to the default reporting mode of many
 other read alignment tools, including BWA. It is also similar to Bowtie
-1's -M alignment mode.
+1’s -M alignment mode.
 
 In general, when we say that a read has an alignment, we mean that it
 has a valid alignment. When we say that a read has multiple alignments,
@@ -484,7 +484,7 @@ one another.
 
 Distinct alignments map a read to different places
 
-Two alignments for the same individual read are "distinct" if they map
+Two alignments for the same individual read are “distinct” if they map
 the same read to different places. Specifically, we say that two
 alignments are distinct if there are no alignment positions where a
 particular read offset is aligned opposite a particular reference offset
@@ -513,13 +513,13 @@ optional fields, such as AS:i and XS:i. Bowtie 2 does not guarantee that
 the alignment reported is the best possible in terms of alignment score.
 
 See also: -D, which puts an upper limit on the number of dynamic
-programming problems (i.e. seed extensions) that can "fail" in a row
+programming problems (i.e. seed extensions) that can “fail” in a row
 before Bowtie 2 stops searching. Increasing -D makes Bowtie 2 slower,
 but increases the likelihood that it will report the correct alignment
 for a read that aligns many places.
 
 See also: -R, which sets the maximum number of times Bowtie 2 will
-"re-seed" when attempting to align a read with repetitive seeds.
+“re-seed” when attempting to align a read with repetitive seeds.
 Increasing -R makes Bowtie 2 slower, but increases the likelihood that
 it will report the correct alignment for a read that aligns many places.
 
@@ -531,11 +531,11 @@ That is, if -k 2 is specified, Bowtie 2 will search for at most 2
 distinct alignments. It reports all alignments found, in descending
 order by alignment score. The alignment score for a paired-end alignment
 equals the sum of the alignment scores of the individual mates. Each
-reported read or pair alignment beyond the first has the SAM 'secondary'
+reported read or pair alignment beyond the first has the SAM ‘secondary’
 bit (which equals 256) set in its FLAGS field. See the SAM specification
 for details.
 
-Bowtie 2 does not "find" alignments in any specific order, so for reads
+Bowtie 2 does not “find” alignments in any specific order, so for reads
 that have more than N distinct, valid alignments, Bowtie 2 does not
 guarantee that the N alignments reported are the best possible in terms
 of alignment score. Still, this mode can be effective and fast in
@@ -549,7 +549,7 @@ number of alignments Bowtie 2 should report. Alignments are reported in
 descending order by alignment score. The alignment score for a
 paired-end alignment equals the sum of the alignment scores of the
 individual mates. Each reported read or pair alignment beyond the first
-has the SAM 'secondary' bit (which equals 256) set in its FLAGS field.
+has the SAM ‘secondary’ bit (which equals 256) set in its FLAGS field.
 See the SAM specification for details.
 
 Some tools are designed with this reporting mode in mind. Bowtie 2 is
@@ -557,7 +557,7 @@ not! For very large genomes, this mode is very slow.
 
 Randomness in Bowtie 2
 
-Bowtie 2's search for alignments for a given read is "randomized." That
+Bowtie 2’s search for alignments for a given read is “randomized.” That
 is, when Bowtie 2 encounters a set of equally-good choices, it uses a
 pseudo-random number to choose. For example, if Bowtie 2 discovers a set
 of 3 equally-good alignments and wants to decide which to report, it
@@ -587,9 +587,9 @@ consists of many identical reads.
 Multiseed heuristic
 
 To rapidly narrow the number of possible alignments that must be
-considered, Bowtie 2 begins by extracting substrings ("seeds") from the
+considered, Bowtie 2 begins by extracting substrings (“seeds”) from the
 read and its reverse complement and aligning them in an ungapped fashion
-with the help of the FM Index. This is "multiseed alignment" and it is
+with the help of the FM Index. This is “multiseed alignment” and it is
 similar to what Bowtie 1 does, except Bowtie 1 attempts to align the
 entire read this way.
 
@@ -605,7 +605,7 @@ and the number of mismatches permitted per seed (-N). For more sensitive
 alignment, set these parameters to (a) make the seeds closer together,
 (b) make the seeds shorter, and/or (c) allow more mismatches. You can
 adjust these options one-by-one, though Bowtie 2 comes with some useful
-combinations of options prepackaged as "preset options."
+combinations of options prepackaged as “preset options.”
 
 -D and -R are also options that adjust the trade-off between speed and
 sensitivity/accuracy.
@@ -613,7 +613,7 @@ sensitivity/accuracy.
 FM Index memory footprint
 
 Bowtie 2 uses the FM Index to find ungapped alignments for seeds. This
-step accounts for the bulk of Bowtie 2's memory footprint, as the FM
+step accounts for the bulk of Bowtie 2’s memory footprint, as the FM
 Index itself is typically the largest data structure used. For instance,
 the memory footprint of the FM Index for the human genome is about 3.2
 gigabytes of RAM.
@@ -622,7 +622,7 @@ gigabytes of RAM.
 Ambiguous characters
 
 Non-whitespace characters besides A, C, G or T are considered
-"ambiguous." N is a common ambiguous character that appears in reference
+“ambiguous.” N is a common ambiguous character that appears in reference
 sequences. Bowtie 2 considers all ambiguous characters in the reference
 (including IUPAC nucleotide codes) to be Ns.
 
@@ -643,7 +643,7 @@ alignments that do not overlap ambiguous reference characters.
 Presets: setting many settings at once
 
 Bowtie 2 comes with some useful combinations of parameters packaged into
-shorter "preset" parameters. For example, running Bowtie 2 with the
+shorter “preset” parameters. For example, running Bowtie 2 with the
 --very-sensitive option is the same as running with options:
 -D 20 -R 3 -N 0 -L 20 -i S,1,0.50. The preset options that come with
 Bowtie 2 are designed to cover a wide area of the
@@ -656,7 +656,7 @@ options for details.
 
 Filtering
 
-Some reads are skipped or "filtered out" by Bowtie 2. For example, reads
+Some reads are skipped or “filtered out” by Bowtie 2. For example, reads
 may be filtered out because they are extremely short or have a high
 proportion of ambiguous nucleotides. Bowtie 2 will still print a SAM
 record for such a read, but no alignment will be reported and the YF:i
@@ -669,13 +669,13 @@ filtered.
     ambiguous characters (usually N or .) greater than the ceiling
     specified with --n-ceil.
 -   YF:Z:SC: the read was filtered because the read length and the match
-    bonus (set with --ma) are such that the read can't possibly earn an
+    bonus (set with --ma) are such that the read can’t possibly earn an
     alignment score greater than or equal to the threshold set with
     --score-min
 -   YF:Z:QC: the read was filtered because it was marked as failing
     quality control and the user specified the --qc-filter option. This
-    only happens when the input is in Illumina's QSEQ format (i.e. when
-    --qseq is specified) and the last (11th) field of the read's QSEQ
+    only happens when the input is in Illumina’s QSEQ format (i.e. when
+    --qseq is specified) and the last (11th) field of the read’s QSEQ
     record contains 1.
 
 If a read could be filtered for more than one reason, the value YF:Z
@@ -685,7 +685,7 @@ flag will reflect only one of those reasons.
 Alignment summary
 
 When Bowtie 2 finishes running, it prints messages summarizing what
-happened. These messages are printed to the "standard error" ("stderr")
+happened. These messages are printed to the “standard error” (“stderr”)
 filehandle. For datasets consisting of unpaired reads, the summary might
 look like this:
 
@@ -721,7 +721,7 @@ Wrapper scripts
 
 The bowtie2, bowtie2-build and bowtie2-inspect executables are actually
 wrapper scripts that call binary programs as appropriate. The wrappers
-shield users from having to distinguish between "small" and "large"
+shield users from having to distinguish between “small” and “large”
 index formats, discussed briefly in the following section. Also, the
 bowtie2 wrapper provides some key functionality, like the ability to
 handle compressed inputs, and the functionality for --un, --al and
@@ -735,8 +735,8 @@ Small and large indexes
 
 bowtie2-build can index reference genomes of any size. For genomes less
 than about 4 billion nucleotides in length, bowtie2-build builds a
-"small" index using 32-bit numbers in various parts of the index. When
-the genome is longer, bowtie2-build builds a "large" index using 64-bit
+“small” index using 32-bit numbers in various parts of the index. When
+the genome is longer, bowtie2-build builds a “large” index using 64-bit
 numbers. Small indexes are stored in files with the .bt2 extension, and
 large indexes are stored in files with the .bt2l extension. The user
 need not worry about whether a particular index is small or large; the
@@ -765,7 +765,7 @@ Performance tuning
     effective at speeding up alignment when many alignments are reported
     per read.
 
-3.  If bowtie2 "thrashes", try increasing bowtie2-build --offrate
+3.  If bowtie2 “thrashes”, try increasing bowtie2-build --offrate
 
     If bowtie2 runs very slowly on a relatively low-memory computer, try
     setting -o/--offrate to a _larger_ value when building the index.
@@ -819,8 +819,8 @@ Comma-separated list of files containing mate 1s (filename usually
 includes _1), e.g. -1 flyA_1.fq,flyB_1.fq. Sequences specified with this
 option must correspond file-for-file and read-for-read with those
 specified in <m2>. Reads may be a mix of different lengths. If - is
-specified, bowtie2 will read the mate 1s from the "standard in" or
-"stdin" filehandle.
+specified, bowtie2 will read the mate 1s from the “standard in” or
+“stdin” filehandle.
 
     -2 <m2>
 
@@ -828,20 +828,20 @@ Comma-separated list of files containing mate 2s (filename usually
 includes _2), e.g. -2 flyA_2.fq,flyB_2.fq. Sequences specified with this
 option must correspond file-for-file and read-for-read with those
 specified in <m1>. Reads may be a mix of different lengths. If - is
-specified, bowtie2 will read the mate 2s from the "standard in" or
-"stdin" filehandle.
+specified, bowtie2 will read the mate 2s from the “standard in” or
+“stdin” filehandle.
 
     -U <r>
 
 Comma-separated list of files containing unpaired reads to be aligned,
 e.g. lane1.fq,lane2.fq,lane3.fq,lane4.fq. Reads may be a mix of
 different lengths. If - is specified, bowtie2 gets the reads from the
-"standard in" or "stdin" filehandle.
+“standard in” or “stdin” filehandle.
 
     -S <sam>
 
 File to write SAM alignments to. By default, alignments are written to
-the "standard out" or "stdout" filehandle (i.e. the console).
+the “standard out” or “stdout” filehandle (i.e. the console).
 
 Options
 
@@ -890,6 +890,17 @@ Reads (specified with <m1>, <m2>, <s>) are files with one input sequence
 per line, without any other information (no read names, no qualities).
 When -r is set, the result is as if --ignore-quals is also set.
 
+    -F k:<int>,i:<int>
+
+Reads are substrings (k-mers) extracted from a FASTA file <s>.
+Specifically, for every reference sequence in FASTA file <s>, Bowtie 2
+aligns the k-mers at offsets 1, 1+i, 1+2i, … until reaching the end of
+the reference. Each k-mer is aligned as a separate read. Quality values
+are set to all Is (40 on Phred scale). Each k-mer (read) is given a name
+like <sequence>_<offset>, where <sequence> is the name of the FASTA
+sequence it was drawn from and <offset> is its 0-based offset of origin
+with respect to the sequence. Only single k-mers, i.e. unpaired reads,
+can be aligned in this way.
     -c
 
 The read sequences are given on command line. I.e. <m1>, <m2> and
@@ -899,7 +910,7 @@ implies --ignore-quals.
 
     -s/--skip <int>
 
-Skip (i.e. do not align) the first <int> reads or pairs in the input.
+Skip (i.e. do not align) the first <int> reads or pairs in the input.
 
     -u/--qupto <int>
 
@@ -909,37 +920,37 @@ limit.
 
     -5/--trim5 <int>
 
-Trim <int> bases from 5' (left) end of each read before alignment
+Trim <int> bases from 5’ (left) end of each read before alignment
 (default: 0).
 
     -3/--trim3 <int>
 
-Trim <int> bases from 3' (right) end of each read before alignment
+Trim <int> bases from 3’ (right) end of each read before alignment
 (default: 0).
 
     --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
+is also called the “Phred+33” encoding, which is used by the very latest
 Illumina pipelines.
 
     --phred64
 
 Input qualities are ASCII chars equal to the Phred quality plus 64. This
-is also called the "Phred+64" encoding.
+is also called the “Phred+64” encoding.
 
     --solexa-quals
 
 Convert input qualities from Solexa (which can be negative) to Phred
-(which can't). This scheme was used in older Illumina GA Pipeline
+(which can’t). This scheme was used in older Illumina GA Pipeline
 versions (prior to 1.3). Default: off.
 
     --int-quals
 
 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. Default: off.
+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. Default: off.
 
 Preset options in --end-to-end mode
 
@@ -1010,7 +1021,7 @@ will be:
     Seed 4 fw:                   TCATGCATAA
     Seed 4 rc:                   TTATGCATGA
 
-Since it's best to use longer intervals for longer reads, this parameter
+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
@@ -1030,7 +1041,7 @@ Default: L,0,0.15.
 
     --dpad <int>
 
-"Pads" dynamic programming problems by <int> columns on either side to
+“Pads” dynamic programming problems by <int> columns on either side to
 allow gaps. Default: 15.
 
     --gbar <int>
@@ -1043,8 +1054,8 @@ read. Default: 4.
 When calculating a mismatch penalty, always consider the quality value
 at the mismatched position to be the highest possible, regardless of the
 actual value. I.e. input is treated as though all quality values are
-high. This is also the default behavior when the input doesn't specify
-quality values (e.g. in -f, -r, or -c modes).
+high. This is also the default behavior when the input doesn’t specify
+quality values (e.g. in -f, -r, or -c modes).
 
     --nofw/--norc
 
@@ -1052,7 +1063,7 @@ If --nofw is specified, bowtie2 will not attempt to align unpaired reads
 to the forward (Watson) reference strand. If --norc is specified,
 bowtie2 will not attempt to align unpaired reads against the
 reverse-complement (Crick) reference strand. In paired-end mode, --nofw
-and --norc pertain to the fragments; i.e. specifying --nofw causes
+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: both
 strands enabled.
@@ -1075,7 +1086,7 @@ comes at the expense of speed.
     --end-to-end
 
 In this mode, Bowtie 2 requires that the entire read align from one end
-to the other, without any trimming (or "soft clipping") of characters
+to the other, without any trimming (or “soft clipping”) of characters
 from either end. The match bonus --ma always equals 0 in this mode, so
 all alignment scores are less than or equal to 0, and the greatest
 possible alignment score is 0. This is mutually exclusive with --local.
@@ -1084,8 +1095,8 @@ possible alignment score is 0. This is mutually exclusive with --local.
     --local
 
 In this mode, Bowtie 2 does not require that the entire read align from
-one end to the other. Rather, some characters may be omitted ("soft
-clipped") from the ends in order to achieve the greatest possible
+one end to the other. Rather, some characters may be omitted (“soft
+clipped”) from the ends in order to achieve the greatest possible
 alignment score. The match bonus --ma is used in this mode, and the best
 possible alignment score is equal to the match bonus (--ma) times the
 length of the read. Specifying --local and one of the presets (e.g.
@@ -1132,7 +1143,7 @@ Default: 5, 3.
     --score-min <func>
 
 Sets a function governing the minimum alignment score needed for an
-alignment to be considered "valid" (i.e. good enough to report). This is
+alignment to be considered “valid” (i.e. good enough to report). 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
@@ -1151,12 +1162,12 @@ SAM optional fields, such as AS:i and XS:i.
 
 When -k is specified, however, bowtie2 behaves differently. Instead, it
 searches for at most <int> distinct, valid alignments for each read. The
-search terminates when it can't find more distinct valid alignments, or
+search terminates when it can’t find more distinct valid alignments, or
 when it finds <int>, whichever happens first. All alignments found are
 reported in descending order by alignment score. The alignment score for
 a paired-end alignment equals the sum of the alignment scores of the
 individual mates. Each reported read or pair alignment beyond the first
-has the SAM 'secondary' bit (which equals 256) set in its FLAGS field.
+has the SAM ‘secondary’ bit (which equals 256) set in its FLAGS field.
 For reads that have more than <int> distinct, valid alignments, bowtie2
 does not guarantee that the <int> alignments reported are the best
 possible in terms of alignment score. -k is mutually exclusive with -a.
@@ -1177,16 +1188,16 @@ Effort options
 
     -D <int>
 
-Up to <int> consecutive seed extension attempts can "fail" before Bowtie
-2 moves on, using the alignments found so far. A seed extension "fails"
+Up to <int> consecutive seed extension attempts can “fail” before Bowtie
+2 moves on, using the alignments found so far. 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.
 
     -R <int>
 
-<int> is the maximum number of times Bowtie 2 will "re-seed" reads with
-repetitive seeds. When "re-seeding," Bowtie 2 simply chooses a new set
+<int> is the maximum number of times Bowtie 2 will “re-seed” reads with
+repetitive seeds. 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
@@ -1241,7 +1252,7 @@ if mate 2 appears upstream of the reverse complement of mate 1 and all
 other constraints are met, that too is valid. --rf likewise requires
 that an upstream mate1 be reverse-complemented and a downstream mate2 be
 forward-oriented. --ff requires both an upstream mate 1 and a downstream
-mate 2 to be forward-oriented. Default: --fr (appropriate for Illumina's
+mate 2 to be forward-oriented. Default: --fr (appropriate for Illumina’s
 Paired-end Sequencing Assay).
 
     --no-mixed
@@ -1260,7 +1271,7 @@ behavior.
 
     --dovetail
 
-If the mates "dovetail", that is if one mate alignment extends past the
+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. Default: mates cannot dovetail in a concordant
@@ -1283,7 +1294,7 @@ Output options
     -t/--time
 
 Print the wall-clock time required to load the index files and align the
-reads. This is printed to the "standard error" ("stderr") filehandle.
+reads. This is printed to the “standard error” (“stderr”) filehandle.
 Default: off.
 
     --un <path>
@@ -1322,7 +1333,7 @@ as they did in the input.
 
 Write paired-end reads that fail to align concordantly to file(s) at
 <path>. These reads correspond to the SAM records with the FLAGS 0x4 bit
-set and either the 0x40 or 0x80 bit set (depending on whether it's mate
+set and either the 0x40 or 0x80 bit set (depending on whether it’s mate
 #1 or #2). .1 and .2 strings are added to the filename to distinguish
 which file contains mate #1 and mate #2. If a percent symbol, %, is used
 in <path>, the percent symbol is replaced with 1 or 2 to make the
@@ -1340,7 +1351,7 @@ inputs.
 
 Write paired-end reads that align concordantly at least once to file(s)
 at <path>. These reads correspond to the SAM records with the FLAGS 0x4
-bit unset and either the 0x40 or 0x80 bit set (depending on whether it's
+bit unset and either the 0x40 or 0x80 bit set (depending on whether it’s
 mate #1 or #2). .1 and .2 strings are added to the filename to
 distinguish which file contains mate #1 and mate #2. If a percent
 symbol, %, is used in <path>, the percent symbol is replaced with 1 or 2
@@ -1363,7 +1374,7 @@ See also: --met. Default: metrics disabled.
 
     --met-stderr <path>
 
-Write bowtie2 metrics to the "standard error" ("stderr") filehandle.
+Write bowtie2 metrics to the “standard error” (“stderr”) filehandle.
 This is not mutually exclusive with --met-file. Having alignment metric
 can be useful for debugging certain problems, especially performance
 issues. See also: --met. Default: metrics disabled.
@@ -1436,11 +1447,11 @@ offsets. <int> must be greater than the value used to build the index.
 Launch NTHREADS parallel search threads (default: 1). Threads will run
 on separate processors/cores and synchronize when parsing reads and
 outputting alignments. Searching for alignments is highly parallel, and
-speedup is close to linear. Increasing -p increases Bowtie 2's memory
+speedup is close to linear. Increasing -p increases Bowtie 2’s memory
 footprint. E.g. when aligning to a human genome index, increasing -p
 from 1 to 8 increases the memory footprint by a few hundred megabytes.
 This option is only available if bowtie is linked with the pthreads
-library (i.e. if BOWTIE_PTHREADS=0 is not specified at build time).
+library (i.e. if BOWTIE_PTHREADS=0 is not specified at build time).
 
     --reorder
 
@@ -1455,7 +1466,7 @@ output order will naturally correspond to input order in that case.
 
 Use memory-mapped I/O to load the index, rather than typical file I/O.
 Memory-mapping allows many concurrent bowtie processes on the same
-computer to share the same memory image of the index (i.e. you pay the
+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 bowtie in situations where using -p is not possible
 or not preferable.
@@ -1566,15 +1577,15 @@ by tabs; from left to right, the fields are:
 
 6.  CIGAR string representation of alignment
 
-7.  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
+7.  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.
 
 8.  1-based offset into the forward reference strand where leftmost
-    character of the mate's alignment occurs. Offset is 0 if there is no
+    character of the mate’s alignment occurs. Offset is 0 if there is no
     mate.
 
-9.  Inferred fragment length. Size is negative if the mate's alignment
+9.  Inferred fragment length. Size is negative if the mate’s alignment
     occurs upstream of this alignment. Size is 0 if the mates did not
     align concordantly. However, size is non-0 if the mates aligned
     discordantly to the same chromosome.
@@ -1671,10 +1682,10 @@ constitute the index: they are all that is needed to align reads to that
 reference. The original sequence FASTA files are no longer used by
 Bowtie 2 once the index is built.
 
-Bowtie 2's .bt2 index format is different from Bowtie 1's .ebwt format,
+Bowtie 2’s .bt2 index format is different from Bowtie 1’s .ebwt format,
 and they are not compatible with each other.
 
-Use of Karkkainen's blockwise algorithm allows bowtie2-build to trade
+Use of Karkkainen’s blockwise algorithm allows bowtie2-build to trade
 off between running time and memory usage. bowtie2-build has three
 options governing how it makes this trade: -p/--packed,
 --bmax/--bmaxdivn, and --dcv. By default, bowtie2-build will
@@ -1682,9 +1693,9 @@ 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,
+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
+“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
@@ -1801,8 +1812,8 @@ paired-end alignment.
 
     -o/--offrate <int>
 
-To map alignments back to positions on the reference sequences, it's
-necessary to annotate ("mark") some or all of the Burrows-Wheeler rows
+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. -o/--offrate governs
 how many rows get marked: the indexer will mark every 2^<int> rows.
 Marking more rows makes reference-position lookups faster, but requires
@@ -1922,7 +1933,7 @@ GETTING STARTED WITH BOWTIE 2: LAMBDA PHAGE EXAMPLE
 
 Bowtie 2 comes with some example files to get you started. The example
 files are not scientifically significant; we use the Lambda phage
-reference genome simply because it's short, and the reads were generated
+reference genome simply because it’s short, and the reads were generated
 by a computer program, not a sequencer. However, these files will let
 you start running Bowtie 2 and downstream tools right away.
 
@@ -1936,7 +1947,7 @@ refer to that directory.
 Indexing a reference genome
 
 To create an index for the Lambda phage reference genome included with
-Bowtie 2, create a new temporary directory (it doesn't matter where),
+Bowtie 2, create a new temporary directory (it doesn’t matter where),
 change into that directory, and run:
 
     $BT2_HOME/bowtie2-build $BT2_HOME/example/reference/lambda_virus.fa lambda_virus
@@ -1945,7 +1956,7 @@ The command should print many lines of output then quit. When the
 command completes, the current directory will contain four new files
 that all start with lambda_virus and end with .1.bt2, .2.bt2, .3.bt2,
 .4.bt2, .rev.1.bt2, and .rev.2.bt2. These files constitute the index -
-you're done!
+you’re done!
 
 You can use bowtie2-build to create an index for a set of FASTA files
 obtained from any source, including sites such as UCSC, NCBI, and
@@ -1967,7 +1978,7 @@ This runs the Bowtie 2 aligner, which aligns a set of unpaired reads to
 the Lambda phage reference genome using the index generated in the
 previous step. The alignment results in SAM format are written to the
 file eg1.sam, and a short alignment summary is written to the console.
-(Actually, the summary is written to the "standard error" or "stderr"
+(Actually, the summary is written to the “standard error” or “stderr”
 filehandle, which is typically printed to the console.)
 
 To see the first few lines of the SAM output, run:
diff --git a/MANUAL.markdown b/MANUAL.markdown
index 8092431..f23cfdc 100644
--- a/MANUAL.markdown
+++ b/MANUAL.markdown
@@ -4,6 +4,10 @@
  ! of this text document, or see the HTML manual online.
  ! -->
 
+---
+title: Bowtie 2 Manual
+---
+
 Introduction
 ============
 
@@ -125,10 +129,11 @@ Building from source
 
 Building Bowtie 2 from source requires a GNU-like environment with GCC, GNU Make
 and other basics.  It should be possible to build Bowtie 2 on most vanilla Linux
-installations or on a Mac installation with [Xcode] installed.  Bowtie 2 can
-also be built on Windows using a 64-bit MinGW distribution and MSYS. In order 
-to simplify the MinGW setup it might be worth investigating popular MinGW personal 
-builds since these are coming already prepared with most of the toolchains needed.
+installations or on a Mac installation with [Xcode] installed.  (But see note
+about the TBB library below).  Bowtie 2 can also be built on Windows using a
+64-bit MinGW distribution and MSYS. In order to simplify the MinGW setup it might
+be worth investigating popular MinGW personal builds since these are coming
+already prepared with most of the toolchains needed.
 
 First, download the source package from the [sourceforge site].  Make sure
 you're getting the source package; the file downloaded should end in
@@ -137,19 +142,12 @@ Bowtie 2 tools by running GNU `make` (usually with the command `make`, but
 sometimes with `gmake`) with no arguments.  If building with MinGW, run `make`
 from the MSYS environment.
 
-Bowtie 2 is using the multithreading software model in order to
-speed up execution times on SMP architectures where this is possible.
-The Threading Building Blocks library, TBB, is now the default
-threading library in Bowtie 2. On POSIX platforms (like Linux, Mac
-OS, etc.) if TBB is not available the pthread library will be used.
-Although it is possible to use pthread library on Windows, a non-POSIX
-platform, due to performance reasons Bowtie 2 will try to use Windows
-native multithreading if possible. We recommend that you first
-install the [Threading Building Blocks library], but if unable to
-do so please specify `make NO_TBB=1`. TBB comes installed by default
-on many popular Linux distros. Please note, packages built without
-TBB will have _-legacy_ appended to the name.
-
+Bowtie 2 can be run on many threads. By default, Bowtie 2 uses the Threading
+Building Blocks library (TBB) for this. If TBB is not available on your system
+(e.g. `make` prints an error like `tbb/mutex.h: No such file or directory`),
+you can install it yourself (see [Threading Building Blocks library]) or build
+Bowtie 2 with `make NO_TBB=1` to use pthreads or Windows native multithreading
+instead.
 
 Adding to PATH
 --------------
@@ -923,6 +921,22 @@ per line, without any other information (no read names, no qualities).  When
 `-r` is set, the result is as if [`--ignore-quals`] is also set.
 
 </td></tr>
+<tr><td id="bowtie2-options-F">
+
+    -F k:<int>,i:<int>
+
+</td><td>
+
+Reads are substrings (k-mers) extracted from a FASTA file `<s>`.
+Specifically, for every reference sequence in FASTA file `<s>`, Bowtie
+2 aligns the k-mers at offsets 1, 1+i, 1+2i, ... until reaching the
+end of the reference. Each k-mer is aligned as a separate read.
+Quality values are set to all Is (40 on Phred scale). Each k-mer
+(read) is given a name like `<sequence>_<offset>`, where `<sequence>`
+is the name of the FASTA sequence it was drawn from and `<offset>`
+is its 0-based offset of origin with respect to the sequence. Only
+single k-mers, i.e. unpaired reads, can be aligned in this way.
+</td></tr>
 <tr><td id="bowtie2-options-c">
 
     -c
@@ -1927,8 +1941,8 @@ left to right, the fields are:
 	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. The standard behavior of truncating at the first
-	whitespace can be suppressed with `--sam-no-qname-trunc` at the expense of
-	generating non-standard SAM.
+    whitespace can be suppressed with `--sam-no-qname-trunc` at the expense of
+    generating non-standard SAM.
 
 2.  Sum of all applicable flags.  Flags relevant to Bowtie are:
 
@@ -2806,6 +2820,9 @@ for more details and variations on this process.
 [`-N`]:                                               #bowtie2-options-N
 [`-a`/`--noauto`]:                                    #bowtie2-build-options-a
 [`-a`]:                                               #bowtie2-options-a
+<!-- fasta-continuous option does not exist but was added to prevent
+warnings due to the case insensitive nature of markdown URLs -->
+[`-F`/--fasta-continuous]:                            #bowtie2-options-F
 [`-c`]:                                               #bowtie2-options-c
 [`-f`]:                                               #bowtie2-options-f
 [`-i`]:                                               #bowtie2-options-i
diff --git a/Makefile b/Makefile
index 9b4453e..d4c8d63 100644
--- a/Makefile
+++ b/Makefile
@@ -21,225 +21,244 @@
 # Makefile for bowtie, bowtie2-build, bowtie2-inspect
 #
 
-prefix = /usr/local
-bindir = $(prefix)/bin
+prefix := /usr/local
+bindir := $(prefix)/bin
 
-INC = $(if $(RELEASE_BUILD),-I$(CURDIR)/.include)
-LIBS = $(LDFLAGS) $(if $(RELEASE_BUILD),-L$(CURDIR)/.lib) -lz
-GCC_PREFIX = $(shell dirname `which gcc`)
-GCC_SUFFIX =
+LDLIBS := -lz
+GCC_PREFIX := $(shell dirname `which gcc`)
+GCC_SUFFIX :=
 CC ?= $(GCC_PREFIX)/gcc$(GCC_SUFFIX)
 CPP ?= $(GCC_PREFIX)/g++$(GCC_SUFFIX)
 CXX ?= $(CPP)
-HEADERS = $(wildcard *.h)
-BOWTIE_MM = 1
-BOWTIE_SHARED_MEM =
+
+HEADERS := $(wildcard *.h)
+BOWTIE_MM := 1
+BOWTIE_SHARED_MEM :=
+
+ifdef RELEASE_BUILD
+	LDFLAGS += -L$(CURDIR)/.lib
+	CPPFLAGS += -I$(CURDIR)/.include
+endif
 
 # Detect Cygwin or MinGW
-WINDOWS =
-MINGW =
+WINDOWS :=
+MINGW :=
 ifneq (,$(findstring MINGW,$(shell uname)))
-	WINDOWS = 1
-	MINGW = 1
+	WINDOWS := 1
+	MINGW := 1
 	# POSIX memory-mapped files not currently supported on Windows
-	BOWTIE_MM = 0
-	BOWTIE_SHARED_MEM = 0
-	override EXTRA_FLAGS += -ansi
+	BOWTIE_MM := 0
+	BOWTIE_SHARED_MEM := 0
+	CXXFLAGS += -ansi
 endif
 
-MACOS =
+MACOS :=
 ifneq (,$(findstring Darwin,$(shell uname)))
-	MACOS = 1
-	ifneq (,$(findstring 13,$(shell uname -r)))
-		CPP = clang++
-		CC = clang
-		override EXTRA_FLAGS += -stdlib=libstdc++
+	MACOS := 1
+	ifeq (1,$(shell uname -r | awk -F. '{ if ($$1 > 12 && $$1 < 16) print 1; }'))
+		CXXFLAGS += -stdlib=libstdc++
 	endif
-	ifeq (1, $(RELEASE_BUILD))
-		EXTRA_FLAGS += -mmacosx-version-min=10.9
+	ifdef RELEASE_BUILD
+		CXXFLAGS += -mmacosx-version-min=10.9
 	endif
 endif
 
 POPCNT_CAPABILITY ?= 1
 ifeq (1, $(POPCNT_CAPABILITY))
-    override EXTRA_FLAGS += -DPOPCNT_CAPABILITY
-    INC += -I third_party
+    CXXFLAGS += -DPOPCNT_CAPABILITY
+    CPPFLAGS += -I third_party
 endif
 
-MM_DEF =
+MM_DEF :=
 
 ifeq (1,$(BOWTIE_MM))
-	MM_DEF = -DBOWTIE_MM
+	MM_DEF := -DBOWTIE_MM
 endif
 
-SHMEM_DEF =
+SHMEM_DEF :=
 
-ifeq (1,$(BOWTIE_SHARED_MEM))
-	SHMEM_DEF = -DBOWTIE_SHARED_MEM
+ifdef BOWTIE_SHARED_MEM
+	SHMEM_DEF := -DBOWTIE_SHARED_MEM
 endif
 
-PTHREAD_PKG =
-PTHREAD_LIB =
+PTHREAD_PKG :=
+PTHREAD_LIB :=
 
 #if we're not using TBB, then we can't use queuing locks
 ifeq (1,$(NO_TBB))
-	NO_QUEUELOCK=1
+	NO_QUEUELOCK := 1
 endif
 
 ifeq (1,$(MINGW))
-	PTHREAD_LIB =
+	PTHREAD_LIB :=
 else
-	PTHREAD_LIB = -lpthread
+	PTHREAD_LIB := -lpthread
 endif
 
 ifeq (1,$(NO_SPINLOCK))
-	override EXTRA_FLAGS += -DNO_SPINLOCK
+	CXXFLAGS += -DNO_SPINLOCK
 endif
 
 #default is to use Intel TBB
 ifneq (1,$(NO_TBB))
-	LIBS += $(PTHREAD_LIB) -ltbb -ltbbmalloc$(if $(RELEASE_BUILD),,_proxy)
-	override EXTRA_FLAGS += -DWITH_TBB
+	LDLIBS += $(PTHREAD_LIB) -ltbb
+	ifdef RELEASE_BUILD
+		LDLIBS += -ltbbmalloc
+	else
+		LDLIBS += -ltbbmalloc_proxy
+	endif
+	CXXFLAGS += -DWITH_TBB
 else
-	LIBS += $(PTHREAD_LIB)
-endif
-SEARCH_LIBS =
-BUILD_LIBS =
-INSPECT_LIBS =
-
-ifeq (1,$(MINGW))
-	BUILD_LIBS =
-	INSPECT_LIBS =
+	LDLIBS += $(PTHREAD_LIB)
 endif
 
 ifeq (1,$(WITH_THREAD_PROFILING))
-	override EXTRA_FLAGS += -DPER_THREAD_TIMING=1
+	CXXFLAGS += -DPER_THREAD_TIMING=1
 endif
 
 ifeq (1,$(WITH_AFFINITY))
-	override EXTRA_FLAGS += -DWITH_AFFINITY=1
+	CXXFLAGS += -DWITH_AFFINITY=1
 endif
 
 #default is to use Intel TBB's queuing lock for better thread scaling performance
 ifneq (1,$(NO_QUEUELOCK))
-	override EXTRA_FLAGS += -DNO_SPINLOCK
-	override EXTRA_FLAGS += -DWITH_QUEUELOCK=1
+	CXXFLAGS += -DNO_SPINLOCK
+	CXXFLAGS += -DWITH_QUEUELOCK=1
 endif
 
-
-SHARED_CPPS = ccnt_lut.cpp ref_read.cpp alphabet.cpp shmem.cpp \
-              edit.cpp bt2_idx.cpp bt2_io.cpp bt2_util.cpp \
-              reference.cpp ds.cpp multikey_qsort.cpp limit.cpp \
-			  random_source.cpp
+SHARED_CPPS := ccnt_lut.cpp ref_read.cpp alphabet.cpp shmem.cpp \
+               edit.cpp bt2_idx.cpp bt2_io.cpp bt2_util.cpp \
+               reference.cpp ds.cpp multikey_qsort.cpp limit.cpp \
+			   random_source.cpp
 
 ifeq (1,$(NO_TBB))
 	SHARED_CPPS += tinythread.cpp
 endif
 
-SEARCH_CPPS = qual.cpp pat.cpp sam.cpp \
-              read_qseq.cpp aligner_seed_policy.cpp \
-              aligner_seed.cpp \
-			  aligner_seed2.cpp \
-			  aligner_sw.cpp \
-			  aligner_sw_driver.cpp aligner_cache.cpp \
-			  aligner_result.cpp ref_coord.cpp mask.cpp \
-			  pe.cpp aln_sink.cpp dp_framer.cpp \
-			  scoring.cpp presets.cpp unique.cpp \
-			  simple_func.cpp \
-			  random_util.cpp \
-			  aligner_bt.cpp sse_util.cpp \
-			  aligner_swsse.cpp outq.cpp \
-			  aligner_swsse_loc_i16.cpp \
-			  aligner_swsse_ee_i16.cpp \
-			  aligner_swsse_loc_u8.cpp \
-			  aligner_swsse_ee_u8.cpp \
-			  aligner_driver.cpp
-
-SEARCH_CPPS_MAIN = $(SEARCH_CPPS) bowtie_main.cpp
-
-DP_CPPS = qual.cpp aligner_sw.cpp aligner_result.cpp ref_coord.cpp mask.cpp \
+SEARCH_CPPS := qual.cpp pat.cpp sam.cpp \
+               read_qseq.cpp aligner_seed_policy.cpp \
+               aligner_seed.cpp \
+			   aligner_seed2.cpp \
+			   aligner_sw.cpp \
+			   aligner_sw_driver.cpp aligner_cache.cpp \
+			   aligner_result.cpp ref_coord.cpp mask.cpp \
+			   pe.cpp aln_sink.cpp dp_framer.cpp \
+			   scoring.cpp presets.cpp unique.cpp \
+			   simple_func.cpp \
+			   random_util.cpp \
+			   aligner_bt.cpp sse_util.cpp \
+			   aligner_swsse.cpp outq.cpp \
+			   aligner_swsse_loc_i16.cpp \
+			   aligner_swsse_ee_i16.cpp \
+			   aligner_swsse_loc_u8.cpp \
+			   aligner_swsse_ee_u8.cpp \
+			   aligner_driver.cpp
+
+SEARCH_CPPS_MAIN := $(SEARCH_CPPS) bowtie_main.cpp
+
+DP_CPPS := qual.cpp aligner_sw.cpp aligner_result.cpp ref_coord.cpp mask.cpp \
           simple_func.cpp sse_util.cpp aligner_bt.cpp aligner_swsse.cpp \
 		  aligner_swsse_loc_i16.cpp aligner_swsse_ee_i16.cpp \
 		  aligner_swsse_loc_u8.cpp aligner_swsse_ee_u8.cpp scoring.cpp
 
-BUILD_CPPS = diff_sample.cpp
-BUILD_CPPS_MAIN = $(BUILD_CPPS) bowtie_build_main.cpp
+BUILD_CPPS := diff_sample.cpp
+BUILD_CPPS_MAIN := $(BUILD_CPPS) bowtie_build_main.cpp
 
-SEARCH_FRAGMENTS = $(wildcard search_*_phase*.c)
-VERSION = $(shell cat VERSION)
+SEARCH_FRAGMENTS := $(wildcard search_*_phase*.c)
+VERSION := $(shell cat VERSION)
 
-BITS=32
+BITS := 32
 ifeq (x86_64,$(shell uname -m))
-	BITS=64
+	BITS := 64
 endif
 ifeq (amd64,$(shell uname -m))
-	BITS=64
+	BITS := 64
 endif
 # msys will always be 32 bit so look at the cpu arch instead.
 ifneq (,$(findstring AMD64,$(PROCESSOR_ARCHITEW6432)))
 	ifeq (1,$(MINGW))
-		BITS=64
+		BITS := 64
 	endif
 endif
 ifeq (32,$(BITS))
   $(error bowtie2 compilation requires a 64-bit platform )
 endif
 
-SSE_FLAG=-msse2
-
-DEBUG_FLAGS    = -O0 -g3 -m64 $(SSE_FLAG)
-DEBUG_DEFS     = -DCOMPILER_OPTIONS="\"$(DEBUG_FLAGS) $(EXTRA_FLAGS)\""
-RELEASE_FLAGS  = -O3 -m64 $(SSE_FLAG) -funroll-loops -g3
-RELEASE_DEFS   = -DCOMPILER_OPTIONS="\"$(RELEASE_FLAGS) $(EXTRA_FLAGS)\""
-NOASSERT_FLAGS = -DNDEBUG
-FILE_FLAGS     = -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
-
-BOWTIE2_BIN_LIST =     bowtie2-build-s \
-                       bowtie2-build-l \
-                       bowtie2-align-s \
-                       bowtie2-align-l \
-                       bowtie2-inspect-s \
-                       bowtie2-inspect-l
-BOWTIE2_BIN_LIST_AUX = bowtie2-build-s-debug \
-                       bowtie2-build-l-debug \
-                       bowtie2-align-s-debug \
-                       bowtie2-align-l-debug \
-                       bowtie2-inspect-s-debug \
-                       bowtie2-inspect-l-debug
-
-GENERAL_LIST = $(wildcard scripts/*.sh) \
-               $(wildcard scripts/*.pl) \
-               doc/manual.html \
-               doc/README \
-               doc/style.css \
-			   $(wildcard example/index/*.bt2) \
-			   $(wildcard example/reads/*.fq) \
-			   $(wildcard example/reads/*.pl) \
-			   example/reference/lambda_virus.fa \
-               $(PTHREAD_PKG) \
-			   bowtie2 \
-			   bowtie2-build \
-			   bowtie2-inspect \
-               AUTHORS \
-               LICENSE \
-               NEWS \
-               MANUAL \
-               MANUAL.markdown \
-               TUTORIAL \
-               VERSION
+SSE_FLAG := -msse2
+
+DEBUG_FLAGS    := -O0 -g3 -m64 $(SSE_FLAG)
+RELEASE_FLAGS  := -O3 -m64 $(SSE_FLAG) -funroll-loops -g3
+NOASSERT_FLAGS := -DNDEBUG
+FILE_FLAGS     := -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
+DEBUG_DEFS     = -DCOMPILER_OPTIONS="\"$(DEBUG_FLAGS) $(CXXFLAGS)\""
+RELEASE_DEFS   = -DCOMPILER_OPTIONS="\"$(RELEASE_FLAGS) $(CXXFLAGS)\""
+
+ifeq (0,$(shell $(CPP) -E -fsanitize=address,undefined btypes.h 2>&1 > /dev/null; echo $$?))
+	SANITIZER_FLAGS := -fsanitize=address,undefined
+endif
+ifndef SANITIZER_FLAGS
+	ifeq (0,$(shell $(CPP) -E -fsanitize=address btypes.h 2>&1 > /dev/null; echo $$?))
+		SANITIZER_FLAGS := -fsanitize=address
+	endif
+endif
+ifndef SANITIZER_FLAGS
+	ifeq (0,$(shell $(CPP) -E -fsanitize=undefined btypes.h 2>&1 > /dev/null; echo $$?))
+		SANITIZER_FLAGS := -fsanitize=undefined
+	endif
+endif
+
+BOWTIE2_BIN_LIST :=     bowtie2-build-s \
+                        bowtie2-build-l \
+                        bowtie2-align-s \
+                        bowtie2-align-l \
+                        bowtie2-inspect-s \
+                        bowtie2-inspect-l
+BOWTIE2_BIN_LIST_DBG := bowtie2-build-s-debug \
+                        bowtie2-build-l-debug \
+                        bowtie2-align-s-debug \
+                        bowtie2-align-l-debug \
+                        bowtie2-inspect-s-debug \
+                        bowtie2-inspect-l-debug
+BOWTIE2_BIN_LIST_SAN := bowtie2-build-s-sanitized \
+                        bowtie2-build-l-sanitized \
+                        bowtie2-align-s-sanitized \
+                        bowtie2-align-l-sanitized \
+                        bowtie2-inspect-s-sanitized \
+                        bowtie2-inspect-l-sanitized
+
+GENERAL_LIST := $(wildcard scripts/*.sh) \
+                $(wildcard scripts/*.pl) \
+                doc/manual.html \
+                doc/README \
+                doc/style.css \
+			    $(wildcard example/index/*.bt2) \
+			    $(wildcard example/reads/*.fq) \
+			    $(wildcard example/reads/*.pl) \
+			    example/reference/lambda_virus.fa \
+                $(PTHREAD_PKG) \
+			    bowtie2 \
+			    bowtie2-build \
+			    bowtie2-inspect \
+                AUTHORS \
+                LICENSE \
+                NEWS \
+                MANUAL \
+                MANUAL.markdown \
+                TUTORIAL \
+                VERSION
 
 ifeq (1,$(WINDOWS))
 	BOWTIE2_BIN_LIST := $(BOWTIE2_BIN_LIST) bowtie2.bat bowtie2-build.bat bowtie2-inspect.bat
     ifneq (1,$(NO_TBB))
-	    override EXTRA_FLAGS += -static-libgcc -static-libstdc++
+	    CXXFLAGS += -static-libgcc -static-libstdc++
 	else
-	    override EXTRA_FLAGS += -static -static-libgcc -static-libstdc++
+	    CXXFLAGS += -static -static-libgcc -static-libstdc++
 	endif
 endif
 
 # This is helpful on Windows under MinGW/MSYS, where Make might go for
 # the Windows FIND tool instead.
-FIND=$(shell which find)
+FIND := $(shell which find)
 
 SRC_PKG_LIST = $(wildcard *.h) \
                $(wildcard *.hh) \
@@ -250,144 +269,145 @@ SRC_PKG_LIST = $(wildcard *.h) \
                $(GENERAL_LIST)
 
 ifeq (1,$(WINDOWS))
-	BIN_PKG_LIST = $(GENERAL_LIST) bowtie2.bat bowtie2-build.bat bowtie2-inspect.bat
+	BIN_PKG_LIST := $(GENERAL_LIST) bowtie2.bat bowtie2-build.bat bowtie2-inspect.bat
 else
-	BIN_PKG_LIST = $(GENERAL_LIST)
+	BIN_PKG_LIST := $(GENERAL_LIST)
 endif
 
 .PHONY: all allall both both-debug
 
-all: $(BOWTIE2_BIN_LIST)
-
-allall: $(BOWTIE2_BIN_LIST) $(BOWTIE2_BIN_LIST_AUX)
-
-both: bowtie2-align-s bowtie2-build-s bowtie2-align-l bowtie2-build-l
-
-both-debug: bowtie2-align-s-debug bowtie2-build-s-debug bowtie2-align-l-debug bowtie2-build-l-debug
-
-DEFS=-fno-strict-aliasing \
-     -DBOWTIE2_VERSION="\"`cat VERSION`\"" \
-     -DBUILD_HOST="\"`hostname`\"" \
-     -DBUILD_TIME="\"`date`\"" \
-     -DCOMPILER_VERSION="\"`$(CXX) -v 2>&1 | tail -1`\"" \
-     $(FILE_FLAGS) \
-     $(PREF_DEF) \
-     $(MM_DEF) \
-     $(SHMEM_DEF)
+all: $(BOWTIE2_BIN_LIST) ;
+allall: $(BOWTIE2_BIN_LIST) $(BOWTIE2_BIN_LIST_DBG) $(BOWTIE2_BIN_LIST_SAN) ;
+both: bowtie2-align-s bowtie2-build-s bowtie2-align-l bowtie2-build-l ;
+both-debug: bowtie2-align-s-debug bowtie2-build-s-debug bowtie2-align-l-debug bowtie2-build-l-debug ;
+both-sanitized: bowtie2-align-s-sanitized bowtie2-build-s-sanitized bowtie2-align-l-sanitized bowtie2-build-l-sanitized ;
+
+DEFS := -fno-strict-aliasing \
+        -DBOWTIE2_VERSION="\"`cat VERSION`\"" \
+        -DBUILD_HOST="\"`hostname`\"" \
+        -DBUILD_TIME="\"`date`\"" \
+        -DCOMPILER_VERSION="\"`$(CXX) -v 2>&1 | tail -1`\"" \
+        $(FILE_FLAGS) \
+        $(PREF_DEF) \
+        $(MM_DEF) \
+        $(SHMEM_DEF)
+
+# set compiler flags for all sanitized builds
+$(BOWTIE2_BIN_LIST_SAN): CXXFLAGS += $(SANITIZER_FLAGS)
 
 #
 # bowtie2-build targets
 #
 
-bowtie2-build-s: bt2_build.cpp $(SHARED_CPPS) $(HEADERS)
-	$(CXX) $(RELEASE_FLAGS) $(RELEASE_DEFS) $(EXTRA_FLAGS) \
+bowtie2-build-s-sanitized bowtie2-build-s: bt2_build.cpp $(SHARED_CPPS) $(HEADERS)
+	$(CXX) $(RELEASE_FLAGS) $(RELEASE_DEFS) $(CXXFLAGS) \
 		$(DEFS) -DBOWTIE2 $(NOASSERT_FLAGS) -Wall \
-		$(INC) \
+		$(CPPFLAGS) \
 		-o $@ $< \
 		$(SHARED_CPPS) $(BUILD_CPPS_MAIN) \
-		$(LIBS) $(BUILD_LIBS)
+		$(LDFLAGS) $(LDLIBS)
 
-bowtie2-build-l: bt2_build.cpp $(SHARED_CPPS) $(HEADERS)
-	$(CXX) $(RELEASE_FLAGS) $(RELEASE_DEFS) $(EXTRA_FLAGS) \
+bowtie2-build-l-sanitized bowtie2-build-l: bt2_build.cpp $(SHARED_CPPS) $(HEADERS)
+	$(CXX) $(RELEASE_FLAGS) $(RELEASE_DEFS) $(CXXFLAGS) \
 		$(DEFS) -DBOWTIE2 -DBOWTIE_64BIT_INDEX $(NOASSERT_FLAGS) -Wall \
-		$(INC) \
+		$(CPPFLAGS) \
 		-o $@ $< \
 		$(SHARED_CPPS) $(BUILD_CPPS_MAIN) \
-		$(LIBS) $(BUILD_LIBS)
+		$(LDFLAGS) $(LDLIBS)
 
 bowtie2-build-s-debug: bt2_build.cpp $(SHARED_CPPS) $(HEADERS)
-	$(CXX) $(DEBUG_FLAGS) $(DEBUG_DEFS) $(EXTRA_FLAGS) \
+	$(CXX) $(DEBUG_FLAGS) $(DEBUG_DEFS) $(CXXFLAGS) \
 		$(DEFS) -DBOWTIE2 -Wall \
-		$(INC) \
+		$(CPPFLAGS) \
 		-o $@ $< \
 		$(SHARED_CPPS) $(BUILD_CPPS_MAIN) \
-		$(LIBS) $(BUILD_LIBS)
+		$(LDFLAGS) $(LDLIBS)
 
 bowtie2-build-l-debug: bt2_build.cpp $(SHARED_CPPS) $(HEADERS)
-	$(CXX) $(DEBUG_FLAGS) $(DEBUG_DEFS) $(EXTRA_FLAGS) \
+	$(CXX) $(DEBUG_FLAGS) $(DEBUG_DEFS) $(CXXFLAGS) \
 		$(DEFS) -DBOWTIE2 -DBOWTIE_64BIT_INDEX -Wall \
-		$(INC) \
+		$(CPPFLAGS) \
 		-o $@ $< \
 		$(SHARED_CPPS) $(BUILD_CPPS_MAIN) \
-		$(LIBS) $(BUILD_LIBS)
+		$(LDFLAGS) $(LDLIBS)
 
 #
 # bowtie2-align targets
 #
 
-bowtie2-align-s: bt2_search.cpp $(SEARCH_CPPS) $(SHARED_CPPS) $(HEADERS) $(SEARCH_FRAGMENTS)
-	$(CXX) $(RELEASE_FLAGS) $(RELEASE_DEFS) $(EXTRA_FLAGS) \
+bowtie2-align-s-sanitized bowtie2-align-s: bt2_search.cpp $(SEARCH_CPPS) $(SHARED_CPPS) $(HEADERS) $(SEARCH_FRAGMENTS)
+	$(CXX) $(RELEASE_FLAGS) $(RELEASE_DEFS) $(CXXFLAGS) \
 		$(DEFS) -DBOWTIE2 $(NOASSERT_FLAGS) -Wall \
-		$(INC) \
+		$(CPPFLAGS) \
 		-o $@ $< \
 		$(SHARED_CPPS) $(SEARCH_CPPS_MAIN) \
-		$(LIBS) $(SEARCH_LIBS)
+		$(LDFLAGS) $(LDLIBS)
 
-bowtie2-align-l: bt2_search.cpp $(SEARCH_CPPS) $(SHARED_CPPS) $(HEADERS) $(SEARCH_FRAGMENTS)
-	$(CXX) $(RELEASE_FLAGS) $(RELEASE_DEFS) $(EXTRA_FLAGS) \
+bowtie2-align-l-sanitized bowtie2-align-l: bt2_search.cpp $(SEARCH_CPPS) $(SHARED_CPPS) $(HEADERS) $(SEARCH_FRAGMENTS)
+	$(CXX) $(RELEASE_FLAGS) $(RELEASE_DEFS) $(CXXFLAGS) \
 		$(DEFS) -DBOWTIE2 -DBOWTIE_64BIT_INDEX $(NOASSERT_FLAGS) -Wall \
-		$(INC) \
+		$(CPPFLAGS) \
 		-o $@ $< \
 		$(SHARED_CPPS) $(SEARCH_CPPS_MAIN) \
-		$(LIBS) $(SEARCH_LIBS)
+		$(LDFLAGS) $(LDLIBS)
 
 bowtie2-align-s-debug: bt2_search.cpp $(SEARCH_CPPS) $(SHARED_CPPS) $(HEADERS) $(SEARCH_FRAGMENTS)
 	$(CXX) $(DEBUG_FLAGS) \
-		$(DEBUG_DEFS) $(EXTRA_FLAGS) \
+		$(DEBUG_DEFS) $(CXXFLAGS) \
 		$(DEFS) -DBOWTIE2 -Wall \
-		$(INC) \
+		$(CPPFLAGS) \
 		-o $@ $< \
 		$(SHARED_CPPS) $(SEARCH_CPPS_MAIN) \
-		$(LIBS) $(SEARCH_LIBS)
+		$(LDFLAGS) $(LDLIBS)
 
 bowtie2-align-l-debug: bt2_search.cpp $(SEARCH_CPPS) $(SHARED_CPPS) $(HEADERS) $(SEARCH_FRAGMENTS)
 	$(CXX) $(DEBUG_FLAGS) \
-		$(DEBUG_DEFS) $(EXTRA_FLAGS) \
+		$(DEBUG_DEFS) $(CXXFLAGS) \
 		$(DEFS) -DBOWTIE2 -DBOWTIE_64BIT_INDEX -Wall \
-		$(INC) \
+		$(CPPFLAGS) \
 		-o $@ $< \
 		$(SHARED_CPPS) $(SEARCH_CPPS_MAIN) \
-		$(LIBS) $(SEARCH_LIBS)
+		$(LDFLAGS) $(LDLIBS)
 
 #
 # bowtie2-inspect targets
 #
 
-bowtie2-inspect-s: bt2_inspect.cpp $(HEADERS) $(SHARED_CPPS)
+bowtie2-inspect-s-sanitized bowtie2-inspect-s: bt2_inspect.cpp $(HEADERS) $(SHARED_CPPS)
 	$(CXX) $(RELEASE_FLAGS) \
-		$(RELEASE_DEFS) $(EXTRA_FLAGS) \
+		$(RELEASE_DEFS) $(CXXFLAGS) \
 		$(DEFS) -DBOWTIE2 -DBOWTIE_INSPECT_MAIN -Wall \
-		$(INC) -I . \
+		$(CPPFLAGS) -I . \
 		-o $@ $< \
 		$(SHARED_CPPS) \
-		$(LIBS) $(INSPECT_LIBS)
+		$(LDFLAGS) $(LDLIBS)
 
-bowtie2-inspect-l: bt2_inspect.cpp $(HEADERS) $(SHARED_CPPS)
+bowtie2-inspect-l-sanitized bowtie2-inspect-l: bt2_inspect.cpp $(HEADERS) $(SHARED_CPPS)
 	$(CXX) $(RELEASE_FLAGS) \
-		$(RELEASE_DEFS) $(EXTRA_FLAGS) \
+		$(RELEASE_DEFS) $(CXXFLAGS) \
 		$(DEFS) -DBOWTIE2 -DBOWTIE_INSPECT_MAIN  -DBOWTIE_64BIT_INDEX -Wall \
-		$(INC) -I . \
+		$(CPPFLAGS) -I . \
 		-o $@ $< \
 		$(SHARED_CPPS) \
-		$(LIBS) $(INSPECT_LIBS)
+		$(LDFLAGS) $(LDLIBS)
 
 bowtie2-inspect-s-debug: bt2_inspect.cpp $(HEADERS) $(SHARED_CPPS)
 	$(CXX) $(DEBUG_FLAGS) \
-		$(DEBUG_DEFS) $(EXTRA_FLAGS) \
+		$(DEBUG_DEFS) $(CXXFLAGS) \
 		$(DEFS) -DBOWTIE2 -DBOWTIE_INSPECT_MAIN -Wall \
-		$(INC) -I . \
+		$(CPPFLAGS) -I . \
 		-o $@ $< \
 		$(SHARED_CPPS) \
-		$(LIBS) $(INSPECT_LIBS)
+		$(LDFLAGS) $(LDLIBS)
 
 bowtie2-inspect-l-debug: bt2_inspect.cpp $(HEADERS) $(SHARED_CPPS)
 	$(CXX) $(DEBUG_FLAGS) \
-		$(DEBUG_DEFS) $(EXTRA_FLAGS) \
+		$(DEBUG_DEFS) $(CXXFLAGS) \
 		$(DEFS) -DBOWTIE2 -DBOWTIE_64BIT_INDEX -DBOWTIE_INSPECT_MAIN -Wall \
-		$(INC) -I . \
+		$(CPPFLAGS) -I . \
 		-o $@ $< \
 		$(SHARED_CPPS) \
-		$(LIBS) $(INSPECT_LIBS)
+		$(LDFLAGS) $(LDLIBS)
 
 #
 # bowtie2-dp targets
@@ -395,21 +415,21 @@ bowtie2-inspect-l-debug: bt2_inspect.cpp $(HEADERS) $(SHARED_CPPS)
 
 bowtie2-dp: bt2_dp.cpp $(HEADERS) $(SHARED_CPPS) $(DP_CPPS)
 	$(CXX) $(RELEASE_FLAGS) \
-		$(RELEASE_DEFS) $(EXTRA_FLAGS) $(NOASSERT_FLAGS) \
+		$(RELEASE_DEFS) $(CXXFLAGS) $(NOASSERT_FLAGS) \
 		$(DEFS) -DBOWTIE2 -DBOWTIE_DP_MAIN -Wall \
-		$(INC) -I . \
+		$(CPPFLAGS) -I . \
 		-o $@ $< \
 		$(DP_CPPS) $(SHARED_CPPS) \
-		$(LIBS) $(SEARCH_LIBS)
+		$(LDFLAGS) $(LDLIBS)
 
 bowtie2-dp-debug: bt2_dp.cpp $(HEADERS) $(SHARED_CPPS) $(DP_CPPS)
 	$(CXX) $(DEBUG_FLAGS) \
-		$(DEBUG_DEFS) $(EXTRA_FLAGS) \
+		$(DEBUG_DEFS) $(CXXFLAGS) \
 		$(DEFS) -DBOWTIE2 -DBOWTIE_DP_MAIN -Wall \
-		$(INC) -I . \
+		$(CPPFLAGS) -I . \
 		-o $@ $< \
 		$(DP_CPPS) $(SHARED_CPPS) \
-		$(LIBS) $(SEARCH_LIBS)
+		$(LDFLAGS) $(LDLIBS)
 
 bowtie2.bat:
 	echo "@echo off" > bowtie2.bat
@@ -436,15 +456,15 @@ bowtie2-src: $(SRC_PKG_LIST)
 	rm -rf .src.tmp
 
 .PHONY: bowtie2-pkg
-bowtie2-pkg: static-libs $(BIN_PKG_LIST) $(BOWTIE2_BIN_LIST) $(BOWTIE2_BIN_LIST_AUX)
-	$(eval PKG_DIR=bowtie2-$(VERSION)-$(if $(MACOS),macos,$(if $(MINGW),mingw,linux))-x86_64)
+bowtie2-pkg: PKG_DIR := bowtie2-$(VERSION)-$(if $(MACOS),macos,$(if $(MINGW),mingw,linux))-x86_64
+bowtie2-pkg: static-libs $(BIN_PKG_LIST) $(BOWTIE2_BIN_LIST) $(BOWTIE2_BIN_LIST_DBG)
 	chmod a+x scripts/*.sh scripts/*.pl
 	rm -rf .bin.tmp
 	mkdir -p .bin.tmp/$(PKG_DIR)
 	if [ -f bowtie2-align-s.exe ] ; then \
-		zip tmp.zip $(BIN_PKG_LIST) $(addsuffix .exe,$(BOWTIE2_BIN_LIST) $(BOWTIE2_BIN_LIST_AUX)) ; \
+		zip tmp.zip $(BIN_PKG_LIST) $(addsuffix .exe,$(BOWTIE2_BIN_LIST) $(BOWTIE2_BIN_LIST_DBG)) ; \
 	else \
-		zip tmp.zip $(BIN_PKG_LIST) $(BOWTIE2_BIN_LIST) $(BOWTIE2_BIN_LIST_AUX) ; \
+		zip tmp.zip $(BIN_PKG_LIST) $(BOWTIE2_BIN_LIST) $(BOWTIE2_BIN_LIST_DBG) ; \
 	fi
 	mv tmp.zip .bin.tmp/$(PKG_DIR)
 	cd .bin.tmp/$(PKG_DIR) ; unzip tmp.zip ; rm -f tmp.zip
@@ -454,13 +474,13 @@ bowtie2-pkg: static-libs $(BIN_PKG_LIST) $(BOWTIE2_BIN_LIST) $(BOWTIE2_BIN_LIST_
 
 bowtie2-seeds-debug: aligner_seed.cpp ccnt_lut.cpp alphabet.cpp aligner_seed.h bt2_idx.cpp bt2_io.cpp
 	$(CXX) $(DEBUG_FLAGS) \
-		$(DEBUG_DEFS) $(EXTRA_FLAGS) \
+		$(DEBUG_DEFS) $(CXXFLAGS) \
 		-DSCAN_MAIN \
 		$(DEFS) -Wall \
-		$(INC) -I . \
+		$(CPPFLAGS) -I . \
 		-o $@ $< \
 		aligner_seed.cpp bt2_idx.cpp ccnt_lut.cpp alphabet.cpp bt2_io.cpp \
-		$(LIBS)
+		$(LDFLAGS) $(LDLIBS)
 
 .PHONY: doc
 doc: doc/manual.html MANUAL
@@ -484,7 +504,7 @@ install: all
 	done
 
 .PHONY: simple-test
-simple-test: all perl-deps
+simple-test: perl-deps both both-debug both-sanitized
 	eval `perl -I $(CURDIR)/.perllib.tmp/lib/perl5 -Mlocal::lib=$(CURDIR)/.perllib.tmp` ; \
 	sh ./scripts/test/simple_tests.sh
 
@@ -500,9 +520,10 @@ perl-deps:
 		mkdir .perllib.tmp ; \
 		$$DL http://cpanmin.us | perl - -l $(CURDIR)/.perllib.tmp App::cpanminus local::lib ; \
 		eval `perl -I $(CURDIR)/.perllib.tmp/lib/perl5 -Mlocal::lib=$(CURDIR)/.perllib.tmp` ; \
-		cpanm --force Math::Random Clone Test::Deep Sys::Info ; \
+		$(CURDIR)/.perllib.tmp/bin/cpanm --force Math::Random Clone Test::Deep Sys::Info ; \
 	fi
 
+.PHONY: static-libs
 static-libs:
 	if [[ ! -d $(CURDIR)/.lib || ! -d $(CURDIR)/.inc ]]; then \
 		mkdir $(CURDIR)/.lib $(CURDIR)/.include ; \
@@ -511,7 +532,7 @@ static-libs:
 		export CFLAGS=-mmacosx-version-min=10.9 ; \
 		export CXXFLAGS=-mmacosx-version-min=10.9 ; \
 	fi ; \
-	DL=$$([ `which wget` ] && echo "wget --no-check-certificate" || echo "curl -LO") ; \
+	DL=$$([ `which wget` ] && echo "wget --no-check-certificate" || echo "curl -LOk") ; \
 	cd /tmp ; \
 	$$DL https://zlib.net/zlib-1.2.11.tar.gz && tar xzf zlib-1.2.11.tar.gz && cd zlib-1.2.11 ; \
 	$(if $(MINGW), mingw32-make -f win32/Makefile.gcc, ./configure --static && make) && cp libz.a $(CURDIR)/.lib && cp zconf.h zlib.h $(CURDIR)/.include ; \
@@ -525,8 +546,8 @@ test: simple-test random-test
 
 .PHONY: clean
 clean:
-	rm -f $(BOWTIE2_BIN_LIST) $(BOWTIE2_BIN_LIST_AUX) \
-	$(addsuffix .exe,$(BOWTIE2_BIN_LIST) $(BOWTIE2_BIN_LIST_AUX)) \
+	rm -f $(BOWTIE2_BIN_LIST) $(BOWTIE2_BIN_LIST_DBG) $(BOWTIE2_BIN_LIST_SAN)\
+	$(addsuffix .exe,$(BOWTIE2_BIN_LIST) $(BOWTIE2_BIN_LIST_DBG)) \
 	bowtie2-src.zip bowtie2-bin.zip
 	rm -f core.* .tmp.head
 	rm -rf *.dSYM
diff --git a/NEWS b/NEWS
index cff70a1..10a1cac 100644
--- a/NEWS
+++ b/NEWS
@@ -19,7 +19,23 @@ Please report any issues to the Bowtie 2 Github page or using the Sourceforge bu
 Version Release History
 =======================
 
+Version 2.3.4 - Dec 29, 2017
+
+    * Fixed major issue causing corrupt SAM output when using many
+      threads (-p/--threads) on certain systems.
+    * Fixed an issue whereby bowtie2 processes could overwrite each
+      others' named pipes on HPC systems.
+    * Fixed an issue causing bowtie2-build and bowtie2-inspect to
+      return prematurely on Windows.
+    * Fixed issues raised by compiler "sanitizers" that could
+      potentially have caused memory corruption or undefined behavior.
+    * Added the "continuous FASTA" input format (`-F`) for aligning
+      all the k-mers in the sequences of a FASTA file.  Useful for
+      determining mapability of regions of the genome, and similar
+      tasks.
+
 Version 2.3.3.1 - Oct 05, 2017
+
     * Fixed an issue causing input files to be skipped when running
     multi-threaded alignment
     * Fixed an issue causing the first character of a read name to be
diff --git a/VERSION b/VERSION
index 9d71486..3f684d2 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-2.3.3.1
+2.3.4
diff --git a/aligner_seed.h b/aligner_seed.h
index ed92616..cdd6968 100644
--- a/aligner_seed.h
+++ b/aligner_seed.h
@@ -818,7 +818,7 @@ public:
 	 * Return average number of hits per seed.
 	 */
 	float averageHitsPerSeed() const {
-		return (float)numElts_ / (float)nonzTot_;
+		return nonzTot_ == 0 ? 0 : (float)numElts_ / (float)nonzTot_;
 	}
 
 	/**
diff --git a/blockwise_sa.h b/blockwise_sa.h
index e64172b..98b2b85 100644
--- a/blockwise_sa.h
+++ b/blockwise_sa.h
@@ -259,7 +259,7 @@ public:
 			if(_threads.size() == 0) {
 #endif
                 _done = std::auto_ptr<volatile bool>(new volatile bool[_sampleSuffs.size() + 1]); 
-                for (int i = 0; i < _sampleSuffs.size() + 1; i++) {
+                for (size_t i = 0; i < _sampleSuffs.size() + 1; i++) {
                     _done.get()[i] = false;
                 }
 				_itrBuckets.resize(this->_nthreads);
diff --git a/bowtie2 b/bowtie2
index 036d425..8637b98 100755
--- a/bowtie2
+++ b/bowtie2
@@ -33,8 +33,10 @@ use warnings;
 use Getopt::Long qw(GetOptions);
 use File::Spec;
 use POSIX;
+use Sys::Hostname;
 
 
+my $host = hostname();
 my ($vol,$script_path,$prog);
 $prog = File::Spec->rel2abs( __FILE__ );
 
@@ -61,7 +63,8 @@ my @signame     = ();
 sub quote_params {
     my %params_2_quote = ('--rg' => 1, '--rg-id' => 1,
                           '-S' => 1, '-U' => 1,
-                          '-1' => 1, '-2' => 1
+                          '-1' => 1, '-2' => 1,
+                          '-x' => 1
     );
     my $param_list = shift;
     my $quoting = 0;
@@ -134,6 +137,7 @@ if(!$saw_dd) {
 }
 
 my $debug = 0;
+my $sanitized = 0;
 my %read_fns = ();
 my %read_compress = ();
 my $cap_out = undef;       # Filename for passthrough
@@ -192,6 +196,10 @@ for(my $i = 0; $i < scalar(@bt2_args); $i++) {
 		$debug = 1;
 		$bt2_args[$i] = undef;
 	}
+	if(not $debug and $arg eq "--sanitized") {
+		$sanitized = 1;
+		$bt2_args[$i] = undef;
+	}
 	if($arg eq "--no-unal") {
 		$no_unal = 1;
 		$bt2_args[$i] = undef;
@@ -368,7 +376,7 @@ if(wrapInput(\@unps, \@mate1s, \@mate2s)) {
 		scalar(@mate2s) == scalar(@mate1s) ||
 			Fail("Different number of files specified with --reads/-1 as with -2\n");
 		# Make a named pipe for delivering mate #1s
-		my $m1fn = "$temp_dir/$$.inpipe1";
+		my $m1fn = "$temp_dir/${host}_$$.inpipe1";
 		push @to_delete, $m1fn;
 		push @bt2_args, "-1 $m1fn";
 		# Create named pipe 1 for writing
@@ -385,7 +393,7 @@ if(wrapInput(\@unps, \@mate1s, \@mate2s)) {
 			exit 0 unless $no_pipes;
 		}
 		# Make a named pipe for delivering mate #2s
-		my $m2fn = "$temp_dir/$$.inpipe2";
+		my $m2fn = "$temp_dir/${host}_$$.inpipe2";
 		push @to_delete, $m2fn;
 		push @bt2_args, "-2 $m2fn";
 		# Create named pipe 2 for writing
@@ -407,7 +415,7 @@ if(wrapInput(\@unps, \@mate1s, \@mate2s)) {
 		# Wrap unpaired inputs.
 		#
 		# Make a named pipe for delivering unpaired reads
-		my $ufn = "$temp_dir/$$.unp";
+		my $ufn = "$temp_dir/${host}_$$.unp";
 		push @to_delete, $ufn;
 		push @bt2_args, "-U $ufn";
 		# Create named pipe 2 for writing
@@ -436,7 +444,7 @@ if(wrapInput(\@unps, \@mate1s, \@mate2s)) {
 }
 
 if(defined($ref_str)) {
-	my $ofn = "$temp_dir/$$.ref_str.fa";
+	my $ofn = "$temp_dir/${host}_$$.ref_str.fa";
 	open(my $ofh, ">$ofn") ||
 		Fail("could not open temporary fasta file '$ofn' for writing.\n");
 	print {$ofh} ">1\n$ref_str\n";
@@ -477,11 +485,17 @@ else {
     }
 }
 
-my $debug_str = ($debug ? "-debug" : "");
+my $suffix = "";
+if ($debug) {
+    $suffix = "-debug";
+}
+elsif($sanitized) {
+    $suffix = "-sanitized";
+}
 
 # Construct command invoking bowtie2-align
 quote_params(\@bt2_args);
-my $cmd = "\"$align_prog$debug_str\" --wrapper basic-0 ".join(" ", @bt2_args);
+my $cmd = "\"$align_prog$suffix\" --wrapper basic-0 ".join(" ", @bt2_args);
 
 # Possibly add read input on an anonymous pipe
 $cmd = "$readpipe $cmd" if defined($readpipe);
diff --git a/bowtie2-build b/bowtie2-build
index d448e2b..07daea1 100755
--- a/bowtie2-build
+++ b/bowtie2-build
@@ -24,56 +24,47 @@ import os
 import sys
 import inspect
 import logging
+import argparse
+import subprocess
+from collections import deque
 
+def main():
+    parser = argparse.ArgumentParser()
 
-def build_args():
-    """
-    Parse the wrapper arguments. Returns the options,<programm arguments> tuple.
-    """
-
-    parsed_args = {}
-    to_remove = []
-    argv = sys.argv[:]
-    for i, arg in enumerate(argv):
-        if arg == '--large-index':
-            parsed_args[arg] = ""
-            to_remove.append(i)
-        elif arg == '--debug':
-            parsed_args[arg] = ""
-            to_remove.append(i)
-        elif arg == '--verbose':
-            parsed_args[arg] = ""
-            to_remove.append(i)
-
-    for i in reversed(to_remove):
-        del argv[i]
-
-    return parsed_args, argv
+    group = parser.add_mutually_exclusive_group()
+    group.add_argument('--debug', action='store_true')
+    group.add_argument('--sanitized', action='store_true')
 
+    parser.add_argument('--verbose', action='store_true')
+    parser.add_argument('--large-index', action='store_true')
 
-def main():
     logging.basicConfig(level=logging.ERROR,
                         format='%(levelname)s: %(message)s'
                         )
     delta               = 200
     small_index_max_size= 4 * 1024**3 - delta
-    build_bin_name      = "bowtie2-build"
-    build_bin_s         = "bowtie2-build-s"
-    build_bin_l         = "bowtie2-build-l"
+    build_bin_name      = 'bowtie2-build'
+    build_bin_s         = 'bowtie2-build-s'
+    build_bin_l         = 'bowtie2-build-l'
     curr_script         = os.path.realpath(inspect.getsourcefile(main))
     ex_path             = os.path.dirname(curr_script)
     build_bin_spec      = os.path.join(ex_path,build_bin_s)
 
-    options, argv = build_args()
+    script_options, argv = parser.parse_known_args()
+    argv = deque(argv)
 
-    if '--verbose' in options:
+    if script_options.verbose:
         logging.getLogger().setLevel(logging.INFO)
         
-    if '--debug' in options:
+    if script_options.debug:
         build_bin_spec += '-debug'
         build_bin_l += '-debug'
 
-    if '--large-index' in options:
+    if script_options.sanitized:
+        build_bin_spec += '-sanitized'
+        build_bin_l += '-sanitized'
+
+    if script_options.large_index:
         build_bin_spec = os.path.join(ex_path,build_bin_l)
     elif len(argv) >= 2:
         ref_fnames = argv[-2]
@@ -85,14 +76,11 @@ def main():
         if tot_size > small_index_max_size:
             build_bin_spec = os.path.join(ex_path,build_bin_l)
 
-    argv[0] = build_bin_name
-    argv.insert(1, 'basic-0')
-    argv.insert(1, '--wrapper')
-    logging.info('Command: %s %s' % (build_bin_spec, ' '.join(argv[1:])))
-    os.execv(build_bin_spec, argv)
+    argv.appendleft('basic-0')
+    argv.appendleft('--wrapper')
+    argv.appendleft(build_bin_spec)
+    logging.info('Command: %s' % ' '.join(argv))
+    subprocess.call(argv)
 
-if __name__ == "__main__":
+if __name__ == '__main__':
     main()
-
-
-
diff --git a/bowtie2-inspect b/bowtie2-inspect
index 62a1c5f..dc89d1b 100755
--- a/bowtie2-inspect
+++ b/bowtie2-inspect
@@ -24,51 +24,61 @@ import os
 import imp
 import inspect
 import logging
+import argparse
+import subprocess
+from collections import deque
 
+def main():
+    parser = argparse.ArgumentParser()
 
+    group = parser.add_mutually_exclusive_group()
+    group.add_argument('--debug', action='store_true')
+    group.add_argument('--sanitized', action='store_true')
+
+    parser.add_argument('--verbose', action='store_true')
+    parser.add_argument('--large-index', action='store_true')
 
-def main():
     logging.basicConfig(level=logging.ERROR,
                         format='%(levelname)s: %(message)s'
                         )
-    inspect_bin_name      = "bowtie-inspect"
-    inspect_bin_s         = "bowtie2-inspect-s"
-    inspect_bin_l         = "bowtie2-inspect-l"
+    inspect_bin_name      = 'bowtie-inspect'
+    inspect_bin_s         = 'bowtie2-inspect-s'
+    inspect_bin_l         = 'bowtie2-inspect-l'
     idx_ext_l             = '.1.bt2l'; 
     idx_ext_s             = '.1.bt2'; 
     curr_script           = os.path.realpath(inspect.getsourcefile(main))
     ex_path               = os.path.dirname(curr_script)
     inspect_bin_spec      = os.path.join(ex_path,inspect_bin_s)
-    bld                   = imp.load_source('bowtie2-build',os.path.join(ex_path,'bowtie2-build'))
-    options,arguments     = bld.build_args()
 
-    if '--verbose' in options:
+    script_options, argv = parser.parse_known_args()
+    argv = deque(argv)
+
+    if script_options.verbose:
         logging.getLogger().setLevel(logging.INFO)
         
-    if '--debug' in options:
+    if script_options.debug:
         inspect_bin_spec += '-debug'
         inspect_bin_l += '-debug'
+
+    if script_options.sanitized:
+        inpsect_bin_spec += '-sanitized'
+        inspect_bin_l += '-sanitized'
         
-    if '--large-index' in options:
+    if script_options.large_index:
         inspect_bin_spec = os.path.join(ex_path,inspect_bin_l)
-    elif len(arguments) >= 1:
-        idx_basename = arguments[-1]
+    elif len(argv) >= 1:
+        idx_basename = argv[-1]
         large_idx_exists = os.path.exists(idx_basename + idx_ext_l)
         small_idx_exists = os.path.exists(idx_basename + idx_ext_s)
         if large_idx_exists and not small_idx_exists:
             inspect_bin_spec = os.path.join(ex_path,inspect_bin_l)
     
-    arguments[0] = inspect_bin_name
-    arguments.insert(1, 'basic-0')
-    arguments.insert(1, '--wrapper')
-    logging.info('Command: %s %s' %  (inspect_bin_spec,' '.join(arguments[1:])))
-    os.execv(inspect_bin_spec, arguments)        
-        
+    argv.appendleft('basic-0')
+    argv.appendleft('--wrapper')
+    argv.appendleft(inspect_bin_spec)
+    logging.info('Command: %s' %  ' '.join(argv))
+    print argv
+    subprocess.call(argv)
         
-if __name__ == "__main__":
+if __name__ == '__main__':
     main()
-
-
-
-
-
diff --git a/bt2_search.cpp b/bt2_search.cpp
index 1daa996..93a213c 100644
--- a/bt2_search.cpp
+++ b/bt2_search.cpp
@@ -728,6 +728,9 @@ static void printUsage(ostream& out) {
 	    << "  --qseq             query input files are in Illumina's qseq format" << endl
 	    << "  -f                 query input files are (multi-)FASTA .fa/.mfa" << endl
 	    << "  -r                 query input files are raw one-sequence-per-line" << endl
+	    << "  -F k:<int>,i:<int> query input files are continuous FASTA where reads" << endl
+	    << "                     are substrings (k-mers) extracted from a FASTA file <s>" << endl
+	    << "                     and aligned at offsets 1, 1+i, 1+2i ... end of reference" << endl
 	    << "  -c                 <m1>, <m2>, <r> are sequences themselves, not files" << endl
 	    << "  -s/--skip <int>    skip the first <int> reads/pairs in the input (none)" << endl
 	    << "  -u/--upto <int>    stop after first <int> reads/pairs (no limit)" << endl
@@ -803,12 +806,12 @@ static void printUsage(ostream& out) {
 	//}
 	out << "  -t/--time          print wall-clock time taken by search phases" << endl;
 	if(wrapper == "basic-0") {
-	out << "  --un <path>           write unpaired reads that didn't align to <path>" << endl
-	    << "  --al <path>           write unpaired reads that aligned at least once to <path>" << endl
-	    << "  --un-conc <path>      write pairs that didn't align concordantly to <path>" << endl
-	    << "  --al-conc <path>      write pairs that aligned concordantly at least once to <path>" << endl
-	    << "  (Note: for --un, --al, --un-conc, or --al-conc, add '-gz' to the option name, e.g." << endl
-		<< "  --un-gz <path>, to gzip compress output, or add '-bz2' to bzip2 compress output.)" << endl;
+	out << "  --un <path>        write unpaired reads that didn't align to <path>" << endl
+	    << "  --al <path>        write unpaired reads that aligned at least once to <path>" << endl
+	    << "  --un-conc <path>   write pairs that didn't align concordantly to <path>" << endl
+	    << "  --al-conc <path>   write pairs that aligned concordantly at least once to <path>" << endl
+	    << "    (Note: for --un, --al, --un-conc, or --al-conc, add '-gz' to the option name, e.g." << endl
+	    << "    --un-gz <path>, to gzip compress output, or add '-bz2' to bzip2 compress output.)" << endl;
 	}
 	out << "  --quiet            print nothing to stderr except serious errors" << endl
 	//  << "  --refidx           refer to ref. seqs by 0-based index rather than name" << endl
@@ -2878,7 +2881,6 @@ static void multiseedSearchWorker(void *vp) {
 	const Ebwt&             ebwtBw   = *multiseed_ebwtBw;
 	const Scoring&          sc       = *multiseed_sc;
 	const BitPairReference& ref      = *multiseed_refs;
-	AlignmentCache&         scShared = *multiseed_ca;
 	AlnSink&                msink    = *multiseed_msink;
 	OutFileBuf*             metricsOfb = multiseed_metricsOfb;
 
@@ -2918,7 +2920,7 @@ static void multiseedSearchWorker(void *vp) {
 		AlignmentCacheIface ca(
 			&scCurrent,
 			scLocal.get(),
-			msNoCache ? NULL : &scShared);
+			msNoCache ? NULL : multiseed_ca);
 		
 		// Instantiate an object for holding reporting-related parameters.
 		ReportingParams rp(
@@ -4576,8 +4578,9 @@ static void multiseedSearch(
 #endif
 	EList<int> tids;
 #ifdef WITH_TBB
-	//tbb::task_group tbb_grp;
 	EList<std::thread*> threads(nthreads);
+	EList<thread_tracking_pair> tps;
+	tps.resize(std::max(nthreads, thread_ceiling));
 #else
 	EList<tthread::thread*> threads;
 #endif
@@ -4630,20 +4633,20 @@ static void multiseedSearch(
 #endif
 		
 		for(int i = 0; i < nthreads; i++) {
+			tids.push_back(i);
 #ifdef WITH_TBB
-			thread_tracking_pair tp;
-			tp.tid = i;
-			tp.done = &all_threads_done;
+			tps[i].tid = i;
+			tps[i].done = &all_threads_done;
+
 			if(bowtie2p5) {
-				threads.push_back(new std::thread(multiseedSearchWorker_2p5, (void*) &tp));
+				threads.push_back(new std::thread(multiseedSearchWorker_2p5, (void*)&tps[i]));
 			} else {
-				threads.push_back(new std::thread(multiseedSearchWorker, (void*) &tp));
+				threads.push_back(new std::thread(multiseedSearchWorker, (void*)&tps[i]));
 			}
 			threads[i]->detach();
 			SLEEP(10);
 #else
 			// Thread IDs start at 1
-			tids.push_back(i);
 			if(bowtie2p5) {
 				threads.push_back(new tthread::thread(multiseedSearchWorker_2p5, (void*)&tids.back()));
 			} else {
@@ -4668,6 +4671,9 @@ static void multiseedSearch(
 			threads[i]->join();
 		}
 #endif
+		for (int i = 0; i < nthreads; ++i) {
+			delete threads[i];
+		}
 
 #ifndef _WIN32
 		if(thread_stealing) {
diff --git a/doc/manual.html b/doc/manual.html
index 7c9d65b..7b4d1e4 100644
--- a/doc/manual.html
+++ b/doc/manual.html
@@ -1,22 +1,33 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
 <head>
-  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-  <meta http-equiv="Content-Style-Type" content="text/css" />
+  <meta charset="utf-8" />
   <meta name="generator" content="pandoc" />
-  <title>Bowtie 2 Manual – </title>
-  <style type="text/css">code{white-space: pre;}</style>
-  <link rel="stylesheet" href="style.css" type="text/css" />
+  <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
+  <title>Bowtie 2 Manual – Bowtie 2 Manual</title>
+  <style type="text/css">
+      code{white-space: pre-wrap;}
+      span.smallcaps{font-variant: small-caps;}
+      div.line-block{white-space: pre-line;}
+      div.column{display: inline-block; vertical-align: top; width: 50%;}
+  </style>
+  <link rel="stylesheet" href="style.css">
+  <!--[if lt IE 9]>
+    <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
+  <![endif]-->
 </head>
 <body>
 <h1>Table of Contents</h1>
-<div id="TOC">
+<header>
+<h1 class="title">Bowtie 2 Manual</h1>
+</header>
+<nav id="TOC">
 <ul>
 <li><a href="#introduction">Introduction</a><ul>
 <li><a href="#what-is-bowtie-2">What is Bowtie 2?</a></li>
 <li><a href="#how-is-bowtie-2-different-from-bowtie-1">How is Bowtie 2 different from Bowtie 1?</a></li>
-<li><a href="#what-isnt-bowtie-2">What isn't Bowtie 2?</a></li>
-<li><a href="#what-does-it-mean-that-some-older-bowtie-2-versions-are-beta">What does it mean that some older Bowtie 2 versions are "beta"?</a></li>
+<li><a href="#what-isnt-bowtie-2">What isn’t Bowtie 2?</a></li>
+<li><a href="#what-does-it-mean-that-some-older-bowtie-2-versions-are-beta">What does it mean that some older Bowtie 2 versions are “beta”?</a></li>
 </ul></li>
 <li><a href="#obtaining-bowtie-2">Obtaining Bowtie 2</a><ul>
 <li><a href="#building-from-source">Building from source</a></li>
@@ -36,7 +47,7 @@
 <li><a href="#aligning-pairs">Aligning pairs</a><ul>
 <li><a href="#paired-inputs">Paired inputs</a></li>
 <li><a href="#paired-sam-output">Paired SAM output</a></li>
-<li><a href="#concordant-pairs-match-pair-expectations-discordant-pairs-dont">Concordant pairs match pair expectations, discordant pairs don't</a></li>
+<li><a href="#concordant-pairs-match-pair-expectations-discordant-pairs-dont">Concordant pairs match pair expectations, discordant pairs don’t</a></li>
 <li><a href="#mixed-mode-paired-where-possible-unpaired-otherwise">Mixed mode: paired where possible, unpaired otherwise</a></li>
 <li><a href="#some-sam-flags-describe-paired-end-properties">Some SAM FLAGS describe paired-end properties</a></li>
 <li><a href="#some-sam-optional-fields-describe-more-paired-end-properties">Some SAM optional fields describe more paired-end properties</a></li>
@@ -87,7 +98,7 @@
 <li><a href="#using-samtoolsbcftools-downstream">Using SAMtools/BCFtools downstream</a></li>
 </ul></li>
 </ul>
-</div>
+</nav>
 <!--
  ! This manual is written in "markdown" format and thus contains some
  ! distracting formatting clutter.  See 'MANUAL' for an easier-to-read version
@@ -95,52 +106,52 @@
  ! -->
 <h1 id="introduction">Introduction</h1>
 <h2 id="what-is-bowtie-2">What is Bowtie 2?</h2>
-<p><a href="http://bowtie-bio.sf.net/bowtie2">Bowtie 2</a> 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 indexes the genome with an <a href="http://en.wikipedia.org/wiki/FM-index">FM Index</a> (based on the <a href="http://en.wikipedia.org/wiki/Burrows-Wheeler_transform">Burrows-Wheeler Transf [...]
-<p><a href="http://bowtie-bio.sf.net/bowtie2">Bowtie 2</a> is often the first step in pipelines for comparative genomics, including for variation calling, ChIP-seq, RNA-seq, BS-seq. <a href="http://bowtie-bio.sf.net/bowtie2">Bowtie 2</a> and <a href="http://bowtie-bio.sf.net">Bowtie</a> (also called "<a href="http://bowtie-bio.sf.net">Bowtie 1</a>" here) are also tightly integrated into some tools, including <a href="http://tophat.cbcb.umd.edu/">TopHat</a>: a fast splice juncti [...]
+<p><a href="http://bowtie-bio.sf.net/bowtie2">Bowtie 2</a> 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 indexes the genome with an <a href="http://en.wikipedia.org/wiki/FM-index">FM Index</a> (based on the <a href="http://en.wikipedia.org/wiki/Burrows-Wheeler_transform">Burrows-Wheeler Transf [...]
+<p><a href="http://bowtie-bio.sf.net/bowtie2">Bowtie 2</a> is often the first step in pipelines for comparative genomics, including for variation calling, ChIP-seq, RNA-seq, BS-seq. <a href="http://bowtie-bio.sf.net/bowtie2">Bowtie 2</a> and <a href="http://bowtie-bio.sf.net">Bowtie</a> (also called “<a href="http://bowtie-bio.sf.net">Bowtie 1</a>” here) are also tightly integrated into some tools, including <a href="http://tophat.cbcb.umd.edu/">TopHat</a>: a fast splice junction mapper  [...]
 <p>If you use <a href="http://bowtie-bio.sf.net/bowtie2">Bowtie 2</a> for your published research, please cite the <a href="http://genomebiology.com/2009/10/3/R25">Bowtie paper</a>. Thank you!</p>
 <h2 id="how-is-bowtie-2-different-from-bowtie-1">How is Bowtie 2 different from Bowtie 1?</h2>
 <p>Bowtie 1 was released in 2009 and was geared toward aligning the relatively short sequencing reads (up to 25-50 nucleotides) prevalent at the time. Since then, technology has improved both sequencing throughput (more nucleotides produced per sequencer per day) and read length (more nucleotides per read).</p>
 <p>The chief differences between Bowtie 1 and Bowtie 2 are:</p>
-<ol style="list-style-type: decimal">
-<li><p>For reads longer than about 50 bp Bowtie 2 is generally faster, more sensitive, and uses less memory than Bowtie 1. For relatively short reads (e.g. less than 50 bp) Bowtie 1 is sometimes faster and/or more sensitive.</p></li>
+<ol type="1">
+<li><p>For reads longer than about 50 bp Bowtie 2 is generally faster, more sensitive, and uses less memory than Bowtie 1. For relatively short reads ( e.g. less than 50 bp) Bowtie 1 is sometimes faster and/or more sensitive.</p></li>
 <li><p>Bowtie 2 supports gapped alignment with affine gap penalties. Number of gaps and gap lengths are not restricted, except by way of the configurable scoring scheme. Bowtie 1 finds just ungapped alignments.</p></li>
-<li><p>Bowtie 2 supports <a href="#end-to-end-alignment-versus-local-alignment">local alignment</a>, which doesn't require reads to align end-to-end. Local alignments might be "trimmed" ("soft clipped") at one or both extremes in a way that optimizes alignment score. Bowtie 2 also supports <a href="#end-to-end-alignment-versus-local-alignment">end-to-end alignment</a> which, like Bowtie 1, requires that the read align entirely.</p></li>
+<li><p>Bowtie 2 supports <a href="#end-to-end-alignment-versus-local-alignment">local alignment</a>, which doesn’t require reads to align end-to-end. Local alignments might be “trimmed” (“soft clipped”) at one or both extremes in a way that optimizes alignment score. Bowtie 2 also supports <a href="#end-to-end-alignment-versus-local-alignment">end-to-end alignment</a> which, like Bowtie 1, requires that the read align entirely.</p></li>
 <li><p>There is no upper limit on read length in Bowtie 2. Bowtie 1 had an upper limit of around 1000 bp.</p></li>
 <li><p>Bowtie 2 allows alignments to <a href="#ambiguous-characters">overlap ambiguous characters</a> (e.g. <code>N</code>s) in the reference. Bowtie 1 does not.</p></li>
-<li><p>Bowtie 2 does away with Bowtie 1's notion of alignment "stratum", and its distinction between "Maq-like" and "end-to-end" modes. In Bowtie 2 all alignments lie along a continuous spectrum of alignment scores where the <a href="#scores-higher-more-similar">scoring scheme</a>, similar to <a href="http://en.wikipedia.org/wiki/Needleman-Wunsch_algorithm">Needleman-Wunsch</a> and <a href="http://en.wikipedia.org/wiki/Smith_waterman">Smith-Waterman</a>.</p></li>
-<li><p>Bowtie 2's <a href="#aligning-pairs">paired-end alignment</a> is more flexible. E.g. for pairs that do not align in a paired fashion, Bowtie 2 attempts to find unpaired alignments for each mate.</p></li>
+<li><p>Bowtie 2 does away with Bowtie 1’s notion of alignment “stratum”, and its distinction between “Maq-like” and “end-to-end” modes. In Bowtie 2 all alignments lie along a continuous spectrum of alignment scores where the <a href="#scores-higher-more-similar">scoring scheme</a>, similar to <a href="http://en.wikipedia.org/wiki/Needleman-Wunsch_algorithm">Needleman-Wunsch</a> and <a href="http://en.wikipedia.org/wiki/Smith_waterman">Smith-Waterman</a>.</p></li>
+<li><p>Bowtie 2’s <a href="#aligning-pairs">paired-end alignment</a> is more flexible. E.g. for pairs that do not align in a paired fashion, Bowtie 2 attempts to find unpaired alignments for each mate.</p></li>
 <li><p>Bowtie 2 reports a spectrum of mapping qualities, in contrast for Bowtie 1 which reports either 0 or high.</p></li>
 <li><p>Bowtie 2 does not align colorspace reads.</p></li>
 </ol>
-<p>Bowtie 2 is not a "drop-in" replacement for Bowtie 1. Bowtie 2's command-line arguments and genome index format are both different from Bowtie 1's.</p>
-<h2 id="what-isnt-bowtie-2">What isn't Bowtie 2?</h2>
-<p>Bowtie 1 and Bowtie 2 are not general-purpose alignment tools like <a href="http://mummer.sourceforge.net/">MUMmer</a>, <a href="http://blast.ncbi.nlm.nih.gov/Blast.cgi">BLAST</a> or <a href="http://www.vmatch.de/">Vmatch</a>. Bowtie 2 works best when aligning to large genomes, though it supports arbitrarily small reference sequences (e.g. amplicons). It handles very long reads (i.e. upwards of 10s or 100s of kilobases), but it is optimized for the read lengths and error modes yielded [...]
-<p>If your goal is to align two very large sequences (e.g. two genomes), consider using <a href="http://mummer.sourceforge.net/">MUMmer</a>. If your goal is very sensitive alignment to a relatively short reference sequence (e.g. a bacterial genome), this can be done with Bowtie 2 but you may want to consider using tools like <a href="http://mummer.sourceforge.net/manual/#nucmer">NUCmer</a>, <a href="http://genome.ucsc.edu/cgi-bin/hgBlat?command=start">BLAT</a>, or <a href="http://blast.n [...]
+<p>Bowtie 2 is not a “drop-in” replacement for Bowtie 1. Bowtie 2’s command-line arguments and genome index format are both different from Bowtie 1’s.</p>
+<h2 id="what-isnt-bowtie-2">What isn’t Bowtie 2?</h2>
+<p>Bowtie 1 and Bowtie 2 are not general-purpose alignment tools like <a href="http://mummer.sourceforge.net/">MUMmer</a>, <a href="http://blast.ncbi.nlm.nih.gov/Blast.cgi">BLAST</a> or <a href="http://www.vmatch.de/">Vmatch</a>. Bowtie 2 works best when aligning to large genomes, though it supports arbitrarily small reference sequences (e.g. amplicons). It handles very long reads (i.e. upwards of 10s or 100s of kilobases), but it is optimized for the read lengths and error modes yielded [...]
+<p>If your goal is to align two very large sequences (e.g. two genomes), consider using <a href="http://mummer.sourceforge.net/">MUMmer</a>. If your goal is very sensitive alignment to a relatively short reference sequence (e.g. a bacterial genome), this can be done with Bowtie 2 but you may want to consider using tools like <a href="http://mummer.sourceforge.net/manual/#nucmer">NUCmer</a>, <a href="http://genome.ucsc.edu/cgi-bin/hgBlat?command=start">BLAT</a>, or <a href="http://blast.n [...]
 <p>Bowtie 2 does not support alignment of colorspace reads.</p>
-<h2 id="what-does-it-mean-that-some-older-bowtie-2-versions-are-beta">What does it mean that some older Bowtie 2 versions are "beta"?</h2>
-<p>We said those Bowtie 2 versions were in "beta" to convey that it was not as polished as a tool that had been around for a while, and was still in flux. Since version 2.0.1, we declared Bowtie 2 was no longer "beta".</p>
+<h2 id="what-does-it-mean-that-some-older-bowtie-2-versions-are-beta">What does it mean that some older Bowtie 2 versions are “beta”?</h2>
+<p>We said those Bowtie 2 versions were in “beta” to convey that it was not as polished as a tool that had been around for a while, and was still in flux. Since version 2.0.1, we declared Bowtie 2 was no longer “beta”.</p>
 <h1 id="obtaining-bowtie-2">Obtaining Bowtie 2</h1>
-<p>Download Bowtie 2 sources and binaries from the <a href="https://sourceforge.net/projects/bowtie-bio/files/bowtie2/">Download</a> section of the Sourceforge site. Binaries are available for the Intel <code>x86_64</code> architecture running Linux, Mac OS X, and Windows. If you plan to compile Bowtie 2 yourself, make sure to get the source package, i.e., the filename that ends in "-source.zip".</p>
+<p>Download Bowtie 2 sources and binaries from the <a href="https://sourceforge.net/projects/bowtie-bio/files/bowtie2/">Download</a> section of the Sourceforge site. Binaries are available for the Intel <code>x86_64</code> architecture running Linux, Mac OS X, and Windows. If you plan to compile Bowtie 2 yourself, make sure to get the source package, i.e., the filename that ends in “-source.zip”.</p>
 <h2 id="building-from-source">Building from source</h2>
 <p>Building Bowtie 2 from source requires a GNU-like environment with GCC, GNU Make and other basics. It should be possible to build Bowtie 2 on most vanilla Linux installations or on a Mac installation with <a href="http://developer.apple.com/xcode/">Xcode</a> installed. Bowtie 2 can also be built on Windows using a 64-bit MinGW distribution and MSYS. In order to simplify the MinGW setup it might be worth investigating popular MinGW personal builds since these are coming already prepare [...]
-<p>First, download the source package from the <a href="https://sourceforge.net/projects/bowtie-bio/files/bowtie2/">sourceforge site</a>. Make sure you're getting the source package; the file downloaded should end in <code>-source.zip</code>. Unzip the file, change to the unzipped directory, and build the Bowtie 2 tools by running GNU <code>make</code> (usually with the command <code>make</code>, but sometimes with <code>gmake</code>) with no arguments. If building with MinGW, run <code> [...]
+<p>First, download the source package from the <a href="https://sourceforge.net/projects/bowtie-bio/files/bowtie2/">sourceforge site</a>. Make sure you’re getting the source package; the file downloaded should end in <code>-source.zip</code>. Unzip the file, change to the unzipped directory, and build the Bowtie 2 tools by running GNU <code>make</code> (usually with the command <code>make</code>, but sometimes with <code>gmake</code>) with no arguments. If building with MinGW, run <code> [...]
 <p>Bowtie 2 is using the multithreading software model in order to speed up execution times on SMP architectures where this is possible. The Threading Building Blocks library, TBB, is now the default threading library in Bowtie 2. On POSIX platforms (like Linux, Mac OS, etc.) if TBB is not available the pthread library will be used. Although it is possible to use pthread library on Windows, a non-POSIX platform, due to performance reasons Bowtie 2 will try to use Windows native multithre [...]
 <h2 id="adding-to-path">Adding to PATH</h2>
-<p>By adding your new Bowtie 2 directory to your <a href="http://en.wikipedia.org/wiki/PATH_(variable)">PATH environment variable</a>, you ensure that whenever you run <code>bowtie2</code>, <code>bowtie2-build</code> or <code>bowtie2-inspect</code> from the command line, you will get the version you just installed without having to specify the entire path. This is recommended for most users. To do this, follow your operating system's instructions for adding the directory to your <a href= [...]
+<p>By adding your new Bowtie 2 directory to your <a href="http://en.wikipedia.org/wiki/PATH_(variable)">PATH environment variable</a>, you ensure that whenever you run <code>bowtie2</code>, <code>bowtie2-build</code> or <code>bowtie2-inspect</code> from the command line, you will get the version you just installed without having to specify the entire path. This is recommended for most users. To do this, follow your operating system’s instructions for adding the directory to your <a href= [...]
 <p>If you would like to install Bowtie 2 by copying the Bowtie 2 executable files to an existing directory in your <a href="http://en.wikipedia.org/wiki/PATH_(variable)">PATH</a>, make sure that you copy all the executables, including <code>bowtie2</code>, <code>bowtie2-align-s</code>, <code>bowtie2-align-l</code>, <code>bowtie2-build</code>, <code>bowtie2-build-s</code>, <code>bowtie2-build-l</code>, <code>bowtie2-inspect</code>, <code>bowtie2-inspect-s</code> and <code>bowtie2-inspect- [...]
 <h1 id="the-bowtie2-aligner">The <code>bowtie2</code> aligner</h1>
 <p><code>bowtie2</code> takes a Bowtie 2 index and a set of sequencing read files and outputs a set of alignments in SAM format.</p>
-<p>"Alignment" is the process by which we discover how and where the read sequences are similar to the reference sequence. An "alignment" is a result from this process, specifically: an alignment is a way of "lining up" some or all of the characters in the read with some characters from the reference in a way that reveals how they're similar. For example:</p>
+<p>“Alignment” is the process by which we discover how and where the read sequences are similar to the reference sequence. An “alignment” is a result from this process, specifically: an alignment is a way of “lining up” some or all of the characters in the read with some characters from the reference in a way that reveals how they’re similar. For example:</p>
 <pre><code>  Read:      GACTGGGCGATCTCGACTTCG
              |||||  |||||||||| |||
   Reference: GACTG--CGATCTCGACATCG</code></pre>
 <p>Where dash symbols represent gaps and vertical bars show where aligned characters match.</p>
-<p>We use alignment to make an educated guess as to where a read originated with respect to the reference genome. It's not always possible to determine this with certainty. For instance, if the reference genome contains several long stretches of As (<code>AAAAAAAAA</code> etc.) and the read sequence is a short stretch of As (<code>AAAAAAA</code>), we cannot know for certain exactly where in the sea of <code>A</code>s the read originated.</p>
+<p>We use alignment to make an educated guess as to where a read originated with respect to the reference genome. It’s not always possible to determine this with certainty. For instance, if the reference genome contains several long stretches of As (<code>AAAAAAAAA</code> etc.) and the read sequence is a short stretch of As (<code>AAAAAAA</code>), we cannot know for certain exactly where in the sea of <code>A</code>s the read originated.</p>
 <h2 id="end-to-end-alignment-versus-local-alignment">End-to-end alignment versus local alignment</h2>
-<p>By default, Bowtie 2 performs end-to-end read alignment. That is, it searches for alignments involving all of the read characters. This is also called an "untrimmed" or "unclipped" alignment.</p>
-<p>When the --local option is specified, Bowtie 2 performs local read alignment. In this mode, Bowtie 2 might "trim" or "clip" some read characters from one or both ends of the alignment if doing so maximizes the alignment score.</p>
+<p>By default, Bowtie 2 performs end-to-end read alignment. That is, it searches for alignments involving all of the read characters. This is also called an “untrimmed” or “unclipped” alignment.</p>
+<p>When the –local option is specified, Bowtie 2 performs local read alignment. In this mode, Bowtie 2 might “trim” or “clip” some read characters from one or both ends of the alignment if doing so maximizes the alignment score.</p>
 <h3 id="end-to-end-alignment-example">End-to-end alignment example</h3>
-<p>The following is an "end-to-end" alignment because it involves all the characters in the read. Such an alignment can be produced by Bowtie 2 in either end-to-end mode or in local mode.</p>
+<p>The following is an “end-to-end” alignment because it involves all the characters in the read. Such an alignment can be produced by Bowtie 2 in either end-to-end mode or in local mode.</p>
 <pre><code>Read:      GACTGGGCGATCTCGACTTCG
 Reference: GACTGCGATCTCGACATCG
 
@@ -149,7 +160,7 @@ Alignment:
              |||||  |||||||||| |||
   Reference: GACTG--CGATCTCGACATCG</code></pre>
 <h3 id="local-alignment-example">Local alignment example</h3>
-<p>The following is a "local" alignment because some of the characters at the ends of the read do not participate. In this case, 4 characters are omitted (or "soft trimmed" or "soft clipped") from the beginning and 3 characters are omitted from the end. This sort of alignment can be produced by Bowtie 2 only in local mode.</p>
+<p>The following is a “local” alignment because some of the characters at the ends of the read do not participate. In this case, 4 characters are omitted (or “soft trimmed” or “soft clipped”) from the beginning and 3 characters are omitted from the end. This sort of alignment can be produced by Bowtie 2 only in local mode.</p>
 <pre><code>Read:      ACGGTTGCGTTAATCCGCCACG
 Reference: TAACTTGCGTTAAATCCGCCTGG
 
@@ -167,38 +178,38 @@ Alignment:
 <p>A mismatched base at a high-quality position in the read receives a penalty of -6 by default. A length-2 read gap receives a penalty of -11 by default (-5 for the gap open, -3 for the first extension, -3 for the second extension). A base that matches receives a bonus of +2 be default. Thus, in local alignment mode, if the read is 50 bp long and it matches the reference exactly except for one mismatch at a high-quality position and one length-2 read gap, then the overall score equals t [...]
 <p>The best possible score in local mode equals the match bonus times the length of the read. This happens when there are no differences between the read and the reference.</p>
 <h3 id="valid-alignments-meet-or-exceed-the-minimum-score-threshold">Valid alignments meet or exceed the minimum score threshold</h3>
-<p>For an alignment to be considered "valid" (i.e. "good enough") by Bowtie 2, it must have an alignment score no less than the minimum score threshold. The threshold is configurable and is expressed as a function of the read length. In end-to-end alignment mode, the default minimum score threshold is <code>-0.6 + -0.6 * L</code>, where <code>L</code> is the read length. In local alignment mode, the default minimum score threshold is <code>20 + 8.0 * ln(L)</code>, whe [...]
+<p>For an alignment to be considered “valid” (i.e. “good enough”) by Bowtie 2, it must have an alignment score no less than the minimum score threshold. The threshold is configurable and is expressed as a function of the read length. In end-to-end alignment mode, the default minimum score threshold is <code>-0.6 + -0.6 * L</code>, where <code>L</code> is the read length. In local alignment mode, the default minimum score threshold is <code>20 + 8.0 * ln(L)</code>, where L is the read len [...]
 <h2 id="mapping-quality-higher-more-unique">Mapping quality: higher = more unique</h2>
 <p>The aligner cannot always assign a read to its point of origin with high confidence. For instance, a read that originated inside a repeat element might align equally well to many occurrences of the element throughout the genome, leaving the aligner with no basis for preferring one over the others.</p>
-<p>Aligners characterize their degree of confidence in the point of origin by reporting a mapping quality: a non-negative integer Q = -10 log10 p, where p is an estimate of the probability that the alignment does not correspond to the read's true point of origin. Mapping quality is sometimes abbreviated MAPQ, and is recorded in the <a href="http://samtools.sourceforge.net/SAM1.pdf">SAM</a> <code>MAPQ</code> field.</p>
-<p>Mapping quality is related to "uniqueness." We say an alignment is unique if it has a much higher alignment score than all the other possible alignments. The bigger the gap between the best alignment's score and the second-best alignment's score, the more unique the best alignment, and the higher its mapping quality should be.</p>
+<p>Aligners characterize their degree of confidence in the point of origin by reporting a mapping quality: a non-negative integer Q = -10 log10 p, where p is an estimate of the probability that the alignment does not correspond to the read’s true point of origin. Mapping quality is sometimes abbreviated MAPQ, and is recorded in the <a href="http://samtools.sourceforge.net/SAM1.pdf">SAM</a> <code>MAPQ</code> field.</p>
+<p>Mapping quality is related to “uniqueness.” We say an alignment is unique if it has a much higher alignment score than all the other possible alignments. The bigger the gap between the best alignment’s score and the second-best alignment’s score, the more unique the best alignment, and the higher its mapping quality should be.</p>
 <p>Accurate mapping qualities are useful for downstream tools like variant callers. For instance, a variant caller might choose to ignore evidence from alignments with mapping quality less than, say, 10. A mapping quality of 10 or less indicates that there is at least a 1 in 10 chance that the read truly originated elsewhere.</p>
 <h2 id="aligning-pairs">Aligning pairs</h2>
-<p>A "paired-end" or "mate-pair" read consists of pair of mates, called mate 1 and mate 2. Pairs come with a prior expectation about (a) the relative orientation of the mates, and (b) the distance separating them on the original DNA molecule. Exactly what expectations hold for a given dataset depends on the lab procedures used to generate the data. For example, a common lab procedure for producing pairs is Illumina's Paired-end Sequencing Assay, which yields pairs wit [...]
-<p>For simplicity, this manual uses the term "paired-end" to refer to any pair of reads with some expected relative orientation and distance. Depending on the protocol, these might actually be referred to as "paired-end" or "mate-paired." Also, we always refer to the individual sequences making up the pair as "mates."</p>
+<p>A “paired-end” or “mate-pair” read consists of pair of mates, called mate 1 and mate 2. Pairs come with a prior expectation about (a) the relative orientation of the mates, and (b) the distance separating them on the original DNA molecule. Exactly what expectations hold for a given dataset depends on the lab procedures used to generate the data. For example, a common lab procedure for producing pairs is Illumina’s Paired-end Sequencing Assay, which yields pairs with a relative orienta [...]
+<p>For simplicity, this manual uses the term “paired-end” to refer to any pair of reads with some expected relative orientation and distance. Depending on the protocol, these might actually be referred to as “paired-end” or “mate-paired.” Also, we always refer to the individual sequences making up the pair as “mates.”</p>
 <h3 id="paired-inputs">Paired inputs</h3>
 <p>Pairs are often stored in a pair of files, one file containing the mate 1s and the other containing the mates 2s. The first mate in the file for mate 1 forms a pair with the first mate in the file for mate 2, the second with the second, and so on. When aligning pairs with Bowtie 2, specify the file with the mate 1s mates using the <a href="#bowtie2-options-1"><code>-1</code></a> argument and the file with the mate 2s using the <a href="#bowtie2-options-2"><code>-2</code></a> argument. [...]
 <h3 id="paired-sam-output">Paired SAM output</h3>
-<p>When Bowtie 2 prints a SAM alignment for a pair, it prints two records (i.e. two lines of output), one for each mate. The first record describes the alignment for mate 1 and the second record describes the alignment for mate 2. In both records, some of the fields of the SAM record describe various properties of the alignment; for instance, the 7th and 8th fields (<code>RNEXT</code> and <code>PNEXT</code> respectively) indicate the reference name and position where the other mate align [...]
-<h3 id="concordant-pairs-match-pair-expectations-discordant-pairs-dont">Concordant pairs match pair expectations, discordant pairs don't</h3>
-<p>A pair that aligns with the expected relative mate orientation and with the expected range of distances between mates is said to align "concordantly". If both mates have unique alignments, but the alignments do not match paired-end expectations (i.e. the mates aren't in the expected relative orientation, or aren't within the expected distance range, or both), the pair is said to align "discordantly". Discordant alignments may be of particular interest, for instance [...]
-<p>The expected relative orientation of the mates is set using the <a href="#bowtie2-options-fr"><code>--ff</code></a>, <a href="#bowtie2-options-fr"><code>--fr</code></a>, or <a href="#bowtie2-options-fr"><code>--rf</code></a> options. The expected range of inter-mates distances (as measured from the furthest extremes of the mates; also called "outer distance") is set with the <a href="#bowtie2-options-I"><code>-I</code></a> and <a href="#bowtie2-options-X"><code>-X</code></a> [...]
+<p>When Bowtie 2 prints a SAM alignment for a pair, it prints two records (i.e. two lines of output), one for each mate. The first record describes the alignment for mate 1 and the second record describes the alignment for mate 2. In both records, some of the fields of the SAM record describe various properties of the alignment; for instance, the 7th and 8th fields (<code>RNEXT</code> and <code>PNEXT</code> respectively) indicate the reference name and position where the other mate align [...]
+<h3 id="concordant-pairs-match-pair-expectations-discordant-pairs-dont">Concordant pairs match pair expectations, discordant pairs don’t</h3>
+<p>A pair that aligns with the expected relative mate orientation and with the expected range of distances between mates is said to align “concordantly”. If both mates have unique alignments, but the alignments do not match paired-end expectations (i.e. the mates aren’t in the expected relative orientation, or aren’t within the expected distance range, or both), the pair is said to align “discordantly”. Discordant alignments may be of particular interest, for instance, when seeking <a hr [...]
+<p>The expected relative orientation of the mates is set using the <a href="#bowtie2-options-fr"><code>--ff</code></a>, <a href="#bowtie2-options-fr"><code>--fr</code></a>, or <a href="#bowtie2-options-fr"><code>--rf</code></a> options. The expected range of inter-mates distances (as measured from the furthest extremes of the mates; also called “outer distance”) is set with the <a href="#bowtie2-options-I"><code>-I</code></a> and <a href="#bowtie2-options-X"><code>-X</code></a> options.  [...]
 <p>To declare that a pair aligns discordantly, Bowtie 2 requires that both mates align uniquely. This is a conservative threshold, but this is often desirable when seeking structural variants.</p>
 <p>By default, Bowtie 2 searches for both concordant and discordant alignments, though searching for discordant alignments can be disabled with the <a href="#bowtie2-options-no-discordant"><code>--no-discordant</code></a> option.</p>
 <h3 id="mixed-mode-paired-where-possible-unpaired-otherwise">Mixed mode: paired where possible, unpaired otherwise</h3>
-<p>If Bowtie 2 cannot find a paired-end alignment for a pair, by default it will go on to look for unpaired alignments for the constituent mates. This is called "mixed mode." To disable mixed mode, set the <a href="#bowtie2-options-no-mixed"><code>--no-mixed</code></a> option.</p>
+<p>If Bowtie 2 cannot find a paired-end alignment for a pair, by default it will go on to look for unpaired alignments for the constituent mates. This is called “mixed mode.” To disable mixed mode, set the <a href="#bowtie2-options-no-mixed"><code>--no-mixed</code></a> option.</p>
 <p>Bowtie 2 runs a little faster in <code>--no-mixed</code> mode, but will only consider alignment status of pairs per se, not individual mates.</p>
 <h3 id="some-sam-flags-describe-paired-end-properties">Some SAM FLAGS describe paired-end properties</h3>
 <p>The SAM <code>FLAGS</code> field, the second field in a SAM record, has multiple bits that describe the paired-end nature of the read and alignment. The first (least significant) bit (1 in decimal, 0x1 in hexadecimal) is set if the read is part of a pair. The second bit (2 in decimal, 0x2 in hexadecimal) is set if the read is part of a pair that aligned in a paired-end fashion. The fourth bit (8 in decimal, 0x8 in hexadecimal) is set if the read is part of a pair and the other mate in [...]
 <h3 id="some-sam-optional-fields-describe-more-paired-end-properties">Some SAM optional fields describe more paired-end properties</h3>
-<p>The last several fields of each SAM record usually contain SAM optional fields, which are simply tab-separated strings conveying additional information about the reads and alignments. A SAM optional field is formatted like this: "XP:i:1" where "XP" is the <code>TAG</code>, "i" is the <code>TYPE</code> ("integer" in this case), and "1" is the <code>VALUE</code>. See the <a href="http://samtools.sourceforge.net/SAM1.pdf">SAM specificatio [...]
+<p>The last several fields of each SAM record usually contain SAM optional fields, which are simply tab-separated strings conveying additional information about the reads and alignments. A SAM optional field is formatted like this: “XP:i:1” where “XP” is the <code>TAG</code>, “i” is the <code>TYPE</code> (“integer” in this case), and “1” is the <code>VALUE</code>. See the <a href="http://samtools.sourceforge.net/SAM1.pdf">SAM specification</a> for details regarding SAM optional fields.</p>
 <h3 id="mates-can-overlap-contain-or-dovetail-each-other">Mates can overlap, contain, or dovetail each other</h3>
 <p>The fragment and read lengths might be such that alignments for the two mates from a pair overlap each other. Consider this example:</p>
 <p>(For these examples, assume we expect mate 1 to align to the left of mate 2.)</p>
 <pre><code>Mate 1:    GCAGATTATATGAGTCAGCTACGATATTGTT
 Mate 2:                               TGTTTGGGGTGACACATTACGCGTCTTTGAC
 Reference: GCAGATTATATGAGTCAGCTACGATATTGTTTGGGGTGACACATTACGCGTCTTTGAC</code></pre>
-<p>It's also possible, though unusual, for one mate alignment to contain the other, as in these examples:</p>
+<p>It’s also possible, though unusual, for one mate alignment to contain the other, as in these examples:</p>
 <pre><code>Mate 1:    GCAGATTATATGAGTCAGCTACGATATTGTTTGGGGTGACACATTACGC
 Mate 2:                               TGTTTGGGGTGACACATTACGC
 Reference: GCAGATTATATGAGTCAGCTACGATATTGTTTGGGGTGACACATTACGCGTCTTTGAC
@@ -206,56 +217,56 @@ Reference: GCAGATTATATGAGTCAGCTACGATATTGTTTGGGGTGACACATTACGCGTCTTTGAC
 Mate 1:                   CAGCTACGATATTGTTTGGGGTGACACATTACGC
 Mate 2:                      CTACGATATTGTTTGGGGTGAC
 Reference: GCAGATTATATGAGTCAGCTACGATATTGTTTGGGGTGACACATTACGCGTCTTTGAC</code></pre>
-<p>And it's also possible, though unusual, for the mates to "dovetail", with the mates seemingly extending "past" each other as in this example:</p>
+<p>And it’s also possible, though unusual, for the mates to “dovetail”, with the mates seemingly extending “past” each other as in this example:</p>
 <pre><code>Mate 1:                 GTCAGCTACGATATTGTTTGGGGTGACACATTACGC
 Mate 2:            TATGAGTCAGCTACGATATTGTTTGGGGTGACACAT                   
 Reference: GCAGATTATATGAGTCAGCTACGATATTGTTTGGGGTGACACATTACGCGTCTTTGAC</code></pre>
-<p>In some situations, it's desirable for the aligner to consider all these cases as "concordant" as long as other paired-end constraints are not violated. Bowtie 2's default behavior is to consider overlapping and containing as being consistent with concordant alignment. By default, dovetailing is considered inconsistent with concordant alignment.</p>
+<p>In some situations, it’s desirable for the aligner to consider all these cases as “concordant” as long as other paired-end constraints are not violated. Bowtie 2’s default behavior is to consider overlapping and containing as being consistent with concordant alignment. By default, dovetailing is considered inconsistent with concordant alignment.</p>
 <p>These defaults can be overridden. Setting <a href="#bowtie2-options-no-overlap"><code>--no-overlap</code></a> causes Bowtie 2 to consider overlapping mates as non-concordant. Setting <a href="#bowtie2-options-no-contain"><code>--no-contain</code></a> causes Bowtie 2 to consider cases where one mate alignment contains the other as non-concordant. Setting <a href="#bowtie2-options-dovetail"><code>--dovetail</code></a> causes Bowtie 2 to consider cases where the mate alignments dovetail  [...]
 <h2 id="reporting">Reporting</h2>
-<p>The reporting mode governs how many alignments Bowtie 2 looks for, and how to report them. Bowtie 2 has three distinct reporting modes. The default reporting mode is similar to the default reporting mode of many other read alignment tools, including <a href="http://bio-bwa.sourceforge.net/">BWA</a>. It is also similar to Bowtie 1's <code>-M</code> alignment mode.</p>
+<p>The reporting mode governs how many alignments Bowtie 2 looks for, and how to report them. Bowtie 2 has three distinct reporting modes. The default reporting mode is similar to the default reporting mode of many other read alignment tools, including <a href="http://bio-bwa.sourceforge.net/">BWA</a>. It is also similar to Bowtie 1’s <code>-M</code> alignment mode.</p>
 <p>In general, when we say that a read has an alignment, we mean that it has a <a href="#valid-alignments-meet-or-exceed-the-minimum-score-threshold">valid alignment</a>. When we say that a read has multiple alignments, we mean that it has multiple alignments that are valid and distinct from one another.</p>
 <h3 id="distinct-alignments-map-a-read-to-different-places">Distinct alignments map a read to different places</h3>
-<p>Two alignments for the same individual read are "distinct" if they map the same read to different places. Specifically, we say that two alignments are distinct if there are no alignment positions where a particular read offset is aligned opposite a particular reference offset in both alignments with the same orientation. E.g. if the first alignment is in the forward orientation and aligns the read character at read offset 10 to the reference character at chromosome 3, offset [...]
+<p>Two alignments for the same individual read are “distinct” if they map the same read to different places. Specifically, we say that two alignments are distinct if there are no alignment positions where a particular read offset is aligned opposite a particular reference offset in both alignments with the same orientation. E.g. if the first alignment is in the forward orientation and aligns the read character at read offset 10 to the reference character at chromosome 3, offset 3,445,245 [...]
 <p>Two alignments for the same pair are distinct if either the mate 1s in the two paired-end alignments are distinct or the mate 2s in the two alignments are distinct or both.</p>
 <h3 id="default-mode-search-for-multiple-alignments-report-the-best-one">Default mode: search for multiple alignments, report the best one</h3>
 <p>By default, Bowtie 2 searches for distinct, valid alignments for each read. When it finds a valid alignment, it generally will continue to look for alignments that are nearly as good or better. It will eventually stop looking, either because it exceeded a limit placed on search effort (see <a href="#bowtie2-options-D"><code>-D</code></a> and <a href="#bowtie2-options-R"><code>-R</code></a>) or because it already knows all it needs to know to report an alignment. Information from the b [...]
-<p>See also: <a href="#bowtie2-options-D"><code>-D</code></a>, which puts an upper limit on the number of dynamic programming problems (i.e. seed extensions) that can "fail" in a row before Bowtie 2 stops searching. Increasing <a href="#bowtie2-options-D"><code>-D</code></a> makes Bowtie 2 slower, but increases the likelihood that it will report the correct alignment for a read that aligns many places.</p>
-<p>See also: <a href="#bowtie2-options-R"><code>-R</code></a>, which sets the maximum number of times Bowtie 2 will "re-seed" when attempting to align a read with repetitive seeds. Increasing <a href="#bowtie2-options-R"><code>-R</code></a> makes Bowtie 2 slower, but increases the likelihood that it will report the correct alignment for a read that aligns many places.</p>
+<p>See also: <a href="#bowtie2-options-D"><code>-D</code></a>, which puts an upper limit on the number of dynamic programming problems (i.e. seed extensions) that can “fail” in a row before Bowtie 2 stops searching. Increasing <a href="#bowtie2-options-D"><code>-D</code></a> makes Bowtie 2 slower, but increases the likelihood that it will report the correct alignment for a read that aligns many places.</p>
+<p>See also: <a href="#bowtie2-options-R"><code>-R</code></a>, which sets the maximum number of times Bowtie 2 will “re-seed” when attempting to align a read with repetitive seeds. Increasing <a href="#bowtie2-options-R"><code>-R</code></a> makes Bowtie 2 slower, but increases the likelihood that it will report the correct alignment for a read that aligns many places.</p>
 <h3 id="k-mode-search-for-one-or-more-alignments-report-each">-k mode: search for one or more alignments, report each</h3>
-<p>In <a href="#bowtie2-options-k"><code>-k</code></a> mode, Bowtie 2 searches for up to N distinct, valid alignments for each read, where N equals the integer specified with the <code>-k</code> parameter. That is, if <code>-k 2</code> is specified, Bowtie 2 will search for at most 2 distinct alignments. It reports all alignments found, in descending order by alignment score. The alignment score for a paired-end alignment equals the sum of the alignment scores of the individual mates. Ea [...]
-<p>Bowtie 2 does not "find" alignments in any specific order, so for reads that have more than N distinct, valid alignments, Bowtie 2 does not guarantee that the N alignments reported are the best possible in terms of alignment score. Still, this mode can be effective and fast in situations where the user cares more about whether a read aligns (or aligns a certain number of times) than where exactly it originated.</p>
+<p>In <a href="#bowtie2-options-k"><code>-k</code></a> mode, Bowtie 2 searches for up to N distinct, valid alignments for each read, where N equals the integer specified with the <code>-k</code> parameter. That is, if <code>-k 2</code> is specified, Bowtie 2 will search for at most 2 distinct alignments. It reports all alignments found, in descending order by alignment score. The alignment score for a paired-end alignment equals the sum of the alignment scores of the individual mates. Ea [...]
+<p>Bowtie 2 does not “find” alignments in any specific order, so for reads that have more than N distinct, valid alignments, Bowtie 2 does not guarantee that the N alignments reported are the best possible in terms of alignment score. Still, this mode can be effective and fast in situations where the user cares more about whether a read aligns (or aligns a certain number of times) than where exactly it originated.</p>
 <h3 id="a-mode-search-for-and-report-all-alignments">-a mode: search for and report all alignments</h3>
-<p><a href="#bowtie2-options-a"><code>-a</code></a> mode is similar to <a href="#bowtie2-options-k"><code>-k</code></a> mode except that there is no upper limit on the number of alignments Bowtie 2 should report. Alignments are reported in descending order by alignment score. The alignment score for a paired-end alignment equals the sum of the alignment scores of the individual mates. Each reported read or pair alignment beyond the first has the SAM 'secondary' bit (which equals 256) set [...]
+<p><a href="#bowtie2-options-a"><code>-a</code></a> mode is similar to <a href="#bowtie2-options-k"><code>-k</code></a> mode except that there is no upper limit on the number of alignments Bowtie 2 should report. Alignments are reported in descending order by alignment score. The alignment score for a paired-end alignment equals the sum of the alignment scores of the individual mates. Each reported read or pair alignment beyond the first has the SAM ‘secondary’ bit (which equals 256) set [...]
 <p>Some tools are designed with this reporting mode in mind. Bowtie 2 is not! For very large genomes, this mode is very slow.</p>
 <h3 id="randomness-in-bowtie-2">Randomness in Bowtie 2</h3>
-<p>Bowtie 2's search for alignments for a given read is "randomized." That is, when Bowtie 2 encounters a set of equally-good choices, it uses a pseudo-random number to choose. For example, if Bowtie 2 discovers a set of 3 equally-good alignments and wants to decide which to report, it picks a pseudo-random integer 0, 1 or 2 and reports the corresponding alignment. Arbitrary choices can crop up at various points during alignment.</p>
+<p>Bowtie 2’s search for alignments for a given read is “randomized.” That is, when Bowtie 2 encounters a set of equally-good choices, it uses a pseudo-random number to choose. For example, if Bowtie 2 discovers a set of 3 equally-good alignments and wants to decide which to report, it picks a pseudo-random integer 0, 1 or 2 and reports the corresponding alignment. Arbitrary choices can crop up at various points during alignment.</p>
 <p>The pseudo-random number generator is re-initialized for every read, and the seed used to initialize it is a function of the read name, nucleotide string, quality string, and the value specified with <a href="#bowtie2-options-seed"><code>--seed</code></a>. If you run the same version of Bowtie 2 on two reads with identical names, nucleotide strings, and quality strings, and if <a href="#bowtie2-options-seed"><code>--seed</code></a> is set the same for both runs, Bowtie 2 will produce  [...]
 <p>However, when the user specifies the <a href="#bowtie2-options-non-deterministic"><code>--non-deterministic</code></a> option, Bowtie 2 will use the current time to re-initialize the pseudo-random number generator. When this is specified, Bowtie 2 might report different alignments for identical reads. This is counter-intuitive for some users, but might be more appropriate in situations where the input consists of many identical reads.</p>
 <h2 id="multiseed-heuristic">Multiseed heuristic</h2>
-<p>To rapidly narrow the number of possible alignments that must be considered, Bowtie 2 begins by extracting substrings ("seeds") from the read and its reverse complement and aligning them in an ungapped fashion with the help of the <a href="http://portal.acm.org/citation.cfm?id=796543">FM Index</a>. This is "multiseed alignment" and it is similar to what <a href="http://genomebiology.com/2009/10/3/R25">Bowtie 1 does</a>, except Bowtie 1 attempts to align the entire  [...]
+<p>To rapidly narrow the number of possible alignments that must be considered, Bowtie 2 begins by extracting substrings (“seeds”) from the read and its reverse complement and aligning them in an ungapped fashion with the help of the <a href="http://portal.acm.org/citation.cfm?id=796543">FM Index</a>. This is “multiseed alignment” and it is similar to what <a href="http://genomebiology.com/2009/10/3/R25">Bowtie 1 does</a>, except Bowtie 1 attempts to align the entire read this way.</p>
 <p>This initial step makes Bowtie 2 much faster than it would be without such a filter, but at the expense of missing some valid alignments. For instance, it is possible for a read to have a valid overall alignment but to have no valid seed alignments because each potential seed alignment is interrupted by too many mismatches or gaps.</p>
-<p>The trade-off between speed and sensitivity/accuracy can be adjusted by setting the seed length (<a href="#bowtie2-options-L"><code>-L</code></a>), the interval between extracted seeds (<a href="#bowtie2-options-i"><code>-i</code></a>), and the number of mismatches permitted per seed (<a href="#bowtie2-options-N"><code>-N</code></a>). For more sensitive alignment, set these parameters to (a) make the seeds closer together, (b) make the seeds shorter, and/or (c) allow more mismatches.  [...]
+<p>The trade-off between speed and sensitivity/accuracy can be adjusted by setting the seed length (<a href="#bowtie2-options-L"><code>-L</code></a>), the interval between extracted seeds (<a href="#bowtie2-options-i"><code>-i</code></a>), and the number of mismatches permitted per seed (<a href="#bowtie2-options-N"><code>-N</code></a>). For more sensitive alignment, set these parameters to (a) make the seeds closer together, (b) make the seeds shorter, and/or (c) allow more mismatches.  [...]
 <p><a href="#bowtie2-options-D"><code>-D</code></a> and <a href="#bowtie2-options-R"><code>-R</code></a> are also options that adjust the trade-off between speed and sensitivity/accuracy.</p>
 <h3 id="fm-index-memory-footprint">FM Index memory footprint</h3>
-<p>Bowtie 2 uses the <a href="http://portal.acm.org/citation.cfm?id=796543">FM Index</a> to find ungapped alignments for seeds. This step accounts for the bulk of Bowtie 2's memory footprint, as the <a href="http://portal.acm.org/citation.cfm?id=796543">FM Index</a> itself is typically the largest data structure used. For instance, the memory footprint of the <a href="http://portal.acm.org/citation.cfm?id=796543">FM Index</a> for the human genome is about 3.2 gigabytes of RAM.</p>
+<p>Bowtie 2 uses the <a href="http://portal.acm.org/citation.cfm?id=796543">FM Index</a> to find ungapped alignments for seeds. This step accounts for the bulk of Bowtie 2’s memory footprint, as the <a href="http://portal.acm.org/citation.cfm?id=796543">FM Index</a> itself is typically the largest data structure used. For instance, the memory footprint of the <a href="http://portal.acm.org/citation.cfm?id=796543">FM Index</a> for the human genome is about 3.2 gigabytes of RAM.</p>
 <h2 id="ambiguous-characters">Ambiguous characters</h2>
-<p>Non-whitespace characters besides A, C, G or T are considered "ambiguous." N is a common ambiguous character that appears in reference sequences. Bowtie 2 considers all ambiguous characters in the reference (including <a href="http://www.bioinformatics.org/sms/iupac.html">IUPAC nucleotide codes</a>) to be Ns.</p>
+<p>Non-whitespace characters besides A, C, G or T are considered “ambiguous.” N is a common ambiguous character that appears in reference sequences. Bowtie 2 considers all ambiguous characters in the reference (including <a href="http://www.bioinformatics.org/sms/iupac.html">IUPAC nucleotide codes</a>) to be Ns.</p>
 <p>Bowtie 2 allows alignments to overlap ambiguous characters in the reference. An alignment position that contains an ambiguous character in the read, reference, or both, is penalized according to <a href="#bowtie2-options-np"><code>--np</code></a>. <a href="#bowtie2-options-n-ceil"><code>--n-ceil</code></a> sets an upper limit on the number of positions that may contain ambiguous reference characters in a valid alignment. The optional field <a href="#bowtie2-build-opt-fields-xn"><code> [...]
 <p>Note that the <a href="#multiseed-heuristic">multiseed heuristic</a> cannot find <em>seed</em> alignments that overlap ambiguous reference characters. For an alignment overlapping an ambiguous reference character to be found, it must have one or more seed alignments that do not overlap ambiguous reference characters.</p>
 <h2 id="presets-setting-many-settings-at-once">Presets: setting many settings at once</h2>
-<p>Bowtie 2 comes with some useful combinations of parameters packaged into shorter "preset" parameters. For example, running Bowtie 2 with the <a href="#bowtie2-options-very-sensitive"><code>--very-sensitive</code></a> option is the same as running with options: <code>-D 20 -R 3 -N 0 -L 20 -i S,1,0.50</code>. The preset options that come with Bowtie 2 are designed to cover a wide area of the speed/sensitivity/accuracy trade-off space, with the presets ending in <code>fast</cod [...]
+<p>Bowtie 2 comes with some useful combinations of parameters packaged into shorter “preset” parameters. For example, running Bowtie 2 with the <a href="#bowtie2-options-very-sensitive"><code>--very-sensitive</code></a> option is the same as running with options: <code>-D 20 -R 3 -N 0 -L 20 -i S,1,0.50</code>. The preset options that come with Bowtie 2 are designed to cover a wide area of the speed/sensitivity/accuracy trade-off space, with the presets ending in <code>fast</code> general [...]
 <h2 id="filtering">Filtering</h2>
-<p>Some reads are skipped or "filtered out" by Bowtie 2. For example, reads may be filtered out because they are extremely short or have a high proportion of ambiguous nucleotides. Bowtie 2 will still print a SAM record for such a read, but no alignment will be reported and the <code>YF:i</code> SAM optional field will be set to indicate the reason the read was filtered.</p>
+<p>Some reads are skipped or “filtered out” by Bowtie 2. For example, reads may be filtered out because they are extremely short or have a high proportion of ambiguous nucleotides. Bowtie 2 will still print a SAM record for such a read, but no alignment will be reported and the <code>YF:i</code> SAM optional field will be set to indicate the reason the read was filtered.</p>
 <ul>
 <li><code>YF:Z:LN</code>: the read was filtered because it had length less than or equal to the number of seed mismatches set with the <a href="#bowtie2-options-N"><code>-N</code></a> option.</li>
 <li><code>YF:Z:NS</code>: the read was filtered because it contains a number of ambiguous characters (usually <code>N</code> or <code>.</code>) greater than the ceiling specified with <a href="#bowtie2-options-n-ceil"><code>--n-ceil</code></a>.</li>
-<li><code>YF:Z:SC</code>: the read was filtered because the read length and the match bonus (set with <a href="#bowtie2-options-ma"><code>--ma</code></a>) are such that the read can't possibly earn an alignment score greater than or equal to the threshold set with <a href="#bowtie2-options-score-min"><code>--score-min</code></a></li>
-<li><code>YF:Z:QC</code>: the read was filtered because it was marked as failing quality control and the user specified the <a href="#bowtie2-options-qc-filter"><code>--qc-filter</code></a> option. This only happens when the input is in Illumina's QSEQ format (i.e. when <a href="#bowtie2-options-qseq"><code>--qseq</code></a> is specified) and the last (11th) field of the read's QSEQ record contains <code>1</code>.</li>
+<li><code>YF:Z:SC</code>: the read was filtered because the read length and the match bonus (set with <a href="#bowtie2-options-ma"><code>--ma</code></a>) are such that the read can’t possibly earn an alignment score greater than or equal to the threshold set with <a href="#bowtie2-options-score-min"><code>--score-min</code></a></li>
+<li><code>YF:Z:QC</code>: the read was filtered because it was marked as failing quality control and the user specified the <a href="#bowtie2-options-qc-filter"><code>--qc-filter</code></a> option. This only happens when the input is in Illumina’s QSEQ format (i.e. when <a href="#bowtie2-options-qseq"><code>--qseq</code></a> is specified) and the last (11th) field of the read’s QSEQ record contains <code>1</code>.</li>
 </ul>
 <p>If a read could be filtered for more than one reason, the value <code>YF:Z</code> flag will reflect only one of those reasons.</p>
 <h2 id="alignment-summary">Alignment summary</h2>
-<p>When Bowtie 2 finishes running, it prints messages summarizing what happened. These messages are printed to the "standard error" ("stderr") filehandle. For datasets consisting of unpaired reads, the summary might look like this:</p>
+<p>When Bowtie 2 finishes running, it prints messages summarizing what happened. These messages are printed to the “standard error” (“stderr”) filehandle. For datasets consisting of unpaired reads, the summary might look like this:</p>
 <pre><code>20000 reads; of these:
   20000 (100.00%) were unpaired; of these:
     1247 (6.24%) aligned 0 times
@@ -280,17 +291,17 @@ Reference: GCAGATTATATGAGTCAGCTACGATATTGTTTGGGGTGACACATTACGCGTCTTTGAC</code></pr
 96.70% overall alignment rate</code></pre>
 <p>The indentation indicates how subtotals relate to totals.</p>
 <h2 id="wrapper-scripts">Wrapper scripts</h2>
-<p>The <code>bowtie2</code>, <code>bowtie2-build</code> and <code>bowtie2-inspect</code> 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. Also, the <code>bowtie2</code> wrapper provides some key functionality, like the ability to handle compressed inputs, and the functionality for <a href="#bowtie [...]
+<p>The <code>bowtie2</code>, <code>bowtie2-build</code> and <code>bowtie2-inspect</code> 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. Also, the <code>bowtie2</code> wrapper provides some key functionality, like the ability to handle compressed inputs, and the functionality for <a href="#bowtie2-options-un"><code> [...]
 <p>It is recommended that you always run the bowtie2 wrappers and not run the binaries directly.</p>
 <h2 id="small-and-large-indexes">Small and large indexes</h2>
-<p><code>bowtie2-build</code> can index reference genomes of any size. For genomes less than about 4 billion nucleotides in length, <code>bowtie2-build</code> builds a "small" index using 32-bit numbers in various parts of the index. When the genome is longer, <code>bowtie2-build</code> builds a "large" index using 64-bit numbers. Small indexes are stored in files with the <code>.bt2</code> extension, and large indexes are stored in files with the <code>.bt2l</code> e [...]
+<p><code>bowtie2-build</code> can index reference genomes of any size. For genomes less than about 4 billion nucleotides in length, <code>bowtie2-build</code> builds a “small” index using 32-bit numbers in various parts of the index. When the genome is longer, <code>bowtie2-build</code> builds a “large” index using 64-bit numbers. Small indexes are stored in files with the <code>.bt2</code> extension, and large indexes are stored in files with the <code>.bt2l</code> extension. The user n [...]
 <h2 id="performance-tuning">Performance tuning</h2>
-<ol style="list-style-type: decimal">
+<ol type="1">
 <li><p>If your computer has multiple processors/cores, use <code>-p</code></p>
 <p>The <a href="#bowtie2-options-p"><code>-p</code></a> option causes Bowtie 2 to launch a specified number of parallel search threads. Each thread runs on a different processor/core and all threads find alignments in parallel, increasing alignment throughput by approximately a multiple of the number of threads (though in practice, speedup is somewhat worse than linear).</p></li>
 <li><p>If reporting many alignments per read, try reducing <code>bowtie2-build --offrate</code></p>
 <p>If you are using <a href="#bowtie2-options-k"><code>-k</code></a> or <a href="#bowtie2-options-a"><code>-a</code></a> options and Bowtie 2 is reporting many alignments per read, using an index with a denser SA sample can speed things up considerably. To do this, specify a smaller-than-default <a href="#bowtie2-options-o"><code>-o</code>/<code>--offrate</code></a> value when running <code>bowtie2-build</code>. A denser SA sample yields a larger index, but is also particularly effective [...]
-<li><p>If <code>bowtie2</code> "thrashes", try increasing <code>bowtie2-build --offrate</code></p>
+<li><p>If <code>bowtie2</code> “thrashes”, try increasing <code>bowtie2-build --offrate</code></p>
 <p>If <code>bowtie2</code> runs very slowly on a relatively low-memory computer, try setting <a href="#bowtie2-options-o"><code>-o</code>/<code>--offrate</code></a> to a <em>larger</em> value when building the index. This decreases the memory footprint of the index.</p></li>
 </ol>
 <h2 id="command-line">Command Line</h2>
@@ -318,7 +329,7 @@ Reference: GCAGATTATATGAGTCAGCTACGATATTGTTTGGGGTGACACATTACGCGTCTTTGAC</code></pr
 <pre><code>-1 <m1></code></pre>
 </td>
 <td>
-<p>Comma-separated list of files containing mate 1s (filename usually includes <code>_1</code>), e.g. <code>-1 flyA_1.fq,flyB_1.fq</code>. Sequences specified with this option must correspond file-for-file and read-for-read with those specified in <code><m2></code>. Reads may be a mix of different lengths. If <code>-</code> is specified, <code>bowtie2</code> will read the mate 1s from the "standard in" or "stdin" filehandle.</p>
+<p>Comma-separated list of files containing mate 1s (filename usually includes <code>_1</code>), e.g. <code>-1 flyA_1.fq,flyB_1.fq</code>. Sequences specified with this option must correspond file-for-file and read-for-read with those specified in <code><m2></code>. Reads may be a mix of different lengths. If <code>-</code> is specified, <code>bowtie2</code> will read the mate 1s from the “standard in” or “stdin” filehandle.</p>
 </td>
 </tr>
 <tr>
@@ -326,7 +337,7 @@ Reference: GCAGATTATATGAGTCAGCTACGATATTGTTTGGGGTGACACATTACGCGTCTTTGAC</code></pr
 <pre><code>-2 <m2></code></pre>
 </td>
 <td>
-<p>Comma-separated list of files containing mate 2s (filename usually includes <code>_2</code>), e.g. <code>-2 flyA_2.fq,flyB_2.fq</code>. Sequences specified with this option must correspond file-for-file and read-for-read with those specified in <code><m1></code>. Reads may be a mix of different lengths. If <code>-</code> is specified, <code>bowtie2</code> will read the mate 2s from the "standard in" or "stdin" filehandle.</p>
+<p>Comma-separated list of files containing mate 2s (filename usually includes <code>_2</code>), e.g. <code>-2 flyA_2.fq,flyB_2.fq</code>. Sequences specified with this option must correspond file-for-file and read-for-read with those specified in <code><m1></code>. Reads may be a mix of different lengths. If <code>-</code> is specified, <code>bowtie2</code> will read the mate 2s from the “standard in” or “stdin” filehandle.</p>
 </td>
 </tr>
 <tr>
@@ -334,7 +345,7 @@ Reference: GCAGATTATATGAGTCAGCTACGATATTGTTTGGGGTGACACATTACGCGTCTTTGAC</code></pr
 <pre><code>-U <r></code></pre>
 </td>
 <td>
-<p>Comma-separated list of files containing unpaired reads to be aligned, e.g. <code>lane1.fq,lane2.fq,lane3.fq,lane4.fq</code>. Reads may be a mix of different lengths. If <code>-</code> is specified, <code>bowtie2</code> gets the reads from the "standard in" or "stdin" filehandle.</p>
+<p>Comma-separated list of files containing unpaired reads to be aligned, e.g. <code>lane1.fq,lane2.fq,lane3.fq,lane4.fq</code>. Reads may be a mix of different lengths. If <code>-</code> is specified, <code>bowtie2</code> gets the reads from the “standard in” or “stdin” filehandle.</p>
 </td>
 </tr>
 <tr>
@@ -342,7 +353,7 @@ Reference: GCAGATTATATGAGTCAGCTACGATATTGTTTGGGGTGACACATTACGCGTCTTTGAC</code></pr
 <pre><code>-S <sam></code></pre>
 </td>
 <td>
-<p>File to write SAM alignments to. By default, alignments are written to the "standard out" or "stdout" filehandle (i.e. the console).</p>
+<p>File to write SAM alignments to. By default, alignments are written to the “standard out” or “stdout” filehandle (i.e. the console).</p>
 </td>
 </tr>
 </table>
@@ -406,6 +417,14 @@ Reference: GCAGATTATATGAGTCAGCTACGATATTGTTTGGGGTGACACATTACGCGTCTTTGAC</code></pr
 </td>
 </tr>
 <tr>
+<td id="bowtie2-options-F">
+<pre><code>-F k:<int>,i:<int></code></pre>
+</td>
+<td>
+Reads are substrings (k-mers) extracted from a FASTA file <code><s></code>. Specifically, for every reference sequence in FASTA file <code><s></code>, Bowtie 2 aligns the k-mers at offsets 1, 1+i, 1+2i, … until reaching the end of the reference. Each k-mer is aligned as a separate read. Quality values are set to all Is (40 on Phred scale). Each k-mer (read) is given a name like <code><sequence>_<offset></code>, where <code><sequence></code> is the name of th [...]
+</td>
+</tr>
+<tr>
 <td id="bowtie2-options-c">
 <pre><code>-c</code></pre>
 </td>
@@ -418,7 +437,7 @@ Reference: GCAGATTATATGAGTCAGCTACGATATTGTTTGGGGTGACACATTACGCGTCTTTGAC</code></pr
 <pre><code>-s/--skip <int></code></pre>
 </td>
 <td>
-<p>Skip (i.e. do not align) the first <code><int></code> reads or pairs in the input.</p>
+<p>Skip (i.e. do not align) the first <code><int></code> reads or pairs in the input.</p>
 </td>
 </tr>
 <tr>
@@ -434,7 +453,7 @@ Reference: GCAGATTATATGAGTCAGCTACGATATTGTTTGGGGTGACACATTACGCGTCTTTGAC</code></pr
 <pre><code>-5/--trim5 <int></code></pre>
 </td>
 <td>
-<p>Trim <code><int></code> bases from 5' (left) end of each read before alignment (default: 0).</p>
+<p>Trim <code><int></code> bases from 5’ (left) end of each read before alignment (default: 0).</p>
 </td>
 </tr>
 <tr>
@@ -442,7 +461,7 @@ Reference: GCAGATTATATGAGTCAGCTACGATATTGTTTGGGGTGACACATTACGCGTCTTTGAC</code></pr
 <pre><code>-3/--trim3 <int></code></pre>
 </td>
 <td>
-<p>Trim <code><int></code> bases from 3' (right) end of each read before alignment (default: 0).</p>
+<p>Trim <code><int></code> bases from 3’ (right) end of each read before alignment (default: 0).</p>
 </td>
 </tr>
 <tr>
@@ -450,7 +469,7 @@ Reference: GCAGATTATATGAGTCAGCTACGATATTGTTTGGGGTGACACATTACGCGTCTTTGAC</code></pr
 <pre><code>--phred33</code></pre>
 </td>
 <td>
-<p>Input qualities are ASCII chars equal to the <a href="http://en.wikipedia.org/wiki/Phred_quality_score">Phred quality</a> plus 33. This is also called the "Phred+33" encoding, which is used by the very latest Illumina pipelines.</p>
+<p>Input qualities are ASCII chars equal to the <a href="http://en.wikipedia.org/wiki/Phred_quality_score">Phred quality</a> plus 33. This is also called the “Phred+33” encoding, which is used by the very latest Illumina pipelines.</p>
 </td>
 </tr>
 <tr>
@@ -458,7 +477,7 @@ Reference: GCAGATTATATGAGTCAGCTACGATATTGTTTGGGGTGACACATTACGCGTCTTTGAC</code></pr
 <pre><code>--phred64</code></pre>
 </td>
 <td>
-<p>Input qualities are ASCII chars equal to the <a href="http://en.wikipedia.org/wiki/Phred_quality_score">Phred quality</a> plus 64. This is also called the "Phred+64" encoding.</p>
+<p>Input qualities are ASCII chars equal to the <a href="http://en.wikipedia.org/wiki/Phred_quality_score">Phred quality</a> plus 64. This is also called the “Phred+64” encoding.</p>
 </td>
 </tr>
 <tr>
@@ -466,7 +485,7 @@ Reference: GCAGATTATATGAGTCAGCTACGATATTGTTTGGGGTGACACATTACGCGTCTTTGAC</code></pr
 <pre><code>--solexa-quals</code></pre>
 </td>
 <td>
-<p>Convert input qualities from <a href="http://en.wikipedia.org/wiki/Phred_quality_score">Solexa</a> (which can be negative) to <a href="http://en.wikipedia.org/wiki/Phred_quality_score">Phred</a> (which can't). This scheme was used in older Illumina GA Pipeline versions (prior to 1.3). Default: off.</p>
+<p>Convert input qualities from <a href="http://en.wikipedia.org/wiki/Phred_quality_score">Solexa</a> (which can be negative) to <a href="http://en.wikipedia.org/wiki/Phred_quality_score">Phred</a> (which can’t). This scheme was used in older Illumina GA Pipeline versions (prior to 1.3). Default: off.</p>
 </td>
 </tr>
 <tr>
@@ -474,7 +493,7 @@ Reference: GCAGATTATATGAGTCAGCTACGATATTGTTTGGGGTGACACATTACGCGTCTTTGAC</code></pr
 <pre><code>--int-quals</code></pre>
 </td>
 <td>
-<p>Quality values are represented in the read input file as space-separated ASCII integers, e.g., <code>40 40 30 40</code>..., rather than ASCII characters, e.g., <code>II?I</code>.... Integers are treated as being on the <a href="http://en.wikipedia.org/wiki/Phred_quality_score">Phred quality</a> scale unless <a href="#bowtie2-options-solexa-quals"><code>--solexa-quals</code></a> is also specified. Default: off.</p>
+<p>Quality values are represented in the read input file as space-separated ASCII integers, e.g., <code>40 40 30 40</code>…, rather than ASCII characters, e.g., <code>II?I</code>…. Integers are treated as being on the <a href="http://en.wikipedia.org/wiki/Phred_quality_score">Phred quality</a> scale unless <a href="#bowtie2-options-solexa-quals"><code>--solexa-quals</code></a> is also specified. Default: off.</p>
 </td>
 </tr>
 </table>
@@ -581,7 +600,7 @@ Seed 3 fw:             ACGCTATCAT
 Seed 3 rc:             ATGATAGCGT
 Seed 4 fw:                   TCATGCATAA
 Seed 4 rc:                   TTATGCATGA</code></pre>
-<p>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 <code>-i S,1,2.5</code> sets the interval function <code>f</code> to <code>f(x) = 1 + 2.5 * sqrt(x)</code>, where x is the read length. See also: <a href="#setting-function-options">setting function options</a>. If the function returns a result less than 1, it is rounded up to 1. Default: th [...]
+<p>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 <code>-i S,1,2.5</code> sets the interval function <code>f</code> to <code>f(x) = 1 + 2.5 * sqrt(x)</code>, where x is the read length. See also: <a href="#setting-function-options">setting function options</a>. If the function returns a result less than 1, it is rounded up to 1. Default: th [...]
 </td>
 </tr>
 <tr>
@@ -597,7 +616,7 @@ Seed 4 rc:                   TTATGCATGA</code></pre>
 <pre><code>--dpad <int></code></pre>
 </td>
 <td>
-<p>"Pads" dynamic programming problems by <code><int></code> columns on either side to allow gaps. Default: 15.</p>
+<p>“Pads” dynamic programming problems by <code><int></code> columns on either side to allow gaps. Default: 15.</p>
 </td>
 </tr>
 <tr>
@@ -613,7 +632,7 @@ Seed 4 rc:                   TTATGCATGA</code></pre>
 <pre><code>--ignore-quals</code></pre>
 </td>
 <td>
-<p>When calculating a mismatch penalty, always consider the quality value at the mismatched position to be the highest possible, regardless of the actual value. I.e. input is treated as though all quality values are high. This is also the default behavior when the input doesn't specify quality values (e.g. in <a href="#bowtie2-options-f"><code>-f</code></a>, <a href="#bowtie2-options-r"><code>-r</code></a>, or <a href="#bowtie2-options-c"><code>-c</code></a> modes).</p>
+<p>When calculating a mismatch penalty, always consider the quality value at the mismatched position to be the highest possible, regardless of the actual value. I.e. input is treated as though all quality values are high. This is also the default behavior when the input doesn’t specify quality values (e.g. in <a href="#bowtie2-options-f"><code>-f</code></a>, <a href="#bowtie2-options-r"><code>-r</code></a>, or <a href="#bowtie2-options-c"><code>-c</code></a> modes).</p>
 </td>
 </tr>
 <tr>
@@ -621,7 +640,7 @@ Seed 4 rc:                   TTATGCATGA</code></pre>
 <pre><code>--nofw/--norc</code></pre>
 </td>
 <td>
-<p>If <code>--nofw</code> is specified, <code>bowtie2</code> will not attempt to align unpaired reads to the forward (Watson) reference strand. If <code>--norc</code> is specified, <code>bowtie2</code> will not attempt to align unpaired reads against the reverse-complement (Crick) reference strand. In paired-end mode, <code>--nofw</code> and <code>--norc</code> pertain to the fragments; i.e. specifying <code>--nofw</code> causes <code>bowtie2</code> to explore only those paired-end confi [...]
+<p>If <code>--nofw</code> is specified, <code>bowtie2</code> will not attempt to align unpaired reads to the forward (Watson) reference strand. If <code>--norc</code> is specified, <code>bowtie2</code> will not attempt to align unpaired reads against the reverse-complement (Crick) reference strand. In paired-end mode, <code>--nofw</code> and <code>--norc</code> pertain to the fragments; i.e. specifying <code>--nofw</code> causes <code>bowtie2</code> to explore only those paired-end confi [...]
 </td>
 </tr>
 <tr>
@@ -637,7 +656,7 @@ Seed 4 rc:                   TTATGCATGA</code></pre>
 <pre><code>--end-to-end</code></pre>
 </td>
 <td>
-<p>In this mode, Bowtie 2 requires that the entire read align from one end to the other, without any trimming (or "soft clipping") of characters from either end. The match bonus <a href="#bowtie2-options-ma"><code>--ma</code></a> always equals 0 in this mode, so all alignment scores are less than or equal to 0, and the greatest possible alignment score is 0. This is mutually exclusive with <a href="#bowtie2-options-local"><code>--local</code></a>. <code>--end-to-end</code> is t [...]
+<p>In this mode, Bowtie 2 requires that the entire read align from one end to the other, without any trimming (or “soft clipping”) of characters from either end. The match bonus <a href="#bowtie2-options-ma"><code>--ma</code></a> always equals 0 in this mode, so all alignment scores are less than or equal to 0, and the greatest possible alignment score is 0. This is mutually exclusive with <a href="#bowtie2-options-local"><code>--local</code></a>. <code>--end-to-end</code> is the default [...]
 </td>
 </tr>
 <tr>
@@ -645,7 +664,7 @@ Seed 4 rc:                   TTATGCATGA</code></pre>
 <pre><code>--local</code></pre>
 </td>
 <td>
-<p>In this mode, Bowtie 2 does not require that the entire read align from one end to the other. Rather, some characters may be omitted ("soft clipped") from the ends in order to achieve the greatest possible alignment score. The match bonus <a href="#bowtie2-options-ma"><code>--ma</code></a> is used in this mode, and the best possible alignment score is equal to the match bonus (<a href="#bowtie2-options-ma"><code>--ma</code></a>) times the length of the read. Specifying <code [...]
+<p>In this mode, Bowtie 2 does not require that the entire read align from one end to the other. Rather, some characters may be omitted (“soft clipped”) from the ends in order to achieve the greatest possible alignment score. The match bonus <a href="#bowtie2-options-ma"><code>--ma</code></a> is used in this mode, and the best possible alignment score is equal to the match bonus (<a href="#bowtie2-options-ma"><code>--ma</code></a>) times the length of the read. Specifying <code>--local</ [...]
 </td>
 </tr>
 </table>
@@ -696,7 +715,7 @@ Seed 4 rc:                   TTATGCATGA</code></pre>
 <pre><code>--score-min <func></code></pre>
 </td>
 <td>
-<p>Sets a function governing the minimum alignment score needed for an alignment to be considered "valid" (i.e. good enough to report). This is a function of read length. For instance, specifying <code>L,0,-0.6</code> sets the minimum-score function <code>f</code> to <code>f(x) = 0 + -0.6 * x</code>, where <code>x</code> is the read length. See also: <a href="#setting-function-options">setting function options</a>. The default in <a href="#bowtie2-options-end-to-end"><code>--en [...]
+<p>Sets a function governing the minimum alignment score needed for an alignment to be considered “valid” (i.e. good enough to report). This is a function of read length. For instance, specifying <code>L,0,-0.6</code> sets the minimum-score function <code>f</code> to <code>f(x) = 0 + -0.6 * x</code>, where <code>x</code> is the read length. See also: <a href="#setting-function-options">setting function options</a>. The default in <a href="#bowtie2-options-end-to-end"><code>--end-to-end</ [...]
 </td>
 </tr>
 </table>
@@ -708,7 +727,7 @@ Seed 4 rc:                   TTATGCATGA</code></pre>
 </td>
 <td>
 <p>By default, <code>bowtie2</code> searches for distinct, valid alignments for each read. When it finds a valid alignment, it continues looking for alignments that are nearly as good or better. The best alignment found is reported (randomly selected from among best if tied). Information about the best alignments is used to estimate mapping quality and to set SAM optional fields, such as <a href="#bowtie2-build-opt-fields-as"><code>AS:i</code></a> and <a href="#bowtie2-build-opt-fields-x [...]
-<p>When <code>-k</code> is specified, however, <code>bowtie2</code> behaves differently. Instead, it searches for at most <code><int></code> distinct, valid alignments for each read. The search terminates when it can't find more distinct valid alignments, or when it finds <code><int></code>, whichever happens first. All alignments found are reported in descending order by alignment score. The alignment score for a paired-end alignment equals the sum of the alignment scores of [...]
+<p>When <code>-k</code> is specified, however, <code>bowtie2</code> behaves differently. Instead, it searches for at most <code><int></code> distinct, valid alignments for each read. The search terminates when it can’t find more distinct valid alignments, or when it finds <code><int></code>, whichever happens first. All alignments found are reported in descending order by alignment score. The alignment score for a paired-end alignment equals the sum of the alignment scores of [...]
 <p>Note: Bowtie 2 is not designed with large values for <code>-k</code> in mind, and when aligning reads to long, repetitive genomes large <code>-k</code> can be very, very slow.</p>
 </td>
 </tr>
@@ -729,7 +748,7 @@ Seed 4 rc:                   TTATGCATGA</code></pre>
 <pre><code>-D <int></code></pre>
 </td>
 <td>
-<p>Up to <code><int></code> consecutive seed extension attempts can "fail" before Bowtie 2 moves on, using the alignments found so far. 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.</p>
+<p>Up to <code><int></code> consecutive seed extension attempts can “fail” before Bowtie 2 moves on, using the alignments found so far. 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.</p>
 </td>
 </tr>
 <tr>
@@ -737,7 +756,7 @@ Seed 4 rc:                   TTATGCATGA</code></pre>
 <pre><code>-R <int></code></pre>
 </td>
 <td>
-<p><code><int></code> is the maximum number of times Bowtie 2 will "re-seed" reads with repetitive seeds. 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.</p>
+<p><code><int></code> is the maximum number of times Bowtie 2 will “re-seed” reads with repetitive seeds. 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.</p>
 </td>
 </tr>
 </table>
@@ -768,7 +787,7 @@ Seed 4 rc:                   TTATGCATGA</code></pre>
 <pre><code>--fr/--rf/--ff</code></pre>
 </td>
 <td>
-<p>The upstream/downstream mate orientations for a valid paired-end alignment against the forward reference strand. E.g., if <code>--fr</code> 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 (<a href="#bowtie2-options-I"><code>-I</code></a> and <a href="#bowtie2-options-X"><code>-X</code></a>) are met, that alignment is valid. Also, if mate 2 appears upstream of the reverse co [...]
+<p>The upstream/downstream mate orientations for a valid paired-end alignment against the forward reference strand. E.g., if <code>--fr</code> 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 (<a href="#bowtie2-options-I"><code>-I</code></a> and <a href="#bowtie2-options-X"><code>-X</code></a>) are met, that alignment is valid. Also, if mate 2 appears upstream of the reverse co [...]
 </td>
 </tr>
 <tr>
@@ -792,7 +811,7 @@ Seed 4 rc:                   TTATGCATGA</code></pre>
 <pre><code>--dovetail</code></pre>
 </td>
 <td>
-<p>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: <a href="#mates-can-overlap-contain-or-dovetail-each-other">Mates can overlap, contain or dovetail each other</a>. Default: mates cannot dovetail in a concordant alignment.</p>
+<p>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: <a href="#mates-can-overlap-contain-or-dovetail-each-other">Mates can overlap, contain or dovetail each other</a>. Default: mates cannot dovetail in a concordant alignment.</p>
 </td>
 </tr>
 <tr>
@@ -819,7 +838,7 @@ Seed 4 rc:                   TTATGCATGA</code></pre>
 <pre><code>-t/--time</code></pre>
 </td>
 <td>
-<p>Print the wall-clock time required to load the index files and align the reads. This is printed to the "standard error" ("stderr") filehandle. Default: off.</p>
+<p>Print the wall-clock time required to load the index files and align the reads. This is printed to the “standard error” (“stderr”) filehandle. Default: off.</p>
 </td>
 </tr>
 <tr>
@@ -852,7 +871,7 @@ Seed 4 rc:                   TTATGCATGA</code></pre>
 --un-conc-lz4 <path></code></pre>
 </td>
 <td>
-<p>Write paired-end reads that fail to align concordantly to file(s) at <code><path></code>. These reads correspond to the SAM records with the FLAGS <code>0x4</code> bit set and either the <code>0x40</code> or <code>0x80</code> bit set (depending on whether it's mate #1 or #2). <code>.1</code> and <code>.2</code> strings are added to the filename to distinguish which file contains mate #1 and mate #2. If a percent symbol, <code>%</code>, is used in <code><path></code>, the p [...]
+<p>Write paired-end reads that fail to align concordantly to file(s) at <code><path></code>. These reads correspond to the SAM records with the FLAGS <code>0x4</code> bit set and either the <code>0x40</code> or <code>0x80</code> bit set (depending on whether it’s mate #1 or #2). <code>.1</code> and <code>.2</code> strings are added to the filename to distinguish which file contains mate #1 and mate #2. If a percent symbol, <code>%</code>, is used in <code><path></code>, the p [...]
 </td>
 </tr>
 <tr>
@@ -863,7 +882,7 @@ Seed 4 rc:                   TTATGCATGA</code></pre>
 --al-conc-lz4 <path></code></pre>
 </td>
 <td>
-<p>Write paired-end reads that align concordantly at least once to file(s) at <code><path></code>. These reads correspond to the SAM records with the FLAGS <code>0x4</code> bit unset and either the <code>0x40</code> or <code>0x80</code> bit set (depending on whether it's mate #1 or #2). <code>.1</code> and <code>.2</code> strings are added to the filename to distinguish which file contains mate #1 and mate #2. If a percent symbol, <code>%</code>, is used in <code><path></code [...]
+<p>Write paired-end reads that align concordantly at least once to file(s) at <code><path></code>. These reads correspond to the SAM records with the FLAGS <code>0x4</code> bit unset and either the <code>0x40</code> or <code>0x80</code> bit set (depending on whether it’s mate #1 or #2). <code>.1</code> and <code>.2</code> strings are added to the filename to distinguish which file contains mate #1 and mate #2. If a percent symbol, <code>%</code>, is used in <code><path></code [...]
 </td>
 </tr>
 <tr>
@@ -887,7 +906,7 @@ Seed 4 rc:                   TTATGCATGA</code></pre>
 <pre><code>--met-stderr <path></code></pre>
 </td>
 <td>
-<p>Write <code>bowtie2</code> metrics to the "standard error" ("stderr") filehandle. This is not mutually exclusive with <a href="#bowtie2-options-met-file"><code>--met-file</code></a>. Having alignment metric can be useful for debugging certain problems, especially performance issues. See also: <a href="#bowtie2-options-met"><code>--met</code></a>. Default: metrics disabled.</p>
+<p>Write <code>bowtie2</code> metrics to the “standard error” (“stderr”) filehandle. This is not mutually exclusive with <a href="#bowtie2-options-met-file"><code>--met-file</code></a>. Having alignment metric can be useful for debugging certain problems, especially performance issues. See also: <a href="#bowtie2-options-met"><code>--met</code></a>. Default: metrics disabled.</p>
 </td>
 </tr>
 <tr>
@@ -989,7 +1008,7 @@ Seed 4 rc:                   TTATGCATGA</code></pre>
 <pre><code>-p/--threads NTHREADS</code></pre>
 </td>
 <td>
-<p>Launch <code>NTHREADS</code> parallel search threads (default: 1). Threads will run on separate processors/cores and synchronize when parsing reads and outputting alignments. Searching for alignments is highly parallel, and speedup is close to linear. Increasing <code>-p</code> increases Bowtie 2's memory footprint. E.g. when aligning to a human genome index, increasing <code>-p</code> from 1 to 8 increases the memory footprint by a few hundred megabytes. This option is only available [...]
+<p>Launch <code>NTHREADS</code> parallel search threads (default: 1). Threads will run on separate processors/cores and synchronize when parsing reads and outputting alignments. Searching for alignments is highly parallel, and speedup is close to linear. Increasing <code>-p</code> increases Bowtie 2’s memory footprint. E.g. when aligning to a human genome index, increasing <code>-p</code> from 1 to 8 increases the memory footprint by a few hundred megabytes. This option is only available [...]
 </td>
 </tr>
 <tr>
@@ -1005,7 +1024,7 @@ Seed 4 rc:                   TTATGCATGA</code></pre>
 <pre><code>--mm</code></pre>
 </td>
 <td>
-<p>Use memory-mapped I/O to load the index, rather than typical file I/O. Memory-mapping allows many concurrent <code>bowtie</code> 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 <code>bowtie</code> in situations where using <a href="#bowtie2-options-p"><code>-p</code></a> is not possible or not preferable.</p>
+<p>Use memory-mapped I/O to load the index, rather than typical file I/O. Memory-mapping allows many concurrent <code>bowtie</code> 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 <code>bowtie</code> in situations where using <a href="#bowtie2-options-p"><code>-p</code></a> is not possible or not preferable.</p>
 </td>
 </tr>
 </table>
@@ -1056,7 +1075,7 @@ Seed 4 rc:                   TTATGCATGA</code></pre>
 <p>Following is a brief description of the <a href="http://samtools.sourceforge.net/SAM1.pdf">SAM</a> format as output by <code>bowtie2</code>. For more details, see the <a href="http://samtools.sourceforge.net/SAM1.pdf">SAM format specification</a>.</p>
 <p>By default, <code>bowtie2</code> prints a SAM header with <code>@HD</code>, <code>@SQ</code> and <code>@PG</code> lines. When one or more <a href="#bowtie2-options-rg"><code>--rg</code></a> arguments are specified, <code>bowtie2</code> will also print an <code>@RG</code> line that includes all user-specified <a href="#bowtie2-options-rg"><code>--rg</code></a> tokens separated by tabs.</p>
 <p>Each subsequent line describes an alignment or, if the read failed to align, a read. Each line is a collection of at least 12 fields separated by tabs; from left to right, the fields are:</p>
-<ol style="list-style-type: decimal">
+<ol type="1">
 <li><p>Name of read that aligned.</p>
 <p>Note that the <a href="http://samtools.sourceforge.net/SAM1.pdf">SAM specification</a> 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. The standard behavior of truncating at the first whitespace can be suppressed with <code>--sam-no-qname-trunc</code> at the expense of generating non-standard SAM.</p></li>
 <li><p>Sum of all applicable flags. Flags relevant to Bowtie are:</p>
@@ -1131,9 +1150,9 @@ Seed 4 rc:                   TTATGCATGA</code></pre>
 <li><p>1-based offset into the forward reference strand where leftmost character of the alignment occurs</p></li>
 <li><p>Mapping quality</p></li>
 <li><p>CIGAR string representation of alignment</p></li>
-<li><p>Name of reference sequence where mate's alignment occurs. Set to <code>=</code> if the mate's reference sequence is the same as this alignment's, or <code>*</code> if there is no mate.</p></li>
-<li><p>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.</p></li>
-<li><p>Inferred fragment length. Size is negative if the mate's alignment occurs upstream of this alignment. Size is 0 if the mates did not align concordantly. However, size is non-0 if the mates aligned discordantly to the same chromosome.</p></li>
+<li><p>Name of reference sequence where mate’s alignment occurs. Set to <code>=</code> if the mate’s reference sequence is the same as this alignment’s, or <code>*</code> if there is no mate.</p></li>
+<li><p>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.</p></li>
+<li><p>Inferred fragment length. Size is negative if the mate’s alignment occurs upstream of this alignment. Size is 0 if the mates did not align concordantly. However, size is non-0 if the mates aligned discordantly to the same chromosome.</p></li>
 <li><p>Read sequence (reverse-complemented if aligned to the reverse strand)</p></li>
 <li><p>ASCII-encoded read qualities (reverse-complemented if the read aligned to the reverse strand). The encoded quality values are on the <a href="http://en.wikipedia.org/wiki/Phred_quality_score">Phred quality</a> scale and the encoding is ASCII-offset by 33 (ASCII char <code>!</code>), similarly to a <a href="http://en.wikipedia.org/wiki/FASTQ_format">FASTQ</a> file.</p></li>
 <li><p>Optional fields. Fields are tab-separated. <code>bowtie2</code> outputs zero or more of these optional fields for each alignment, depending on the type of the alignment:</p></li>
@@ -1230,9 +1249,9 @@ Seed 4 rc:                   TTATGCATGA</code></pre>
 </table>
 <h1 id="the-bowtie2-build-indexer">The <code>bowtie2-build</code> indexer</h1>
 <p><code>bowtie2-build</code> builds a Bowtie index from a set of DNA sequences. <code>bowtie2-build</code> outputs a set of 6 files with suffixes <code>.1.bt2</code>, <code>.2.bt2</code>, <code>.3.bt2</code>, <code>.4.bt2</code>, <code>.rev.1.bt2</code>, and <code>.rev.2.bt2</code>. In the case of a large index these suffixes will have a <code>bt2l</code> termination. These files together constitute the index: they are all that is needed to align reads to that reference. The original se [...]
-<p>Bowtie 2's <code>.bt2</code> index format is different from Bowtie 1's <code>.ebwt</code> format, and they are not compatible with each other.</p>
-<p>Use of Karkkainen's <a href="http://portal.acm.org/citation.cfm?id=1314852">blockwise algorithm</a> allows <code>bowtie2-build</code> to trade off between running time and memory usage. <code>bowtie2-build</code> has three options governing how it makes this trade: <a href="#bowtie2-build-options-p"><code>-p</code>/<code>--packed</code></a>, <a href="#bowtie2-build-options-bmax"><code>--bmax</code></a>/<a href="#bowtie2-build-options-bmaxdivn"><code>--bmaxdivn</code></a>, and <a href= [...]
-<p>The indexer provides options pertaining to the "shape" of the index, e.g. <a href="#bowtie2-build-options-o"><code>--offrate</code></a> governs the fraction of <a href="http://en.wikipedia.org/wiki/Burrows-Wheeler_transform">Burrows-Wheeler</a> rows that are "marked" (i.e., the density of the suffix-array sample; see the original <a href="http://portal.acm.org/citation.cfm?id=796543">FM Index</a> paper for details). All of these options are potentially profitable t [...]
+<p>Bowtie 2’s <code>.bt2</code> index format is different from Bowtie 1’s <code>.ebwt</code> format, and they are not compatible with each other.</p>
+<p>Use of Karkkainen’s <a href="http://portal.acm.org/citation.cfm?id=1314852">blockwise algorithm</a> allows <code>bowtie2-build</code> to trade off between running time and memory usage. <code>bowtie2-build</code> has three options governing how it makes this trade: <a href="#bowtie2-build-options-p"><code>-p</code>/<code>--packed</code></a>, <a href="#bowtie2-build-options-bmax"><code>--bmax</code></a>/<a href="#bowtie2-build-options-bmaxdivn"><code>--bmaxdivn</code></a>, and <a href= [...]
+<p>The indexer provides options pertaining to the “shape” of the index, e.g. <a href="#bowtie2-build-options-o"><code>--offrate</code></a> governs the fraction of <a href="http://en.wikipedia.org/wiki/Burrows-Wheeler_transform">Burrows-Wheeler</a> rows that are “marked” (i.e., the density of the suffix-array sample; see the original <a href="http://portal.acm.org/citation.cfm?id=796543">FM Index</a> paper for details). All of these options are potentially profitable trade-offs depending  [...]
 <p><code>bowtie2-build</code> can generate either <a href="#small-and-large-indexes">small or large indexes</a>. The wrapper will decide which based on the length of the input genome. If the reference does not exceed 4 billion characters but a large index is preferred, the user can specify <a href="#bowtie2-build-options-large-index"><code>--large-index</code></a> to force <code>bowtie2-build</code> to build a large index instead.</p>
 <p>The Bowtie 2 index is based on the <a href="http://portal.acm.org/citation.cfm?id=796543">FM Index</a> of Ferragina and Manzini, which in turn is based on the <a href="http://en.wikipedia.org/wiki/Burrows-Wheeler_transform">Burrows-Wheeler</a> transform. The algorithm used to build the index is based on the <a href="http://portal.acm.org/citation.cfm?id=1314852">blockwise algorithm</a> of Karkkainen.</p>
 <h2 id="command-line-1">Command Line</h2>
@@ -1352,7 +1371,7 @@ Seed 4 rc:                   TTATGCATGA</code></pre>
 <pre><code>-o/--offrate <int></code></pre>
 </td>
 <td>
-<p>To map alignments back to positions on the reference sequences, it's necessary to annotate ("mark") some or all of the <a href="http://en.wikipedia.org/wiki/Burrows-Wheeler_transform">Burrows-Wheeler</a> rows with their corresponding location on the genome. <a href="#bowtie2-build-options-o"><code>-o</code>/<code>--offrate</code></a> governs how many rows get marked: the indexer will mark every 2^<code><int></code> rows. Marking more rows makes reference-position looku [...]
+<p>To map alignments back to positions on the reference sequences, it’s necessary to annotate (“mark”) some or all of the <a href="http://en.wikipedia.org/wiki/Burrows-Wheeler_transform">Burrows-Wheeler</a> rows with their corresponding location on the genome. <a href="#bowtie2-build-options-o"><code>-o</code>/<code>--offrate</code></a> governs how many rows get marked: the indexer will mark every 2^<code><int></code> rows. Marking more rows makes reference-position lookups faster, [...]
 </td>
 </tr>
 <tr>
@@ -1488,17 +1507,17 @@ Sequence-N  <name>  <len></code></pre>
 </tr>
 </table>
 <h1 id="getting-started-with-bowtie-2-lambda-phage-example">Getting started with Bowtie 2: Lambda phage example</h1>
-<p>Bowtie 2 comes with some example files to get you started. The example files are not scientifically significant; we use the <a href="http://en.wikipedia.org/wiki/Lambda_phage">Lambda phage</a> reference genome simply because it's short, and the reads were generated by a computer program, not a sequencer. However, these files will let you start running Bowtie 2 and downstream tools right away.</p>
+<p>Bowtie 2 comes with some example files to get you started. The example files are not scientifically significant; we use the <a href="http://en.wikipedia.org/wiki/Lambda_phage">Lambda phage</a> reference genome simply because it’s short, and the reads were generated by a computer program, not a sequencer. However, these files will let you start running Bowtie 2 and downstream tools right away.</p>
 <p>First follow the manual instructions to <a href="#obtaining-bowtie-2">obtain Bowtie 2</a>. Set the <code>BT2_HOME</code> environment variable to point to the new Bowtie 2 directory containing the <code>bowtie2</code>, <code>bowtie2-build</code> and <code>bowtie2-inspect</code> binaries. This is important, as the <code>BT2_HOME</code> variable is used in the commands below to refer to that directory.</p>
 <h2 id="indexing-a-reference-genome">Indexing a reference genome</h2>
-<p>To create an index for the <a href="http://en.wikipedia.org/wiki/Lambda_phage">Lambda phage</a> reference genome included with Bowtie 2, create a new temporary directory (it doesn't matter where), change into that directory, and run:</p>
+<p>To create an index for the <a href="http://en.wikipedia.org/wiki/Lambda_phage">Lambda phage</a> reference genome included with Bowtie 2, create a new temporary directory (it doesn’t matter where), change into that directory, and run:</p>
 <pre><code>$BT2_HOME/bowtie2-build $BT2_HOME/example/reference/lambda_virus.fa lambda_virus</code></pre>
-<p>The command should print many lines of output then quit. When the command completes, the current directory will contain four new files that all start with <code>lambda_virus</code> and end with <code>.1.bt2</code>, <code>.2.bt2</code>, <code>.3.bt2</code>, <code>.4.bt2</code>, <code>.rev.1.bt2</code>, and <code>.rev.2.bt2</code>. These files constitute the index - you're done!</p>
+<p>The command should print many lines of output then quit. When the command completes, the current directory will contain four new files that all start with <code>lambda_virus</code> and end with <code>.1.bt2</code>, <code>.2.bt2</code>, <code>.3.bt2</code>, <code>.4.bt2</code>, <code>.rev.1.bt2</code>, and <code>.rev.2.bt2</code>. These files constitute the index - you’re done!</p>
 <p>You can use <code>bowtie2-build</code> to create an index for a set of <a href="https://en.wikipedia.org/wiki/FASTA"><code>FASTA</code></a> files obtained from any source, including sites such as <a href="http://genome.ucsc.edu/cgi-bin/hgGateway">UCSC</a>, <a href="http://www.ncbi.nlm.nih.gov/sites/genome">NCBI</a>, and <a href="http://www.ensembl.org/">Ensembl</a>. When indexing multiple <a href="https://en.wikipedia.org/wiki/FASTA"><code>FASTA</code></a> files, specify all the files [...]
 <h2 id="aligning-example-reads">Aligning example reads</h2>
 <p>Stay in the directory created in the previous step, which now contains the <code>lambda_virus</code> index files. Next, run:</p>
 <pre><code>$BT2_HOME/bowtie2 -x lambda_virus -U $BT2_HOME/example/reads/reads_1.fq -S eg1.sam</code></pre>
-<p>This runs the Bowtie 2 aligner, which aligns a set of unpaired reads to the <a href="http://en.wikipedia.org/wiki/Lambda_phage">Lambda phage</a> reference genome using the index generated in the previous step. The alignment results in SAM format are written to the file <code>eg1.sam</code>, and a short alignment summary is written to the console. (Actually, the summary is written to the "standard error" or "stderr" filehandle, which is typically printed to the cons [...]
+<p>This runs the Bowtie 2 aligner, which aligns a set of unpaired reads to the <a href="http://en.wikipedia.org/wiki/Lambda_phage">Lambda phage</a> reference genome using the index generated in the previous step. The alignment results in SAM format are written to the file <code>eg1.sam</code>, and a short alignment summary is written to the console. (Actually, the summary is written to the “standard error” or “stderr” filehandle, which is typically printed to the console.)</p>
 <p>To see the first few lines of the SAM output, run:</p>
 <pre><code>head eg1.sam</code></pre>
 <p>You will see something like this:</p>
@@ -1534,5 +1553,7 @@ r7  16  gi|9626243|ref|NC_001416.1| 4692    42  143M    *   0   0   TCAGCCGGACGC
 <p>Then to view the variants, run:</p>
 <pre><code>bcftools view eg2.raw.bcf</code></pre>
 <p>See the official SAMtools guide to <a href="http://samtools.sourceforge.net/mpileup.shtml">Calling SNPs/INDELs with SAMtools/BCFtools</a> for more details and variations on this process.</p>
+<!-- fasta-continuous option does not exist but was added to prevent
+warnings due to the case insensitive nature of markdown URLs -->
 </body>
 </html>
diff --git a/doc/website/manual.ssi b/doc/website/manual.ssi
index 37c745d..0afcb0a 100644
--- a/doc/website/manual.ssi
+++ b/doc/website/manual.ssi
@@ -15,8 +15,8 @@
 <li><a href="#introduction">Introduction</a><ul>
 <li><a href="#what-is-bowtie-2">What is Bowtie 2?</a></li>
 <li><a href="#how-is-bowtie-2-different-from-bowtie-1">How is Bowtie 2 different from Bowtie 1?</a></li>
-<li><a href="#what-isnt-bowtie-2">What isn't Bowtie 2?</a></li>
-<li><a href="#what-does-it-mean-that-some-older-bowtie-2-versions-are-beta">What does it mean that some older Bowtie 2 versions are "beta"?</a></li>
+<li><a href="#what-isnt-bowtie-2">What isn’t Bowtie 2?</a></li>
+<li><a href="#what-does-it-mean-that-some-older-bowtie-2-versions-are-beta">What does it mean that some older Bowtie 2 versions are “beta”?</a></li>
 </ul></li>
 <li><a href="#obtaining-bowtie-2">Obtaining Bowtie 2</a><ul>
 <li><a href="#building-from-source">Building from source</a></li>
@@ -36,7 +36,7 @@
 <li><a href="#aligning-pairs">Aligning pairs</a><ul>
 <li><a href="#paired-inputs">Paired inputs</a></li>
 <li><a href="#paired-sam-output">Paired SAM output</a></li>
-<li><a href="#concordant-pairs-match-pair-expectations-discordant-pairs-dont">Concordant pairs match pair expectations, discordant pairs don't</a></li>
+<li><a href="#concordant-pairs-match-pair-expectations-discordant-pairs-dont">Concordant pairs match pair expectations, discordant pairs don’t</a></li>
 <li><a href="#mixed-mode-paired-where-possible-unpaired-otherwise">Mixed mode: paired where possible, unpaired otherwise</a></li>
 <li><a href="#some-sam-flags-describe-paired-end-properties">Some SAM FLAGS describe paired-end properties</a></li>
 <li><a href="#some-sam-optional-fields-describe-more-paired-end-properties">Some SAM optional fields describe more paired-end properties</a></li>
@@ -95,52 +95,52 @@
  ! -->
 <h1 id="introduction">Introduction</h1>
 <h2 id="what-is-bowtie-2">What is Bowtie 2?</h2>
-<p><a href="http://bowtie-bio.sf.net/bowtie2">Bowtie 2</a> 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 indexes the genome with an <a href="http://en.wikipedia.org/wiki/FM-index">FM Index</a> (based on the <a href="http://en.wikipedia.org/wiki/Burrows-Wheeler_transform">Burrows-Wheeler Transf [...]
-<p><a href="http://bowtie-bio.sf.net/bowtie2">Bowtie 2</a> is often the first step in pipelines for comparative genomics, including for variation calling, ChIP-seq, RNA-seq, BS-seq. <a href="http://bowtie-bio.sf.net/bowtie2">Bowtie 2</a> and <a href="http://bowtie-bio.sf.net">Bowtie</a> (also called "<a href="http://bowtie-bio.sf.net">Bowtie 1</a>" here) are also tightly integrated into some tools, including <a href="http://tophat.cbcb.umd.edu/">TopHat</a>: a fast splice juncti [...]
+<p><a href="http://bowtie-bio.sf.net/bowtie2">Bowtie 2</a> 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 indexes the genome with an <a href="http://en.wikipedia.org/wiki/FM-index">FM Index</a> (based on the <a href="http://en.wikipedia.org/wiki/Burrows-Wheeler_transform">Burrows-Wheeler Transf [...]
+<p><a href="http://bowtie-bio.sf.net/bowtie2">Bowtie 2</a> is often the first step in pipelines for comparative genomics, including for variation calling, ChIP-seq, RNA-seq, BS-seq. <a href="http://bowtie-bio.sf.net/bowtie2">Bowtie 2</a> and <a href="http://bowtie-bio.sf.net">Bowtie</a> (also called “<a href="http://bowtie-bio.sf.net">Bowtie 1</a>” here) are also tightly integrated into some tools, including <a href="http://tophat.cbcb.umd.edu/">TopHat</a>: a fast splice junction mapper  [...]
 <p>If you use <a href="http://bowtie-bio.sf.net/bowtie2">Bowtie 2</a> for your published research, please cite the <a href="http://genomebiology.com/2009/10/3/R25">Bowtie paper</a>. Thank you!</p>
 <h2 id="how-is-bowtie-2-different-from-bowtie-1">How is Bowtie 2 different from Bowtie 1?</h2>
 <p>Bowtie 1 was released in 2009 and was geared toward aligning the relatively short sequencing reads (up to 25-50 nucleotides) prevalent at the time. Since then, technology has improved both sequencing throughput (more nucleotides produced per sequencer per day) and read length (more nucleotides per read).</p>
 <p>The chief differences between Bowtie 1 and Bowtie 2 are:</p>
-<ol style="list-style-type: decimal">
-<li><p>For reads longer than about 50 bp Bowtie 2 is generally faster, more sensitive, and uses less memory than Bowtie 1. For relatively short reads (e.g. less than 50 bp) Bowtie 1 is sometimes faster and/or more sensitive.</p></li>
+<ol type="1">
+<li><p>For reads longer than about 50 bp Bowtie 2 is generally faster, more sensitive, and uses less memory than Bowtie 1. For relatively short reads ( e.g. less than 50 bp) Bowtie 1 is sometimes faster and/or more sensitive.</p></li>
 <li><p>Bowtie 2 supports gapped alignment with affine gap penalties. Number of gaps and gap lengths are not restricted, except by way of the configurable scoring scheme. Bowtie 1 finds just ungapped alignments.</p></li>
-<li><p>Bowtie 2 supports <a href="#end-to-end-alignment-versus-local-alignment">local alignment</a>, which doesn't require reads to align end-to-end. Local alignments might be "trimmed" ("soft clipped") at one or both extremes in a way that optimizes alignment score. Bowtie 2 also supports <a href="#end-to-end-alignment-versus-local-alignment">end-to-end alignment</a> which, like Bowtie 1, requires that the read align entirely.</p></li>
+<li><p>Bowtie 2 supports <a href="#end-to-end-alignment-versus-local-alignment">local alignment</a>, which doesn’t require reads to align end-to-end. Local alignments might be “trimmed” (“soft clipped”) at one or both extremes in a way that optimizes alignment score. Bowtie 2 also supports <a href="#end-to-end-alignment-versus-local-alignment">end-to-end alignment</a> which, like Bowtie 1, requires that the read align entirely.</p></li>
 <li><p>There is no upper limit on read length in Bowtie 2. Bowtie 1 had an upper limit of around 1000 bp.</p></li>
 <li><p>Bowtie 2 allows alignments to <a href="#ambiguous-characters">overlap ambiguous characters</a> (e.g. <code>N</code>s) in the reference. Bowtie 1 does not.</p></li>
-<li><p>Bowtie 2 does away with Bowtie 1's notion of alignment "stratum", and its distinction between "Maq-like" and "end-to-end" modes. In Bowtie 2 all alignments lie along a continuous spectrum of alignment scores where the <a href="#scores-higher-more-similar">scoring scheme</a>, similar to <a href="http://en.wikipedia.org/wiki/Needleman-Wunsch_algorithm">Needleman-Wunsch</a> and <a href="http://en.wikipedia.org/wiki/Smith_waterman">Smith-Waterman</a>.</p></li>
-<li><p>Bowtie 2's <a href="#aligning-pairs">paired-end alignment</a> is more flexible. E.g. for pairs that do not align in a paired fashion, Bowtie 2 attempts to find unpaired alignments for each mate.</p></li>
+<li><p>Bowtie 2 does away with Bowtie 1’s notion of alignment “stratum”, and its distinction between “Maq-like” and “end-to-end” modes. In Bowtie 2 all alignments lie along a continuous spectrum of alignment scores where the <a href="#scores-higher-more-similar">scoring scheme</a>, similar to <a href="http://en.wikipedia.org/wiki/Needleman-Wunsch_algorithm">Needleman-Wunsch</a> and <a href="http://en.wikipedia.org/wiki/Smith_waterman">Smith-Waterman</a>.</p></li>
+<li><p>Bowtie 2’s <a href="#aligning-pairs">paired-end alignment</a> is more flexible. E.g. for pairs that do not align in a paired fashion, Bowtie 2 attempts to find unpaired alignments for each mate.</p></li>
 <li><p>Bowtie 2 reports a spectrum of mapping qualities, in contrast for Bowtie 1 which reports either 0 or high.</p></li>
 <li><p>Bowtie 2 does not align colorspace reads.</p></li>
 </ol>
-<p>Bowtie 2 is not a "drop-in" replacement for Bowtie 1. Bowtie 2's command-line arguments and genome index format are both different from Bowtie 1's.</p>
-<h2 id="what-isnt-bowtie-2">What isn't Bowtie 2?</h2>
-<p>Bowtie 1 and Bowtie 2 are not general-purpose alignment tools like <a href="http://mummer.sourceforge.net/">MUMmer</a>, <a href="http://blast.ncbi.nlm.nih.gov/Blast.cgi">BLAST</a> or <a href="http://www.vmatch.de/">Vmatch</a>. Bowtie 2 works best when aligning to large genomes, though it supports arbitrarily small reference sequences (e.g. amplicons). It handles very long reads (i.e. upwards of 10s or 100s of kilobases), but it is optimized for the read lengths and error modes yielded [...]
-<p>If your goal is to align two very large sequences (e.g. two genomes), consider using <a href="http://mummer.sourceforge.net/">MUMmer</a>. If your goal is very sensitive alignment to a relatively short reference sequence (e.g. a bacterial genome), this can be done with Bowtie 2 but you may want to consider using tools like <a href="http://mummer.sourceforge.net/manual/#nucmer">NUCmer</a>, <a href="http://genome.ucsc.edu/cgi-bin/hgBlat?command=start">BLAT</a>, or <a href="http://blast.n [...]
+<p>Bowtie 2 is not a “drop-in” replacement for Bowtie 1. Bowtie 2’s command-line arguments and genome index format are both different from Bowtie 1’s.</p>
+<h2 id="what-isnt-bowtie-2">What isn’t Bowtie 2?</h2>
+<p>Bowtie 1 and Bowtie 2 are not general-purpose alignment tools like <a href="http://mummer.sourceforge.net/">MUMmer</a>, <a href="http://blast.ncbi.nlm.nih.gov/Blast.cgi">BLAST</a> or <a href="http://www.vmatch.de/">Vmatch</a>. Bowtie 2 works best when aligning to large genomes, though it supports arbitrarily small reference sequences (e.g. amplicons). It handles very long reads (i.e. upwards of 10s or 100s of kilobases), but it is optimized for the read lengths and error modes yielded [...]
+<p>If your goal is to align two very large sequences (e.g. two genomes), consider using <a href="http://mummer.sourceforge.net/">MUMmer</a>. If your goal is very sensitive alignment to a relatively short reference sequence (e.g. a bacterial genome), this can be done with Bowtie 2 but you may want to consider using tools like <a href="http://mummer.sourceforge.net/manual/#nucmer">NUCmer</a>, <a href="http://genome.ucsc.edu/cgi-bin/hgBlat?command=start">BLAT</a>, or <a href="http://blast.n [...]
 <p>Bowtie 2 does not support alignment of colorspace reads.</p>
-<h2 id="what-does-it-mean-that-some-older-bowtie-2-versions-are-beta">What does it mean that some older Bowtie 2 versions are "beta"?</h2>
-<p>We said those Bowtie 2 versions were in "beta" to convey that it was not as polished as a tool that had been around for a while, and was still in flux. Since version 2.0.1, we declared Bowtie 2 was no longer "beta".</p>
+<h2 id="what-does-it-mean-that-some-older-bowtie-2-versions-are-beta">What does it mean that some older Bowtie 2 versions are “beta”?</h2>
+<p>We said those Bowtie 2 versions were in “beta” to convey that it was not as polished as a tool that had been around for a while, and was still in flux. Since version 2.0.1, we declared Bowtie 2 was no longer “beta”.</p>
 <h1 id="obtaining-bowtie-2">Obtaining Bowtie 2</h1>
-<p>Download Bowtie 2 sources and binaries from the <a href="https://sourceforge.net/projects/bowtie-bio/files/bowtie2/">Download</a> section of the Sourceforge site. Binaries are available for the Intel <code>x86_64</code> architecture running Linux, Mac OS X, and Windows. If you plan to compile Bowtie 2 yourself, make sure to get the source package, i.e., the filename that ends in "-source.zip".</p>
+<p>Download Bowtie 2 sources and binaries from the <a href="https://sourceforge.net/projects/bowtie-bio/files/bowtie2/">Download</a> section of the Sourceforge site. Binaries are available for the Intel <code>x86_64</code> architecture running Linux, Mac OS X, and Windows. If you plan to compile Bowtie 2 yourself, make sure to get the source package, i.e., the filename that ends in “-source.zip”.</p>
 <h2 id="building-from-source">Building from source</h2>
 <p>Building Bowtie 2 from source requires a GNU-like environment with GCC, GNU Make and other basics. It should be possible to build Bowtie 2 on most vanilla Linux installations or on a Mac installation with <a href="http://developer.apple.com/xcode/">Xcode</a> installed. Bowtie 2 can also be built on Windows using a 64-bit MinGW distribution and MSYS. In order to simplify the MinGW setup it might be worth investigating popular MinGW personal builds since these are coming already prepare [...]
-<p>First, download the source package from the <a href="https://sourceforge.net/projects/bowtie-bio/files/bowtie2/">sourceforge site</a>. Make sure you're getting the source package; the file downloaded should end in <code>-source.zip</code>. Unzip the file, change to the unzipped directory, and build the Bowtie 2 tools by running GNU <code>make</code> (usually with the command <code>make</code>, but sometimes with <code>gmake</code>) with no arguments. If building with MinGW, run <code> [...]
+<p>First, download the source package from the <a href="https://sourceforge.net/projects/bowtie-bio/files/bowtie2/">sourceforge site</a>. Make sure you’re getting the source package; the file downloaded should end in <code>-source.zip</code>. Unzip the file, change to the unzipped directory, and build the Bowtie 2 tools by running GNU <code>make</code> (usually with the command <code>make</code>, but sometimes with <code>gmake</code>) with no arguments. If building with MinGW, run <code> [...]
 <p>Bowtie 2 is using the multithreading software model in order to speed up execution times on SMP architectures where this is possible. The Threading Building Blocks library, TBB, is now the default threading library in Bowtie 2. On POSIX platforms (like Linux, Mac OS, etc.) if TBB is not available the pthread library will be used. Although it is possible to use pthread library on Windows, a non-POSIX platform, due to performance reasons Bowtie 2 will try to use Windows native multithre [...]
 <h2 id="adding-to-path">Adding to PATH</h2>
-<p>By adding your new Bowtie 2 directory to your <a href="http://en.wikipedia.org/wiki/PATH_(variable)">PATH environment variable</a>, you ensure that whenever you run <code>bowtie2</code>, <code>bowtie2-build</code> or <code>bowtie2-inspect</code> from the command line, you will get the version you just installed without having to specify the entire path. This is recommended for most users. To do this, follow your operating system's instructions for adding the directory to your <a href= [...]
+<p>By adding your new Bowtie 2 directory to your <a href="http://en.wikipedia.org/wiki/PATH_(variable)">PATH environment variable</a>, you ensure that whenever you run <code>bowtie2</code>, <code>bowtie2-build</code> or <code>bowtie2-inspect</code> from the command line, you will get the version you just installed without having to specify the entire path. This is recommended for most users. To do this, follow your operating system’s instructions for adding the directory to your <a href= [...]
 <p>If you would like to install Bowtie 2 by copying the Bowtie 2 executable files to an existing directory in your <a href="http://en.wikipedia.org/wiki/PATH_(variable)">PATH</a>, make sure that you copy all the executables, including <code>bowtie2</code>, <code>bowtie2-align-s</code>, <code>bowtie2-align-l</code>, <code>bowtie2-build</code>, <code>bowtie2-build-s</code>, <code>bowtie2-build-l</code>, <code>bowtie2-inspect</code>, <code>bowtie2-inspect-s</code> and <code>bowtie2-inspect- [...]
 <h1 id="the-bowtie2-aligner">The <code>bowtie2</code> aligner</h1>
 <p><code>bowtie2</code> takes a Bowtie 2 index and a set of sequencing read files and outputs a set of alignments in SAM format.</p>
-<p>"Alignment" is the process by which we discover how and where the read sequences are similar to the reference sequence. An "alignment" is a result from this process, specifically: an alignment is a way of "lining up" some or all of the characters in the read with some characters from the reference in a way that reveals how they're similar. For example:</p>
+<p>“Alignment” is the process by which we discover how and where the read sequences are similar to the reference sequence. An “alignment” is a result from this process, specifically: an alignment is a way of “lining up” some or all of the characters in the read with some characters from the reference in a way that reveals how they’re similar. For example:</p>
 <pre><code>  Read:      GACTGGGCGATCTCGACTTCG
              |||||  |||||||||| |||
   Reference: GACTG--CGATCTCGACATCG</code></pre>
 <p>Where dash symbols represent gaps and vertical bars show where aligned characters match.</p>
-<p>We use alignment to make an educated guess as to where a read originated with respect to the reference genome. It's not always possible to determine this with certainty. For instance, if the reference genome contains several long stretches of As (<code>AAAAAAAAA</code> etc.) and the read sequence is a short stretch of As (<code>AAAAAAA</code>), we cannot know for certain exactly where in the sea of <code>A</code>s the read originated.</p>
+<p>We use alignment to make an educated guess as to where a read originated with respect to the reference genome. It’s not always possible to determine this with certainty. For instance, if the reference genome contains several long stretches of As (<code>AAAAAAAAA</code> etc.) and the read sequence is a short stretch of As (<code>AAAAAAA</code>), we cannot know for certain exactly where in the sea of <code>A</code>s the read originated.</p>
 <h2 id="end-to-end-alignment-versus-local-alignment">End-to-end alignment versus local alignment</h2>
-<p>By default, Bowtie 2 performs end-to-end read alignment. That is, it searches for alignments involving all of the read characters. This is also called an "untrimmed" or "unclipped" alignment.</p>
-<p>When the --local option is specified, Bowtie 2 performs local read alignment. In this mode, Bowtie 2 might "trim" or "clip" some read characters from one or both ends of the alignment if doing so maximizes the alignment score.</p>
+<p>By default, Bowtie 2 performs end-to-end read alignment. That is, it searches for alignments involving all of the read characters. This is also called an “untrimmed” or “unclipped” alignment.</p>
+<p>When the –local option is specified, Bowtie 2 performs local read alignment. In this mode, Bowtie 2 might “trim” or “clip” some read characters from one or both ends of the alignment if doing so maximizes the alignment score.</p>
 <h3 id="end-to-end-alignment-example">End-to-end alignment example</h3>
-<p>The following is an "end-to-end" alignment because it involves all the characters in the read. Such an alignment can be produced by Bowtie 2 in either end-to-end mode or in local mode.</p>
+<p>The following is an “end-to-end” alignment because it involves all the characters in the read. Such an alignment can be produced by Bowtie 2 in either end-to-end mode or in local mode.</p>
 <pre><code>Read:      GACTGGGCGATCTCGACTTCG
 Reference: GACTGCGATCTCGACATCG
 
@@ -149,7 +149,7 @@ Alignment:
              |||||  |||||||||| |||
   Reference: GACTG--CGATCTCGACATCG</code></pre>
 <h3 id="local-alignment-example">Local alignment example</h3>
-<p>The following is a "local" alignment because some of the characters at the ends of the read do not participate. In this case, 4 characters are omitted (or "soft trimmed" or "soft clipped") from the beginning and 3 characters are omitted from the end. This sort of alignment can be produced by Bowtie 2 only in local mode.</p>
+<p>The following is a “local” alignment because some of the characters at the ends of the read do not participate. In this case, 4 characters are omitted (or “soft trimmed” or “soft clipped”) from the beginning and 3 characters are omitted from the end. This sort of alignment can be produced by Bowtie 2 only in local mode.</p>
 <pre><code>Read:      ACGGTTGCGTTAATCCGCCACG
 Reference: TAACTTGCGTTAAATCCGCCTGG
 
@@ -167,38 +167,38 @@ Alignment:
 <p>A mismatched base at a high-quality position in the read receives a penalty of -6 by default. A length-2 read gap receives a penalty of -11 by default (-5 for the gap open, -3 for the first extension, -3 for the second extension). A base that matches receives a bonus of +2 be default. Thus, in local alignment mode, if the read is 50 bp long and it matches the reference exactly except for one mismatch at a high-quality position and one length-2 read gap, then the overall score equals t [...]
 <p>The best possible score in local mode equals the match bonus times the length of the read. This happens when there are no differences between the read and the reference.</p>
 <h3 id="valid-alignments-meet-or-exceed-the-minimum-score-threshold">Valid alignments meet or exceed the minimum score threshold</h3>
-<p>For an alignment to be considered "valid" (i.e. "good enough") by Bowtie 2, it must have an alignment score no less than the minimum score threshold. The threshold is configurable and is expressed as a function of the read length. In end-to-end alignment mode, the default minimum score threshold is <code>-0.6 + -0.6 * L</code>, where <code>L</code> is the read length. In local alignment mode, the default minimum score threshold is <code>20 + 8.0 * ln(L)</code>, whe [...]
+<p>For an alignment to be considered “valid” (i.e. “good enough”) by Bowtie 2, it must have an alignment score no less than the minimum score threshold. The threshold is configurable and is expressed as a function of the read length. In end-to-end alignment mode, the default minimum score threshold is <code>-0.6 + -0.6 * L</code>, where <code>L</code> is the read length. In local alignment mode, the default minimum score threshold is <code>20 + 8.0 * ln(L)</code>, where L is the read len [...]
 <h2 id="mapping-quality-higher-more-unique">Mapping quality: higher = more unique</h2>
 <p>The aligner cannot always assign a read to its point of origin with high confidence. For instance, a read that originated inside a repeat element might align equally well to many occurrences of the element throughout the genome, leaving the aligner with no basis for preferring one over the others.</p>
-<p>Aligners characterize their degree of confidence in the point of origin by reporting a mapping quality: a non-negative integer Q = -10 log10 p, where p is an estimate of the probability that the alignment does not correspond to the read's true point of origin. Mapping quality is sometimes abbreviated MAPQ, and is recorded in the <a href="http://samtools.sourceforge.net/SAM1.pdf">SAM</a> <code>MAPQ</code> field.</p>
-<p>Mapping quality is related to "uniqueness." We say an alignment is unique if it has a much higher alignment score than all the other possible alignments. The bigger the gap between the best alignment's score and the second-best alignment's score, the more unique the best alignment, and the higher its mapping quality should be.</p>
+<p>Aligners characterize their degree of confidence in the point of origin by reporting a mapping quality: a non-negative integer Q = -10 log10 p, where p is an estimate of the probability that the alignment does not correspond to the read’s true point of origin. Mapping quality is sometimes abbreviated MAPQ, and is recorded in the <a href="http://samtools.sourceforge.net/SAM1.pdf">SAM</a> <code>MAPQ</code> field.</p>
+<p>Mapping quality is related to “uniqueness.” We say an alignment is unique if it has a much higher alignment score than all the other possible alignments. The bigger the gap between the best alignment’s score and the second-best alignment’s score, the more unique the best alignment, and the higher its mapping quality should be.</p>
 <p>Accurate mapping qualities are useful for downstream tools like variant callers. For instance, a variant caller might choose to ignore evidence from alignments with mapping quality less than, say, 10. A mapping quality of 10 or less indicates that there is at least a 1 in 10 chance that the read truly originated elsewhere.</p>
 <h2 id="aligning-pairs">Aligning pairs</h2>
-<p>A "paired-end" or "mate-pair" read consists of pair of mates, called mate 1 and mate 2. Pairs come with a prior expectation about (a) the relative orientation of the mates, and (b) the distance separating them on the original DNA molecule. Exactly what expectations hold for a given dataset depends on the lab procedures used to generate the data. For example, a common lab procedure for producing pairs is Illumina's Paired-end Sequencing Assay, which yields pairs wit [...]
-<p>For simplicity, this manual uses the term "paired-end" to refer to any pair of reads with some expected relative orientation and distance. Depending on the protocol, these might actually be referred to as "paired-end" or "mate-paired." Also, we always refer to the individual sequences making up the pair as "mates."</p>
+<p>A “paired-end” or “mate-pair” read consists of pair of mates, called mate 1 and mate 2. Pairs come with a prior expectation about (a) the relative orientation of the mates, and (b) the distance separating them on the original DNA molecule. Exactly what expectations hold for a given dataset depends on the lab procedures used to generate the data. For example, a common lab procedure for producing pairs is Illumina’s Paired-end Sequencing Assay, which yields pairs with a relative orienta [...]
+<p>For simplicity, this manual uses the term “paired-end” to refer to any pair of reads with some expected relative orientation and distance. Depending on the protocol, these might actually be referred to as “paired-end” or “mate-paired.” Also, we always refer to the individual sequences making up the pair as “mates.”</p>
 <h3 id="paired-inputs">Paired inputs</h3>
 <p>Pairs are often stored in a pair of files, one file containing the mate 1s and the other containing the mates 2s. The first mate in the file for mate 1 forms a pair with the first mate in the file for mate 2, the second with the second, and so on. When aligning pairs with Bowtie 2, specify the file with the mate 1s mates using the <a href="#bowtie2-options-1"><code>-1</code></a> argument and the file with the mate 2s using the <a href="#bowtie2-options-2"><code>-2</code></a> argument. [...]
 <h3 id="paired-sam-output">Paired SAM output</h3>
-<p>When Bowtie 2 prints a SAM alignment for a pair, it prints two records (i.e. two lines of output), one for each mate. The first record describes the alignment for mate 1 and the second record describes the alignment for mate 2. In both records, some of the fields of the SAM record describe various properties of the alignment; for instance, the 7th and 8th fields (<code>RNEXT</code> and <code>PNEXT</code> respectively) indicate the reference name and position where the other mate align [...]
-<h3 id="concordant-pairs-match-pair-expectations-discordant-pairs-dont">Concordant pairs match pair expectations, discordant pairs don't</h3>
-<p>A pair that aligns with the expected relative mate orientation and with the expected range of distances between mates is said to align "concordantly". If both mates have unique alignments, but the alignments do not match paired-end expectations (i.e. the mates aren't in the expected relative orientation, or aren't within the expected distance range, or both), the pair is said to align "discordantly". Discordant alignments may be of particular interest, for instance [...]
-<p>The expected relative orientation of the mates is set using the <a href="#bowtie2-options-fr"><code>--ff</code></a>, <a href="#bowtie2-options-fr"><code>--fr</code></a>, or <a href="#bowtie2-options-fr"><code>--rf</code></a> options. The expected range of inter-mates distances (as measured from the furthest extremes of the mates; also called "outer distance") is set with the <a href="#bowtie2-options-I"><code>-I</code></a> and <a href="#bowtie2-options-X"><code>-X</code></a> [...]
+<p>When Bowtie 2 prints a SAM alignment for a pair, it prints two records (i.e. two lines of output), one for each mate. The first record describes the alignment for mate 1 and the second record describes the alignment for mate 2. In both records, some of the fields of the SAM record describe various properties of the alignment; for instance, the 7th and 8th fields (<code>RNEXT</code> and <code>PNEXT</code> respectively) indicate the reference name and position where the other mate align [...]
+<h3 id="concordant-pairs-match-pair-expectations-discordant-pairs-dont">Concordant pairs match pair expectations, discordant pairs don’t</h3>
+<p>A pair that aligns with the expected relative mate orientation and with the expected range of distances between mates is said to align “concordantly”. If both mates have unique alignments, but the alignments do not match paired-end expectations (i.e. the mates aren’t in the expected relative orientation, or aren’t within the expected distance range, or both), the pair is said to align “discordantly”. Discordant alignments may be of particular interest, for instance, when seeking <a hr [...]
+<p>The expected relative orientation of the mates is set using the <a href="#bowtie2-options-fr"><code>--ff</code></a>, <a href="#bowtie2-options-fr"><code>--fr</code></a>, or <a href="#bowtie2-options-fr"><code>--rf</code></a> options. The expected range of inter-mates distances (as measured from the furthest extremes of the mates; also called “outer distance”) is set with the <a href="#bowtie2-options-I"><code>-I</code></a> and <a href="#bowtie2-options-X"><code>-X</code></a> options.  [...]
 <p>To declare that a pair aligns discordantly, Bowtie 2 requires that both mates align uniquely. This is a conservative threshold, but this is often desirable when seeking structural variants.</p>
 <p>By default, Bowtie 2 searches for both concordant and discordant alignments, though searching for discordant alignments can be disabled with the <a href="#bowtie2-options-no-discordant"><code>--no-discordant</code></a> option.</p>
 <h3 id="mixed-mode-paired-where-possible-unpaired-otherwise">Mixed mode: paired where possible, unpaired otherwise</h3>
-<p>If Bowtie 2 cannot find a paired-end alignment for a pair, by default it will go on to look for unpaired alignments for the constituent mates. This is called "mixed mode." To disable mixed mode, set the <a href="#bowtie2-options-no-mixed"><code>--no-mixed</code></a> option.</p>
+<p>If Bowtie 2 cannot find a paired-end alignment for a pair, by default it will go on to look for unpaired alignments for the constituent mates. This is called “mixed mode.” To disable mixed mode, set the <a href="#bowtie2-options-no-mixed"><code>--no-mixed</code></a> option.</p>
 <p>Bowtie 2 runs a little faster in <code>--no-mixed</code> mode, but will only consider alignment status of pairs per se, not individual mates.</p>
 <h3 id="some-sam-flags-describe-paired-end-properties">Some SAM FLAGS describe paired-end properties</h3>
 <p>The SAM <code>FLAGS</code> field, the second field in a SAM record, has multiple bits that describe the paired-end nature of the read and alignment. The first (least significant) bit (1 in decimal, 0x1 in hexadecimal) is set if the read is part of a pair. The second bit (2 in decimal, 0x2 in hexadecimal) is set if the read is part of a pair that aligned in a paired-end fashion. The fourth bit (8 in decimal, 0x8 in hexadecimal) is set if the read is part of a pair and the other mate in [...]
 <h3 id="some-sam-optional-fields-describe-more-paired-end-properties">Some SAM optional fields describe more paired-end properties</h3>
-<p>The last several fields of each SAM record usually contain SAM optional fields, which are simply tab-separated strings conveying additional information about the reads and alignments. A SAM optional field is formatted like this: "XP:i:1" where "XP" is the <code>TAG</code>, "i" is the <code>TYPE</code> ("integer" in this case), and "1" is the <code>VALUE</code>. See the <a href="http://samtools.sourceforge.net/SAM1.pdf">SAM specificatio [...]
+<p>The last several fields of each SAM record usually contain SAM optional fields, which are simply tab-separated strings conveying additional information about the reads and alignments. A SAM optional field is formatted like this: “XP:i:1” where “XP” is the <code>TAG</code>, “i” is the <code>TYPE</code> (“integer” in this case), and “1” is the <code>VALUE</code>. See the <a href="http://samtools.sourceforge.net/SAM1.pdf">SAM specification</a> for details regarding SAM optional fields.</p>
 <h3 id="mates-can-overlap-contain-or-dovetail-each-other">Mates can overlap, contain, or dovetail each other</h3>
 <p>The fragment and read lengths might be such that alignments for the two mates from a pair overlap each other. Consider this example:</p>
 <p>(For these examples, assume we expect mate 1 to align to the left of mate 2.)</p>
 <pre><code>Mate 1:    GCAGATTATATGAGTCAGCTACGATATTGTT
 Mate 2:                               TGTTTGGGGTGACACATTACGCGTCTTTGAC
 Reference: GCAGATTATATGAGTCAGCTACGATATTGTTTGGGGTGACACATTACGCGTCTTTGAC</code></pre>
-<p>It's also possible, though unusual, for one mate alignment to contain the other, as in these examples:</p>
+<p>It’s also possible, though unusual, for one mate alignment to contain the other, as in these examples:</p>
 <pre><code>Mate 1:    GCAGATTATATGAGTCAGCTACGATATTGTTTGGGGTGACACATTACGC
 Mate 2:                               TGTTTGGGGTGACACATTACGC
 Reference: GCAGATTATATGAGTCAGCTACGATATTGTTTGGGGTGACACATTACGCGTCTTTGAC
@@ -206,56 +206,56 @@ Reference: GCAGATTATATGAGTCAGCTACGATATTGTTTGGGGTGACACATTACGCGTCTTTGAC
 Mate 1:                   CAGCTACGATATTGTTTGGGGTGACACATTACGC
 Mate 2:                      CTACGATATTGTTTGGGGTGAC
 Reference: GCAGATTATATGAGTCAGCTACGATATTGTTTGGGGTGACACATTACGCGTCTTTGAC</code></pre>
-<p>And it's also possible, though unusual, for the mates to "dovetail", with the mates seemingly extending "past" each other as in this example:</p>
+<p>And it’s also possible, though unusual, for the mates to “dovetail”, with the mates seemingly extending “past” each other as in this example:</p>
 <pre><code>Mate 1:                 GTCAGCTACGATATTGTTTGGGGTGACACATTACGC
 Mate 2:            TATGAGTCAGCTACGATATTGTTTGGGGTGACACAT                   
 Reference: GCAGATTATATGAGTCAGCTACGATATTGTTTGGGGTGACACATTACGCGTCTTTGAC</code></pre>
-<p>In some situations, it's desirable for the aligner to consider all these cases as "concordant" as long as other paired-end constraints are not violated. Bowtie 2's default behavior is to consider overlapping and containing as being consistent with concordant alignment. By default, dovetailing is considered inconsistent with concordant alignment.</p>
+<p>In some situations, it’s desirable for the aligner to consider all these cases as “concordant” as long as other paired-end constraints are not violated. Bowtie 2’s default behavior is to consider overlapping and containing as being consistent with concordant alignment. By default, dovetailing is considered inconsistent with concordant alignment.</p>
 <p>These defaults can be overridden. Setting <a href="#bowtie2-options-no-overlap"><code>--no-overlap</code></a> causes Bowtie 2 to consider overlapping mates as non-concordant. Setting <a href="#bowtie2-options-no-contain"><code>--no-contain</code></a> causes Bowtie 2 to consider cases where one mate alignment contains the other as non-concordant. Setting <a href="#bowtie2-options-dovetail"><code>--dovetail</code></a> causes Bowtie 2 to consider cases where the mate alignments dovetail  [...]
 <h2 id="reporting">Reporting</h2>
-<p>The reporting mode governs how many alignments Bowtie 2 looks for, and how to report them. Bowtie 2 has three distinct reporting modes. The default reporting mode is similar to the default reporting mode of many other read alignment tools, including <a href="http://bio-bwa.sourceforge.net/">BWA</a>. It is also similar to Bowtie 1's <code>-M</code> alignment mode.</p>
+<p>The reporting mode governs how many alignments Bowtie 2 looks for, and how to report them. Bowtie 2 has three distinct reporting modes. The default reporting mode is similar to the default reporting mode of many other read alignment tools, including <a href="http://bio-bwa.sourceforge.net/">BWA</a>. It is also similar to Bowtie 1’s <code>-M</code> alignment mode.</p>
 <p>In general, when we say that a read has an alignment, we mean that it has a <a href="#valid-alignments-meet-or-exceed-the-minimum-score-threshold">valid alignment</a>. When we say that a read has multiple alignments, we mean that it has multiple alignments that are valid and distinct from one another.</p>
 <h3 id="distinct-alignments-map-a-read-to-different-places">Distinct alignments map a read to different places</h3>
-<p>Two alignments for the same individual read are "distinct" if they map the same read to different places. Specifically, we say that two alignments are distinct if there are no alignment positions where a particular read offset is aligned opposite a particular reference offset in both alignments with the same orientation. E.g. if the first alignment is in the forward orientation and aligns the read character at read offset 10 to the reference character at chromosome 3, offset [...]
+<p>Two alignments for the same individual read are “distinct” if they map the same read to different places. Specifically, we say that two alignments are distinct if there are no alignment positions where a particular read offset is aligned opposite a particular reference offset in both alignments with the same orientation. E.g. if the first alignment is in the forward orientation and aligns the read character at read offset 10 to the reference character at chromosome 3, offset 3,445,245 [...]
 <p>Two alignments for the same pair are distinct if either the mate 1s in the two paired-end alignments are distinct or the mate 2s in the two alignments are distinct or both.</p>
 <h3 id="default-mode-search-for-multiple-alignments-report-the-best-one">Default mode: search for multiple alignments, report the best one</h3>
 <p>By default, Bowtie 2 searches for distinct, valid alignments for each read. When it finds a valid alignment, it generally will continue to look for alignments that are nearly as good or better. It will eventually stop looking, either because it exceeded a limit placed on search effort (see <a href="#bowtie2-options-D"><code>-D</code></a> and <a href="#bowtie2-options-R"><code>-R</code></a>) or because it already knows all it needs to know to report an alignment. Information from the b [...]
-<p>See also: <a href="#bowtie2-options-D"><code>-D</code></a>, which puts an upper limit on the number of dynamic programming problems (i.e. seed extensions) that can "fail" in a row before Bowtie 2 stops searching. Increasing <a href="#bowtie2-options-D"><code>-D</code></a> makes Bowtie 2 slower, but increases the likelihood that it will report the correct alignment for a read that aligns many places.</p>
-<p>See also: <a href="#bowtie2-options-R"><code>-R</code></a>, which sets the maximum number of times Bowtie 2 will "re-seed" when attempting to align a read with repetitive seeds. Increasing <a href="#bowtie2-options-R"><code>-R</code></a> makes Bowtie 2 slower, but increases the likelihood that it will report the correct alignment for a read that aligns many places.</p>
+<p>See also: <a href="#bowtie2-options-D"><code>-D</code></a>, which puts an upper limit on the number of dynamic programming problems (i.e. seed extensions) that can “fail” in a row before Bowtie 2 stops searching. Increasing <a href="#bowtie2-options-D"><code>-D</code></a> makes Bowtie 2 slower, but increases the likelihood that it will report the correct alignment for a read that aligns many places.</p>
+<p>See also: <a href="#bowtie2-options-R"><code>-R</code></a>, which sets the maximum number of times Bowtie 2 will “re-seed” when attempting to align a read with repetitive seeds. Increasing <a href="#bowtie2-options-R"><code>-R</code></a> makes Bowtie 2 slower, but increases the likelihood that it will report the correct alignment for a read that aligns many places.</p>
 <h3 id="k-mode-search-for-one-or-more-alignments-report-each">-k mode: search for one or more alignments, report each</h3>
-<p>In <a href="#bowtie2-options-k"><code>-k</code></a> mode, Bowtie 2 searches for up to N distinct, valid alignments for each read, where N equals the integer specified with the <code>-k</code> parameter. That is, if <code>-k 2</code> is specified, Bowtie 2 will search for at most 2 distinct alignments. It reports all alignments found, in descending order by alignment score. The alignment score for a paired-end alignment equals the sum of the alignment scores of the individual mates. Ea [...]
-<p>Bowtie 2 does not "find" alignments in any specific order, so for reads that have more than N distinct, valid alignments, Bowtie 2 does not guarantee that the N alignments reported are the best possible in terms of alignment score. Still, this mode can be effective and fast in situations where the user cares more about whether a read aligns (or aligns a certain number of times) than where exactly it originated.</p>
+<p>In <a href="#bowtie2-options-k"><code>-k</code></a> mode, Bowtie 2 searches for up to N distinct, valid alignments for each read, where N equals the integer specified with the <code>-k</code> parameter. That is, if <code>-k 2</code> is specified, Bowtie 2 will search for at most 2 distinct alignments. It reports all alignments found, in descending order by alignment score. The alignment score for a paired-end alignment equals the sum of the alignment scores of the individual mates. Ea [...]
+<p>Bowtie 2 does not “find” alignments in any specific order, so for reads that have more than N distinct, valid alignments, Bowtie 2 does not guarantee that the N alignments reported are the best possible in terms of alignment score. Still, this mode can be effective and fast in situations where the user cares more about whether a read aligns (or aligns a certain number of times) than where exactly it originated.</p>
 <h3 id="a-mode-search-for-and-report-all-alignments">-a mode: search for and report all alignments</h3>
-<p><a href="#bowtie2-options-a"><code>-a</code></a> mode is similar to <a href="#bowtie2-options-k"><code>-k</code></a> mode except that there is no upper limit on the number of alignments Bowtie 2 should report. Alignments are reported in descending order by alignment score. The alignment score for a paired-end alignment equals the sum of the alignment scores of the individual mates. Each reported read or pair alignment beyond the first has the SAM 'secondary' bit (which equals 256) set [...]
+<p><a href="#bowtie2-options-a"><code>-a</code></a> mode is similar to <a href="#bowtie2-options-k"><code>-k</code></a> mode except that there is no upper limit on the number of alignments Bowtie 2 should report. Alignments are reported in descending order by alignment score. The alignment score for a paired-end alignment equals the sum of the alignment scores of the individual mates. Each reported read or pair alignment beyond the first has the SAM ‘secondary’ bit (which equals 256) set [...]
 <p>Some tools are designed with this reporting mode in mind. Bowtie 2 is not! For very large genomes, this mode is very slow.</p>
 <h3 id="randomness-in-bowtie-2">Randomness in Bowtie 2</h3>
-<p>Bowtie 2's search for alignments for a given read is "randomized." That is, when Bowtie 2 encounters a set of equally-good choices, it uses a pseudo-random number to choose. For example, if Bowtie 2 discovers a set of 3 equally-good alignments and wants to decide which to report, it picks a pseudo-random integer 0, 1 or 2 and reports the corresponding alignment. Arbitrary choices can crop up at various points during alignment.</p>
+<p>Bowtie 2’s search for alignments for a given read is “randomized.” That is, when Bowtie 2 encounters a set of equally-good choices, it uses a pseudo-random number to choose. For example, if Bowtie 2 discovers a set of 3 equally-good alignments and wants to decide which to report, it picks a pseudo-random integer 0, 1 or 2 and reports the corresponding alignment. Arbitrary choices can crop up at various points during alignment.</p>
 <p>The pseudo-random number generator is re-initialized for every read, and the seed used to initialize it is a function of the read name, nucleotide string, quality string, and the value specified with <a href="#bowtie2-options-seed"><code>--seed</code></a>. If you run the same version of Bowtie 2 on two reads with identical names, nucleotide strings, and quality strings, and if <a href="#bowtie2-options-seed"><code>--seed</code></a> is set the same for both runs, Bowtie 2 will produce  [...]
 <p>However, when the user specifies the <a href="#bowtie2-options-non-deterministic"><code>--non-deterministic</code></a> option, Bowtie 2 will use the current time to re-initialize the pseudo-random number generator. When this is specified, Bowtie 2 might report different alignments for identical reads. This is counter-intuitive for some users, but might be more appropriate in situations where the input consists of many identical reads.</p>
 <h2 id="multiseed-heuristic">Multiseed heuristic</h2>
-<p>To rapidly narrow the number of possible alignments that must be considered, Bowtie 2 begins by extracting substrings ("seeds") from the read and its reverse complement and aligning them in an ungapped fashion with the help of the <a href="http://portal.acm.org/citation.cfm?id=796543">FM Index</a>. This is "multiseed alignment" and it is similar to what <a href="http://genomebiology.com/2009/10/3/R25">Bowtie 1 does</a>, except Bowtie 1 attempts to align the entire  [...]
+<p>To rapidly narrow the number of possible alignments that must be considered, Bowtie 2 begins by extracting substrings (“seeds”) from the read and its reverse complement and aligning them in an ungapped fashion with the help of the <a href="http://portal.acm.org/citation.cfm?id=796543">FM Index</a>. This is “multiseed alignment” and it is similar to what <a href="http://genomebiology.com/2009/10/3/R25">Bowtie 1 does</a>, except Bowtie 1 attempts to align the entire read this way.</p>
 <p>This initial step makes Bowtie 2 much faster than it would be without such a filter, but at the expense of missing some valid alignments. For instance, it is possible for a read to have a valid overall alignment but to have no valid seed alignments because each potential seed alignment is interrupted by too many mismatches or gaps.</p>
-<p>The trade-off between speed and sensitivity/accuracy can be adjusted by setting the seed length (<a href="#bowtie2-options-L"><code>-L</code></a>), the interval between extracted seeds (<a href="#bowtie2-options-i"><code>-i</code></a>), and the number of mismatches permitted per seed (<a href="#bowtie2-options-N"><code>-N</code></a>). For more sensitive alignment, set these parameters to (a) make the seeds closer together, (b) make the seeds shorter, and/or (c) allow more mismatches.  [...]
+<p>The trade-off between speed and sensitivity/accuracy can be adjusted by setting the seed length (<a href="#bowtie2-options-L"><code>-L</code></a>), the interval between extracted seeds (<a href="#bowtie2-options-i"><code>-i</code></a>), and the number of mismatches permitted per seed (<a href="#bowtie2-options-N"><code>-N</code></a>). For more sensitive alignment, set these parameters to (a) make the seeds closer together, (b) make the seeds shorter, and/or (c) allow more mismatches.  [...]
 <p><a href="#bowtie2-options-D"><code>-D</code></a> and <a href="#bowtie2-options-R"><code>-R</code></a> are also options that adjust the trade-off between speed and sensitivity/accuracy.</p>
 <h3 id="fm-index-memory-footprint">FM Index memory footprint</h3>
-<p>Bowtie 2 uses the <a href="http://portal.acm.org/citation.cfm?id=796543">FM Index</a> to find ungapped alignments for seeds. This step accounts for the bulk of Bowtie 2's memory footprint, as the <a href="http://portal.acm.org/citation.cfm?id=796543">FM Index</a> itself is typically the largest data structure used. For instance, the memory footprint of the <a href="http://portal.acm.org/citation.cfm?id=796543">FM Index</a> for the human genome is about 3.2 gigabytes of RAM.</p>
+<p>Bowtie 2 uses the <a href="http://portal.acm.org/citation.cfm?id=796543">FM Index</a> to find ungapped alignments for seeds. This step accounts for the bulk of Bowtie 2’s memory footprint, as the <a href="http://portal.acm.org/citation.cfm?id=796543">FM Index</a> itself is typically the largest data structure used. For instance, the memory footprint of the <a href="http://portal.acm.org/citation.cfm?id=796543">FM Index</a> for the human genome is about 3.2 gigabytes of RAM.</p>
 <h2 id="ambiguous-characters">Ambiguous characters</h2>
-<p>Non-whitespace characters besides A, C, G or T are considered "ambiguous." N is a common ambiguous character that appears in reference sequences. Bowtie 2 considers all ambiguous characters in the reference (including <a href="http://www.bioinformatics.org/sms/iupac.html">IUPAC nucleotide codes</a>) to be Ns.</p>
+<p>Non-whitespace characters besides A, C, G or T are considered “ambiguous.” N is a common ambiguous character that appears in reference sequences. Bowtie 2 considers all ambiguous characters in the reference (including <a href="http://www.bioinformatics.org/sms/iupac.html">IUPAC nucleotide codes</a>) to be Ns.</p>
 <p>Bowtie 2 allows alignments to overlap ambiguous characters in the reference. An alignment position that contains an ambiguous character in the read, reference, or both, is penalized according to <a href="#bowtie2-options-np"><code>--np</code></a>. <a href="#bowtie2-options-n-ceil"><code>--n-ceil</code></a> sets an upper limit on the number of positions that may contain ambiguous reference characters in a valid alignment. The optional field <a href="#bowtie2-build-opt-fields-xn"><code> [...]
 <p>Note that the <a href="#multiseed-heuristic">multiseed heuristic</a> cannot find <em>seed</em> alignments that overlap ambiguous reference characters. For an alignment overlapping an ambiguous reference character to be found, it must have one or more seed alignments that do not overlap ambiguous reference characters.</p>
 <h2 id="presets-setting-many-settings-at-once">Presets: setting many settings at once</h2>
-<p>Bowtie 2 comes with some useful combinations of parameters packaged into shorter "preset" parameters. For example, running Bowtie 2 with the <a href="#bowtie2-options-very-sensitive"><code>--very-sensitive</code></a> option is the same as running with options: <code>-D 20 -R 3 -N 0 -L 20 -i S,1,0.50</code>. The preset options that come with Bowtie 2 are designed to cover a wide area of the speed/sensitivity/accuracy trade-off space, with the presets ending in <code>fast</cod [...]
+<p>Bowtie 2 comes with some useful combinations of parameters packaged into shorter “preset” parameters. For example, running Bowtie 2 with the <a href="#bowtie2-options-very-sensitive"><code>--very-sensitive</code></a> option is the same as running with options: <code>-D 20 -R 3 -N 0 -L 20 -i S,1,0.50</code>. The preset options that come with Bowtie 2 are designed to cover a wide area of the speed/sensitivity/accuracy trade-off space, with the presets ending in <code>fast</code> general [...]
 <h2 id="filtering">Filtering</h2>
-<p>Some reads are skipped or "filtered out" by Bowtie 2. For example, reads may be filtered out because they are extremely short or have a high proportion of ambiguous nucleotides. Bowtie 2 will still print a SAM record for such a read, but no alignment will be reported and the <code>YF:i</code> SAM optional field will be set to indicate the reason the read was filtered.</p>
+<p>Some reads are skipped or “filtered out” by Bowtie 2. For example, reads may be filtered out because they are extremely short or have a high proportion of ambiguous nucleotides. Bowtie 2 will still print a SAM record for such a read, but no alignment will be reported and the <code>YF:i</code> SAM optional field will be set to indicate the reason the read was filtered.</p>
 <ul>
 <li><code>YF:Z:LN</code>: the read was filtered because it had length less than or equal to the number of seed mismatches set with the <a href="#bowtie2-options-N"><code>-N</code></a> option.</li>
 <li><code>YF:Z:NS</code>: the read was filtered because it contains a number of ambiguous characters (usually <code>N</code> or <code>.</code>) greater than the ceiling specified with <a href="#bowtie2-options-n-ceil"><code>--n-ceil</code></a>.</li>
-<li><code>YF:Z:SC</code>: the read was filtered because the read length and the match bonus (set with <a href="#bowtie2-options-ma"><code>--ma</code></a>) are such that the read can't possibly earn an alignment score greater than or equal to the threshold set with <a href="#bowtie2-options-score-min"><code>--score-min</code></a></li>
-<li><code>YF:Z:QC</code>: the read was filtered because it was marked as failing quality control and the user specified the <a href="#bowtie2-options-qc-filter"><code>--qc-filter</code></a> option. This only happens when the input is in Illumina's QSEQ format (i.e. when <a href="#bowtie2-options-qseq"><code>--qseq</code></a> is specified) and the last (11th) field of the read's QSEQ record contains <code>1</code>.</li>
+<li><code>YF:Z:SC</code>: the read was filtered because the read length and the match bonus (set with <a href="#bowtie2-options-ma"><code>--ma</code></a>) are such that the read can’t possibly earn an alignment score greater than or equal to the threshold set with <a href="#bowtie2-options-score-min"><code>--score-min</code></a></li>
+<li><code>YF:Z:QC</code>: the read was filtered because it was marked as failing quality control and the user specified the <a href="#bowtie2-options-qc-filter"><code>--qc-filter</code></a> option. This only happens when the input is in Illumina’s QSEQ format (i.e. when <a href="#bowtie2-options-qseq"><code>--qseq</code></a> is specified) and the last (11th) field of the read’s QSEQ record contains <code>1</code>.</li>
 </ul>
 <p>If a read could be filtered for more than one reason, the value <code>YF:Z</code> flag will reflect only one of those reasons.</p>
 <h2 id="alignment-summary">Alignment summary</h2>
-<p>When Bowtie 2 finishes running, it prints messages summarizing what happened. These messages are printed to the "standard error" ("stderr") filehandle. For datasets consisting of unpaired reads, the summary might look like this:</p>
+<p>When Bowtie 2 finishes running, it prints messages summarizing what happened. These messages are printed to the “standard error” (“stderr”) filehandle. For datasets consisting of unpaired reads, the summary might look like this:</p>
 <pre><code>20000 reads; of these:
   20000 (100.00%) were unpaired; of these:
     1247 (6.24%) aligned 0 times
@@ -280,17 +280,17 @@ Reference: GCAGATTATATGAGTCAGCTACGATATTGTTTGGGGTGACACATTACGCGTCTTTGAC</code></pr
 96.70% overall alignment rate</code></pre>
 <p>The indentation indicates how subtotals relate to totals.</p>
 <h2 id="wrapper-scripts">Wrapper scripts</h2>
-<p>The <code>bowtie2</code>, <code>bowtie2-build</code> and <code>bowtie2-inspect</code> 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. Also, the <code>bowtie2</code> wrapper provides some key functionality, like the ability to handle compressed inputs, and the functionality for <a href="#bowtie [...]
+<p>The <code>bowtie2</code>, <code>bowtie2-build</code> and <code>bowtie2-inspect</code> 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. Also, the <code>bowtie2</code> wrapper provides some key functionality, like the ability to handle compressed inputs, and the functionality for <a href="#bowtie2-options-un"><code> [...]
 <p>It is recommended that you always run the bowtie2 wrappers and not run the binaries directly.</p>
 <h2 id="small-and-large-indexes">Small and large indexes</h2>
-<p><code>bowtie2-build</code> can index reference genomes of any size. For genomes less than about 4 billion nucleotides in length, <code>bowtie2-build</code> builds a "small" index using 32-bit numbers in various parts of the index. When the genome is longer, <code>bowtie2-build</code> builds a "large" index using 64-bit numbers. Small indexes are stored in files with the <code>.bt2</code> extension, and large indexes are stored in files with the <code>.bt2l</code> e [...]
+<p><code>bowtie2-build</code> can index reference genomes of any size. For genomes less than about 4 billion nucleotides in length, <code>bowtie2-build</code> builds a “small” index using 32-bit numbers in various parts of the index. When the genome is longer, <code>bowtie2-build</code> builds a “large” index using 64-bit numbers. Small indexes are stored in files with the <code>.bt2</code> extension, and large indexes are stored in files with the <code>.bt2l</code> extension. The user n [...]
 <h2 id="performance-tuning">Performance tuning</h2>
-<ol style="list-style-type: decimal">
+<ol type="1">
 <li><p>If your computer has multiple processors/cores, use <code>-p</code></p>
 <p>The <a href="#bowtie2-options-p"><code>-p</code></a> option causes Bowtie 2 to launch a specified number of parallel search threads. Each thread runs on a different processor/core and all threads find alignments in parallel, increasing alignment throughput by approximately a multiple of the number of threads (though in practice, speedup is somewhat worse than linear).</p></li>
 <li><p>If reporting many alignments per read, try reducing <code>bowtie2-build --offrate</code></p>
 <p>If you are using <a href="#bowtie2-options-k"><code>-k</code></a> or <a href="#bowtie2-options-a"><code>-a</code></a> options and Bowtie 2 is reporting many alignments per read, using an index with a denser SA sample can speed things up considerably. To do this, specify a smaller-than-default <a href="#bowtie2-options-o"><code>-o</code>/<code>--offrate</code></a> value when running <code>bowtie2-build</code>. A denser SA sample yields a larger index, but is also particularly effective [...]
-<li><p>If <code>bowtie2</code> "thrashes", try increasing <code>bowtie2-build --offrate</code></p>
+<li><p>If <code>bowtie2</code> “thrashes”, try increasing <code>bowtie2-build --offrate</code></p>
 <p>If <code>bowtie2</code> runs very slowly on a relatively low-memory computer, try setting <a href="#bowtie2-options-o"><code>-o</code>/<code>--offrate</code></a> to a <em>larger</em> value when building the index. This decreases the memory footprint of the index.</p></li>
 </ol>
 <h2 id="command-line">Command Line</h2>
@@ -318,7 +318,7 @@ Reference: GCAGATTATATGAGTCAGCTACGATATTGTTTGGGGTGACACATTACGCGTCTTTGAC</code></pr
 <pre><code>-1 <m1></code></pre>
 </td>
 <td>
-<p>Comma-separated list of files containing mate 1s (filename usually includes <code>_1</code>), e.g. <code>-1 flyA_1.fq,flyB_1.fq</code>. Sequences specified with this option must correspond file-for-file and read-for-read with those specified in <code><m2></code>. Reads may be a mix of different lengths. If <code>-</code> is specified, <code>bowtie2</code> will read the mate 1s from the "standard in" or "stdin" filehandle.</p>
+<p>Comma-separated list of files containing mate 1s (filename usually includes <code>_1</code>), e.g. <code>-1 flyA_1.fq,flyB_1.fq</code>. Sequences specified with this option must correspond file-for-file and read-for-read with those specified in <code><m2></code>. Reads may be a mix of different lengths. If <code>-</code> is specified, <code>bowtie2</code> will read the mate 1s from the “standard in” or “stdin” filehandle.</p>
 </td>
 </tr>
 <tr>
@@ -326,7 +326,7 @@ Reference: GCAGATTATATGAGTCAGCTACGATATTGTTTGGGGTGACACATTACGCGTCTTTGAC</code></pr
 <pre><code>-2 <m2></code></pre>
 </td>
 <td>
-<p>Comma-separated list of files containing mate 2s (filename usually includes <code>_2</code>), e.g. <code>-2 flyA_2.fq,flyB_2.fq</code>. Sequences specified with this option must correspond file-for-file and read-for-read with those specified in <code><m1></code>. Reads may be a mix of different lengths. If <code>-</code> is specified, <code>bowtie2</code> will read the mate 2s from the "standard in" or "stdin" filehandle.</p>
+<p>Comma-separated list of files containing mate 2s (filename usually includes <code>_2</code>), e.g. <code>-2 flyA_2.fq,flyB_2.fq</code>. Sequences specified with this option must correspond file-for-file and read-for-read with those specified in <code><m1></code>. Reads may be a mix of different lengths. If <code>-</code> is specified, <code>bowtie2</code> will read the mate 2s from the “standard in” or “stdin” filehandle.</p>
 </td>
 </tr>
 <tr>
@@ -334,7 +334,7 @@ Reference: GCAGATTATATGAGTCAGCTACGATATTGTTTGGGGTGACACATTACGCGTCTTTGAC</code></pr
 <pre><code>-U <r></code></pre>
 </td>
 <td>
-<p>Comma-separated list of files containing unpaired reads to be aligned, e.g. <code>lane1.fq,lane2.fq,lane3.fq,lane4.fq</code>. Reads may be a mix of different lengths. If <code>-</code> is specified, <code>bowtie2</code> gets the reads from the "standard in" or "stdin" filehandle.</p>
+<p>Comma-separated list of files containing unpaired reads to be aligned, e.g. <code>lane1.fq,lane2.fq,lane3.fq,lane4.fq</code>. Reads may be a mix of different lengths. If <code>-</code> is specified, <code>bowtie2</code> gets the reads from the “standard in” or “stdin” filehandle.</p>
 </td>
 </tr>
 <tr>
@@ -342,7 +342,7 @@ Reference: GCAGATTATATGAGTCAGCTACGATATTGTTTGGGGTGACACATTACGCGTCTTTGAC</code></pr
 <pre><code>-S <sam></code></pre>
 </td>
 <td>
-<p>File to write SAM alignments to. By default, alignments are written to the "standard out" or "stdout" filehandle (i.e. the console).</p>
+<p>File to write SAM alignments to. By default, alignments are written to the “standard out” or “stdout” filehandle (i.e. the console).</p>
 </td>
 </tr>
 </table>
@@ -406,6 +406,14 @@ Reference: GCAGATTATATGAGTCAGCTACGATATTGTTTGGGGTGACACATTACGCGTCTTTGAC</code></pr
 </td>
 </tr>
 <tr>
+<td id="bowtie2-options-F">
+<pre><code>-F k:<int>,i:<int></code></pre>
+</td>
+<td>
+Reads are substrings (k-mers) extracted from a FASTA file <code><s></code>. Specifically, for every reference sequence in FASTA file <code><s></code>, Bowtie 2 aligns the k-mers at offsets 1, 1+i, 1+2i, … until reaching the end of the reference. Each k-mer is aligned as a separate read. Quality values are set to all Is (40 on Phred scale). Each k-mer (read) is given a name like <code><sequence>_<offset></code>, where <code><sequence></code> is the name of th [...]
+</td>
+</tr>
+<tr>
 <td id="bowtie2-options-c">
 <pre><code>-c</code></pre>
 </td>
@@ -418,7 +426,7 @@ Reference: GCAGATTATATGAGTCAGCTACGATATTGTTTGGGGTGACACATTACGCGTCTTTGAC</code></pr
 <pre><code>-s/--skip <int></code></pre>
 </td>
 <td>
-<p>Skip (i.e. do not align) the first <code><int></code> reads or pairs in the input.</p>
+<p>Skip (i.e. do not align) the first <code><int></code> reads or pairs in the input.</p>
 </td>
 </tr>
 <tr>
@@ -434,7 +442,7 @@ Reference: GCAGATTATATGAGTCAGCTACGATATTGTTTGGGGTGACACATTACGCGTCTTTGAC</code></pr
 <pre><code>-5/--trim5 <int></code></pre>
 </td>
 <td>
-<p>Trim <code><int></code> bases from 5' (left) end of each read before alignment (default: 0).</p>
+<p>Trim <code><int></code> bases from 5’ (left) end of each read before alignment (default: 0).</p>
 </td>
 </tr>
 <tr>
@@ -442,7 +450,7 @@ Reference: GCAGATTATATGAGTCAGCTACGATATTGTTTGGGGTGACACATTACGCGTCTTTGAC</code></pr
 <pre><code>-3/--trim3 <int></code></pre>
 </td>
 <td>
-<p>Trim <code><int></code> bases from 3' (right) end of each read before alignment (default: 0).</p>
+<p>Trim <code><int></code> bases from 3’ (right) end of each read before alignment (default: 0).</p>
 </td>
 </tr>
 <tr>
@@ -450,7 +458,7 @@ Reference: GCAGATTATATGAGTCAGCTACGATATTGTTTGGGGTGACACATTACGCGTCTTTGAC</code></pr
 <pre><code>--phred33</code></pre>
 </td>
 <td>
-<p>Input qualities are ASCII chars equal to the <a href="http://en.wikipedia.org/wiki/Phred_quality_score">Phred quality</a> plus 33. This is also called the "Phred+33" encoding, which is used by the very latest Illumina pipelines.</p>
+<p>Input qualities are ASCII chars equal to the <a href="http://en.wikipedia.org/wiki/Phred_quality_score">Phred quality</a> plus 33. This is also called the “Phred+33” encoding, which is used by the very latest Illumina pipelines.</p>
 </td>
 </tr>
 <tr>
@@ -458,7 +466,7 @@ Reference: GCAGATTATATGAGTCAGCTACGATATTGTTTGGGGTGACACATTACGCGTCTTTGAC</code></pr
 <pre><code>--phred64</code></pre>
 </td>
 <td>
-<p>Input qualities are ASCII chars equal to the <a href="http://en.wikipedia.org/wiki/Phred_quality_score">Phred quality</a> plus 64. This is also called the "Phred+64" encoding.</p>
+<p>Input qualities are ASCII chars equal to the <a href="http://en.wikipedia.org/wiki/Phred_quality_score">Phred quality</a> plus 64. This is also called the “Phred+64” encoding.</p>
 </td>
 </tr>
 <tr>
@@ -466,7 +474,7 @@ Reference: GCAGATTATATGAGTCAGCTACGATATTGTTTGGGGTGACACATTACGCGTCTTTGAC</code></pr
 <pre><code>--solexa-quals</code></pre>
 </td>
 <td>
-<p>Convert input qualities from <a href="http://en.wikipedia.org/wiki/Phred_quality_score">Solexa</a> (which can be negative) to <a href="http://en.wikipedia.org/wiki/Phred_quality_score">Phred</a> (which can't). This scheme was used in older Illumina GA Pipeline versions (prior to 1.3). Default: off.</p>
+<p>Convert input qualities from <a href="http://en.wikipedia.org/wiki/Phred_quality_score">Solexa</a> (which can be negative) to <a href="http://en.wikipedia.org/wiki/Phred_quality_score">Phred</a> (which can’t). This scheme was used in older Illumina GA Pipeline versions (prior to 1.3). Default: off.</p>
 </td>
 </tr>
 <tr>
@@ -474,7 +482,7 @@ Reference: GCAGATTATATGAGTCAGCTACGATATTGTTTGGGGTGACACATTACGCGTCTTTGAC</code></pr
 <pre><code>--int-quals</code></pre>
 </td>
 <td>
-<p>Quality values are represented in the read input file as space-separated ASCII integers, e.g., <code>40 40 30 40</code>..., rather than ASCII characters, e.g., <code>II?I</code>.... Integers are treated as being on the <a href="http://en.wikipedia.org/wiki/Phred_quality_score">Phred quality</a> scale unless <a href="#bowtie2-options-solexa-quals"><code>--solexa-quals</code></a> is also specified. Default: off.</p>
+<p>Quality values are represented in the read input file as space-separated ASCII integers, e.g., <code>40 40 30 40</code>…, rather than ASCII characters, e.g., <code>II?I</code>…. Integers are treated as being on the <a href="http://en.wikipedia.org/wiki/Phred_quality_score">Phred quality</a> scale unless <a href="#bowtie2-options-solexa-quals"><code>--solexa-quals</code></a> is also specified. Default: off.</p>
 </td>
 </tr>
 </table>
@@ -581,7 +589,7 @@ Seed 3 fw:             ACGCTATCAT
 Seed 3 rc:             ATGATAGCGT
 Seed 4 fw:                   TCATGCATAA
 Seed 4 rc:                   TTATGCATGA</code></pre>
-<p>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 <code>-i S,1,2.5</code> sets the interval function <code>f</code> to <code>f(x) = 1 + 2.5 * sqrt(x)</code>, where x is the read length. See also: <a href="#setting-function-options">setting function options</a>. If the function returns a result less than 1, it is rounded up to 1. Default: th [...]
+<p>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 <code>-i S,1,2.5</code> sets the interval function <code>f</code> to <code>f(x) = 1 + 2.5 * sqrt(x)</code>, where x is the read length. See also: <a href="#setting-function-options">setting function options</a>. If the function returns a result less than 1, it is rounded up to 1. Default: th [...]
 </td>
 </tr>
 <tr>
@@ -597,7 +605,7 @@ Seed 4 rc:                   TTATGCATGA</code></pre>
 <pre><code>--dpad <int></code></pre>
 </td>
 <td>
-<p>"Pads" dynamic programming problems by <code><int></code> columns on either side to allow gaps. Default: 15.</p>
+<p>“Pads” dynamic programming problems by <code><int></code> columns on either side to allow gaps. Default: 15.</p>
 </td>
 </tr>
 <tr>
@@ -613,7 +621,7 @@ Seed 4 rc:                   TTATGCATGA</code></pre>
 <pre><code>--ignore-quals</code></pre>
 </td>
 <td>
-<p>When calculating a mismatch penalty, always consider the quality value at the mismatched position to be the highest possible, regardless of the actual value. I.e. input is treated as though all quality values are high. This is also the default behavior when the input doesn't specify quality values (e.g. in <a href="#bowtie2-options-f"><code>-f</code></a>, <a href="#bowtie2-options-r"><code>-r</code></a>, or <a href="#bowtie2-options-c"><code>-c</code></a> modes).</p>
+<p>When calculating a mismatch penalty, always consider the quality value at the mismatched position to be the highest possible, regardless of the actual value. I.e. input is treated as though all quality values are high. This is also the default behavior when the input doesn’t specify quality values (e.g. in <a href="#bowtie2-options-f"><code>-f</code></a>, <a href="#bowtie2-options-r"><code>-r</code></a>, or <a href="#bowtie2-options-c"><code>-c</code></a> modes).</p>
 </td>
 </tr>
 <tr>
@@ -621,7 +629,7 @@ Seed 4 rc:                   TTATGCATGA</code></pre>
 <pre><code>--nofw/--norc</code></pre>
 </td>
 <td>
-<p>If <code>--nofw</code> is specified, <code>bowtie2</code> will not attempt to align unpaired reads to the forward (Watson) reference strand. If <code>--norc</code> is specified, <code>bowtie2</code> will not attempt to align unpaired reads against the reverse-complement (Crick) reference strand. In paired-end mode, <code>--nofw</code> and <code>--norc</code> pertain to the fragments; i.e. specifying <code>--nofw</code> causes <code>bowtie2</code> to explore only those paired-end confi [...]
+<p>If <code>--nofw</code> is specified, <code>bowtie2</code> will not attempt to align unpaired reads to the forward (Watson) reference strand. If <code>--norc</code> is specified, <code>bowtie2</code> will not attempt to align unpaired reads against the reverse-complement (Crick) reference strand. In paired-end mode, <code>--nofw</code> and <code>--norc</code> pertain to the fragments; i.e. specifying <code>--nofw</code> causes <code>bowtie2</code> to explore only those paired-end confi [...]
 </td>
 </tr>
 <tr>
@@ -637,7 +645,7 @@ Seed 4 rc:                   TTATGCATGA</code></pre>
 <pre><code>--end-to-end</code></pre>
 </td>
 <td>
-<p>In this mode, Bowtie 2 requires that the entire read align from one end to the other, without any trimming (or "soft clipping") of characters from either end. The match bonus <a href="#bowtie2-options-ma"><code>--ma</code></a> always equals 0 in this mode, so all alignment scores are less than or equal to 0, and the greatest possible alignment score is 0. This is mutually exclusive with <a href="#bowtie2-options-local"><code>--local</code></a>. <code>--end-to-end</code> is t [...]
+<p>In this mode, Bowtie 2 requires that the entire read align from one end to the other, without any trimming (or “soft clipping”) of characters from either end. The match bonus <a href="#bowtie2-options-ma"><code>--ma</code></a> always equals 0 in this mode, so all alignment scores are less than or equal to 0, and the greatest possible alignment score is 0. This is mutually exclusive with <a href="#bowtie2-options-local"><code>--local</code></a>. <code>--end-to-end</code> is the default [...]
 </td>
 </tr>
 <tr>
@@ -645,7 +653,7 @@ Seed 4 rc:                   TTATGCATGA</code></pre>
 <pre><code>--local</code></pre>
 </td>
 <td>
-<p>In this mode, Bowtie 2 does not require that the entire read align from one end to the other. Rather, some characters may be omitted ("soft clipped") from the ends in order to achieve the greatest possible alignment score. The match bonus <a href="#bowtie2-options-ma"><code>--ma</code></a> is used in this mode, and the best possible alignment score is equal to the match bonus (<a href="#bowtie2-options-ma"><code>--ma</code></a>) times the length of the read. Specifying <code [...]
+<p>In this mode, Bowtie 2 does not require that the entire read align from one end to the other. Rather, some characters may be omitted (“soft clipped”) from the ends in order to achieve the greatest possible alignment score. The match bonus <a href="#bowtie2-options-ma"><code>--ma</code></a> is used in this mode, and the best possible alignment score is equal to the match bonus (<a href="#bowtie2-options-ma"><code>--ma</code></a>) times the length of the read. Specifying <code>--local</ [...]
 </td>
 </tr>
 </table>
@@ -696,7 +704,7 @@ Seed 4 rc:                   TTATGCATGA</code></pre>
 <pre><code>--score-min <func></code></pre>
 </td>
 <td>
-<p>Sets a function governing the minimum alignment score needed for an alignment to be considered "valid" (i.e. good enough to report). This is a function of read length. For instance, specifying <code>L,0,-0.6</code> sets the minimum-score function <code>f</code> to <code>f(x) = 0 + -0.6 * x</code>, where <code>x</code> is the read length. See also: <a href="#setting-function-options">setting function options</a>. The default in <a href="#bowtie2-options-end-to-end"><code>--en [...]
+<p>Sets a function governing the minimum alignment score needed for an alignment to be considered “valid” (i.e. good enough to report). This is a function of read length. For instance, specifying <code>L,0,-0.6</code> sets the minimum-score function <code>f</code> to <code>f(x) = 0 + -0.6 * x</code>, where <code>x</code> is the read length. See also: <a href="#setting-function-options">setting function options</a>. The default in <a href="#bowtie2-options-end-to-end"><code>--end-to-end</ [...]
 </td>
 </tr>
 </table>
@@ -708,7 +716,7 @@ Seed 4 rc:                   TTATGCATGA</code></pre>
 </td>
 <td>
 <p>By default, <code>bowtie2</code> searches for distinct, valid alignments for each read. When it finds a valid alignment, it continues looking for alignments that are nearly as good or better. The best alignment found is reported (randomly selected from among best if tied). Information about the best alignments is used to estimate mapping quality and to set SAM optional fields, such as <a href="#bowtie2-build-opt-fields-as"><code>AS:i</code></a> and <a href="#bowtie2-build-opt-fields-x [...]
-<p>When <code>-k</code> is specified, however, <code>bowtie2</code> behaves differently. Instead, it searches for at most <code><int></code> distinct, valid alignments for each read. The search terminates when it can't find more distinct valid alignments, or when it finds <code><int></code>, whichever happens first. All alignments found are reported in descending order by alignment score. The alignment score for a paired-end alignment equals the sum of the alignment scores of [...]
+<p>When <code>-k</code> is specified, however, <code>bowtie2</code> behaves differently. Instead, it searches for at most <code><int></code> distinct, valid alignments for each read. The search terminates when it can’t find more distinct valid alignments, or when it finds <code><int></code>, whichever happens first. All alignments found are reported in descending order by alignment score. The alignment score for a paired-end alignment equals the sum of the alignment scores of [...]
 <p>Note: Bowtie 2 is not designed with large values for <code>-k</code> in mind, and when aligning reads to long, repetitive genomes large <code>-k</code> can be very, very slow.</p>
 </td>
 </tr>
@@ -729,7 +737,7 @@ Seed 4 rc:                   TTATGCATGA</code></pre>
 <pre><code>-D <int></code></pre>
 </td>
 <td>
-<p>Up to <code><int></code> consecutive seed extension attempts can "fail" before Bowtie 2 moves on, using the alignments found so far. 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.</p>
+<p>Up to <code><int></code> consecutive seed extension attempts can “fail” before Bowtie 2 moves on, using the alignments found so far. 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.</p>
 </td>
 </tr>
 <tr>
@@ -737,7 +745,7 @@ Seed 4 rc:                   TTATGCATGA</code></pre>
 <pre><code>-R <int></code></pre>
 </td>
 <td>
-<p><code><int></code> is the maximum number of times Bowtie 2 will "re-seed" reads with repetitive seeds. 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.</p>
+<p><code><int></code> is the maximum number of times Bowtie 2 will “re-seed” reads with repetitive seeds. 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.</p>
 </td>
 </tr>
 </table>
@@ -768,7 +776,7 @@ Seed 4 rc:                   TTATGCATGA</code></pre>
 <pre><code>--fr/--rf/--ff</code></pre>
 </td>
 <td>
-<p>The upstream/downstream mate orientations for a valid paired-end alignment against the forward reference strand. E.g., if <code>--fr</code> 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 (<a href="#bowtie2-options-I"><code>-I</code></a> and <a href="#bowtie2-options-X"><code>-X</code></a>) are met, that alignment is valid. Also, if mate 2 appears upstream of the reverse co [...]
+<p>The upstream/downstream mate orientations for a valid paired-end alignment against the forward reference strand. E.g., if <code>--fr</code> 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 (<a href="#bowtie2-options-I"><code>-I</code></a> and <a href="#bowtie2-options-X"><code>-X</code></a>) are met, that alignment is valid. Also, if mate 2 appears upstream of the reverse co [...]
 </td>
 </tr>
 <tr>
@@ -792,7 +800,7 @@ Seed 4 rc:                   TTATGCATGA</code></pre>
 <pre><code>--dovetail</code></pre>
 </td>
 <td>
-<p>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: <a href="#mates-can-overlap-contain-or-dovetail-each-other">Mates can overlap, contain or dovetail each other</a>. Default: mates cannot dovetail in a concordant alignment.</p>
+<p>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: <a href="#mates-can-overlap-contain-or-dovetail-each-other">Mates can overlap, contain or dovetail each other</a>. Default: mates cannot dovetail in a concordant alignment.</p>
 </td>
 </tr>
 <tr>
@@ -819,7 +827,7 @@ Seed 4 rc:                   TTATGCATGA</code></pre>
 <pre><code>-t/--time</code></pre>
 </td>
 <td>
-<p>Print the wall-clock time required to load the index files and align the reads. This is printed to the "standard error" ("stderr") filehandle. Default: off.</p>
+<p>Print the wall-clock time required to load the index files and align the reads. This is printed to the “standard error” (“stderr”) filehandle. Default: off.</p>
 </td>
 </tr>
 <tr>
@@ -852,7 +860,7 @@ Seed 4 rc:                   TTATGCATGA</code></pre>
 --un-conc-lz4 <path></code></pre>
 </td>
 <td>
-<p>Write paired-end reads that fail to align concordantly to file(s) at <code><path></code>. These reads correspond to the SAM records with the FLAGS <code>0x4</code> bit set and either the <code>0x40</code> or <code>0x80</code> bit set (depending on whether it's mate #1 or #2). <code>.1</code> and <code>.2</code> strings are added to the filename to distinguish which file contains mate #1 and mate #2. If a percent symbol, <code>%</code>, is used in <code><path></code>, the p [...]
+<p>Write paired-end reads that fail to align concordantly to file(s) at <code><path></code>. These reads correspond to the SAM records with the FLAGS <code>0x4</code> bit set and either the <code>0x40</code> or <code>0x80</code> bit set (depending on whether it’s mate #1 or #2). <code>.1</code> and <code>.2</code> strings are added to the filename to distinguish which file contains mate #1 and mate #2. If a percent symbol, <code>%</code>, is used in <code><path></code>, the p [...]
 </td>
 </tr>
 <tr>
@@ -863,7 +871,7 @@ Seed 4 rc:                   TTATGCATGA</code></pre>
 --al-conc-lz4 <path></code></pre>
 </td>
 <td>
-<p>Write paired-end reads that align concordantly at least once to file(s) at <code><path></code>. These reads correspond to the SAM records with the FLAGS <code>0x4</code> bit unset and either the <code>0x40</code> or <code>0x80</code> bit set (depending on whether it's mate #1 or #2). <code>.1</code> and <code>.2</code> strings are added to the filename to distinguish which file contains mate #1 and mate #2. If a percent symbol, <code>%</code>, is used in <code><path></code [...]
+<p>Write paired-end reads that align concordantly at least once to file(s) at <code><path></code>. These reads correspond to the SAM records with the FLAGS <code>0x4</code> bit unset and either the <code>0x40</code> or <code>0x80</code> bit set (depending on whether it’s mate #1 or #2). <code>.1</code> and <code>.2</code> strings are added to the filename to distinguish which file contains mate #1 and mate #2. If a percent symbol, <code>%</code>, is used in <code><path></code [...]
 </td>
 </tr>
 <tr>
@@ -887,7 +895,7 @@ Seed 4 rc:                   TTATGCATGA</code></pre>
 <pre><code>--met-stderr <path></code></pre>
 </td>
 <td>
-<p>Write <code>bowtie2</code> metrics to the "standard error" ("stderr") filehandle. This is not mutually exclusive with <a href="#bowtie2-options-met-file"><code>--met-file</code></a>. Having alignment metric can be useful for debugging certain problems, especially performance issues. See also: <a href="#bowtie2-options-met"><code>--met</code></a>. Default: metrics disabled.</p>
+<p>Write <code>bowtie2</code> metrics to the “standard error” (“stderr”) filehandle. This is not mutually exclusive with <a href="#bowtie2-options-met-file"><code>--met-file</code></a>. Having alignment metric can be useful for debugging certain problems, especially performance issues. See also: <a href="#bowtie2-options-met"><code>--met</code></a>. Default: metrics disabled.</p>
 </td>
 </tr>
 <tr>
@@ -989,7 +997,7 @@ Seed 4 rc:                   TTATGCATGA</code></pre>
 <pre><code>-p/--threads NTHREADS</code></pre>
 </td>
 <td>
-<p>Launch <code>NTHREADS</code> parallel search threads (default: 1). Threads will run on separate processors/cores and synchronize when parsing reads and outputting alignments. Searching for alignments is highly parallel, and speedup is close to linear. Increasing <code>-p</code> increases Bowtie 2's memory footprint. E.g. when aligning to a human genome index, increasing <code>-p</code> from 1 to 8 increases the memory footprint by a few hundred megabytes. This option is only available [...]
+<p>Launch <code>NTHREADS</code> parallel search threads (default: 1). Threads will run on separate processors/cores and synchronize when parsing reads and outputting alignments. Searching for alignments is highly parallel, and speedup is close to linear. Increasing <code>-p</code> increases Bowtie 2’s memory footprint. E.g. when aligning to a human genome index, increasing <code>-p</code> from 1 to 8 increases the memory footprint by a few hundred megabytes. This option is only available [...]
 </td>
 </tr>
 <tr>
@@ -1005,7 +1013,7 @@ Seed 4 rc:                   TTATGCATGA</code></pre>
 <pre><code>--mm</code></pre>
 </td>
 <td>
-<p>Use memory-mapped I/O to load the index, rather than typical file I/O. Memory-mapping allows many concurrent <code>bowtie</code> 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 <code>bowtie</code> in situations where using <a href="#bowtie2-options-p"><code>-p</code></a> is not possible or not preferable.</p>
+<p>Use memory-mapped I/O to load the index, rather than typical file I/O. Memory-mapping allows many concurrent <code>bowtie</code> 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 <code>bowtie</code> in situations where using <a href="#bowtie2-options-p"><code>-p</code></a> is not possible or not preferable.</p>
 </td>
 </tr>
 </table>
@@ -1056,7 +1064,7 @@ Seed 4 rc:                   TTATGCATGA</code></pre>
 <p>Following is a brief description of the <a href="http://samtools.sourceforge.net/SAM1.pdf">SAM</a> format as output by <code>bowtie2</code>. For more details, see the <a href="http://samtools.sourceforge.net/SAM1.pdf">SAM format specification</a>.</p>
 <p>By default, <code>bowtie2</code> prints a SAM header with <code>@HD</code>, <code>@SQ</code> and <code>@PG</code> lines. When one or more <a href="#bowtie2-options-rg"><code>--rg</code></a> arguments are specified, <code>bowtie2</code> will also print an <code>@RG</code> line that includes all user-specified <a href="#bowtie2-options-rg"><code>--rg</code></a> tokens separated by tabs.</p>
 <p>Each subsequent line describes an alignment or, if the read failed to align, a read. Each line is a collection of at least 12 fields separated by tabs; from left to right, the fields are:</p>
-<ol style="list-style-type: decimal">
+<ol type="1">
 <li><p>Name of read that aligned.</p>
 <p>Note that the <a href="http://samtools.sourceforge.net/SAM1.pdf">SAM specification</a> 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. The standard behavior of truncating at the first whitespace can be suppressed with <code>--sam-no-qname-trunc</code> at the expense of generating non-standard SAM.</p></li>
 <li><p>Sum of all applicable flags. Flags relevant to Bowtie are:</p>
@@ -1131,9 +1139,9 @@ Seed 4 rc:                   TTATGCATGA</code></pre>
 <li><p>1-based offset into the forward reference strand where leftmost character of the alignment occurs</p></li>
 <li><p>Mapping quality</p></li>
 <li><p>CIGAR string representation of alignment</p></li>
-<li><p>Name of reference sequence where mate's alignment occurs. Set to <code>=</code> if the mate's reference sequence is the same as this alignment's, or <code>*</code> if there is no mate.</p></li>
-<li><p>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.</p></li>
-<li><p>Inferred fragment length. Size is negative if the mate's alignment occurs upstream of this alignment. Size is 0 if the mates did not align concordantly. However, size is non-0 if the mates aligned discordantly to the same chromosome.</p></li>
+<li><p>Name of reference sequence where mate’s alignment occurs. Set to <code>=</code> if the mate’s reference sequence is the same as this alignment’s, or <code>*</code> if there is no mate.</p></li>
+<li><p>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.</p></li>
+<li><p>Inferred fragment length. Size is negative if the mate’s alignment occurs upstream of this alignment. Size is 0 if the mates did not align concordantly. However, size is non-0 if the mates aligned discordantly to the same chromosome.</p></li>
 <li><p>Read sequence (reverse-complemented if aligned to the reverse strand)</p></li>
 <li><p>ASCII-encoded read qualities (reverse-complemented if the read aligned to the reverse strand). The encoded quality values are on the <a href="http://en.wikipedia.org/wiki/Phred_quality_score">Phred quality</a> scale and the encoding is ASCII-offset by 33 (ASCII char <code>!</code>), similarly to a <a href="http://en.wikipedia.org/wiki/FASTQ_format">FASTQ</a> file.</p></li>
 <li><p>Optional fields. Fields are tab-separated. <code>bowtie2</code> outputs zero or more of these optional fields for each alignment, depending on the type of the alignment:</p></li>
@@ -1230,9 +1238,9 @@ Seed 4 rc:                   TTATGCATGA</code></pre>
 </table>
 <h1 id="the-bowtie2-build-indexer">The <code>bowtie2-build</code> indexer</h1>
 <p><code>bowtie2-build</code> builds a Bowtie index from a set of DNA sequences. <code>bowtie2-build</code> outputs a set of 6 files with suffixes <code>.1.bt2</code>, <code>.2.bt2</code>, <code>.3.bt2</code>, <code>.4.bt2</code>, <code>.rev.1.bt2</code>, and <code>.rev.2.bt2</code>. In the case of a large index these suffixes will have a <code>bt2l</code> termination. These files together constitute the index: they are all that is needed to align reads to that reference. The original se [...]
-<p>Bowtie 2's <code>.bt2</code> index format is different from Bowtie 1's <code>.ebwt</code> format, and they are not compatible with each other.</p>
-<p>Use of Karkkainen's <a href="http://portal.acm.org/citation.cfm?id=1314852">blockwise algorithm</a> allows <code>bowtie2-build</code> to trade off between running time and memory usage. <code>bowtie2-build</code> has three options governing how it makes this trade: <a href="#bowtie2-build-options-p"><code>-p</code>/<code>--packed</code></a>, <a href="#bowtie2-build-options-bmax"><code>--bmax</code></a>/<a href="#bowtie2-build-options-bmaxdivn"><code>--bmaxdivn</code></a>, and <a href= [...]
-<p>The indexer provides options pertaining to the "shape" of the index, e.g. <a href="#bowtie2-build-options-o"><code>--offrate</code></a> governs the fraction of <a href="http://en.wikipedia.org/wiki/Burrows-Wheeler_transform">Burrows-Wheeler</a> rows that are "marked" (i.e., the density of the suffix-array sample; see the original <a href="http://portal.acm.org/citation.cfm?id=796543">FM Index</a> paper for details). All of these options are potentially profitable t [...]
+<p>Bowtie 2’s <code>.bt2</code> index format is different from Bowtie 1’s <code>.ebwt</code> format, and they are not compatible with each other.</p>
+<p>Use of Karkkainen’s <a href="http://portal.acm.org/citation.cfm?id=1314852">blockwise algorithm</a> allows <code>bowtie2-build</code> to trade off between running time and memory usage. <code>bowtie2-build</code> has three options governing how it makes this trade: <a href="#bowtie2-build-options-p"><code>-p</code>/<code>--packed</code></a>, <a href="#bowtie2-build-options-bmax"><code>--bmax</code></a>/<a href="#bowtie2-build-options-bmaxdivn"><code>--bmaxdivn</code></a>, and <a href= [...]
+<p>The indexer provides options pertaining to the “shape” of the index, e.g. <a href="#bowtie2-build-options-o"><code>--offrate</code></a> governs the fraction of <a href="http://en.wikipedia.org/wiki/Burrows-Wheeler_transform">Burrows-Wheeler</a> rows that are “marked” (i.e., the density of the suffix-array sample; see the original <a href="http://portal.acm.org/citation.cfm?id=796543">FM Index</a> paper for details). All of these options are potentially profitable trade-offs depending  [...]
 <p><code>bowtie2-build</code> can generate either <a href="#small-and-large-indexes">small or large indexes</a>. The wrapper will decide which based on the length of the input genome. If the reference does not exceed 4 billion characters but a large index is preferred, the user can specify <a href="#bowtie2-build-options-large-index"><code>--large-index</code></a> to force <code>bowtie2-build</code> to build a large index instead.</p>
 <p>The Bowtie 2 index is based on the <a href="http://portal.acm.org/citation.cfm?id=796543">FM Index</a> of Ferragina and Manzini, which in turn is based on the <a href="http://en.wikipedia.org/wiki/Burrows-Wheeler_transform">Burrows-Wheeler</a> transform. The algorithm used to build the index is based on the <a href="http://portal.acm.org/citation.cfm?id=1314852">blockwise algorithm</a> of Karkkainen.</p>
 <h2 id="command-line-1">Command Line</h2>
@@ -1352,7 +1360,7 @@ Seed 4 rc:                   TTATGCATGA</code></pre>
 <pre><code>-o/--offrate <int></code></pre>
 </td>
 <td>
-<p>To map alignments back to positions on the reference sequences, it's necessary to annotate ("mark") some or all of the <a href="http://en.wikipedia.org/wiki/Burrows-Wheeler_transform">Burrows-Wheeler</a> rows with their corresponding location on the genome. <a href="#bowtie2-build-options-o"><code>-o</code>/<code>--offrate</code></a> governs how many rows get marked: the indexer will mark every 2^<code><int></code> rows. Marking more rows makes reference-position looku [...]
+<p>To map alignments back to positions on the reference sequences, it’s necessary to annotate (“mark”) some or all of the <a href="http://en.wikipedia.org/wiki/Burrows-Wheeler_transform">Burrows-Wheeler</a> rows with their corresponding location on the genome. <a href="#bowtie2-build-options-o"><code>-o</code>/<code>--offrate</code></a> governs how many rows get marked: the indexer will mark every 2^<code><int></code> rows. Marking more rows makes reference-position lookups faster, [...]
 </td>
 </tr>
 <tr>
@@ -1488,17 +1496,17 @@ Sequence-N  <name>  <len></code></pre>
 </tr>
 </table>
 <h1 id="getting-started-with-bowtie-2-lambda-phage-example">Getting started with Bowtie 2: Lambda phage example</h1>
-<p>Bowtie 2 comes with some example files to get you started. The example files are not scientifically significant; we use the <a href="http://en.wikipedia.org/wiki/Lambda_phage">Lambda phage</a> reference genome simply because it's short, and the reads were generated by a computer program, not a sequencer. However, these files will let you start running Bowtie 2 and downstream tools right away.</p>
+<p>Bowtie 2 comes with some example files to get you started. The example files are not scientifically significant; we use the <a href="http://en.wikipedia.org/wiki/Lambda_phage">Lambda phage</a> reference genome simply because it’s short, and the reads were generated by a computer program, not a sequencer. However, these files will let you start running Bowtie 2 and downstream tools right away.</p>
 <p>First follow the manual instructions to <a href="#obtaining-bowtie-2">obtain Bowtie 2</a>. Set the <code>BT2_HOME</code> environment variable to point to the new Bowtie 2 directory containing the <code>bowtie2</code>, <code>bowtie2-build</code> and <code>bowtie2-inspect</code> binaries. This is important, as the <code>BT2_HOME</code> variable is used in the commands below to refer to that directory.</p>
 <h2 id="indexing-a-reference-genome">Indexing a reference genome</h2>
-<p>To create an index for the <a href="http://en.wikipedia.org/wiki/Lambda_phage">Lambda phage</a> reference genome included with Bowtie 2, create a new temporary directory (it doesn't matter where), change into that directory, and run:</p>
+<p>To create an index for the <a href="http://en.wikipedia.org/wiki/Lambda_phage">Lambda phage</a> reference genome included with Bowtie 2, create a new temporary directory (it doesn’t matter where), change into that directory, and run:</p>
 <pre><code>$BT2_HOME/bowtie2-build $BT2_HOME/example/reference/lambda_virus.fa lambda_virus</code></pre>
-<p>The command should print many lines of output then quit. When the command completes, the current directory will contain four new files that all start with <code>lambda_virus</code> and end with <code>.1.bt2</code>, <code>.2.bt2</code>, <code>.3.bt2</code>, <code>.4.bt2</code>, <code>.rev.1.bt2</code>, and <code>.rev.2.bt2</code>. These files constitute the index - you're done!</p>
+<p>The command should print many lines of output then quit. When the command completes, the current directory will contain four new files that all start with <code>lambda_virus</code> and end with <code>.1.bt2</code>, <code>.2.bt2</code>, <code>.3.bt2</code>, <code>.4.bt2</code>, <code>.rev.1.bt2</code>, and <code>.rev.2.bt2</code>. These files constitute the index - you’re done!</p>
 <p>You can use <code>bowtie2-build</code> to create an index for a set of <a href="https://en.wikipedia.org/wiki/FASTA"><code>FASTA</code></a> files obtained from any source, including sites such as <a href="http://genome.ucsc.edu/cgi-bin/hgGateway">UCSC</a>, <a href="http://www.ncbi.nlm.nih.gov/sites/genome">NCBI</a>, and <a href="http://www.ensembl.org/">Ensembl</a>. When indexing multiple <a href="https://en.wikipedia.org/wiki/FASTA"><code>FASTA</code></a> files, specify all the files [...]
 <h2 id="aligning-example-reads">Aligning example reads</h2>
 <p>Stay in the directory created in the previous step, which now contains the <code>lambda_virus</code> index files. Next, run:</p>
 <pre><code>$BT2_HOME/bowtie2 -x lambda_virus -U $BT2_HOME/example/reads/reads_1.fq -S eg1.sam</code></pre>
-<p>This runs the Bowtie 2 aligner, which aligns a set of unpaired reads to the <a href="http://en.wikipedia.org/wiki/Lambda_phage">Lambda phage</a> reference genome using the index generated in the previous step. The alignment results in SAM format are written to the file <code>eg1.sam</code>, and a short alignment summary is written to the console. (Actually, the summary is written to the "standard error" or "stderr" filehandle, which is typically printed to the cons [...]
+<p>This runs the Bowtie 2 aligner, which aligns a set of unpaired reads to the <a href="http://en.wikipedia.org/wiki/Lambda_phage">Lambda phage</a> reference genome using the index generated in the previous step. The alignment results in SAM format are written to the file <code>eg1.sam</code>, and a short alignment summary is written to the console. (Actually, the summary is written to the “standard error” or “stderr” filehandle, which is typically printed to the console.)</p>
 <p>To see the first few lines of the SAM output, run:</p>
 <pre><code>head eg1.sam</code></pre>
 <p>You will see something like this:</p>
diff --git a/doc/website/recent_news.ssi b/doc/website/recent_news.ssi
index 9a41e30..c51b343 100644
--- a/doc/website/recent_news.ssi
+++ b/doc/website/recent_news.ssi
@@ -1,3 +1,12 @@
+<h2>Version 2.3.4 - December 29, 2017</h2>
+<ul>
+    <li>Fixed major issue causing corrupt SAM output when using many threads (<tt><a href="manual.shtml#bowtie2-options-p">-p/--threads</a></tt>) on certain systems.</li>
+    <li>Fixed an issue whereby bowtie2 processes could overwrite each others' named pipes on HPC systems.</li>
+    <li>Fixed an issue causing <tt>bowtie2-build</tt> and <tt>bowtie2-inspect</tt> to return prematurely on Windows.</li>
+    <li>Fixed issues raised by compiler "sanitizers" that could potentially have caused memory corruption or undefined behavior.</li>
+    <li>Added the "continuous FASTA" input format (<tt><a href="manual.shtml#bowtie2-options-F">-F</a></tt>) for aligning all the k-mers in the sequences of a FASTA file.  Useful for determining mapability of regions of the genome, and similar tasks.</li>
+</ul>
+
 <h2>Version 2.3.3.1 - October 05, 2017</h2>
 <ul>
     <li>Fixed an issue causing input files to be skipped when running multi-threaded alignment</li>
diff --git a/doc/website/rhsidebar.ssi b/doc/website/rhsidebar.ssi
index 3a74fdc..e425c1b 100644
--- a/doc/website/rhsidebar.ssi
+++ b/doc/website/rhsidebar.ssi
@@ -18,10 +18,10 @@
         </tr>
       <tr>
       <td>
-        <a href="https://sourceforge.net/projects/bowtie-bio/files/bowtie2/2.3.3.1">Bowtie2 2.3.3.1</a>
+        <a href="https://sourceforge.net/projects/bowtie-bio/files/bowtie2/2.3.4">Bowtie2 2.3.4</a>
       </td>
       <td align="right">
-        10/05/17 
+        12/29/17 
       </td>
       </tr>
       <tr>
diff --git a/ds.h b/ds.h
index d4a9737..06c9f34 100644
--- a/ds.h
+++ b/ds.h
@@ -3093,7 +3093,7 @@ public:
 	 * Free each page.
 	 */
 	~Pool() {
-		delete super_pages;
+		delete[] super_pages;
 		for(size_t i = 0; i < pages_.size(); i++) {
 #ifdef USE_MEM_TALLY
 			gMemTally.del(cat_, pagesz_);
diff --git a/filebuf.h b/filebuf.h
index 964db80..067546e 100644
--- a/filebuf.h
+++ b/filebuf.h
@@ -632,7 +632,10 @@ public:
 		if(cur_ + slen > BUF_SZ) {
 			if(cur_ > 0) flush();
 			if(slen >= BUF_SZ) {
-				fwrite(s.c_str(), slen, 1, out_);
+				if (slen != fwrite(s.c_str(), 1, slen, out_)) {
+					std::cerr << "Error: outputting data" << std::endl;
+					throw 1;
+				}
 			} else {
 				memcpy(&buf_[cur_], s.data(), slen);
 				assert_eq(0, cur_);
@@ -655,7 +658,10 @@ public:
 		if(cur_ + slen > BUF_SZ) {
 			if(cur_ > 0) flush();
 			if(slen >= BUF_SZ) {
-				fwrite(s.toZBuf(), slen, 1, out_);
+				if (slen != fwrite(s.toZBuf(), 1, slen, out_)) {
+					std::cerr << "Error outputting data" << std::endl;
+					throw 1;
+				}
 			} else {
 				memcpy(&buf_[cur_], s.toZBuf(), slen);
 				assert_eq(0, cur_);
@@ -717,10 +723,10 @@ public:
 	}
 
 	void flush() {
-		if(!fwrite((const void *)buf_, cur_, 1, out_)) {
-            if (errno == EPIPE) {
-                exit(EXIT_SUCCESS);
-            }
+		if(cur_ != fwrite((const void *)buf_, 1, cur_, out_)) {
+			if (errno == EPIPE) {
+				exit(EXIT_SUCCESS);
+			}
 			std::cerr << "Error while flushing and closing output" << std::endl;
 			throw 1;
 		}
diff --git a/outq.h b/outq.h
index f8a30cf..537d5f8 100644
--- a/outq.h
+++ b/outq.h
@@ -26,6 +26,7 @@
 #include "read.h"
 #include "threading.h"
 #include "mem_ids.h"
+#include <vector>
 
 /**
  * Encapsulates a list of lines of output.  If the earliest as-yet-unreported
@@ -75,7 +76,13 @@ public:
 		}
 	}
 
-	~OutputQueue() { }
+	~OutputQueue() {
+		for (size_t i = 0; i < nthreads_; i++) {
+			delete[] perThreadBuf[i];
+		}
+		delete[] perThreadBuf;
+		delete[] perThreadCounter;
+	}
 
 	/**
 	 * Caller is telling us that they're about to write output record(s) for
@@ -141,7 +148,7 @@ protected:
 
 	// used for output read buffer	
 	size_t nthreads_;
-	BTString**	perThreadBuf;
+	BTString** perThreadBuf;
 	int* 		perThreadCounter;
 	int perThreadBufSize_;
 
diff --git a/pat.cpp b/pat.cpp
index b86a6be..9bd144e 100644
--- a/pat.cpp
+++ b/pat.cpp
@@ -61,7 +61,7 @@ static uint32_t genRandSeed(
 		int p = (int)qry[i];
 		assert_leq(p, 4);
 		size_t off = ((i & 15) << 1);
-		rseed ^= (p << off);
+		rseed ^= ((uint32_t)p << off);
 	}
 	// Throw all the quality values for the read into the random
 	// seed
diff --git a/scripts/test/simple_tests.pl b/scripts/test/simple_tests.pl
index 51ef2be..7e4d6b2 100644
--- a/scripts/test/simple_tests.pl
+++ b/scripts/test/simple_tests.pl
@@ -4374,7 +4374,7 @@ sub runbowtie2($$$$$$$$$$$$$$$$$$$$$$) {
 	my (
 		$do_build,
 		$large_idx,
-		$debug_mode,
+		$binary_type,
 		$args,
 		$fa,
 		$reportargs,       #5
@@ -4511,26 +4511,31 @@ my  $idx_type = "";
 		$formatarg = "-q";
 		$readarg = $mate1arg;
 	}
-	# Possibly add debug mode string
-	my $debug_arg = "";
-	$debug_arg = "--debug" if $debug_mode;
+
+	if ($binary_type eq "release") {
+		$binary_type = "";
+	}
+	else {
+		$binary_type = "--" . $binary_type;
+	}
+	
 	my $cmd;
 	my $batch_size = int(rand(16) + 1);
 	if($pe) {
 		# Paired-end case
 		if (ref $mate1arg eq "ARRAY") {
-			$cmd = "$bowtie2 $debug_arg @ARGV $idx_type $args --reads-per-batch $batch_size -x .simple_tests.tmp $formatarg -1 " . join(",", @$mate1arg) . " -2 " . join(",", @$mate2arg);
+			$cmd = "$bowtie2 $binary_type @ARGV $idx_type $args --reads-per-batch $batch_size -x .simple_tests.tmp $formatarg -1 " . join(",", @$mate1arg) . " -2 " . join(",", @$mate2arg);
 		}
 		else {
-			$cmd = "$bowtie2 $debug_arg @ARGV $idx_type $args --reads-per-batch $batch_size -x .simple_tests.tmp $formatarg -1 $mate1arg -2 $mate2arg";
+			$cmd = "$bowtie2 $binary_type @ARGV $idx_type $args --reads-per-batch $batch_size -x .simple_tests.tmp $formatarg -1 $mate1arg -2 $mate2arg";
 		}
 	} else {
 		# Unpaired case
 		if (ref $readarg eq "ARRAY") {
-			$cmd = "$bowtie2 $debug_arg @ARGV $idx_type $args --reads-per-batch $batch_size -x .simple_tests.tmp $formatarg " . join(",", @$readarg);
+			$cmd = "$bowtie2 $binary_type @ARGV $idx_type $args --reads-per-batch $batch_size -x .simple_tests.tmp $formatarg " . join(",", @$readarg);
 		}
 		else {
-			$cmd = "$bowtie2 $debug_arg @ARGV $idx_type $args --reads-per-batch $batch_size -x .simple_tests.tmp $formatarg $readarg";
+			$cmd = "$bowtie2 $binary_type @ARGV $idx_type $args --reads-per-batch $batch_size -x .simple_tests.tmp $formatarg $readarg";
 		}
 	}
 	print "$cmd\n";
@@ -4586,7 +4591,7 @@ sub matchSamOptionalFlags($$) {
 my $tmpfafn = ".simple_tests.pl.fa";
 my $last_ref = undef;
 foreach my $large_idx (undef,1) {
-	foreach my $debug_mode (undef,1) {
+	foreach my $binary_type ("release", "debug", "sanitized") {
 		for (my $ci = 0; $ci < scalar(@cases); $ci++) {
 			my $c = $cases[$ci];
 			last unless defined($c);
@@ -4702,7 +4707,7 @@ foreach my $large_idx (undef,1) {
 				runbowtie2(
 					$do_build && $first,
 					$large_idx,
-					$debug_mode,
+					$binary_type,
 					"$a",
 					$tmpfafn,
 					$c->{report},
diff --git a/scripts/test/simple_tests.sh b/scripts/test/simple_tests.sh
index b71ade5..cdb2f8a 100644
--- a/scripts/test/simple_tests.sh
+++ b/scripts/test/simple_tests.sh
@@ -21,14 +21,21 @@
 
 #  simple_tests.sh
 
+export ASAN_OPTIONS=halt_on_error=1
+export UBSAN_OPTIONS=halt_on_error=1
+
 make $* bowtie2-align-s \
 		bowtie2-align-l \
 		bowtie2-align-s-debug \
 		bowtie2-align-l-debug \
+		bowtie2-align-s-sanitized \
+		bowtie2-align-l-sanitized \
 		bowtie2-build-s \
 		bowtie2-build-l \
 		bowtie2-build-s-debug \
-		bowtie2-build-l-debug && \
+		bowtie2-build-l-debug \
+		bowtie2-build-s-sanitized \
+		bowtie2-build-l-sanitized && \
 perl scripts/test/simple_tests.pl \
 	--bowtie2=./bowtie2 \
 	--bowtie2-build=./bowtie2-build \

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/bowtie2.git



More information about the debian-med-commit mailing list