Skip to content

Commit

Permalink
Allow partial read placements for bubbles at the edges of tigs
Browse files Browse the repository at this point in the history
  • Loading branch information
skoren committed May 15, 2020
1 parent 3430d35 commit 9e1cf35
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/bogart/AS_BAT_MergeOrphans.C
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ findOrphanReadPlacements(TigVector &tigs,

vector<overlapPlacement> placements;

placeReadUsingOverlaps(tigs, NULL, rdA->ident, placements, placeRead_noExtend);
placeReadUsingOverlaps(tigs, NULL, rdA->ident, placements, allowOrphanPlacement ? placeRead_all : placeRead_noExtend);

// Weed out placements that aren't for orphans, or that are for orphans but are poor quality. Or are to ourself!

Expand Down
6 changes: 5 additions & 1 deletion src/bogart/AS_BAT_PlaceReadUsingOverlaps.C
Original file line number Diff line number Diff line change
Expand Up @@ -423,12 +423,16 @@ placeRead_computePlacement(overlapPlacement &op,
op.verified.end = endVer3;
#endif

// Finally, limit verified to be the extent of the tig, or the extent of the placement.
// Finally, limit coordinates to be the extent of the tig, or the extent of the placement.

if (isFwd) {
if (op.position.bgn < 0) op.position.bgn = 0;
if (op.position.end > tigLen) op.position.end = tigLen;
if (op.verified.bgn < 0) op.verified.bgn = 0;
if (op.verified.end > tigLen) op.verified.end = tigLen;
} else {
if (op.position.bgn > tigLen) op.position.bgn = tigLen;
if (op.position.end < 0) op.position.end = 0;
if (op.verified.bgn > tigLen) op.verified.bgn = tigLen;
if (op.verified.end < 0) op.verified.end = 0;
}
Expand Down

0 comments on commit 9e1cf35

Please sign in to comment.