Imported Upstream version 2.0.0-beta5

parents
Ben Langmead <blangmea@jhsph.edu> wrote Bowtie 2, which is based partially on
Bowtie. Bowtie was written by Ben Langmead and Cole Trapnell.
Bowtie & Bowtie 2: http://bowtie-bio.sf.net
A DLL from the pthreads for Win32 library is distributed with the Win32 version
of Bowtie 2. The pthreads for Win32 library and the GnuWin32 package have many
contributors (see their respective web sites).
pthreads for Win32: http://sourceware.org/pthreads-win32
GnuWin32: http://gnuwin32.sf.net
The ForkManager.pm perl module is used in Bowtie 2's random testing framework,
and is included as scripts/sim/contrib/ForkManager.pm. ForkManager.pm is
written by dLux (Szabo, Balazs), with contributions by others. See the perldoc
in ForkManager.pm for the complete list.
The file ls.h includes an implementation of the Larsson-Sadakane suffix sorting
algorithm. The implementation is by N. Jesper Larsson and was adapted somewhat
for use in Bowtie 2.
Various users have kindly supplied patches, bug reports and feature requests
over the years. Many, many thanks go to them.
September 2011
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
#
# Copyright 2011, Ben Langmead <blangmea@jhsph.edu>
#
# This file is part of Bowtie 2.
#
# Bowtie 2 is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Bowtie 2 is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Bowtie 2. If not, see <http://www.gnu.org/licenses/>.
#
#
# Makefile for bowtie, bowtie2-build, bowtie2-inspect
#
INC =
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_PTHREADS = 1
BOWTIE_MM = 1
BOWTIE_SHARED_MEM = 0
# Detect Cygwin or MinGW
WINDOWS = 0
ifneq (,$(findstring CYGWIN,$(shell uname)))
WINDOWS = 1
# POSIX memory-mapped files not currently supported on Windows
BOWTIE_MM = 0
BOWTIE_SHARED_MEM = 0
else
ifneq (,$(findstring MINGW,$(shell uname)))
WINDOWS = 1
# POSIX memory-mapped files not currently supported on Windows
BOWTIE_MM = 0
BOWTIE_SHARED_MEM = 0
endif
endif
MACOS = 0
ifneq (,$(findstring Darwin,$(shell uname)))
MACOS = 1
endif
MM_DEF =
ifeq (1,$(BOWTIE_MM))
MM_DEF = -DBOWTIE_MM
endif
SHMEM_DEF =
ifeq (1,$(BOWTIE_SHARED_MEM))
SHMEM_DEF = -DBOWTIE_SHARED_MEM
endif
PTHREAD_PKG =
PTHREAD_LIB =
PTHREAD_DEF =
ifeq (1,$(BOWTIE_PTHREADS))
PTHREAD_DEF = -DBOWTIE_PTHREADS
ifeq (1,$(WINDOWS))
# pthreads for windows forces us to be specific about the library
PTHREAD_LIB = -lpthreadGC2
PTHREAD_PKG = pthreadGC2.dll
else
# There's also -pthread, but that only seems to work on Linux
PTHREAD_LIB = -lpthread
endif
endif
PREFETCH_LOCALITY = 2
PREF_DEF = -DPREFETCH_LOCALITY=$(PREFETCH_LOCALITY)
LIBS =
SEARCH_LIBS = $(PTHREAD_LIB)
BUILD_LIBS =
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
SEARCH_CPPS = qual.cpp pat.cpp sam.cpp \
read_qseq.cpp aligner_seed_policy.cpp \
aligner_seed.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 \
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
SEARCH_CPPS_MAIN = $(SEARCH_CPPS) bowtie_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)
EXTRA_FLAGS =
# Convert BITS=?? to a -m flag
BITS=32
ifeq (x86_64,$(shell uname -m))
BITS=64
endif
BITS_FLAG =
ifeq (32,$(BITS))
BITS_FLAG = -m32
endif
ifeq (64,$(BITS))
BITS_FLAG = -m64
endif
SSE_FLAG=-msse2
DEBUG_FLAGS = -O0 -g3 $(BITS_FLAG) $(SSE_FLAG)
DEBUG_DEFS = -DCOMPILER_OPTIONS="\"$(DEBUG_FLAGS) $(EXTRA_FLAGS)\""
RELEASE_FLAGS = -O3 $(BITS_FLAG) $(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 \
bowtie2-align \
bowtie2-inspect
BOWTIE2_BIN_LIST_AUX = bowtie2-build-debug \
bowtie2-align-debug \
bowtie2-inspect-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 \
AUTHORS \
COPYING \
NEWS \
MANUAL \
MANUAL.markdown \
TUTORIAL \
VERSION
# This is helpful on Windows under MinGW/MSYS, where Make might go for
# the Windows FIND tool instead.
FIND=$(shell which find)
SRC_PKG_LIST = $(wildcard *.h) \
$(wildcard *.hh) \
$(wildcard *.c) \
$(wildcard *.cpp) \
doc/strip_markdown.pl \
Makefile \
$(GENERAL_LIST)
BIN_PKG_LIST = $(GENERAL_LIST)
.PHONY: all allall both both-debug
all: $(BOWTIE2_BIN_LIST)
allall: $(BOWTIE2_BIN_LIST) $(BOWTIE2_BIN_LIST_AUX)
both: bowtie2 bowtie2-build
both-debug: bowtie2-align-debug bowtie2-build-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) \
$(PTHREAD_DEF) \
$(PREF_DEF) \
$(MM_DEF) \
$(SHMEM_DEF)
#
# bowtie2-build targets
#
bowtie2-build: bt2_build.cpp $(SHARED_CPPS) $(HEADERS)
$(CXX) $(RELEASE_FLAGS) $(RELEASE_DEFS) $(EXTRA_FLAGS) \
$(DEFS) -DBOWTIE2 $(NOASSERT_FLAGS) -Wall \
$(INC) \
-o $@ $< \
$(SHARED_CPPS) $(BUILD_CPPS_MAIN) \
$(LIBS) $(BUILD_LIBS)
bowtie2-build-debug: bt2_build.cpp $(SHARED_CPPS) $(HEADERS)
$(CXX) $(DEBUG_FLAGS) $(DEBUG_DEFS) $(EXTRA_FLAGS) \
$(DEFS) -DBOWTIE2 -Wall \
$(INC) \
-o $@ $< \
$(SHARED_CPPS) $(BUILD_CPPS_MAIN) \
$(LIBS) $(BUILD_LIBS)
#
# bowtie targets
#
bowtie2-align: bt2_search.cpp $(SEARCH_CPPS) $(SHARED_CPPS) $(HEADERS) $(SEARCH_FRAGMENTS)
$(CXX) $(RELEASE_FLAGS) $(RELEASE_DEFS) $(EXTRA_FLAGS) \
$(DEFS) -DBOWTIE2 $(NOASSERT_FLAGS) -Wall \
$(INC) \
-o $@ $< \
$(SHARED_CPPS) $(SEARCH_CPPS_MAIN) \
$(LIBS) $(SEARCH_LIBS)
bowtie2-align-debug: bt2_search.cpp $(SEARCH_CPPS) $(SHARED_CPPS) $(HEADERS) $(SEARCH_FRAGMENTS)
$(CXX) $(DEBUG_FLAGS) \
$(DEBUG_DEFS) $(EXTRA_FLAGS) \
$(DEFS) -DBOWTIE2 -Wall \
$(INC) \
-o $@ $< \
$(SHARED_CPPS) $(SEARCH_CPPS_MAIN) \
$(LIBS) $(SEARCH_LIBS)
#
# bowtie2-inspect targets
#
bowtie2-inspect: bt2_inspect.cpp $(HEADERS) $(SHARED_CPPS)
$(CXX) $(RELEASE_FLAGS) \
$(RELEASE_DEFS) $(EXTRA_FLAGS) \
$(DEFS) -DBOWTIE2 -DBOWTIE_INSPECT_MAIN -Wall \
$(INC) -I . \
-o $@ $< \
$(SHARED_CPPS) \
$(LIBS)
bowtie2-inspect-debug: bt2_inspect.cpp $(HEADERS) $(SHARED_CPPS)
$(CXX) $(DEBUG_FLAGS) \
$(DEBUG_DEFS) $(EXTRA_FLAGS) \
$(DEFS) -DBOWTIE2 -DBOWTIE_INSPECT_MAIN -Wall \
$(INC) -I . \
-o $@ $< \
$(SHARED_CPPS) \
$(LIBS)
.PHONY: bowtie2-src
bowtie2-src: $(SRC_PKG_LIST)
chmod a+x scripts/*.sh scripts/*.pl
mkdir .src.tmp
mkdir .src.tmp/bowtie2-$(VERSION)
zip tmp.zip $(SRC_PKG_LIST)
mv tmp.zip .src.tmp/bowtie2-$(VERSION)
cd .src.tmp/bowtie2-$(VERSION) ; unzip tmp.zip ; rm -f tmp.zip
cd .src.tmp ; zip -r bowtie2-$(VERSION).zip bowtie2-$(VERSION)
cp .src.tmp/bowtie2-$(VERSION).zip .
rm -rf .src.tmp
.PHONY: bowtie2-bin
bowtie2-bin: $(BIN_PKG_LIST) $(BOWTIE2_BIN_LIST) $(BOWTIE2_BIN_LIST_AUX)
chmod a+x scripts/*.sh scripts/*.pl
rm -rf .bin.tmp
mkdir .bin.tmp
mkdir .bin.tmp/bowtie2-$(VERSION)
if [ -f bowtie.exe ] ; then \
zip tmp.zip $(BIN_PKG_LIST) $(addsuffix .exe,$(BOWTIE2_BIN_LIST) $(BOWTIE2_BIN_LIST_AUX)) ; \
else \
zip tmp.zip $(BIN_PKG_LIST) $(BOWTIE2_BIN_LIST) $(BOWTIE2_BIN_LIST_AUX) ; \
fi
mv tmp.zip .bin.tmp/bowtie2-$(VERSION)
cd .bin.tmp/bowtie2-$(VERSION) ; unzip tmp.zip ; rm -f tmp.zip
cd .bin.tmp ; zip -r bowtie2-$(VERSION)-$(BITS).zip bowtie2-$(VERSION)
cp .bin.tmp/bowtie2-$(VERSION)-$(BITS).zip .
rm -rf .bin.tmp
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) \
-DSCAN_MAIN \
$(DEFS) -Wall \
$(INC) -I . \
-o $@ $< \
aligner_seed.cpp bt2_idx.cpp ccnt_lut.cpp alphabet.cpp bt2_io.cpp \
$(LIBS)
.PHONY: doc
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 $@ \
--from markdown --to HTML \
--table-of-contents $^
MANUAL: MANUAL.markdown
perl doc/strip_markdown.pl < $^ > $@
.PHONY: clean
clean:
rm -f $(BOWTIE2_BIN_LIST) $(BOWTIE2_BIN_LIST_AUX) \
$(addsuffix .exe,$(BOWTIE2_BIN_LIST) $(BOWTIE2_BIN_LIST_AUX)) \
bowtie2-src.zip bowtie2-bin.zip
rm -f core.* .tmp.head
rm -rf *.dSYM
Bowtie 2 NEWS
=============
Bowtie 2 is now available for download from the project website,
http://bowtie-bio.sf.net/bowtie2. 2.0.0-beta1 is the first version released to
the public and 2.0.0-beta5 is the latest version. Bowtie 2 is licensed under
the GPLv3 license. See `COPYING' file for details.
Reporting Issues
================
Please report any issues using the Sourceforge bug tracker:
https://sourceforge.net/tracker/?group_id=236897&atid=1101606
Version Release History
=======================
Version 2.0.0-beta5 - December 14, 2011
* Added --un, --al, --un-conc, and --al-conc options that write unpaired
and/or paired-end reads to files depending on whether they align at least
once or fail to align.
* Added --reorder option. When enabled, the order of the SAM records output
by Bowtie 2 will match the order of the input reads even when -p is set
greater than 1. This is disabled by default; enabling it makes Bowtie 2
somewhat slower and use somewhat more memory when -p is set greater than
1.
* Changed the default --score-min in --local mode to G,20,8. This ought to
improve sensitivity and accuracy in many cases.
* Improved error reporting.
* Fixed some minor documentation issues.
* Note: I am aware of an issue whereby longer reads (>10,000 bp) drive the
memory footprint way up and often cause an out-of-memory exception. This
will be fixed in a future version.
Version 2.0.0-beta4 - December 5, 2011
* Accuracy improvements.
* Speed improvements in some situations.
* Fixed a handful of crashing bugs.
* Fixed some documentation bugs.
* Fixed bug whereby --version worked incorrectly.
* Fixed formatting bug with MD:Z optional field that would sometimes fail to
follow a mismatch with a number.
* Added -D option for controlling the maximum number of seed extensions that
can fail in a row before we move on. This option or something like it
will eventually replace the argument to -M.
* Added -R option to control maximum number of times re-seeding is attempted
for a read with repetitive seeds.
* Changed default to --no-dovetail. Specifying --dovetail turns it back on.
* Added second argument for --mp option so that user can set maximum and
minimum mismatch penalties at once. Also tweaked the formula for
calculating the quality-aware mismatch penalty.
Version 2.0.0-beta3 - November 1, 2011
* Accuracy improvements.
* Speed improvements in some situations.
* Fixed a handful of crashing bugs.
* Fixed a bug whereby number of repetitively aligned reads could be
misreported in the summary output.
Version 2.0.0-beta2 - October 16, 2011
* Added manual, both included in the download package and on the website.
The website will always have the manual for the latest version.
* Added Linux 32-bit and 64-bit binary packages. Mac OS X packages to come.
Still working on a Windows package.
* Fixed a bug that led to crashes when seed-alignment result memory was
exhausted.
* Changed the --end-to-end mode --score-min default to be less permissive.
The previous threshold seemed to be having an adverse effect on accuracy,
though the fix implemented in this version comes at the expense of some
sensitivity.
* Changed the --end-to-end mode -M default to be lower by 2 notches. This
offsets any detrimental effect that the previous change would have had on
speed, without a large adverse impact on accuracy. As always, setting -M
higher will yield still greater accuracy at the expense of speed.
Version 2.0.0-beta1 - September 22, 2011
* First public release.
* Caveats: as of now, the manual is incomplete, there's no tutorial, and no
example genome or example reads. All these will be fixed in upcoming
releases.
* Only a source package is currently available. Platform-specific binaries
will be included in future releases.
See section toward end of MANUAL entited "Getting started with Bowtie 2: Lambda
phage example". Or, for tutorial for latest Bowtie 2 version, visit:
http://bowtie-bio.sf.net/bowtie2/manual.shtml#getting-started-with-bowtie-2-lambda-phage-example
2.0.0-beta5
\ No newline at end of file
/*
* Copyright 2011, Ben Langmead <blangmea@jhsph.edu>
*
* This file is part of Bowtie 2.
*
* Bowtie 2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Bowtie 2 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Bowtie 2. If not, see <http://www.gnu.org/licenses/>.
*/
#include "aligner_cache.h"
/**
* Check that this QVal is internally consistent and consistent
* with the contents of the given cache.
*/
bool QVal::repOk(const AlignmentCache& ac) const {
if(rangen_ > 0) {
assert_lt(i_, ac.qSize());
assert_leq(i_ + rangen_, ac.qSize());
}
assert_geq(eltn_, rangen_);
return true;
}
/**
* Check that this SAVal is internally consistent and consistent
* with the contents of the given cache.
*/
bool SAVal::repOk(const AlignmentCache& ac) const {
assert_lt(i, ac.saSize());
assert_leq(i + len, ac.saSize());
return true;
}
/**
* Add a new association between a read sequnce ('seq') and a
* reference sequence ('')
*/
bool AlignmentCache::addOnTheFly(
QVal& qv, // qval that points to the range of reference substrings
const SAKey& sak, // the key holding the reference substring
uint32_t topf, // top range elt in BWT index
uint32_t botf, // bottom range elt in BWT index
uint32_t topb, // top range elt in BWT' index
uint32_t botb, // bottom range elt in BWT' index
bool getLock)
{
ThreadSafe ts(lockPtr(), shared_ && getLock);
bool added = true;
// If this is the first reference sequence we're associating with
// the query sequence, initialize the QVal.
if(!qv.valid()) {
qv.init((uint32_t)qlist_.size(), 0, 0);
}
qv.addRange(botf-topf);
if(!qlist_.add(pool(), sak)) {
return false; // Exhausted pool memory
}
#ifndef NDEBUG
for(size_t i = qv.offset(); i < qlist_.size(); i++) {
if(i > qv.offset()) {
assert(qlist_.get(i) != qlist_.get(i-1));
}
}
#endif
assert_eq(qv.offset() + qv.numRanges(), qlist_.size());
SANode *s = samap_.add(pool(), sak, &added);
if(s == NULL) {
return false; // Exhausted pool memory
}
assert(s->key.repOk());
if(added) {
s->payload.i = (uint32_t)salist_.size();
s->payload.len = botf - topf;
s->payload.topf = topf;
s->payload.topb = topb;
for(size_t j = 0; j < (botf-topf); j++) {
if(!salist_.add(pool(), 0xffffffff)) {
// Change the payload's len field
s->payload.len = (uint32_t)j;
return false; // Exhausted pool memory
}
}
assert(s->payload.repOk(*this));
}
return true;
}
#ifdef ALIGNER_CACHE_MAIN
#include <iostream>
#include <getopt.h>
#include <string>
#include "random_source.h"
using namespace std;
enum {
ARG_TESTS = 256
};
static const char *short_opts = "vCt";
static struct option long_opts[] = {
{(char*)"verbose", no_argument, 0, 'v'},
{(char*)"tests", no_argument, 0, ARG_TESTS},
};
static void printUsage(ostream& os) {
os << "Usage: bowtie2-cache [options]*" << endl;
os << "Options:" << endl;
os << " --tests run unit tests" << endl;
os << " -v/--verbose talkative mode" << endl;
}
int gVerbose = 0;
static void add(
RedBlack<QKey, QVal>& t,
Pool& p,
const char *dna)
{
QKey qk;
qk.init(BTDnaString(dna, true));
t.add(p, qk, NULL);
}
/**
* Small tests for the AlignmentCache.
*/
static void aligner_cache_tests() {
RedBlack<QKey, QVal> rb(1024);
Pool p(64 * 1024, 1024);
// Small test
add(rb, p, "ACGTCGATCGT");
add(rb, p, "ACATCGATCGT");
add(rb, p, "ACGACGATCGT");
add(rb, p, "ACGTAGATCGT");
add(rb, p, "ACGTCAATCGT");
add(rb, p, "ACGTCGCTCGT");
add(rb, p, "ACGTCGAACGT");
assert_eq(7, rb.size());
rb.clear();
p.clear();
// Another small test
add(rb, p, "ACGTCGATCGT");
add(rb, p, "CCGTCGATCGT");
add(rb, p, "TCGTCGATCGT");
add(rb, p, "GCGTCGATCGT");
add(rb, p, "AAGTCGATCGT");
assert_eq(5, rb.size());
rb.clear();
p.clear();
// Regression test (attempt to make it smaller)
add(rb, p, "CCTA");
add(rb, p, "AGAA");
add(rb, p, "TCTA");
add(rb, p, "GATC");
add(rb, p, "CTGC");
add(rb, p, "TTGC");
add(rb, p, "GCCG");
add(rb, p, "GGAT");
rb.clear();
p.clear();
// Regression test
add(rb, p, "CCTA");
add(rb, p, "AGAA");
add(rb, p, "TCTA");
add(rb, p, "GATC");
add(rb, p, "CTGC");
add(rb, p, "CATC");
add(rb, p, "CAAA");
add(rb, p, "CTAT");
add(rb, p, "CTCA");
add(rb, p, "TTGC");
add(rb, p, "GCCG");
add(rb, p, "GGAT");
assert_eq(12, rb.size());
rb.clear();
p.clear();
// Larger random test
EList<BTDnaString> strs;
char buf[5];
for(int i = 0; i < 4; i++) {
for(int j = 0; j < 4; j++) {
for(int k = 0; k < 4; k++) {
for(int m = 0; m < 4; m++) {
buf[0] = "ACGT"[i];
buf[1] = "ACGT"[j];
buf[2] = "ACGT"[k];
buf[3] = "ACGT"[m];
buf[4] = '\0';
strs.push_back(BTDnaString(buf, true));
}
}
}
}
// Add all of the 4-mers in several different random orders
RandomSource rand;
for(uint32_t runs = 0; runs < 100; runs++) {
rb.clear();
p.clear();
assert_eq(0, rb.size());
rand.init(runs);
EList<bool> used;
used.resize(256);
for(int i = 0; i < 256; i++) used[i] = false;
for(int i = 0; i < 256; i++) {
int r = rand.nextU32() % (256-i);
int unused = 0;
bool added = false;
for(int j = 0; j < 256; j++) {
if(!used[j] && unused == r) {
used[j] = true;
QKey qk;
qk.init(strs[j]);
rb.add(p, qk, NULL);
added = true;
break;
}
if(!used[j]) unused++;
}
assert(added);
}
}
}
/**
* A way of feeding simply tests to the seed alignment infrastructure.
*/
int main(int argc, char **argv) {
int option_index = 0;
int next_option;
do {
next_option = getopt_long(argc, argv, short_opts, long_opts, &option_index);
switch (next_option) {
case 'v': gVerbose = true; break;
case ARG_TESTS: aligner_cache_tests(); return 0;
case -1: break;
default: {
cerr << "Unknown option: " << (char)next_option << endl;
printUsage(cerr);
exit(1);
}
}
} while(next_option != -1);
}
#endif
This diff is collapsed.
This diff is collapsed.
aligner_report.h 0 → 100644