Skip to content
Commits on Source (8)
cmake_minimum_required(VERSION 2.8)
cmake_policy(SET CMP0048 NEW)
cmake_policy(SET CMP0005 NEW)
project(bowtie2 LANGUAGES CXX VERSION "2.3.4.2")
enable_testing()
include(CTest)
include(ProcessorCount)
include(CheckSymbolExists)
ProcessorCount(NUM_CORES)
option(BOWTIE_MM "enable bowtie2 memory mapping" ON)
option(BOWITE_SHARED_MM "enable shared memory mapping" ON)
set(CMAKE_CXX_STANDARD 98)
set(NO_TBB ${NO_TBB})
set(NO_SPINLOCK, ${NO_SPINLOCK})
set(WITH_THREAD_PROFILING ${WITH_THREAD_PROFILING})
set(POPCNT_CAPABILITY ${POPCNT_CAPABILITY})
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m64 -g3 -Wall -msse2")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3 -funroll-loops")
set(INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/bin" CACHE PATH "Installation directory for executables")
set(CMAKE_EXPORT_COMPILE_COMMANDS on)
if (MINGW)
option(BOWTIE_MM "Memory mapped files not supported on Windows" OFF)
option(BOWTIE_SHARED_MEM "Shared memory not supported on Windows" OFF)
endif(MINGW)
if (APPLE)
set(CMAKE_XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT "dwarf-with-dsym")
endif(APPLE)
set(BOWTIE2_BIN_LIST
bowtie2-build-s
bowtie2-build-l
bowtie2-align-s
bowtie2-align-l
bowtie2-inspect-s
bowtie2-inspect-l
)
set(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
)
set(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
bowtie_main.cpp
bt2_search.cpp
)
set(BUILD_CPPS
bt2_build.cpp
diff_sample.cpp
bowtie_build_main.cpp)
set(INSPECT_CPPS
bt2_inspect.cpp
)
string(TIMESTAMP BUILD_DATE)
execute_process(COMMAND ${CMAKE_CXX_COMPILER} -v OUTPUT_VARIABLE COMPILER_VERSION)
add_definitions(
-DBOWTIE2
-DBUILD_HOST="${CMAKE_HOST_SYSTEM}"
-DBUILD_TIME="${BUILD_DATE}"
-DCOMPILER_VERSION="${CMAKE_CXX_COMPILER} ${CMAKE_CXX_COMPILER_VERSION}"
-DBOWTIE2_VERSION="${PROJECT_VERSION}"
-D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64
-D_GNU_SOURCE
)
if (WITH_AFFINITY)
add_definitions(-DWITH_AFFINITY=1)
endif()
if (NO_SPINLOCK)
add_definitions(-DNO_SPINLOCK)
endif()
if (POPCNT_CAPABILITY)
add_definitions(-DPOPCNT_CAPABILITY)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -I third_party")
endif()
if (WITH_THREAD_PROFILING)
add_definitions(-DPER_THREAD_TIMING=1)
endif()
if (CMAKE_BUILD_TYPE STREQUAL "Release")
add_definitions(-DNDEBUG)
endif()
find_package(Threads REQUIRED)
find_package(ZLIB REQUIRED)
find_path(TBB_INCLUDE_PATH tbb)
find_library(TBB_LIBRARY_PATH tbb)
find_library(TBB_MALLOC_LIBRARY_PATH tbbmalloc)
if (ZLIB_FOUND)
link_libraries(${ZLIB_LIBRARIES})
include_directories(${ZLIB_INCLUDE_DIRS})
endif()
if (Threads_FOUND)
link_libraries(Threads::Threads)
endif()
if (NOT TBB_LIBRARY_PATH)
set(SHARED_CPPS ${SHARED_CPPS} tinythread.cpp)
else()
if (NOT NO_QUEUELOCK)
add_definitions(-DWITH_TBB -DWITH_QUEUELOCK=1 -DNO_SPINLOCK)
endif()
include_directories(${TBB_INCLUDE_PATH})
link_libraries(${TBB_LIBRARY_PATH} ${TBB_MALLOC_LIBRARY_PATH})
endif()
include_directories(${PROJECT_SOURCE_DIR})
get_directory_property(COMPILER_DEFS COMPILE_DEFINITIONS)
add_definitions(-DCOMPILER_OPTIONS="${CMAKE_CXX_FLAGS}")
add_executable(bowtie2-align-s ${SEARCH_CPPS} ${SHARED_CPPS})
add_executable(bowtie2-align-l ${SEARCH_CPPS} ${SHARED_CPPS})
add_executable(bowtie2-build-s ${BUILD_CPPS} ${SHARED_CPPS})
add_executable(bowtie2-build-l ${BUILD_CPPS} ${SHARED_CPPS})
add_executable(bowtie2-inspect-s ${INSPECT_CPPS} ${SHARED_CPPS})
add_executable(bowtie2-inspect-l ${INSPECT_CPPS} ${SHARED_CPPS})
set_target_properties(bowtie2-align-l bowtie2-build-l bowtie2-inspect-l PROPERTIES COMPILE_FLAGS "-DBOWTIE2_64BIT_INDEX")
set_target_properties(bowtie2-inspect-s bowtie2-inspect-l PROPERTIES COMPILE_FLAGS "-DBOWTIE_INSPECT_MAIN")
set_target_properties(${BOWTIE2_BIN_LIST} PROPERTIES DEBUG_POSTFIX "-debug")
add_test(NAME simple-align COMMAND ${PROJECT_SOURCE_DIR}/bowtie2 -x example/index/lambda_virus example/reads/longreads.fq)
......@@ -3,33 +3,35 @@
INTRODUCTION
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
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,
local, and paired-end alignment modes. Multiple processors can be used
simultaneously to achieve greater alignment speed. Cufflinks: a tool for
transcriptome assembly and isoform quantitiation from Bowtie 2 outputs
alignments in SAM format, enabling interoperation with a large number of
other tools (e.g. SAMtools, GATK) that use SAM. Bowtie 2 is distributed
under the GPLv3 license, and it runs on the command line under Windows,
Mac OS X and Linux.
aligning reads of about 50 up to 100s of characters to 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, local, and
paired-end alignment modes. Multiple processors can be used
simultaneously to achieve greater alignment speed.
Bowtie 2 outputs alignments in SAM format, enabling interoperation with
a large number of other tools (e.g. SAMtools, GATK) that use SAM. Bowtie
2 is distributed under the GPLv3 license, and it runs on the command
line under Windows, 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
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
for aligning RNA-seq reads and measuring differential gene expression.
many other tools, some of which are listed here.
If you use Bowtie 2 for your published research, please cite our work.
Papers describing Bowtie 2 are:
If you use Bowtie 2 for your published research, please cite the Bowtie
paper. Thank you!
- Langmead B, Wilks C, Antonescu V, Charles R. Scaling read aligners
to hundreds of threads on general-purpose processors.
_Bioinformatics_. 2018 Jul 18. doi: 10.1093/bioinformatics/bty648.
- Langmead B, Salzberg SL. Fast gapped-read alignment with Bowtie 2.
_Nature Methods_. 2012 Mar 4;9(4):357-9. doi: 10.1038/nmeth.1923.
How is Bowtie 2 different from Bowtie 1?
......@@ -86,38 +88,30 @@ Bowtie 1’s.
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.
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
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
short.
Bowtie 2 is geared toward aligning relatively short sequencing reads to
long genomes. That said, it handles arbitrarily small reference
sequences ( e.g. amplicons) and very long reads (i.e. upwards of 10s or
100s of kilobases), though it is slower in those settings. It is
optimized for the read lengths and error modes yielded by typical
Illumina sequencers.
Bowtie 2 does not support alignment of colorspace reads.
Bowtie 2 does not support alignment of colorspace reads. (Bowtie 1
does.)
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
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”.
OBTAINING BOWTIE 2
OBTAINING BOWTIE 2
Bowtie 2 is available from various package managers, notably Bioconda.
With Bioconda installed, you should be able to install Bowtie 2 with
conda install bowtie2.
Containerized versions of Bowtie 2 are also available via the
Biocontainers project (e.g. via Docker Hub).
Download Bowtie 2 sources and binaries from the Download section of the
Sourceforge site. Binaries are available for the Intel x86_64
You can also download Bowtie 2 sources and binaries from the Download
section of the Sourceforge site. Binaries are available for the 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”.
......@@ -145,8 +139,64 @@ 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.
from source (see Threading Building Blocks library) or install it using
your operating system’s preferred package manager. The table below list
some of the commands for a few of the more popular operating systems.
OS
Sync Package List
Search
Install
Ubuntu, Mint, Debian
apt-get update
apt-cache search tbb
apt-get install libtbb-dev
Fedora, CentOS
yum check-update
yum search tbb
yum install tbb-devel.x86_64
Arch
packman -Sy
pacman -Ss tbb
pacman -S extra/intel-tbb
Gentoo
emerge --sync
emerge --search tbb
emerge dev-cpp/tbb
MacOS
brew update
brew search tbb
brew install tbb
FreeBSD
portsnap fetch update
make search name=tbb
cd /usr/ports/devel/tbb && make install && make clean
The Bowtie 2 Makefile also includes recipes for basic automatic
dependency management. Running make static-libs && make STATIC_BUILD=1
will issue a series of commands that will: 1. download TBB and zlib 2.
compile them as static libraries 3. link the resulting libraries to the
compiled Bowtie 2 binaries
If all fails Bowtie 2 can be built with make NO_TBB=1 to use pthreads or
Windows native multithreading instead.
Adding to PATH
......@@ -923,6 +973,13 @@ Trim <int> bases from 5’ (left) end of each read before alignment
Trim <int> bases from 3’ (right) end of each read before alignment
(default: 0).
--trim-to [3:|5:]<int>
Trim reads exceeding <int> bases. Bases will be trimmed from either the
3’ (right) or 5’ (left) end of the read. If the read end if not
specified, bowtie 2 will default to trimming from the 3’ (right) end of
the read. --trim-to and -3/-5 are mutually exclusive.
--phred33
Input qualities are ASCII chars equal to the Phred quality plus 33. This
......@@ -1416,7 +1473,8 @@ print an asterisk in those fields instead.
--soft-clipped-unmapped-tlen
Consider soft-clipped bases unmapped when calculating TLEN.
Consider soft-clipped bases unmapped when calculating TLEN. Only
available in --local mode.
--sam-no-qname-trunc
......
......@@ -4,25 +4,18 @@
! of this text document, or see the HTML manual online.
! -->
---
title: Bowtie 2 Manual
---
Introduction
============
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)
about 50 up to 100s of characters to relatively long (e.g. mammalian)
genomes. Bowtie 2 indexes the genome with an [FM Index][FM Index Wiki] (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, local, and paired-end alignment modes. Multiple
processors can be used simultaneously to achieve greater alignment speed.
[Cufflinks][]: a tool for transcriptome assembly and isoform quantitiation from
Bowtie 2 outputs alignments in [SAM] format, enabling interoperation with a
large number of other tools (e.g. [SAMtools], [GATK]) that use SAM. Bowtie 2 is
distributed under the [GPLv3 license], and it runs on the command line under
......@@ -30,14 +23,18 @@ Windows, 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 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 for aligning
RNA-seq reads and measuring differential gene expression.
[Bowtie] (also called "[Bowtie 1]" here) are also tightly integrated into many
other tools, some of which [are listed here](http://bowtie-bio.sourceforge.net/bowtie2/other_tools.shtml).
If you use [Bowtie 2] for your published research, please cite our work. Papers
describing Bowtie 2 are:
If you use [Bowtie 2] for your published research, please cite the [Bowtie
paper]. Thank you!
* Langmead B, Wilks C, Antonescu V, Charles R. [Scaling read aligners to hundreds
of threads on general-purpose processors](https://doi.org/10.1093/bioinformatics/bty648). _Bioinformatics_. 2018 Jul 18. doi:
10.1093/bioinformatics/bty648.
* Langmead B, Salzberg SL. [Fast gapped-read alignment with Bowtie 2](https://www.nature.com/articles/nmeth.1923). _Nature
Methods_. 2012 Mar 4;9(4):357-9. doi: 10.1038/nmeth.1923.
How is Bowtie 2 different from Bowtie 1?
......@@ -91,35 +88,27 @@ arguments and genome index format are both different from Bowtie 1's.
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.
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 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 short.
Bowtie 2 does not support alignment of colorspace reads.
Bowtie 2 is geared toward aligning relatively short sequencing reads to long
genomes. That said, it handles arbitrarily small reference sequences (e.g.
amplicons) and very long reads (i.e. upwards of 10s or 100s of kilobases),
though it is slower in those settings. It is optimized for the read lengths
and error modes yielded by typical Illumina sequencers.
What does it mean that some older Bowtie 2 versions are "beta"?
--------------------------------------------------------------
Bowtie 2 does not support alignment of colorspace reads. (Bowtie 1 does.)
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".
Obtaining Bowtie 2
==================
Download Bowtie 2 sources and binaries from the [Download] section of the
Sourceforge site. Binaries are available for the Intel `x86_64` architecture
Bowtie 2 is available from various package managers, notably [Bioconda](https://anaconda.org/bioconda/bowtie2).
With Bioconda installed, you should be able to install Bowtie 2 with `conda
install bowtie2`.
Containerized versions of Bowtie 2 are also available via the [Biocontainers](https://BioContainers.pro)
project (e.g. [via Docker Hub](https://hub.docker.com/r/biocontainers/bowtie2/)).
You can also download Bowtie 2 sources and binaries from the [Download] section
of the Sourceforge site. Binaries are available for the `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".
......@@ -145,9 +134,118 @@ from the MSYS environment.
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.
you can install it yourself from source (see [Threading Building Blocks library])
or install it using your operating system's preferred package manager.
The table below list some of the commands for a few of the more popular
operating systems.
<table>
<tr><th>OS</th><th>Sync Package List</th><th>Search</th><th>Install</th></tr>
<tr><td>Ubuntu, Mint, Debian</td>
<td>
apt-get update
</td>
<td>
apt-cache search tbb
</td>
<td>
apt-get install libtbb-dev
</td></tr>
<tr><td>Fedora, CentOS</td>
<td>
yum check-update
</td>
<td>
yum search tbb
</td>
<td>
yum install tbb-devel.x86_64
</td></tr>
<tr><td>Arch</td>
<td>
packman -Sy
</td>
<td>
pacman -Ss tbb
</td>
<td>
pacman -S extra/intel-tbb
</td></tr>
<tr><td>Gentoo</td>
<td>
emerge --sync
</td>
<td>
emerge --search tbb
</td>
<td>
emerge dev-cpp/tbb
</td>
<tr><td>MacOS</td>
<td>
brew update
</td>
<td>
brew search tbb
</td>
<td>
brew install tbb
</td></tr>
<tr><td>FreeBSD</td>
<td>
portsnap fetch update
</td>
<td>
make search name=tbb
</td>
<td>
cd /usr/ports/devel/tbb && make install && make clean
</table>
The Bowtie 2 Makefile also includes recipes for basic automatic dependency
management. Running `make static-libs && make STATIC_BUILD=1` will issue
a series of commands that will:
1. download TBB and zlib
2. compile them as static libraries
3. link the resulting libraries to the compiled Bowtie 2 binaries
If all fails Bowtie 2 can be built with `make NO_TBB=1` to use pthreads
or Windows native multithreading instead.
Adding to PATH
--------------
......@@ -985,6 +1083,17 @@ Trim `<int>` bases from 5' (left) end of each read before alignment (default: 0)
Trim `<int>` bases from 3' (right) end of each read before alignment (default: 0).
</td></tr><tr><td id="bowtie2-options-trim-to">
--trim-to [3:|5:]<int>
</td><td>
Trim reads exceeding `<int>` bases. Bases will be trimmed from either the 3' (right)
or 5' (left) end of the read. If the read end if not specified, bowtie 2 will default
to trimming from the 3' (right) end of the read. [`--trim-to`] and [`-3`]/[`-5`] are
mutually exclusive.
</td></tr><tr><td id="bowtie2-options-phred33-quals">
--phred33
......@@ -1768,13 +1877,14 @@ and `QUAL` strings. Specifying this option causes Bowtie 2 to print an asterisk
in those fields instead.
</td></tr>
<tr><td id="bowtie2-options-soft-clipped-unmapped-tlen-sec-seq">
<tr><td id="bowtie2-options-soft-clipped-unmapped-tlen">
--soft-clipped-unmapped-tlen
</td><td>
Consider soft-clipped bases unmapped when calculating `TLEN`.
Consider soft-clipped bases unmapped when calculating `TLEN`. Only available
in [`--local`] mode.
</td></tr>
<tr><td id="bowtie2-options-sam-no-qname-trunc">
......@@ -2719,7 +2829,6 @@ for more details and variations on this process.
[Threading Building Blocks library]: https://www.threadingbuildingblocks.org
[TopHat]: http://tophat.cbcb.umd.edu/
[UCSC]: http://genome.ucsc.edu/cgi-bin/hgGateway
[Vmatch]: http://www.vmatch.de/
[Xcode]: http://developer.apple.com/xcode/
[`+I`/`--minins`]: #bowtie2-options-I
[`+I`]: #bowtie2-options-I
......@@ -2815,6 +2924,7 @@ for more details and variations on this process.
[`-3`]: #bowtie2-options-3
[`-5`/`--trim5`]: #bowtie2-options-5
[`-5`]: #bowtie2-options-5
[`--trim-to`]: #bowtie2-options-trim-to
[`-D`]: #bowtie2-options-D
[`-L`]: #bowtie2-options-L
[`-N`]: #bowtie2-options-N
......
......@@ -36,9 +36,9 @@ HEADERS := $(wildcard *.h)
BOWTIE_MM := 1
BOWTIE_SHARED_MEM :=
ifdef RELEASE_BUILD
LDFLAGS += -L$(CURDIR)/.lib
CPPFLAGS += -I$(CURDIR)/.include
ifdef STATIC_BUILD
LDFLAGS += -L$(CURDIR)/.tmp/lib
CPPFLAGS += -I$(CURDIR)/.tmp/include
endif
# Detect Cygwin or MinGW
......@@ -58,7 +58,7 @@ ifneq (,$(findstring Darwin,$(shell uname)))
ifeq (1,$(shell uname -r | awk -F. '{ if ($$1 > 12 && $$1 < 16) print 1; }'))
CXXFLAGS += -stdlib=libstdc++
endif
ifdef RELEASE_BUILD
ifdef STATIC_BUILD
CXXFLAGS += -mmacosx-version-min=10.9
endif
endif
......@@ -102,7 +102,7 @@ endif
#default is to use Intel TBB
ifneq (1,$(NO_TBB))
LDLIBS += $(PTHREAD_LIB) -ltbb
ifdef RELEASE_BUILD
ifdef STATIC_BUILD
LDLIBS += -ltbbmalloc
else
LDLIBS += -ltbbmalloc_proxy
......@@ -443,8 +443,8 @@ bowtie2-inspect.bat:
echo "@echo off" > bowtie2-inspect.bat
echo "python %~dp0/bowtie2-inspect %*" >> bowtie2-inspect.bat
.PHONY: bowtie2-src
bowtie2-src: $(SRC_PKG_LIST)
.PHONY: bowtie2-src-pkg
bowtie2-src-pkg: $(SRC_PKG_LIST)
chmod a+x scripts/*.sh scripts/*.pl
mkdir .src.tmp
mkdir .src.tmp/bowtie2-$(VERSION)
......@@ -455,9 +455,9 @@ bowtie2-src: $(SRC_PKG_LIST)
cp .src.tmp/bowtie2-$(VERSION)-source.zip .
rm -rf .src.tmp
.PHONY: bowtie2-pkg
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)
.PHONY: bowtie2-bin-pkg
bowtie2-bin-pkg: PKG_DIR := bowtie2-$(VERSION)-$(if $(MACOS),macos,$(if $(MINGW),mingw,linux))-x86_64
bowtie2-bin-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)
......@@ -487,8 +487,9 @@ doc: doc/manual.html MANUAL
doc/manual.html: MANUAL.markdown
echo "<h1>Table of Contents</h1>" > .tmp.head
pandoc -T "Bowtie 2 Manual" -B .tmp.head \
--css style.css -o $@ \
pandoc -B .tmp.head \
--metadata title:"Bowtie 2 Manual"\
--css doc/style.css -o $@ \
--from markdown --to HTML \
--table-of-contents $^
rm -f .tmp.head
......@@ -505,41 +506,42 @@ install: all
.PHONY: simple-test
simple-test: perl-deps both both-debug both-sanitized
eval `perl -I $(CURDIR)/.perllib.tmp/lib/perl5 -Mlocal::lib=$(CURDIR)/.perllib.tmp` ; \
eval `perl -I $(CURDIR)/.tmp/lib/perl5 -Mlocal::lib=$(CURDIR)/.tmp` ; \
sh ./scripts/test/simple_tests.sh
.PHONY: random-test
random-test: all perl-deps
eval `perl -I $(CURDIR)/.perllib.tmp/lib/perl5 -Mlocal::lib=$(CURDIR)/.perllib.tmp` ; \
eval `perl -I $(CURDIR)/.tmp/lib/perl5 -Mlocal::lib=$(CURDIR)/.tmp` ; \
sh ./scripts/sim/run.sh $(if $(NUM_CORES), $(NUM_CORES), 2)
.PHONY: perl-deps
perl-deps:
if [ ! -e .perllib.tmp ]; then \
if [ ! -e .tmp ]; then \
DL=$$([ `which wget` ] && echo "wget --no-check-certificate -O-" || echo "curl -L") ; \
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` ; \
$(CURDIR)/.perllib.tmp/bin/cpanm --force Math::Random Clone Test::Deep Sys::Info ; \
mkdir .tmp ; \
$$DL http://cpanmin.us | perl - -l $(CURDIR)/.tmp App::cpanminus local::lib ; \
eval `perl -I $(CURDIR)/.tmp/lib/perl5 -Mlocal::lib=$(CURDIR)/.tmp` ; \
$(CURDIR)/.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 ; \
if [[ ! -d $(CURDIR)/.tmp/lib || ! -d $(CURDIR)/.tmp/include ]]; then \
mkdir -p $(CURDIR)/.tmp/lib $(CURDIR)/.tmp/include ; \
fi ; \
if [[ `uname` = "Darwin" ]]; then \
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 -LOk") ; \
cd /tmp ; \
mkdir .tmp ; \
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 ; \
$(if $(MINGW), mingw32-make -f win32/Makefile.gcc, ./configure --static && make) && cp libz.a $(CURDIR)/.tmp/lib && cp zconf.h zlib.h $(CURDIR)/.tmp/include ; \
cd .. ; \
$$DL https://github.com/01org/tbb/archive/2017_U8.tar.gz && tar xzf 2017_U8.tar.gz && cd tbb-2017_U8; \
$(if $(MINGW), mingw32-make compiler=gcc arch=ia64 runtime=mingw, make) extra_inc=big_iron.inc -j4 \
&& cp -r include/tbb $(CURDIR)/.include && cp build/*_release/*.a $(CURDIR)/.lib
&& cp -r include/tbb $(CURDIR)/.tmp/include && cp build/*_release/*.a $(CURDIR)/.tmp/lib
.PHONY: test
test: simple-test random-test
......@@ -548,8 +550,7 @@ test: simple-test random-test
clean:
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
bowtie2-*.zip
rm -f core.* .tmp.head
rm -rf *.dSYM
rm -rf .perllib.tmp
rm -rf .include .lib
rm -rf .tmp
......@@ -19,6 +19,35 @@ Please report any issues to the Bowtie 2 Github page or using the Sourceforge bu
Version Release History
=======================
Version 2.3.4.2 - Aug 7, 2018
* Fixed issue causing `bowtie2` to fail in `--fast-local` mode.
* Fixed issue causing `--soft-clipped-unmapped-tlen` to be a positional argument.
* New option `--trim-to N` causes `bowtie2` to trim reads longer
than `N` bases to exactly `N` bases. Can trim from either 3'
or 5' end, e.g. `--trim-to 5:30` trims reads to 30 bases,
truncating at the 5' end.
* Updated "Building from source" manual section with additional
instructions on installing TBB.
* Several other updates to manual, including new mentions of
[Bioconda](http://bioconda.github.io) and
[Biocontainers](https://biocontainers.pro).
* Fixed an issue preventing `bowtie2` from processing more than
one pattern source when running single threaded.
* Fixed an issue causing `bowtie2` and `bowtie2-inspect` to crash if
the index contains a gap-only segment.
* Added experimental BAM input mode `-b`. Works only with unpaired
input reads and BAM files that are sorted by read name (`samtools
sort -n`). BAM input mode also supports the following options:
o `--preserve-sam-tags`: Preserve any optional fields present in BAM record
o `--align-paired-reads`: Paired-end mode for BAM files
* Added experimental cmake support
Thread-scaling paper appears - July 19, 2018
* Our latest work on Bowtie's core thread scaling capabilities
[just appeared Open Access in the journal Bioinformatics](href="https://academic.oup.com/bioinformatics/advance-article/doi/10.1093/bioinformatics/bty648/5055585)
Version 2.3.4.1 - Feb 3, 2018
* Fixed an issue with `--reorder` that caused bowtie2 to crash
......
......@@ -2110,6 +2110,7 @@ void AlnSinkSam::appendMate(
prm, // per-read metrics
sc); // scoring scheme
}
samc_.printPreservedOptFlags(o, rd);
o.append('\n');
}
......
......@@ -80,7 +80,7 @@ def main():
argv.appendleft('--wrapper')
argv.appendleft(build_bin_spec)
logging.info('Command: %s' % ' '.join(argv))
subprocess.call(argv)
sys.exit(subprocess.call(argv))
if __name__ == '__main__':
main()
......@@ -77,7 +77,7 @@ def main():
argv.appendleft('--wrapper')
argv.appendleft(inspect_bin_spec)
logging.info('Command: %s' % ' '.join(argv))
subprocess.call(argv)
sys.exit(subprocess.call(argv))
if __name__ == '__main__':
main()
......@@ -2530,6 +2530,9 @@ TStr Ebwt::join(EList<FileBuf*>& l,
while(!l[i]->eof()) {
RefRecord rec = fastaRefReadAppend(*l[i], first, ret, dstoff, rpcp);
first = false;
if(rec.first && rec.len == 0) {
continue;
}
TIndexOffU bases = rec.len;
assert_eq(rec.off, szs[szsi].off);
assert_eq(rec.len, szs[szsi].len);
......@@ -2596,7 +2599,7 @@ void Ebwt::joinToDisk(
writeU<TIndexOffU>(out1, this->plen()[npat], this->toBe());
}
this->plen()[++npat] = (szs[i].len + szs[i].off);
} else {
} else if(!szs[i].first) {
// edge case, but we could get here with npat == -1
// e.g. when building from a reference of all Ns
if (npat < 0) npat = 0;
......@@ -2639,6 +2642,9 @@ void Ebwt::joinToDisk(
//assert_eq(0, _refnames.back().length());
_refnames.pop_back();
}
if(rec.first && rec.len == 0) {
continue;
}
assert_lt(szsi, szs.size());
assert_eq(rec.off, szs[szsi].off);
assert_eq(rec.len, szs[szsi].len);
......@@ -2646,7 +2652,7 @@ void Ebwt::joinToDisk(
assert(rec.first || rec.off > 0);
ASSERT_ONLY(szsi++);
// Increment seqsRead if this is the first fragment
if(rec.first && rec.len > 0) seqsRead++;
if(rec.first) seqsRead++;
if(bases == 0) continue;
assert_leq(bases, this->plen()[seqsRead-1]);
// Reset the patoff if this is the first fragment
......
......@@ -97,6 +97,7 @@ static int ipause; // pause before maching?
static uint32_t qUpto; // max # of queries to read
static int gTrim5; // amount to trim from 5' end
static int gTrim3; // amount to trim from 3' end
static pair<short, size_t> trimTo; // trim reads exceeding given length from either 3' or 5'-end
static int offRate; // keep default offRate
static bool solexaQuals; // quality strings are solexa quals, not phred, and subtract 64 (not 33)
static bool phred64Quals; // quality chars are phred, but must subtract 64 (not 33)
......@@ -176,6 +177,8 @@ static bool sam_print_zi;
static bool sam_print_zp;
static bool sam_print_zu;
static bool sam_print_zt;
static bool preserve_sam_tags; // Only applies when aligning BAM files
static bool align_paired_reads; // Process only the paired reads in BAM file
static bool bwaSwLike;
static bool gSeedLenIsSet;
static float bwaSwLikeC;
......@@ -288,6 +291,7 @@ static void resetOptions() {
qUpto = 0xffffffff; // max # of queries to read
gTrim5 = 0; // amount to trim from 5' end
gTrim3 = 0; // amount to trim from 3' end
trimTo = pair<short, size_t>(5, 0); // default: don't do any trimming
offRate = -1; // keep default offRate
solexaQuals = false; // quality strings are solexa quals, not phred, and subtract 64 (not 33)
phred64Quals = false; // quality chars are phred, but must subtract 64 (not 33)
......@@ -369,6 +373,8 @@ static void resetOptions() {
sam_print_zp = false;
sam_print_zu = false;
sam_print_zt = false;
preserve_sam_tags = false;
align_paired_reads = false;
bwaSwLike = false;
gSeedLenIsSet = false;
bwaSwLikeC = 5.5f;
......@@ -455,7 +461,7 @@ static void resetOptions() {
logDpsOpp.clear(); // log mate-search dynamic programming problems
}
static const char *short_options = "fF:qbzhcu:rv:s:aP:t3:5:w:p:k:M:1:2:I:X:CQ:N:i:L:U:x:S:g:O:D:R:";
static const char *short_options = "bfF:qbzhcu:rv:s:aP:t3:5:w:p:k:M:1:2:I:X:CQ:N:i:L:U:x:S:g:O:D:R:";
static struct option long_options[] = {
{(char*)"verbose", no_argument, 0, ARG_VERBOSE},
......@@ -643,6 +649,9 @@ static struct option long_options[] = {
{(char*)"xeq", no_argument, 0, ARG_XEQ},
{(char*)"thread-ceiling", required_argument, 0, ARG_THREAD_CEILING},
{(char*)"thread-piddir", required_argument, 0, ARG_THREAD_PIDDIR},
{(char*)"trim-to", required_argument, 0, ARG_TRIM_TO},
{(char*)"preserve-sam-tags", no_argument, 0, ARG_PRESERVE_SAM_TAGS},
{(char*)"align-paired-reads", no_argument, 0, ARG_ALIGN_PAIRED_READS},
{(char*)0, 0, 0, 0} // terminator
};
......@@ -736,6 +745,8 @@ static void printUsage(ostream& out) {
<< " -u/--upto <int> stop after first <int> reads/pairs (no limit)" << endl
<< " -5/--trim5 <int> trim <int> bases from 5'/left end of reads (0)" << endl
<< " -3/--trim3 <int> trim <int> bases from 3'/right end of reads (0)" << endl
<< " --trim-to [3:|5:]<int> trim reads exceeding <int> bases from either 3' or 5' end" << endl
<< " If the read end is not specified then it defaults to 3 (0)" << endl
<< " --phred33 qualities are Phred+33 (default)" << endl
<< " --phred64 qualities are Phred+64" << endl
<< " --int-quals qualities encoded as space-delimited integers" << endl
......@@ -944,6 +955,12 @@ static string applyPreset(const string& sorig, Presets& presets) {
static bool saw_M;
static bool saw_a;
static bool saw_k;
static bool saw_trim3;
static bool saw_trim5;
static bool saw_trim_to;
static bool saw_bam;
static bool saw_preserve_sam_tags;
static bool saw_align_paired_reads;
static EList<string> presetList;
/**
......@@ -983,6 +1000,11 @@ static void parseOption(int next_option, const char *arg) {
case ARG_TAB5: tokenize(arg, ",", mates12); format = TAB_MATE5; break;
case ARG_TAB6: tokenize(arg, ",", mates12); format = TAB_MATE6; break;
case ARG_INTERLEAVED_FASTQ: tokenize(arg, ",", mates12); format = INTERLEAVED; break;
case 'b': {
format = BAM;
saw_bam = true;
break;
}
case 'f': format = FASTA; break;
case 'F': {
format = FASTA_CONT;
......@@ -1026,6 +1048,16 @@ static void parseOption(int next_option, const char *arg) {
case ARG_SEED_SUMM: seedSumm = true; break;
case ARG_SC_UNMAPPED: scUnMapped = true; break;
case ARG_XEQ: xeq = true; break;
case ARG_PRESERVE_SAM_TAGS: {
preserve_sam_tags = true;
saw_preserve_sam_tags = true;
break;
}
case ARG_ALIGN_PAIRED_READS: {
align_paired_reads = true;
saw_align_paired_reads = true;
break;
}
case ARG_MM: {
#ifdef BOWTIE_MM
useMm = true;
......@@ -1101,6 +1133,26 @@ static void parseOption(int next_option, const char *arg) {
break;
case '3': gTrim3 = parseInt(0, "-3/--trim3 arg must be at least 0", arg); break;
case '5': gTrim5 = parseInt(0, "-5/--trim5 arg must be at least 0", arg); break;
case ARG_TRIM_TO: {
if (strlen(arg) > 1 && arg[1] != ':') {
trimTo.first = 3;
trimTo.second = parseInt(0, "--trim-to: the number of bases to trim must be at least 0", arg);
break;
}
pair<int, int> res = parsePair<int>(arg, ':');
if (res.first != 3 && res.first != 5) {
cerr << "--trim-to: trim position must be either 3 or 5" << endl;
printUsage(cerr);
throw 1;
}
if(res.second < 0) {
cerr << "--trim-to: the number bases to trim must be at least 0" << endl;
printUsage(cerr);
throw 1;
}
trimTo = static_cast<pair<short, size_t> >(res);
break;
}
case 'h': printUsage(cout); throw 0; break;
case ARG_USAGE: printUsage(cout); throw 0; break;
//
......@@ -1468,12 +1520,6 @@ static void parseOption(int next_option, const char *arg) {
printUsage(cerr);
throw 1;
}
if (!localAlign && scUnMapped) {
scUnMapped = false;
cerr << "WARNING: --soft-clipped-unmapped-tlen can only be set for "
<< "local alignment... ignoring" << endl;
}
}
/**
......@@ -1485,6 +1531,12 @@ static void parseOptions(int argc, const char **argv) {
saw_M = false;
saw_a = false;
saw_k = false;
saw_trim3 = false;
saw_trim5 = false;
saw_trim_to = false;
saw_bam = false;
saw_preserve_sam_tags = false;
saw_align_paired_reads = false;
presetList.clear();
if(startVerbose) { cerr << "Parsing options: "; logTime(cerr, true); }
while(true) {
......@@ -1503,6 +1555,27 @@ static void parseOptions(int argc, const char **argv) {
}
parseOption(next_option, arg);
}
if (!localAlign && scUnMapped) {
cerr << "ERROR: --soft-clipped-unmapped-tlen can only be set for local alignments." << endl;
exit(1);
}
if ((saw_trim3 || saw_trim5) && saw_trim_to) {
cerr << "ERROR: --trim5/--trim3 and --trim-to are mutually exclusive "
<< "options." << endl;
exit(1);
}
if (!saw_bam && saw_preserve_sam_tags) {
cerr << "--preserve_sam_tag can only be used when aligning BAM reads." << endl;
exit(1);
}
if (!saw_bam && saw_align_paired_reads) {
cerr << "--align-paired-reads can only be used when aligning BAM reads." << endl;
exit(1);
}
// Now parse all the presets. Might want to pick which presets version to
// use according to other parameters.
auto_ptr<Presets> presets(new PresetsV0());
......@@ -4717,11 +4790,14 @@ static void driver(
integerQuals, // true -> qualities are space-separated numbers
gTrim5, // amt to hard clip from 5' end
gTrim3, // amt to hard clip from 3' end
trimTo, // trim reads exceeding given length from either 3' or 5'-end
fastaContLen, // length of sampled reads for FastaContinuous...
fastaContFreq, // frequency of sampled reads for FastaContinuous...
skipReads, // skip the first 'skip' patterns
nthreads, //number of threads for locking
outType != OUTPUT_SAM // whether to fix mate names
outType != OUTPUT_SAM, // whether to fix mate names
preserve_sam_tags, // keep existing SAM tags when aligning BAM files
align_paired_reads // Align only the paired reads in BAM file
);
if(gVerbose || startVerbose) {
cerr << "Creating PatternSource: "; logTime(cerr, true);
......
bowtie2 (2.3.4.2-1) unstable; urgency=medium
* New upstream version 2.3.4.2
* Bump Standards-Version to 4.2.0
* Refresh patches
* Add patch fixing interpreter for bowite2 scripts
* Add patch removing reference to js lib for ie...
* Update uploader's email
-- Alexandre Mestiashvili <mestia@debian.org> Tue, 14 Aug 2018 13:31:56 +0200
bowtie2 (2.3.4.1-2) unstable; urgency=medium
* Team upload.
......
Source: bowtie2
Maintainer: Debian Med Packaging Team <debian-med-packaging@lists.alioth.debian.org>
Uploaders: Alexandre Mestiashvili <alex@biotec.tu-dresden.de>,
Uploaders: Alexandre Mestiashvili <mestia@debian.org>,
Andreas Tille <tille@debian.org>
Section: science
Priority: optional
......@@ -12,7 +12,7 @@ Build-Depends: debhelper (>= 11),
libtest-deep-perl,
libclone-perl,
zlib1g-dev
Standards-Version: 4.1.4
Standards-Version: 4.2.0
Vcs-Browser: https://salsa.debian.org/med-team/bowtie2
Vcs-Git: https://salsa.debian.org/med-team/bowtie2.git
Homepage: http://bowtie-bio.sourceforge.net/bowtie2
......
Description: Remove link to external js lib, not needed as used for ie browsers
Author: Alex Mestiashvili <amestia@rsh2.donotuse.de>
Forwarded: not-needed
--- bowtie2.orig/doc/manual.html
+++ bowtie2/doc/manual.html
@@ -12,9 +12,6 @@
div.column{display: inline-block; vertical-align: top; width: 50%;}
</style>
<link rel="stylesheet" href="doc/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>
......@@ -70,7 +70,7 @@ Author: Sascha Steinbiss <sascha@steinbiss.name>
--- bowtie2.orig/bt2_search.cpp
+++ bowtie2/bt2_search.cpp
@@ -5006,15 +5006,15 @@
@@ -5082,15 +5082,15 @@
} else {
cout << "Neither 32- nor 64-bit: sizeof(void*) = " << sizeof(void*) << endl;
}
......
drop-not-needed-js-from-manual.patch
wrong-interpreter-path.patch
indentation.patch
hardening.patch
reproducible.patch
......
......@@ -165,31 +165,31 @@ Description: Math::Random is in package libmath-random-perl which is
print STDERR "DONE\n";
--- bowtie2.orig/Makefile
+++ bowtie2/Makefile
@@ -506,12 +506,12 @@
@@ -507,12 +507,12 @@
done
.PHONY: simple-test
-simple-test: perl-deps both both-debug both-sanitized
+simple-test: all
eval `perl -I $(CURDIR)/.perllib.tmp/lib/perl5 -Mlocal::lib=$(CURDIR)/.perllib.tmp` ; \
eval `perl -I $(CURDIR)/.tmp/lib/perl5 -Mlocal::lib=$(CURDIR)/.tmp` ; \
sh ./scripts/test/simple_tests.sh
.PHONY: random-test
-random-test: all perl-deps
+random-test: all
eval `perl -I $(CURDIR)/.perllib.tmp/lib/perl5 -Mlocal::lib=$(CURDIR)/.perllib.tmp` ; \
eval `perl -I $(CURDIR)/.tmp/lib/perl5 -Mlocal::lib=$(CURDIR)/.tmp` ; \
sh ./scripts/sim/run.sh $(if $(NUM_CORES), $(NUM_CORES), 2)
@@ -522,7 +522,6 @@
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` ; \
- $(CURDIR)/.perllib.tmp/bin/cpanm --force Math::Random Clone Test::Deep Sys::Info ; \
@@ -523,7 +523,6 @@
mkdir .tmp ; \
$$DL http://cpanmin.us | perl - -l $(CURDIR)/.tmp App::cpanminus local::lib ; \
eval `perl -I $(CURDIR)/.tmp/lib/perl5 -Mlocal::lib=$(CURDIR)/.tmp` ; \
- $(CURDIR)/.tmp/bin/cpanm --force Math::Random Clone Test::Deep Sys::Info ; \
fi
.PHONY: static-libs
@@ -544,7 +543,7 @@
&& cp -r include/tbb $(CURDIR)/.include && cp build/*_release/*.a $(CURDIR)/.lib
@@ -546,7 +545,7 @@
&& cp -r include/tbb $(CURDIR)/.tmp/include && cp build/*_release/*.a $(CURDIR)/.tmp/lib
.PHONY: test
-test: simple-test random-test
......
Description: Use path to interpreter instead of /usr/bin/env
Author: Alex Mestiashvili <amestia@rsh2.donotuse.de>
Forwarded: not-needed
--- bowtie2.orig/bowtie2
+++ bowtie2/bowtie2
@@ -1,4 +1,4 @@
-#!/usr/bin/env perl
+#!/usr/bin/perl
#
# Copyright 2011, Ben Langmead <langmea@cs.jhu.edu>
--- bowtie2.orig/bowtie2-build
+++ bowtie2/bowtie2-build
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python
"""
Copyright 2014, Ben Langmead <langmea@cs.jhu.edu>
--- bowtie2.orig/bowtie2-inspect
+++ bowtie2/bowtie2-inspect
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python
"""
Copyright 2014, Ben Langmead <langmea@cs.jhu.edu>
......@@ -4,14 +4,14 @@
<meta charset="utf-8" />
<meta name="generator" content="pandoc" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
<title>Bowtie 2 Manual – Bowtie 2 Manual</title>
<title>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;}
span.underline{text-decoration: underline;}
div.column{display: inline-block; vertical-align: top; width: 50%;}
</style>
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="doc/style.css" />
<!--[if lt IE 9]>
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
<![endif]-->
......@@ -24,10 +24,8 @@
<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>
</ul></li>
<li><a href="#obtaining-bowtie-2">Obtaining Bowtie 2</a><ul>
<li><a href="#building-from-source">Building from source</a></li>
......@@ -105,10 +103,14 @@
! of this text document, or see the HTML manual online.
! -->
<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 Transform</a> or <a href="http://en.wikipedia.org/wiki/Burrows-Wheeler_transform">BWT</a>) 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, local, and paired-end alignment modes. Multiple processors can be used simultaneously to achieve greater alignment speed. <a href="http://cufflinks.cbcb.umd.edu/">Cufflinks</a>: a tool for transcriptome assembly and isoform quantitiation from Bowtie 2 outputs alignments in <a href="http://samtools.sourceforge.net/SAM1.pdf">SAM</a> format, enabling interoperation with a large number of other tools (e.g. <a href="http://samtools.sourceforge.net">SAMtools</a>, <a href="http://www.broadinstitute.org/gsa/wiki/index.php/The_Genome_Analysis_Toolkit">GATK</a>) that use SAM. Bowtie 2 is distributed under the <a href="http://www.gnu.org/licenses/gpl-3.0.html">GPLv3 license</a>, and it runs on the command line under Windows, Mac OS X and Linux.</p>
<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 for RNA-seq reads, RNA-seq reads, <a href="http://bowtie-bio.sf.net/crossbow">Crossbow</a>: a cloud-enabled software tool for analyzing resequencing data, and <a href="http://bowtie-bio.sf.net/myrna">Myrna</a>: a cloud-enabled software tool for aligning RNA-seq reads and measuring differential gene expression.</p>
<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>
<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 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 Transform</a> or <a href="http://en.wikipedia.org/wiki/Burrows-Wheeler_transform">BWT</a>) 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, local, and paired-end alignment modes. Multiple processors can be used simultaneously to achieve greater alignment speed.</p>
<p>Bowtie 2 outputs alignments in <a href="http://samtools.sourceforge.net/SAM1.pdf">SAM</a> format, enabling interoperation with a large number of other tools (e.g. <a href="http://samtools.sourceforge.net">SAMtools</a>, <a href="http://www.broadinstitute.org/gsa/wiki/index.php/The_Genome_Analysis_Toolkit">GATK</a>) that use SAM. Bowtie 2 is distributed under the <a href="http://www.gnu.org/licenses/gpl-3.0.html">GPLv3 license</a>, and it runs on the command line under Windows, Mac OS X and Linux.</p>
<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 many other tools, some of which <a href="http://bowtie-bio.sourceforge.net/bowtie2/other_tools.shtml">are listed here</a>.</p>
<p>If you use <a href="http://bowtie-bio.sf.net/bowtie2">Bowtie 2</a> for your published research, please cite our work. Papers describing Bowtie 2 are:</p>
<ul>
<li><p>Langmead B, Wilks C, Antonescu V, Charles R. <a href="https://doi.org/10.1093/bioinformatics/bty648">Scaling read aligners to hundreds of threads on general-purpose processors</a>. <em>Bioinformatics</em>. 2018 Jul 18. doi: 10.1093/bioinformatics/bty648.</p></li>
<li><p>Langmead B, Salzberg SL. <a href="https://www.nature.com/articles/nmeth.1923">Fast gapped-read alignment with Bowtie 2</a>. <em>Nature Methods</em>. 2012 Mar 4;9(4):357-9. doi: 10.1038/nmeth.1923.</p></li>
</ul>
<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>
......@@ -125,17 +127,115 @@
</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 by recent sequencers, such as the Illumina HiSeq 2000, Roche 454, and Ion Torrent instruments.</p>
<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.ncbi.nlm.nih.gov/Blast.cgi">BLAST</a>. These tools can be extremely slow when the reference genome is long, but are often adequate when the reference is short.</p>
<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>
<p>Bowtie 2 is geared toward aligning relatively short sequencing reads to long genomes. That said, it handles arbitrarily small reference sequences ( e.g. amplicons) and very long reads (i.e. upwards of 10s or 100s of kilobases), though it is slower in those settings. It is optimized for the read lengths and error modes yielded by typical Illumina sequencers.</p>
<p>Bowtie 2 does not support alignment of colorspace reads. (Bowtie 1 does.)</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>Bowtie 2 is available from various package managers, notably <a href="https://anaconda.org/bioconda/bowtie2">Bioconda</a>. With Bioconda installed, you should be able to install Bowtie 2 with <code>conda install bowtie2</code>.</p>
<p>Containerized versions of Bowtie 2 are also available via the <a href="https://BioContainers.pro">Biocontainers</a> project (e.g. <a href="https://hub.docker.com/r/biocontainers/bowtie2/">via Docker Hub</a>).</p>
<p>You can also 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 <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. (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.</p>
<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>make</code> from the MSYS environment.</p>
<p>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. <code>make</code> prints an error like <code>tbb/mutex.h: No such file or directory</code>), you can install it yourself (see <a href="https://www.threadingbuildingblocks.org">Threading Building Blocks library</a>) or build Bowtie 2 with <code>make NO_TBB=1</code> to use pthreads or Windows native multithreading instead.</p>
<p>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. <code>make</code> prints an error like <code>tbb/mutex.h: No such file or directory</code>), you can install it yourself from source (see <a href="https://www.threadingbuildingblocks.org">Threading Building Blocks library</a>) or install it using your operating system’s preferred package manager. The table below list some of the commands for a few of the more popular operating systems.</p>
<table>
<tr>
<th>
OS
</th>
<th>
Sync Package List
</th>
<th>
Search
</th>
<th>
Install
</th>
</tr>
<tr>
<td>
Ubuntu, Mint, Debian
</td>
<td>
<pre><code>apt-get update</code></pre>
</td>
<td>
<pre><code>apt-cache search tbb</code></pre>
</td>
<td>
<pre><code>apt-get install libtbb-dev</code></pre>
</td>
</tr>
<tr>
<td>
Fedora, CentOS
</td>
<td>
<pre><code>yum check-update</code></pre>
</td>
<td>
<p>yum search tbb</p>
</td>
<td>
<pre><code>yum install tbb-devel.x86_64</code></pre>
</td>
</tr>
<tr>
<td>
Arch
</td>
<td>
<pre><code>packman -Sy</code></pre>
</td>
<td>
<pre><code>pacman -Ss tbb</code></pre>
</td>
<td>
<pre><code>pacman -S extra/intel-tbb</code></pre>
</td>
</tr>
<tr>
<td>
Gentoo
</td>
<td>
<pre><code>emerge --sync</code></pre>
</td>
<td>
<pre><code>emerge --search tbb</code></pre>
</td>
<td>
<pre><code>emerge dev-cpp/tbb</code></pre>
</td>
<tr>
<td>
MacOS
</td>
<td>
<pre><code>brew update</code></pre>
</td>
<td>
<pre><code>brew search tbb</code></pre>
</td>
<td>
<pre><code>brew install tbb</code></pre>
</td>
</tr>
<tr>
<td>
FreeBSD
</td>
<td>
<pre><code>portsnap fetch update</code></pre>
</td>
<td>
<pre><code>make search name=tbb</code></pre>
</td>
<td>
<pre><code>cd /usr/ports/devel/tbb &amp;&amp; make install &amp;&amp; make clean</code></pre>
</table>
<p>The Bowtie 2 Makefile also includes recipes for basic automatic dependency management. Running <code>make static-libs &amp;&amp; make STATIC_BUILD=1</code> will issue a series of commands that will: 1. download TBB and zlib 2. compile them as static libraries 3. link the resulting libraries to the compiled Bowtie 2 binaries</p>
<p>If all fails Bowtie 2 can be built with <code>make NO_TBB=1</code> to use pthreads or Windows native multithreading instead.</p>
<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="http://en.wikipedia.org/wiki/PATH_(variable)">PATH</a>.</p>
<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-l</code>.</p>
......@@ -465,6 +565,14 @@ Reads are substrings (k-mers) extracted from a FASTA file <code>&lt;s&gt;</code>
</td>
</tr>
<tr>
<td id="bowtie2-options-trim-to">
<pre><code>--trim-to [3:|5:]&lt;int&gt;</code></pre>
</td>
<td>
<p>Trim reads exceeding <code>&lt;int&gt;</code> bases. Bases will be trimmed from either the 3’ (right) or 5’ (left) end of the read. If the read end if not specified, bowtie 2 will default to trimming from the 3’ (right) end of the read. <a href="#bowtie2-options-trim-to"><code>--trim-to</code></a> and <a href="#bowtie2-options-3"><code>-3</code></a>/<a href="#bowtie2-options-5"><code>-5</code></a> are mutually exclusive.</p>
</td>
</tr>
<tr>
<td id="bowtie2-options-phred33-quals">
<pre><code>--phred33</code></pre>
</td>
......@@ -969,11 +1077,11 @@ Seed 4 rc: TTATGCATGA</code></pre>
</td>
</tr>
<tr>
<td id="bowtie2-options-soft-clipped-unmapped-tlen-sec-seq">
<td id="bowtie2-options-soft-clipped-unmapped-tlen">
<pre><code>--soft-clipped-unmapped-tlen</code></pre>
</td>
<td>
<p>Consider soft-clipped bases unmapped when calculating <code>TLEN</code>.</p>
<p>Consider soft-clipped bases unmapped when calculating <code>TLEN</code>. Only available in <a href="#bowtie2-options-local"><code>--local</code></a> mode.</p>
</td>
</tr>
<tr>
......
<h1>Table of Contents</h1>
<p>&nbsp;Version <b>2.3.4.1</b></p>
<!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">
<head>
<title>Bowtie 2 Manual - </title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="pandoc" />
<link rel="stylesheet" href="style.css" type="text/css" />
</head>
<body>
<div id="TOC">
<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>
</ul></li>
<li><a href="#obtaining-bowtie-2">Obtaining Bowtie 2</a><ul>
<li><a href="#building-from-source">Building from source</a></li>
......@@ -87,17 +74,21 @@
<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
! of this text document, or see the HTML manual online.
! -->
<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 Transform</a> or <a href="http://en.wikipedia.org/wiki/Burrows-Wheeler_transform">BWT</a>) 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, local, and paired-end alignment modes. Multiple processors can be used simultaneously to achieve greater alignment speed. <a href="http://cufflinks.cbcb.umd.edu/">Cufflinks</a>: a tool for transcriptome assembly and isoform quantitiation from Bowtie 2 outputs alignments in <a href="http://samtools.sourceforge.net/SAM1.pdf">SAM</a> format, enabling interoperation with a large number of other tools (e.g. <a href="http://samtools.sourceforge.net">SAMtools</a>, <a href="http://www.broadinstitute.org/gsa/wiki/index.php/The_Genome_Analysis_Toolkit">GATK</a>) that use SAM. Bowtie 2 is distributed under the <a href="http://www.gnu.org/licenses/gpl-3.0.html">GPLv3 license</a>, and it runs on the command line under Windows, Mac OS X and Linux.</p>
<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 for RNA-seq reads, RNA-seq reads, <a href="http://bowtie-bio.sf.net/crossbow">Crossbow</a>: a cloud-enabled software tool for analyzing resequencing data, and <a href="http://bowtie-bio.sf.net/myrna">Myrna</a>: a cloud-enabled software tool for aligning RNA-seq reads and measuring differential gene expression.</p>
<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>
<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 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 Transform</a> or <a href="http://en.wikipedia.org/wiki/Burrows-Wheeler_transform">BWT</a>) 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, local, and paired-end alignment modes. Multiple processors can be used simultaneously to achieve greater alignment speed.</p>
<p>Bowtie 2 outputs alignments in <a href="http://samtools.sourceforge.net/SAM1.pdf">SAM</a> format, enabling interoperation with a large number of other tools (e.g. <a href="http://samtools.sourceforge.net">SAMtools</a>, <a href="http://www.broadinstitute.org/gsa/wiki/index.php/The_Genome_Analysis_Toolkit">GATK</a>) that use SAM. Bowtie 2 is distributed under the <a href="http://www.gnu.org/licenses/gpl-3.0.html">GPLv3 license</a>, and it runs on the command line under Windows, Mac OS X and Linux.</p>
<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 many other tools, some of which <a href="http://bowtie-bio.sourceforge.net/bowtie2/other_tools.shtml">are listed here</a>.</p>
<p>If you use <a href="http://bowtie-bio.sf.net/bowtie2">Bowtie 2</a> for your published research, please cite our work. Papers describing Bowtie 2 are:</p>
<ul>
<li><p>Langmead B, Wilks C, Antonescu V, Charles R. <a href="https://doi.org/10.1093/bioinformatics/bty648">Scaling read aligners to hundreds of threads on general-purpose processors</a>. <em>Bioinformatics</em>. 2018 Jul 18. doi: 10.1093/bioinformatics/bty648.</p></li>
<li><p>Langmead B, Salzberg SL. <a href="https://www.nature.com/articles/nmeth.1923">Fast gapped-read alignment with Bowtie 2</a>. <em>Nature Methods</em>. 2012 Mar 4;9(4):357-9. doi: 10.1038/nmeth.1923.</p></li>
</ul>
<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>
......@@ -114,17 +105,115 @@
</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 by recent sequencers, such as the Illumina HiSeq 2000, Roche 454, and Ion Torrent instruments.</p>
<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.ncbi.nlm.nih.gov/Blast.cgi">BLAST</a>. These tools can be extremely slow when the reference genome is long, but are often adequate when the reference is short.</p>
<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>
<p>Bowtie 2 is geared toward aligning relatively short sequencing reads to long genomes. That said, it handles arbitrarily small reference sequences ( e.g. amplicons) and very long reads (i.e. upwards of 10s or 100s of kilobases), though it is slower in those settings. It is optimized for the read lengths and error modes yielded by typical Illumina sequencers.</p>
<p>Bowtie 2 does not support alignment of colorspace reads. (Bowtie 1 does.)</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>Bowtie 2 is available from various package managers, notably <a href="https://anaconda.org/bioconda/bowtie2">Bioconda</a>. With Bioconda installed, you should be able to install Bowtie 2 with <code>conda install bowtie2</code>.</p>
<p>Containerized versions of Bowtie 2 are also available via the <a href="https://BioContainers.pro">Biocontainers</a> project (e.g. <a href="https://hub.docker.com/r/biocontainers/bowtie2/">via Docker Hub</a>).</p>
<p>You can also 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 <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 prepared with most of the toolchains needed.</p>
<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. (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.</p>
<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>make</code> from the MSYS environment.</p>
<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 multithreading if possible. We recommend that you first install the <a href="https://www.threadingbuildingblocks.org">Threading Building Blocks library</a>, but if unable to do so please specify <code>make NO_TBB=1</code>. TBB comes installed by default on many popular Linux distros. Please note, packages built without TBB will have <em>-legacy</em> appended to the name.</p>
<p>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. <code>make</code> prints an error like <code>tbb/mutex.h: No such file or directory</code>), you can install it yourself from source (see <a href="https://www.threadingbuildingblocks.org">Threading Building Blocks library</a>) or install it using your operating system’s preferred package manager. The table below list some of the commands for a few of the more popular operating systems.</p>
<table>
<tr>
<th>
OS
</th>
<th>
Sync Package List
</th>
<th>
Search
</th>
<th>
Install
</th>
</tr>
<tr>
<td>
Ubuntu, Mint, Debian
</td>
<td>
<pre><code>apt-get update</code></pre>
</td>
<td>
<pre><code>apt-cache search tbb</code></pre>
</td>
<td>
<pre><code>apt-get install libtbb-dev</code></pre>
</td>
</tr>
<tr>
<td>
Fedora, CentOS
</td>
<td>
<pre><code>yum check-update</code></pre>
</td>
<td>
<p>yum search tbb</p>
</td>
<td>
<pre><code>yum install tbb-devel.x86_64</code></pre>
</td>
</tr>
<tr>
<td>
Arch
</td>
<td>
<pre><code>packman -Sy</code></pre>
</td>
<td>
<pre><code>pacman -Ss tbb</code></pre>
</td>
<td>
<pre><code>pacman -S extra/intel-tbb</code></pre>
</td>
</tr>
<tr>
<td>
Gentoo
</td>
<td>
<pre><code>emerge --sync</code></pre>
</td>
<td>
<pre><code>emerge --search tbb</code></pre>
</td>
<td>
<pre><code>emerge dev-cpp/tbb</code></pre>
</td>
<tr>
<td>
MacOS
</td>
<td>
<pre><code>brew update</code></pre>
</td>
<td>
<pre><code>brew search tbb</code></pre>
</td>
<td>
<pre><code>brew install tbb</code></pre>
</td>
</tr>
<tr>
<td>
FreeBSD
</td>
<td>
<pre><code>portsnap fetch update</code></pre>
</td>
<td>
<pre><code>make search name=tbb</code></pre>
</td>
<td>
<pre><code>cd /usr/ports/devel/tbb &amp;&amp; make install &amp;&amp; make clean</code></pre>
</table>
<p>The Bowtie 2 Makefile also includes recipes for basic automatic dependency management. Running <code>make static-libs &amp;&amp; make STATIC_BUILD=1</code> will issue a series of commands that will: 1. download TBB and zlib 2. compile them as static libraries 3. link the resulting libraries to the compiled Bowtie 2 binaries</p>
<p>If all fails Bowtie 2 can be built with <code>make NO_TBB=1</code> to use pthreads or Windows native multithreading instead.</p>
<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="http://en.wikipedia.org/wiki/PATH_(variable)">PATH</a>.</p>
<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-l</code>.</p>
......@@ -454,6 +543,14 @@ Reads are substrings (k-mers) extracted from a FASTA file <code>&lt;s&gt;</code>
</td>
</tr>
<tr>
<td id="bowtie2-options-trim-to">
<pre><code>--trim-to [3:|5:]&lt;int&gt;</code></pre>
</td>
<td>
<p>Trim reads exceeding <code>&lt;int&gt;</code> bases. Bases will be trimmed from either the 3’ (right) or 5’ (left) end of the read. If the read end if not specified, bowtie 2 will default to trimming from the 3’ (right) end of the read. <a href="#bowtie2-options-trim-to"><code>--trim-to</code></a> and <a href="#bowtie2-options-3"><code>-3</code></a>/<a href="#bowtie2-options-5"><code>-5</code></a> are mutually exclusive.</p>
</td>
</tr>
<tr>
<td id="bowtie2-options-phred33-quals">
<pre><code>--phred33</code></pre>
</td>
......@@ -958,11 +1055,11 @@ Seed 4 rc: TTATGCATGA</code></pre>
</td>
</tr>
<tr>
<td id="bowtie2-options-soft-clipped-unmapped-tlen-sec-seq">
<td id="bowtie2-options-soft-clipped-unmapped-tlen">
<pre><code>--soft-clipped-unmapped-tlen</code></pre>
</td>
<td>
<p>Consider soft-clipped bases unmapped when calculating <code>TLEN</code>.</p>
<p>Consider soft-clipped bases unmapped when calculating <code>TLEN</code>. Only available in <a href="#bowtie2-options-local"><code>--local</code></a> mode.</p>
</td>
</tr>
<tr>
......