Description: Change class name of _Context_LSS New version 1.4 of SeQan uses a different name of the class. Forwarded: no Author: Gert Wollny <gw.fossdev@gmail.com> Last-Update: 2014-100-06 --- diff_sample.h +++ diff_sample.h @@ -979,7 +979,7 @@ void DifferenceCoverSample<TStr>::build( { Timer timer(cout, " Invoking Larsson-Sadakane on ranks time: ", this->verbose()); VMSG_NL(" Invoking Larsson-Sadakane on ranks"); - _Context_LSS<TIndexOff> c; + ContextLss_<TIndexOff> c; c.suffixsort( (TIndexOff*)begin(_isaPrime, Standard()), (TIndexOff*)begin(sPrime, Standard()), Description: Proper type-casting in using seqan::_setBegin(). Required by newer versions of GCC. Forwarded: no Author: Ognyan Kulev <ogi@debian.org> Last-Update: 2013-04-18 --- pat.h +++ pat.h @@ -120,13 +120,13 @@ ~Read() { clearAll(); reset(); // Prevent seqan from trying to free buffers - _setBegin(patFw, NULL); - _setBegin(patRc, NULL); - _setBegin(qual, NULL); - _setBegin(patFwRev, NULL); - _setBegin(patRcRev, NULL); - _setBegin(qualRev, NULL); - _setBegin(name, NULL); + _setBegin(patFw, (Dna5*)NULL); + _setBegin(patRc, (Dna5*)NULL); + _setBegin(qual, (char*)NULL); + _setBegin(patFwRev, (Dna5*)NULL); + _setBegin(patRcRev, (Dna5*)NULL); + _setBegin(qualRev, (char*)NULL); + _setBegin(name, (char*)NULL); } #define RESET_BUF(str, buf, typ) _setBegin(str, (typ*)buf); _setLength(str, 0); _setCapacity(str, BUF_SIZE); Description: Use SeqAn 1.4's seqan::popCount() function instead of own function Author: Ognyan Kulev <ogi@debian.org> Last-Update: 2014-03-08 --- This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ --- diff_sample.h +++ diff_sample.h @@ -481,6 +481,8 @@ static String<T> getDeltaMap(T v, const return amap; } +// Debian: Use seqan::popCount +#if 0 /** * Return population count (count of all bits set to 1) of i. */ @@ -493,6 +495,7 @@ static unsigned int popCount(T i) { } return cnt; } +#endif /** * Calculate log-base-2 of i Description: Renamed ChunkPool class to bowtieChunkPool. SeqAn has a class with the same name and fatal name collision happens. Forwarded: no Author: Ognyan Kulev <ogi@debian.org> Last-Update: 2013-04-18 --- aligner.h +++ aligner.h @@ -391,7 +391,7 @@ public: bool verbose, bool quiet, int maxBts, - ChunkPool *pool, + bowtieChunkPool *pool, int *btCnt = NULL, AlignerMetrics *metrics = NULL) : Aligner(true, rangeMode), @@ -597,7 +597,7 @@ protected: bool quiet_; // don't print informational/warning info const int maxBts_; - ChunkPool *pool_; + bowtieChunkPool *pool_; int *btCnt_; AlignerMetrics *metrics_; }; @@ -638,7 +638,7 @@ public: bool verbose, bool quiet, int maxBts, - ChunkPool *pool, + bowtieChunkPool *pool, int *btCnt) : Aligner(true, rangeMode), refs_(refs), @@ -1405,7 +1405,7 @@ protected: bool quiet_; int maxBts_; - ChunkPool *pool_; + bowtieChunkPool *pool_; int *btCnt_; // Range-finding state for first mate @@ -1529,7 +1529,7 @@ public: bool verbose, bool quiet, int maxBts, - ChunkPool *pool, + bowtieChunkPool *pool, int *btCnt) : Aligner(true, rangeMode), refs_(refs), @@ -2076,7 +2076,7 @@ protected: TDriver* driver_; // Pool for distributing chunks of best-first path descriptor memory - ChunkPool *pool_; + bowtieChunkPool *pool_; bool verbose_; bool quiet_; --- aligner_0mm.h +++ aligner_0mm.h @@ -32,7 +32,7 @@ public: RangeCache* cacheFw, RangeCache* cacheBw, uint32_t cacheLimit, - ChunkPool *pool, + bowtieChunkPool *pool, BitPairReference* refs, vector<String<Dna5> >& os, bool maqPenalty, @@ -123,7 +123,7 @@ private: RangeCache *cacheFw_; RangeCache *cacheBw_; const uint32_t cacheLimit_; - ChunkPool *pool_; + bowtieChunkPool *pool_; BitPairReference* refs_; vector<String<Dna5> >& os_; bool maqPenalty_; @@ -162,7 +162,7 @@ public: RangeCache* cacheFw, RangeCache* cacheBw, uint32_t cacheLimit, - ChunkPool *pool, + bowtieChunkPool *pool, BitPairReference* refs, vector<String<Dna5> >& os, bool reportSe, @@ -363,7 +363,7 @@ private: RangeCache *cacheFw_; RangeCache *cacheBw_; const uint32_t cacheLimit_; - ChunkPool *pool_; + bowtieChunkPool *pool_; BitPairReference* refs_; vector<String<Dna5> >& os_; const bool reportSe_; --- aligner_1mm.h +++ aligner_1mm.h @@ -32,7 +32,7 @@ public: RangeCache *cacheFw, RangeCache *cacheBw, uint32_t cacheLimit, - ChunkPool *pool, + bowtieChunkPool *pool, BitPairReference* refs, vector<String<Dna5> >& os, bool maqPenalty, @@ -160,7 +160,7 @@ private: RangeCache *cacheFw_; RangeCache *cacheBw_; const uint32_t cacheLimit_; - ChunkPool *pool_; + bowtieChunkPool *pool_; BitPairReference* refs_; vector<String<Dna5> >& os_; const bool maqPenalty_; @@ -199,7 +199,7 @@ public: RangeCache *cacheFw, RangeCache *cacheBw, uint32_t cacheLimit, - ChunkPool *pool, + bowtieChunkPool *pool, BitPairReference* refs, vector<String<Dna5> >& os, bool reportSe, @@ -475,7 +475,7 @@ private: RangeCache *cacheFw_; RangeCache *cacheBw_; const uint32_t cacheLimit_; - ChunkPool *pool_; + bowtieChunkPool *pool_; BitPairReference* refs_; vector<String<Dna5> >& os_; const bool reportSe_; --- aligner_23mm.h +++ aligner_23mm.h @@ -33,7 +33,7 @@ public: RangeCache *cacheFw, RangeCache *cacheBw, uint32_t cacheLimit, - ChunkPool *pool, + bowtieChunkPool *pool, BitPairReference* refs, vector<String<Dna5> >& os, bool maqPenalty, @@ -230,7 +230,7 @@ private: RangeCache *cacheFw_; RangeCache *cacheBw_; const uint32_t cacheLimit_; - ChunkPool *pool_; + bowtieChunkPool *pool_; BitPairReference* refs_; vector<String<Dna5> >& os_; const bool maqPenalty_; @@ -271,7 +271,7 @@ public: RangeCache *cacheFw, RangeCache *cacheBw, uint32_t cacheLimit, - ChunkPool *pool, + bowtieChunkPool *pool, BitPairReference* refs, vector<String<Dna5> >& os, bool reportSe, @@ -672,7 +672,7 @@ private: RangeCache *cacheFw_; RangeCache *cacheBw_; const uint32_t cacheLimit_; - ChunkPool *pool_; + bowtieChunkPool *pool_; BitPairReference* refs_; vector<String<Dna5> >& os_; const bool reportSe_; --- aligner_seed_mm.h +++ aligner_seed_mm.h @@ -37,7 +37,7 @@ public: RangeCache* cacheFw, RangeCache* cacheBw, uint32_t cacheLimit, - ChunkPool *pool, + bowtieChunkPool *pool, BitPairReference* refs, vector<String<Dna5> >& os, bool maqPenalty, @@ -554,7 +554,7 @@ private: RangeCache *cacheFw_; RangeCache *cacheBw_; const uint32_t cacheLimit_; - ChunkPool *pool_; + bowtieChunkPool *pool_; BitPairReference* refs_; vector<String<Dna5> >& os_; bool strandFix_; @@ -598,7 +598,7 @@ public: RangeCache* cacheFw, RangeCache* cacheBw, uint32_t cacheLimit, - ChunkPool *pool, + bowtieChunkPool *pool, BitPairReference* refs, vector<String<Dna5> >& os, bool reportSe, @@ -1375,7 +1375,7 @@ private: RangeCache *cacheFw_; RangeCache *cacheBw_; const uint32_t cacheLimit_; - ChunkPool *pool_; + bowtieChunkPool *pool_; BitPairReference* refs_; vector<String<Dna5> >& os_; const bool reportSe_; --- ebwt_search.cpp +++ ebwt_search.cpp @@ -125,7 +125,7 @@ static bool strandFix; // attempt to fix strand bias static bool stats; // print performance stats static int chunkPoolMegabytes; // max MB to dedicate to best-first search frames per thread -static int chunkSz; // size of single chunk disbursed by ChunkPool +static int chunkSz; // size of single chunk disbursed by bowtieChunkPool static bool chunkVerbose; // have chunk allocator output status messages? static bool useV1; static bool reportSe; @@ -232,7 +232,7 @@ norc = false; // don't align rc orientation of read strandFix = true; // attempt to fix strand bias stats = false; // print performance stats chunkPoolMegabytes = 64; // max MB to dedicate to best-first search frames per thread - chunkSz = 256; // size of single chunk disbursed by ChunkPool (in KB) + chunkSz = 256; // size of single chunk disbursed by bowtieChunkPool (in KB) chunkVerbose = false; // have chunk allocator output status messages? useV1 = true; reportSe = false; @@ -1343,7 +1343,7 @@ static void exactSearchWorkerStateful(vo PatternSourcePerThreadFactory* patsrcFact = createPatsrcFactory(_patsrc, tid, readsPerBatch); HitSinkPerThreadFactory* sinkFact = createSinkFactory(_sink, tid); - ChunkPool *pool = new ChunkPool(chunkSz * 1024, chunkPoolMegabytes * 1024 * 1024, chunkVerbose); + bowtieChunkPool *pool = new bowtieChunkPool(chunkSz * 1024, chunkPoolMegabytes * 1024 * 1024, chunkVerbose); UnpairedExactAlignerV1Factory alSEfact( ebwt, NULL, @@ -1632,7 +1632,7 @@ static void mismatchSearchWorkerFullStat // Global initialization PatternSourcePerThreadFactory* patsrcFact = createPatsrcFactory(_patsrc, tid, readsPerBatch); HitSinkPerThreadFactory* sinkFact = createSinkFactory(_sink, tid); - ChunkPool *pool = new ChunkPool(chunkSz * 1024, chunkPoolMegabytes * 1024 * 1024, chunkVerbose); + bowtieChunkPool *pool = new bowtieChunkPool(chunkSz * 1024, chunkPoolMegabytes * 1024 * 1024, chunkVerbose); Unpaired1mmAlignerV1Factory alSEfact( ebwtFw, @@ -2083,7 +2083,7 @@ static void twoOrThreeMismatchSearchWork PatternSourcePerThreadFactory* patsrcFact = createPatsrcFactory(_patsrc, tid, readsPerBatch); HitSinkPerThreadFactory* sinkFact = createSinkFactory(_sink, tid); - ChunkPool *pool = new ChunkPool(chunkSz * 1024, chunkPoolMegabytes * 1024 * 1024, chunkVerbose); + bowtieChunkPool *pool = new bowtieChunkPool(chunkSz * 1024, chunkPoolMegabytes * 1024 * 1024, chunkVerbose); Unpaired23mmAlignerV1Factory alSEfact( ebwtFw, &ebwtBw, @@ -2753,7 +2753,7 @@ static void seededQualSearchWorkerFullSt // Global initialization PatternSourcePerThreadFactory* patsrcFact = createPatsrcFactory(_patsrc, tid, readsPerBatch); HitSinkPerThreadFactory* sinkFact = createSinkFactory(_sink, tid); - ChunkPool *pool = new ChunkPool(chunkSz * 1024, chunkPoolMegabytes * 1024 * 1024, chunkVerbose); + bowtieChunkPool *pool = new bowtieChunkPool(chunkSz * 1024, chunkPoolMegabytes * 1024 * 1024, chunkVerbose); AlignerMetrics *metrics = NULL; if(stats) { --- ebwt_search_backtrack.h +++ ebwt_search_backtrack.h @@ -2703,7 +2703,7 @@ bool verbose, bool quiet, bool mate1, - ChunkPool* pool, + bowtieChunkPool* pool, int *btCnt) : SingleRangeSourceDriver<EbwtRangeSource>( params, rs, fw, sink, sinkPt, os, verbose, @@ -2877,7 +2877,7 @@ bool verbose, bool quiet, bool mate1, - ChunkPool* pool, + bowtieChunkPool* pool, int *btCnt = NULL) : params_(params), rs_(rs), @@ -2936,7 +2936,7 @@ bool verbose_; bool quiet_; bool mate1_; - ChunkPool* pool_; + bowtieChunkPool* pool_; int *btCnt_; }; --- pool.h +++ pool.h @@ -19,13 +19,13 @@ * is set at construction time. Heap memory is only allocated at * construction and deallocated at destruction. */ -class ChunkPool { +class bowtieChunkPool { public: /** * Initialize a new pool with an initial size of about 'bytes' * bytes. Exit with an error message if we can't allocate it. */ - ChunkPool(uint32_t chunkSz, uint32_t totSz, bool verbose_) : + bowtieChunkPool(uint32_t chunkSz, uint32_t totSz, bool verbose_) : verbose(verbose_), patid(0), pool_(NULL), cur_(0), chunkSz_(chunkSz), totSz_(totSz), lim_(totSz/chunkSz), bits_(lim_), exhaustCrash_(false), @@ -38,7 +38,7 @@ public: } } catch(std::bad_alloc& e) { ThreadSafe _ts(&gLock); - std::cerr << "Error: Could not allocate ChunkPool of " + std::cerr << "Error: Could not allocate bowtieChunkPool of " << totSz << " bytes" << std::endl; exhausted(); throw 1; // Exit if we haven't already @@ -48,7 +48,7 @@ public: /** * Delete all the pools. */ - ~ChunkPool() { + ~bowtieChunkPool() { if(pool_ != NULL) delete[] pool_; } @@ -189,7 +189,7 @@ public: * Initialize a new pool with an initial size of about 'bytes' * bytes. Exit with an error message if we can't allocate it. */ - AllocOnlyPool(ChunkPool* pool, const char *name) : + AllocOnlyPool(bowtieChunkPool* pool, const char *name) : pool_(pool), name_(name), curPool_(0), cur_(0) { assert(pool != NULL); @@ -388,7 +388,7 @@ protected: lastCurInPool_.pop_back(); } - ChunkPool* pool_; + bowtieChunkPool* pool_; const char *name_; std::vector<T*> pools_; /// the memory pools uint32_t curPool_; /// pool we're current allocating from --- range_source.h +++ range_source.h @@ -1307,7 +1307,7 @@ class PathManager { public: - PathManager(ChunkPool* cpool_, int *btCnt, bool verbose, bool quiet) : + PathManager(bowtieChunkPool* cpool_, int *btCnt, bool verbose, bool quiet) : branchQ_(verbose, quiet), cpool(cpool_), bpool(cpool, "branch"), @@ -1556,7 +1556,7 @@ public: - ChunkPool *cpool; // pool for generic chunks of memory + bowtieChunkPool *cpool; // pool for generic chunks of memory AllocOnlyPool<Branch> bpool; // pool for allocating Branches AllocOnlyPool<RangeState> rpool; // pool for allocating RangeStates AllocOnlyPool<Edit> epool; // pool for allocating Edits @@ -1730,7 +1730,7 @@ bool quiet, bool mate1, uint32_t minCostAdjustment, - ChunkPool* pool, + bowtieChunkPool* pool, int *btCnt) : RangeSourceDriver<TRangeSource>(true, minCostAdjustment), len_(0), mate1_(mate1), Description: Renamed seqan::fill function calls to use seqan::resize. SeqAn 1.3 renamed seqan::fill() to seqan::resize(). SeqAn ticket: http://trac.seqan.de/ticket/77 Forwarded: no Author: Ognyan Kulev <ogi@debian.org> Last-Update: 2014-08-13 --- blockwise_sa.h +++ blockwise_sa.h @@ -673,8 +673,8 @@ try { // Allocate and initialize containers for holding bucket // sizes and representatives. - fill(tparams[tid].bucketSzs, numBuckets, 0, Exact()); - fill(tparams[tid].bucketReps, numBuckets, OFF_MASK, Exact()); + resize(tparams[tid].bucketSzs, numBuckets, 0, Exact()); + resize(tparams[tid].bucketReps, numBuckets, OFF_MASK, Exact()); } catch(bad_alloc &e) { if(this->_passMemExc) { throw e; // rethrow immediately @@ -1063,7 +1063,7 @@ hi = _sampleSuffs[cur_block]; //zHi.resizeExact(_dcV); //zHi.fillZero(); - fill(zHi, _dcV, 0, Exact()); + resize(zHi, _dcV, 0, Exact()); assert_eq(getValue(zHi, 0), 0); calcZ(t, hi, zHi, this->verbose(), this->sanityCheck()); } @@ -1074,7 +1074,7 @@ lo = _sampleSuffs[cur_block-1]; //zLo.resizeExact(_dcV); //zLo.fillZero(); - fill(zLo, _dcV, 0, Exact()); + resize(zLo, _dcV, 0, Exact()); assert_gt(_dcV, 3); assert_eq(getValue(zLo, 0), 0); calcZ(t, lo, zLo, this->verbose(), this->sanityCheck()); --- diff_sample.h +++ diff_sample.h @@ -457,7 +457,7 @@ static String<T> getDeltaMap(T v, const // Declare anchor-map-related items String<T> amap; size_t amapEnts = 1; - fill(amap, v, 0xffffffff, Exact()); + resize(amap, v, 0xffffffff, Exact()); amap[0] = 0; // Print out difference cover (and optionally calculate // anchor map) @@ -540,7 +540,7 @@ public: assert_gt(_d, 0); assert_eq(1, popCount(_v)); // must be power of 2 // Build map from d's to idx's - fill(_dInv, _v, 0xffffffff, Exact()); + resize(_dInv, _v, 0xffffffff, Exact()); uint32_t lim = (uint32_t)length(_ds); for(uint32_t i = 0; i < lim; i++) { _dInv[_ds[i]] = i; @@ -664,7 +664,7 @@ void DifferenceCoverSample<TStr>::doBuil VMSG_NL(" Doing sanity check"); TIndexOffU added = 0; String<TIndexOffU> sorted; - fill(sorted, length(_isaPrime), OFF_MASK, Exact()); + resize(sorted, length(_isaPrime), OFF_MASK, Exact()); for(size_t di = 0; di < this->d(); di++) { uint32_t d = _ds[di]; size_t i = 0; @@ -728,7 +728,7 @@ void DifferenceCoverSample<TStr>::buildS assert_eq(length(_doffs), d+1); // Size sPrime appropriately reserve(sPrime, sPrimeSz + padding, Exact()); // reserve extra slot for LS - fill(sPrime, sPrimeSz + padding, OFF_MASK, Exact()); + resize(sPrime, sPrimeSz + padding, OFF_MASK, Exact()); // Slot suffixes from text into sPrime according to the mu // mapping; where the mapping would leave a blank, insert a 0 TIndexOffU added = 0; @@ -952,7 +952,7 @@ void DifferenceCoverSample<TStr>::build( // arrays back into sPrime. VMSG_NL(" Allocating rank array"); reserve(_isaPrime, length(sPrime), Exact()); - fill(_isaPrime, length(sPrime), OFF_MASK, Exact()); + resize(_isaPrime, length(sPrime), OFF_MASK, Exact()); assert_gt(length(_isaPrime), 0); { Timer timer(cout, " Ranking v-sort output time: ", this->verbose()); --- Makefile.orig 2017-12-12 11:29:54.000000000 -0700 +++ Makefile 2019-01-27 04:46:19.000000000 -0700 @@ -7,10 +7,7 @@ prefix ?= /usr/local bindir = $(prefix)/bin -SEQAN_DIR = ./SeqAn-1.1 -# treat SeqAn as a sysdir to suppress warnings -SEQAN_INC = -isystem $(SEQAN_DIR) -INC = $(if $(RELEASE_BUILD),-I$(CURDIR)/.include) $(SEQAN_INC) -I third_party +INC = $(if $(RELEASE_BUILD),-I$(CURDIR)/.include) CXX ?= g++ CPP ?= $(CXX) CC ?= gcc @@ -178,7 +175,6 @@ $(wildcard genomes/NC_008253.fna) \ $(wildcard reads/e_coli_1000.*) \ $(wildcard reads/e_coli_1000_*) \ - SeqAn-1.1 \ bowtie \ bowtie-build \ bowtie-inspect \