Skip to content

Commit

Permalink
Initial colorspace deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
ch4rr0 committed May 17, 2020
1 parent 9890dd1 commit a7cc3e3
Show file tree
Hide file tree
Showing 31 changed files with 216 additions and 1,625 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ endif

SEARCH_CPPS = qual.cpp pat.cpp ebwt_search_util.cpp ref_aligner.cpp \
log.cpp hit_set.cpp sam.cpp \
color.cpp color_dec.cpp hit.cpp
hit.cpp
SEARCH_CPPS_MAIN = $(SEARCH_CPPS) bowtie_main.cpp

BUILD_CPPS =
Expand Down
47 changes: 0 additions & 47 deletions aligner.h
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,6 @@ class UnpairedAlignerV2 : public Aligner {
const HitSinkPerThreadFactory& sinkPtFactory,
HitSinkPerThread* sinkPt,
vector<BTRefString >& os, // TODO: remove this, not used
const BitPairReference* refs,
bool rangeMode,
bool verbose,
bool quiet,
Expand All @@ -397,7 +396,6 @@ class UnpairedAlignerV2 : public Aligner {
int *btCnt = NULL,
AlignerMetrics *metrics = NULL) :
Aligner(true, rangeMode),
refs_(refs),
doneFirst_(true),
firstIsFw_(true),
chase_(false),
Expand Down Expand Up @@ -470,19 +468,12 @@ class UnpairedAlignerV2 : public Aligner {
{
bool ebwtFw = ra.ebwt->fw();
params_->setFw(ra.fw);
assert_eq(bufa_->color, color);
return params_->reportHit(
ra.fw ? (ebwtFw? bufa_->patFw : bufa_->patFwRev) :
(ebwtFw? bufa_->patRc : bufa_->patRcRev),
ra.fw ? (ebwtFw? &bufa_->qual : &bufa_->qualRev) :
(ebwtFw? &bufa_->qualRev : &bufa_->qual),
&bufa_->name,
bufa_->color,
bufa_->primer,
bufa_->trimc,
colorExEnds,
snpPhred,
refs_,
ebwtFw,
ra.mms, // mismatch positions
ra.refcs, // reference characters for mms
Expand Down Expand Up @@ -574,9 +565,6 @@ class UnpairedAlignerV2 : public Aligner {

protected:

// Reference sequences (needed for colorspace decoding)
const BitPairReference* refs_;

// Progress state
bool doneFirst_;
bool firstIsFw_;
Expand Down Expand Up @@ -881,20 +869,13 @@ class PairedBWAlignerV1 : public Aligner {
bool ret;
assert(!params_->sink().exceededOverThresh());
params_->setFw(rL.fw);
assert_eq(bufL->color, color);
// Print upstream mate first
ret = params_->reportHit(
rL.fw ? (ebwtFwL? bufL->patFw : bufL->patFwRev) :
(ebwtFwL? bufL->patRc : bufL->patRcRev),
rL.fw ? (ebwtFwL? &bufL->qual : &bufL->qualRev) :
(ebwtFwL? &bufL->qualRev : &bufL->qual),
&bufL->name,
bufL->color,
bufL->primer,
bufL->trimc,
colorExEnds,
snpPhred,
refs_,
ebwtFwL,
rL.mms, // mismatch positions
rL.refcs, // reference characters for mms
Expand All @@ -916,19 +897,12 @@ class PairedBWAlignerV1 : public Aligner {
return true; // can happen when -m is set
}
params_->setFw(rR.fw);
assert_eq(bufR->color, color);
ret = params_->reportHit(
rR.fw ? (ebwtFwR? bufR->patFw : bufR->patFwRev) :
(ebwtFwR? bufR->patRc : bufR->patRcRev),
rR.fw ? (ebwtFwR? &bufR->qual : &bufR->qualRev) :
(ebwtFwR? &bufR->qualRev : &bufR->qual),
&bufR->name,
bufR->color,
bufR->primer,
bufR->trimc,
colorExEnds,
snpPhred,
refs_,
ebwtFwR,
rR.mms, // mismatch positions
rR.refcs, // reference characters for mms
Expand Down Expand Up @@ -1754,20 +1728,13 @@ class PairedBWAlignerV2 : public Aligner {
bool ret;
assert(!params_->sink().exceededOverThresh());
params_->setFw(rL.fw);
assert_eq(bufL->color, color);
// Print upstream mate first
ret = params_->reportHit(
rL.fw ? (ebwtFwL? bufL->patFw : bufL->patFwRev) :
(ebwtFwL? bufL->patRc : bufL->patRcRev),
rL.fw ? (ebwtFwL? &bufL->qual : &bufL->qualRev) :
(ebwtFwL? &bufL->qualRev : &bufL->qual),
&bufL->name,
bufL->color,
bufL->primer,
bufL->trimc,
colorExEnds,
snpPhred,
refs_,
ebwtFwL,
rL.mms, // mismatch positions
rL.refcs, // reference characters for mms
Expand All @@ -1789,19 +1756,12 @@ class PairedBWAlignerV2 : public Aligner {
return true; // can happen when -m is set
}
params_->setFw(rR.fw);
assert_eq(bufR->color, color);
ret = params_->reportHit(
rR.fw ? (ebwtFwR? bufR->patFw : bufR->patFwRev) :
(ebwtFwR? bufR->patRc : bufR->patRcRev),
rR.fw ? (ebwtFwR? &bufR->qual : &bufR->qualRev) :
(ebwtFwR? &bufR->qualRev : &bufR->qual),
&bufR->name,
bufR->color,
bufR->primer,
bufR->trimc,
colorExEnds,
snpPhred,
refs_,
ebwtFwR,
rR.mms, // mismatch positions
rR.refcs, // reference characters for mms
Expand Down Expand Up @@ -1834,20 +1794,13 @@ class PairedBWAlignerV2 : public Aligner {
Read* buf = r.mate1 ? bufa_ : bufb_;
bool ebwtFw = r.ebwt->fw();
uint32_t len = r.mate1 ? alen_ : blen_;
assert_eq(buf->color, color);
// Print upstream mate first
if(params->reportHit(
r.fw ? (ebwtFw? buf->patFw : buf->patFwRev) :
(ebwtFw? buf->patRc : buf->patRcRev),
r.fw ? (ebwtFw? &buf->qual : &buf->qualRev) :
(ebwtFw? &buf->qualRev : &buf->qual),
&buf->name,
buf->color,
buf->primer,
buf->trimc,
colorExEnds,
snpPhred,
refs_,
ebwtFw,
r.mms, // mismatch positions
r.refcs, // reference characters for mms
Expand Down
10 changes: 2 additions & 8 deletions aligner_0mm.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ class UnpairedExactAlignerV1Factory : public AlignerFactory {
RangeCache* cacheBw,
uint32_t cacheLimit,
ChunkPool *pool,
BitPairReference* refs,
vector<BTRefString >& os,
bool maqPenalty,
bool qualOrder,
Expand All @@ -52,7 +51,6 @@ class UnpairedExactAlignerV1Factory : public AlignerFactory {
cacheBw_(cacheBw),
cacheLimit_(cacheLimit),
pool_(pool),
refs_(refs),
os_(os),
maqPenalty_(maqPenalty),
qualOrder_(qualOrder),
Expand Down Expand Up @@ -110,7 +108,7 @@ class UnpairedExactAlignerV1Factory : public AlignerFactory {

return new UnpairedAlignerV2<EbwtRangeSource>(
params, dr, rchase,
sink_, sinkPtFactory_, sinkPt, os_, refs_,
sink_, sinkPtFactory_, sinkPt, os_,
rangeMode_, verbose_, quiet_, INT_MAX, pool_, NULL, NULL);
}

Expand All @@ -125,7 +123,6 @@ class UnpairedExactAlignerV1Factory : public AlignerFactory {
RangeCache *cacheBw_;
const uint32_t cacheLimit_;
ChunkPool *pool_;
BitPairReference* refs_;
vector<BTRefString >& os_;
bool maqPenalty_;
bool qualOrder_;
Expand All @@ -146,7 +143,6 @@ class PairedExactAlignerV1Factory : public AlignerFactory {
PairedExactAlignerV1Factory(
Ebwt& ebwtFw,
Ebwt* ebwtBw,
bool color,
bool doFw,
bool doRc,
bool v1,
Expand Down Expand Up @@ -175,7 +171,6 @@ class PairedExactAlignerV1Factory : public AlignerFactory {
bool quiet,
uint32_t seed) :
ebwtFw_(ebwtFw),
color_(color),
doFw_(doFw),
doRc_(doRc),
v1_(v1),
Expand Down Expand Up @@ -305,7 +300,7 @@ class PairedExactAlignerV1Factory : public AlignerFactory {
}

RefAligner* refAligner
= new ExactRefAligner(color_, verbose_, quiet_);
= new ExactRefAligner(verbose_, quiet_);

// Set up a RangeChaser
RangeChaser* rchase =
Expand Down Expand Up @@ -347,7 +342,6 @@ class PairedExactAlignerV1Factory : public AlignerFactory {
private:
Ebwt& ebwtFw_;
Ebwt* ebwtBw_;
bool color_;
bool doFw_;
bool doRc_;
bool v1_;
Expand Down
10 changes: 2 additions & 8 deletions aligner_1mm.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ class Unpaired1mmAlignerV1Factory : public AlignerFactory {
RangeCache *cacheBw,
uint32_t cacheLimit,
ChunkPool *pool,
BitPairReference* refs,
vector<BTRefString >& os,
bool maqPenalty,
bool qualOrder,
Expand All @@ -53,7 +52,6 @@ class Unpaired1mmAlignerV1Factory : public AlignerFactory {
cacheBw_(cacheBw),
cacheLimit_(cacheLimit),
pool_(pool),
refs_(refs),
os_(os),
maqPenalty_(maqPenalty),
qualOrder_(qualOrder),
Expand Down Expand Up @@ -147,7 +145,7 @@ class Unpaired1mmAlignerV1Factory : public AlignerFactory {
// Set up the aligner
return new UnpairedAlignerV2<EbwtRangeSource>(
params, dr, rchase,
sink_, sinkPtFactory_, sinkPt, os_, refs_,
sink_, sinkPtFactory_, sinkPt, os_,
rangeMode_, verbose_, quiet_, INT_MAX, pool_, NULL, NULL);
}

Expand All @@ -162,7 +160,6 @@ class Unpaired1mmAlignerV1Factory : public AlignerFactory {
RangeCache *cacheBw_;
const uint32_t cacheLimit_;
ChunkPool *pool_;
BitPairReference* refs_;
vector<BTRefString >& os_;
const bool maqPenalty_;
const bool qualOrder_;
Expand All @@ -183,7 +180,6 @@ class Paired1mmAlignerV1Factory : public AlignerFactory {
Paired1mmAlignerV1Factory(
Ebwt& ebwtFw,
Ebwt* ebwtBw,
bool color,
bool doFw,
bool doRc,
bool v1,
Expand Down Expand Up @@ -213,7 +209,6 @@ class Paired1mmAlignerV1Factory : public AlignerFactory {
uint32_t seed) :
ebwtFw_(ebwtFw),
ebwtBw_(ebwtBw),
color_(color),
doFw_(doFw),
doRc_(doRc),
v1_(v1),
Expand Down Expand Up @@ -417,7 +412,7 @@ class Paired1mmAlignerV1Factory : public AlignerFactory {
}

RefAligner* refAligner =
new OneMMRefAligner(color_, verbose_, quiet_);
new OneMMRefAligner(verbose_, quiet_);

// Set up a RangeChaser
RangeChaser *rchase =
Expand Down Expand Up @@ -459,7 +454,6 @@ class Paired1mmAlignerV1Factory : public AlignerFactory {
private:
Ebwt& ebwtFw_;
Ebwt* ebwtBw_;
bool color_;
bool doFw_;
bool doRc_;
bool v1_;
Expand Down
11 changes: 4 additions & 7 deletions aligner_23mm.h
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ class Unpaired23mmAlignerV1Factory : public AlignerFactory {

return new UnpairedAlignerV2<EbwtRangeSource>(
params, dr, rchase,
sink_, sinkPtFactory_, sinkPt, os_, refs_,
sink_, sinkPtFactory_, sinkPt, os_,
rangeMode_, verbose_, quiet_, INT_MAX, pool_, NULL, NULL);
}

Expand All @@ -231,8 +231,8 @@ class Unpaired23mmAlignerV1Factory : public AlignerFactory {
RangeCache *cacheBw_;
const uint32_t cacheLimit_;
ChunkPool *pool_;
BitPairReference* refs_;
vector<BTRefString >& os_;
BitPairReference *refs_;
const bool maqPenalty_;
const bool qualOrder_;
const bool strandFix_;
Expand All @@ -253,7 +253,6 @@ class Paired23mmAlignerV1Factory : public AlignerFactory {
Paired23mmAlignerV1Factory(
Ebwt& ebwtFw,
Ebwt* ebwtBw,
bool color,
bool doFw,
bool doRc,
bool v1,
Expand Down Expand Up @@ -284,7 +283,6 @@ class Paired23mmAlignerV1Factory : public AlignerFactory {
uint32_t seed) :
ebwtFw_(ebwtFw),
ebwtBw_(ebwtBw),
color_(color),
doFw_(doFw),
doRc_(doRc),
v1_(v1),
Expand Down Expand Up @@ -609,9 +607,9 @@ class Paired23mmAlignerV1Factory : public AlignerFactory {

RefAligner* refAligner;
if(two_) {
refAligner = new TwoMMRefAligner(color_, verbose_, quiet_);
refAligner = new TwoMMRefAligner(verbose_, quiet_);
} else {
refAligner = new ThreeMMRefAligner(color_, verbose_, quiet_);
refAligner = new ThreeMMRefAligner(verbose_, quiet_);
}

// Set up a RangeChaser
Expand Down Expand Up @@ -654,7 +652,6 @@ class Paired23mmAlignerV1Factory : public AlignerFactory {
private:
Ebwt& ebwtFw_;
Ebwt* ebwtBw_;
bool color_;
bool doFw_;
bool doRc_;
bool v1_;
Expand Down
Loading

0 comments on commit a7cc3e3

Please sign in to comment.