Skip to content

Commit

Permalink
Include spur in the set of overlaps that are isOverlapBadQuality().
Browse files Browse the repository at this point in the history
  • Loading branch information
brianwalenz committed May 14, 2020
1 parent ed3c02f commit 911fd66
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions src/bogart/AS_BAT_BestOverlapGraph.C
Original file line number Diff line number Diff line change
Expand Up @@ -852,8 +852,9 @@ BestOverlapGraph::isOverlapBadQuality(BAToverlap& olap) const {
bool isIgnV = false;
bool isIgnI = false;
bool isBadL = false;
bool isBadG = false;
bool isBadS = false;
bool isBadO = false;
bool isBadC = false;

if (olap.erate() > _errorLimit) // Our only real test is on
isBadE = true; // overlap error rate.
Expand All @@ -870,9 +871,13 @@ BestOverlapGraph::isOverlapBadQuality(BAToverlap& olap) const {
(isLopsided(olap.b_iid) == true)) // lopsided read.
isBadL = true;

if ((isCoverageGap(olap.a_iid) == true) || // Bad if the edge touches a
(isCoverageGap(olap.b_iid) == true)) // coverage-gap read.
isBadC = true;
if ((isCoverageGap(olap.a_iid) == true) || // Bad if the edge touches a
(isCoverageGap(olap.b_iid) == true)) // coveragegap read.
isBadG = true;

if ((isSpur(olap.a_iid) == true) || // Bad if the edge touches a
(isSpur(olap.b_iid) == true)) // spurpath read.
isBadS = true;

if (_minOlapPercent > 0.0) {
uint32 lenA = RI->readLength(olap.a_iid); // But retract goodness if the
Expand All @@ -891,7 +896,8 @@ BestOverlapGraph::isOverlapBadQuality(BAToverlap& olap) const {
(isIgnV == true) ||
(isIgnI == true) ||
(isBadL == true) ||
(isBadC == true) ||
(isBadG == true) ||
(isBadS == true) ||
(isBadO == true));

// Now just a bunch of logging.
Expand All @@ -900,7 +906,7 @@ BestOverlapGraph::isOverlapBadQuality(BAToverlap& olap) const {
((olap.a_iid != 0) || // is specifically annoying (the default is to
(olap.a_iid == 0) || // log for all reads (!= 0).
(olap.a_iid == 0)))
writeLog("isOverlapBadQuality()-- %6d %6d %c hangs %6d %6d err %.5f -- %c%c%c%c%c%c\n",
writeLog("isOverlapBadQuality()-- %6d %6d %c hangs %6d %6d err %.5f -- %c%c%c%c%c%c%c\n",
olap.a_iid, olap.b_iid,
olap.flipped ? 'A' : 'N',
olap.a_hang,
Expand All @@ -910,7 +916,8 @@ BestOverlapGraph::isOverlapBadQuality(BAToverlap& olap) const {
(isIgnV) ? 't' : 'f',
(isIgnI) ? 't' : 'f',
(isBadL) ? 't' : 'f',
(isBadC) ? 't' : 'f',
(isBadG) ? 't' : 'f',
(isBadS) ? 't' : 'f',
(isBadO) ? 't' : 'f');

return(olap.filtered);
Expand Down

0 comments on commit 911fd66

Please sign in to comment.