Permalink
Browse files

*** empty log message ***

  • Loading branch information...
1 parent f33f363 commit 4f02e10f4960c4d0c597f11bc3845f5efde9ef97 langmead committed Sep 8, 2009
Showing with 1,008 additions and 814 deletions.
  1. +43 −0 aligner.h
  2. +9 −3 aligner_0mm.h
  3. +9 −3 aligner_1mm.h
  4. +9 −3 aligner_23mm.h
  5. +10 −4 aligner_seed_mm.h
  6. +2 −1 annot.cpp
  7. +4 −3 bitset.h
  8. +7 −7 blockwise_sa.h
  9. +49 −45 bowtie_inspect.cpp
  10. +19 −14 chaincat.cpp
  11. +29 −28 ebwt.h
  12. +131 −128 ebwt_build.cpp
  13. +360 −258 ebwt_search.cpp
  14. +2 −1 ebwt_search_backtrack.h
  15. +11 −5 filebuf.h
  16. +14 −13 hit.h
  17. +129 −124 map_tool.cpp
  18. +6 −5 maq_convert/bfa.cpp
  19. +71 −66 maq_convert/bowtie_convert.cpp
  20. +4 −3 maq_convert/maqmap.h
  21. +29 −29 pat.h
  22. +2 −2 pool.h
  23. +7 −5 qual.h
  24. +1 −1 range_cache.h
  25. +1 −1 range_source.h
  26. +2 −1 ref_aligner.h
  27. +1 −1 ref_read.cpp
  28. +5 −4 ref_read.h
  29. +10 −9 reference.h
  30. +4 −3 refmap.cpp
  31. +1 −1 search_1mm_phase1.c
  32. +2 −2 search_23mm_phase1.c
  33. +0 −3 search_23mm_phase3.c
  34. +17 −22 search_seeded_phase1.c
  35. +0 −3 search_seeded_phase3.c
  36. +0 −7 search_seeded_phase4.c
  37. +7 −6 shmem.h
  38. +1 −0 tokenize.h
View
@@ -333,6 +333,7 @@ class UnpairedAlignerV2 : public Aligner {
vector<String<Dna5> >& os,
bool rangeMode,
bool verbose,
+ bool quiet,
int maxBts,
ChunkPool *pool,
int *btCnt = NULL,
@@ -346,6 +347,8 @@ class UnpairedAlignerV2 : public Aligner {
params_(params),
rchase_(rchase),
driver_(driver),
+ verbose_(verbose),
+ quiet_(quiet),
maxBts_(maxBts),
pool_(pool),
btCnt_(btCnt),
@@ -374,6 +377,15 @@ class UnpairedAlignerV2 : public Aligner {
metrics_->nextRead(patsrc->bufa().patFw);
}
pool_->reset(&patsrc->bufa().name, patsrc->patid());
+ if(patsrc->bufa().length() < 4) {
+ if(!quiet_) {
+ cerr << "Warning: Skipping read " << patsrc->bufa().name
+ << " because it is less than 4 characters long" << endl;
+ }
+ this->done = true;
+ sinkPt_->finishRead(*patsrc_, true, true);
+ return;
+ }
driver_->setQuery(patsrc, NULL);
this->done = driver_->done;
doneFirst_ = false;
@@ -508,6 +520,9 @@ class UnpairedAlignerV2 : public Aligner {
// Range-finding state
TDriver* driver_;
+ bool verbose_; // be talkative
+ bool quiet_; // don't print informational/warning info
+
const int maxBts_;
ChunkPool *pool_;
int *btCnt_;
@@ -548,6 +563,7 @@ class PairedBWAlignerV1 : public Aligner {
const BitPairReference* refs,
bool rangeMode,
bool verbose,
+ bool quiet,
int maxBts,
ChunkPool *pool,
int *btCnt) :
@@ -572,6 +588,7 @@ class PairedBWAlignerV1 : public Aligner {
fw1_(fw1), fw2_(fw2),
rchase_(rchase),
verbose_(verbose),
+ quiet_(quiet),
maxBts_(maxBts),
pool_(pool),
btCnt_(btCnt),
@@ -654,6 +671,15 @@ class PairedBWAlignerV1 : public Aligner {
// Give all of the drivers pointers to the relevant read info
patsrc_ = patsrc;
pool_->reset(&patsrc->bufa().name, patsrc->patid());
+ if(patsrc->bufa().length() < 4 || patsrc->bufb().length() < 4) {
+ if(!quiet_) {
+ cerr << "Warning: Skipping pair " << patsrc->bufa().name
+ << " because a mate is less than 4 characters long" << endl;
+ }
+ this->done = true;
+ sinkPt_->finishRead(*patsrc_, true, true);
+ return;
+ }
driver1Fw_->setQuery(patsrc, NULL);
driver1Rc_->setQuery(patsrc, NULL);
driver2Fw_->setQuery(patsrc, NULL);
@@ -1327,6 +1353,8 @@ class PairedBWAlignerV1 : public Aligner {
// true -> be talkative
bool verbose_;
+ // true -> suppress warnings
+ bool quiet_;
int maxBts_;
ChunkPool *pool_;
@@ -1451,6 +1479,7 @@ class PairedBWAlignerV2 : public Aligner {
const BitPairReference* refs,
bool rangeMode,
bool verbose,
+ bool quiet,
int maxBts,
ChunkPool *pool,
int *btCnt) :
@@ -1477,6 +1506,8 @@ class PairedBWAlignerV2 : public Aligner {
rchase_(rchase),
driver_(driver),
pool_(pool),
+ verbose_(verbose),
+ quiet_(quiet),
maxBts_(maxBts),
btCnt_(btCnt)
{
@@ -1512,6 +1543,15 @@ class PairedBWAlignerV2 : public Aligner {
// Give all of the drivers pointers to the relevant read info
patsrc_ = patsrc;
pool_->reset(&patsrc->bufa().name, patsrc->patid());
+ if(patsrc->bufa().length() < 4 || patsrc->bufb().length() < 4) {
+ if(!quiet_) {
+ cerr << "Warning: Skipping pair " << patsrc->bufa().name
+ << " because a mate is less than 4 characters long" << endl;
+ }
+ this->done = true;
+ sinkPt_->finishRead(*patsrc_, true, true);
+ return;
+ }
driver_->setQuery(patsrc, NULL);
qlen1_ = patsrc_->bufa().length();
qlen2_ = patsrc_->bufb().length();
@@ -1934,6 +1974,9 @@ class PairedBWAlignerV2 : public Aligner {
// Pool for distributing chunks of best-first path descriptor memory
ChunkPool *pool_;
+ bool verbose_;
+ bool quiet_;
+
int maxBts_; // maximum allowed # backtracks
int *btCnt_; // current backtrack count
View
@@ -39,6 +39,7 @@ class UnpairedExactAlignerV1Factory : public AlignerFactory {
bool strandFix,
bool rangeMode,
bool verbose,
+ bool quiet,
uint32_t seed) :
ebwtFw_(ebwtFw),
ebwtBw_(ebwtBw),
@@ -55,6 +56,7 @@ class UnpairedExactAlignerV1Factory : public AlignerFactory {
strandFix_(strandFix),
rangeMode_(rangeMode),
verbose_(verbose),
+ quiet_(quiet),
seed_(seed)
{
assert(ebwtFw.isInMemory());
@@ -107,7 +109,7 @@ class UnpairedExactAlignerV1Factory : public AlignerFactory {
return new UnpairedAlignerV2<EbwtRangeSource>(
params, dr, rchase,
sink_, sinkPtFactory_, sinkPt, os_, rangeMode_, verbose_,
- INT_MAX, pool_, NULL, NULL);
+ quiet_, INT_MAX, pool_, NULL, NULL);
}
private:
@@ -127,6 +129,7 @@ class UnpairedExactAlignerV1Factory : public AlignerFactory {
bool strandFix_;
bool rangeMode_;
bool verbose_;
+ bool quiet_;
uint32_t seed_;
};
@@ -166,6 +169,7 @@ class PairedExactAlignerV1Factory : public AlignerFactory {
bool qualOrder,
bool rangeMode,
bool verbose,
+ bool quiet,
uint32_t seed) :
ebwtFw_(ebwtFw),
doFw_(doFw),
@@ -192,6 +196,7 @@ class PairedExactAlignerV1Factory : public AlignerFactory {
strandFix_(strandFix),
rangeMode_(rangeMode),
verbose_(verbose),
+ quiet_(quiet),
seed_(seed)
{
assert(ebwtFw.isInMemory());
@@ -312,7 +317,7 @@ class PairedExactAlignerV1Factory : public AlignerFactory {
refAligner,
rchase, sink_, sinkPtFactory_, sinkPt, mate1fw_, mate2fw_,
peInner_, peOuter_, dontReconcile_, symCeil_, mixedThresh_,
- mixedAttemptLim_, refs_, rangeMode_, verbose_,
+ mixedAttemptLim_, refs_, rangeMode_, verbose_, quiet_,
INT_MAX, pool_, NULL);
return al;
} else {
@@ -328,7 +333,7 @@ class PairedExactAlignerV1Factory : public AlignerFactory {
rchase, sink_, sinkPtFactory_, sinkPt,
sinkPtSe1, sinkPtSe2, mate1fw_, mate2fw_,
peInner_, peOuter_,
- mixedAttemptLim_, refs_, rangeMode_, verbose_,
+ mixedAttemptLim_, refs_, rangeMode_, verbose_, quiet_,
INT_MAX, pool_, NULL);
delete drVec;
return al;
@@ -363,6 +368,7 @@ class PairedExactAlignerV1Factory : public AlignerFactory {
const bool strandFix_;
const bool rangeMode_;
const bool verbose_;
+ const bool quiet_;
const uint32_t seed_;
};
View
@@ -39,6 +39,7 @@ class Unpaired1mmAlignerV1Factory : public AlignerFactory {
bool strandFix,
bool rangeMode,
bool verbose,
+ bool quiet,
uint32_t seed) :
ebwtFw_(ebwtFw),
ebwtBw_(ebwtBw),
@@ -56,6 +57,7 @@ class Unpaired1mmAlignerV1Factory : public AlignerFactory {
strandFix_(strandFix),
rangeMode_(rangeMode),
verbose_(verbose),
+ quiet_(quiet),
seed_(seed)
{
assert(ebwtFw.isInMemory());
@@ -144,7 +146,7 @@ class Unpaired1mmAlignerV1Factory : public AlignerFactory {
return new UnpairedAlignerV2<EbwtRangeSource>(
params, dr, rchase,
sink_, sinkPtFactory_, sinkPt, os_, rangeMode_, verbose_,
- INT_MAX, pool_, NULL, NULL);
+ quiet_, INT_MAX, pool_, NULL, NULL);
}
private:
@@ -164,6 +166,7 @@ class Unpaired1mmAlignerV1Factory : public AlignerFactory {
bool strandFix_;
bool rangeMode_;
bool verbose_;
+ bool quiet_;
uint32_t seed_;
};
@@ -203,6 +206,7 @@ class Paired1mmAlignerV1Factory : public AlignerFactory {
bool strandFix,
bool rangeMode,
bool verbose,
+ bool quiet,
uint32_t seed) :
ebwtFw_(ebwtFw),
ebwtBw_(ebwtBw),
@@ -230,6 +234,7 @@ class Paired1mmAlignerV1Factory : public AlignerFactory {
strandFix_(strandFix),
rangeMode_(rangeMode),
verbose_(verbose),
+ quiet_(quiet),
seed_(seed)
{
assert(ebwtBw != NULL);
@@ -424,7 +429,7 @@ class Paired1mmAlignerV1Factory : public AlignerFactory {
refAligner, rchase,
sink_, sinkPtFactory_, sinkPt, mate1fw_, mate2fw_,
peInner_, peOuter_, dontReconcile_, symCeil_, mixedThresh_,
- mixedAttemptLim_, refs_, rangeMode_, verbose_,
+ mixedAttemptLim_, refs_, rangeMode_, verbose_, quiet_,
INT_MAX, pool_, NULL);
delete dr1FwVec;
delete dr1RcVec;
@@ -440,7 +445,7 @@ class Paired1mmAlignerV1Factory : public AlignerFactory {
sinkPt, sinkPtSe1, sinkPtSe2,
mate1fw_, mate2fw_,
peInner_, peOuter_,
- mixedAttemptLim_, refs_, rangeMode_, verbose_,
+ mixedAttemptLim_, refs_, rangeMode_, verbose_, quiet_,
INT_MAX, pool_, NULL);
delete dr1FwVec;
return al;
@@ -475,6 +480,7 @@ class Paired1mmAlignerV1Factory : public AlignerFactory {
const bool strandFix_;
const bool rangeMode_;
const bool verbose_;
+ const bool quiet_;
const uint32_t seed_;
};
View
@@ -40,6 +40,7 @@ class Unpaired23mmAlignerV1Factory : public AlignerFactory {
bool strandFix,
bool rangeMode,
bool verbose,
+ bool quiet,
uint32_t seed) :
ebwtFw_(ebwtFw),
ebwtBw_(ebwtBw),
@@ -57,6 +58,7 @@ class Unpaired23mmAlignerV1Factory : public AlignerFactory {
strandFix_(strandFix),
rangeMode_(rangeMode),
verbose_(verbose),
+ quiet_(quiet),
seed_(seed)
{
assert(ebwtFw.isInMemory());
@@ -213,7 +215,7 @@ class Unpaired23mmAlignerV1Factory : public AlignerFactory {
return new UnpairedAlignerV2<EbwtRangeSource>(
params, dr, rchase,
sink_, sinkPtFactory_, sinkPt, os_, rangeMode_, verbose_,
- INT_MAX, pool_, NULL, NULL);
+ quiet_, INT_MAX, pool_, NULL, NULL);
}
private:
@@ -234,6 +236,7 @@ class Unpaired23mmAlignerV1Factory : public AlignerFactory {
const bool strandFix_;
const bool rangeMode_;
const bool verbose_;
+ const bool quiet_;
uint32_t seed_;
};
@@ -275,6 +278,7 @@ class Paired23mmAlignerV1Factory : public AlignerFactory {
bool strandFix,
bool rangeMode,
bool verbose,
+ bool quiet,
uint32_t seed) :
ebwtFw_(ebwtFw),
ebwtBw_(ebwtBw),
@@ -303,6 +307,7 @@ class Paired23mmAlignerV1Factory : public AlignerFactory {
strandFix_(strandFix),
rangeMode_(rangeMode),
verbose_(verbose),
+ quiet_(quiet),
seed_(seed)
{
assert(ebwtBw != NULL);
@@ -621,7 +626,7 @@ class Paired23mmAlignerV1Factory : public AlignerFactory {
refAligner, rchase,
sink_, sinkPtFactory_, sinkPt, mate1fw_, mate2fw_,
peInner_, peOuter_, dontReconcile_, symCeil_, mixedThresh_,
- mixedAttemptLim_, refs_, rangeMode_, verbose_,
+ mixedAttemptLim_, refs_, rangeMode_, verbose_, quiet_,
INT_MAX, pool_, NULL);
delete dr1FwVec;
delete dr1RcVec;
@@ -637,7 +642,7 @@ class Paired23mmAlignerV1Factory : public AlignerFactory {
sinkPt, sinkPtSe1, sinkPtSe2,
mate1fw_, mate2fw_,
peInner_, peOuter_,
- mixedAttemptLim_, refs_, rangeMode_, verbose_,
+ mixedAttemptLim_, refs_, rangeMode_, verbose_, quiet_,
INT_MAX, pool_, NULL);
delete dr1FwVec;
return al;
@@ -673,6 +678,7 @@ class Paired23mmAlignerV1Factory : public AlignerFactory {
const bool strandFix_;
const bool rangeMode_;
const bool verbose_;
+ const bool quiet_;
const uint32_t seed_;
};
Oops, something went wrong.

0 comments on commit 4f02e10

Please sign in to comment.