Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 9 additions & 17 deletions src/pairToBed/pairToBed.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,14 +97,7 @@ void BedIntersectPE::FindOverlaps(const BEDPE &a, vector<BED> &hits1, vector<BED
// is there enough overlap relative to the user's request? (default ~ 1bp)
if ( ( (float) overlapBases / (float) aLength ) >= _overlapFraction ) {
numOverlapsEnd1++;

if (type == "either") {
_bedA->reportBedPETab(a);
_bedB->reportBedNewLine(*h);
}
else {
qualityHits1.push_back(*h);
}
qualityHits1.push_back(*h);
}
}
}
Expand All @@ -128,20 +121,18 @@ void BedIntersectPE::FindOverlaps(const BEDPE &a, vector<BED> &hits1, vector<BED
// is there enough overlap relative to the user's request? (default ~ 1bp)
if ( ( (float) overlapBases / (float) aLength ) >= _overlapFraction ) {
numOverlapsEnd2++;

if (type == "either") {
_bedA->reportBedPETab(a);
_bedB->reportBedNewLine(*h);
}
else {
qualityHits2.push_back(*h);
}
qualityHits2.push_back(*h);
}
}
}

// Now report the hits depending on what the user has requested.
if (type == "neither") {
if (type == "either") {
if ( (numOverlapsEnd1 > 0) || (numOverlapsEnd2 > 0) ) {
_bedA->reportBedPENewLine(a);
}
}
else if (type == "neither") {
if ( (numOverlapsEnd1 == 0) && (numOverlapsEnd2 == 0) ) {
_bedA->reportBedPENewLine(a);
}
Expand Down Expand Up @@ -189,6 +180,7 @@ void BedIntersectPE::FindOverlaps(const BEDPE &a, vector<BED> &hits1, vector<BED
}
}
}

}


Expand Down