Skip to content
Snippets Groups Projects
Commit 0bbd02c3 authored by Aaron's avatar Aaron
Browse files

Fixed bug preventing closest feature detection for features with start < 2048000.

parent 5d8e5739
No related branches found
No related tags found
No related merge requests found
......@@ -62,11 +62,15 @@ void BedClosest::FindWindowOverlaps(BED &a, vector<BED> &hits) {
// add some slop (starting at 0 bases) to a in hopes
// of finding a hit in B
if ((a.start - slop) > 0) aFudgeStart = a.start - slop;
else aFudgeStart = 0;
if ((static_cast<int>(a.start) - slop) > 0)
aFudgeStart = a.start - slop;
else
aFudgeStart = 0;
if ((a.start + slop) < 2 * MAXSLOP) aFudgeEnd = a.end + slop;
else aFudgeEnd = 2 * MAXSLOP;
if ((a.start + slop) < (2 * MAXSLOP))
aFudgeEnd = a.end + slop;
else
aFudgeEnd = 2 * MAXSLOP;
_bedB->FindOverlapsPerBin(a.chrom, aFudgeStart, aFudgeEnd, a.strand, hits, _forceStrand);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment