Skip to content

Commit

Permalink
Add disabled compile time support for reclassifying contained reads a…
Browse files Browse the repository at this point in the history
…fter spurs.
  • Loading branch information
brianwalenz committed May 14, 2020
1 parent 8a86d93 commit 19075a9
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 0 deletions.
49 changes: 49 additions & 0 deletions src/bogart/AS_BAT_BestOverlapGraph.C
Original file line number Diff line number Diff line change
Expand Up @@ -1390,6 +1390,46 @@ BestOverlapGraph::emitGoodOverlaps(const char *prefix, const char *label) {



// More comments where this is called.
void
BestOverlapGraph::redoFindContains(void) {
uint32 fiLimit = RI->numReads();

// Recompute what reads are contained, taking into account the current
// state of covGap, lopsided, and spur markings.

findContains();

// That recompute possibly changed a dovetail read into a contained read,
// which would result in a best edge to/from a contained read. That is
// not allowed. So, brute force, remove all such edges.

for (uint32 fi=1; fi <= fiLimit; fi++) {
if (isContained(fi) == true) {
getBestEdgeOverlap(fi, false)->clear();
getBestEdgeOverlap(fi, true)->clear();
}

else {
uint32 id5 = getBestEdgeOverlap(fi, false)->readId();
uint32 id3 = getBestEdgeOverlap(fi, true)->readId();

if (isContained(id5))
getBestEdgeOverlap(fi, false)->clear();

if (isContained(id3))
getBestEdgeOverlap(fi, true)->clear();
}
}

// Lastly, recompute best edges for reads that can have a best edge and
// that also do not currently have a best edge.

findEdges(false);
}



void
BestOverlapGraph::checkForContainedDovetails(void) const {
uint32 fiLimit = RI->numReads();
Expand Down Expand Up @@ -1630,6 +1670,15 @@ BestOverlapGraph::BestOverlapGraph(double erateGraph,
// to 15 Mbp N50s. BAC resolution is worse.
//

//
// Find reads contained in some other read, and mark them as such. Reset
// the best edge for any read that now has an edge to a contained read.
//
// This is disabled because it has the potential to resurrect paths to
// spur ends.
//
//redoFindContains();

//
// All done! Do some final checks and cleanup, dump various logs and reports.
//
Expand Down
2 changes: 2 additions & 0 deletions src/bogart/AS_BAT_BestOverlapGraph.H
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,8 @@ private:

void findErrorRateThreshold(void);

void redoFindContains(void);

void checkForContainedDovetails(void) const;
void checkForCovGapEdges(void) const;

Expand Down

0 comments on commit 19075a9

Please sign in to comment.