From 4777128948b4cb06590378ab8da4cb6ab3a2cf65 Mon Sep 17 00:00:00 2001
From: Aaron <aaronquinlan@gmail.com>
Date: Tue, 6 Sep 2011 22:27:18 -0400
Subject: [PATCH] Fixed pairToPair's -type notBoth mode

---
 src/pairToPair/pairToPair.cpp | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/pairToPair/pairToPair.cpp b/src/pairToPair/pairToPair.cpp
index 8cc90e77..58d52140 100644
--- a/src/pairToPair/pairToPair.cpp
+++ b/src/pairToPair/pairToPair.cpp
@@ -123,8 +123,7 @@ void PairToPair::FindOverlaps(const BEDPE &a) {
             found1 = FindHitsOnBothEnds(a, hitsA1B1, hitsA2B2);
         if ((hitsA2B1.size() > 0) || (hitsA1B2.size() > 0))
             found2 = FindHitsOnBothEnds(a, hitsA2B1, hitsA1B2);
-
-        if (!found1 || !found2)
+        if (found1 == false && found2 == false)
             _bedA->reportBedPENewLine(a);
     }
     else if (_searchType == "either") {
@@ -151,7 +150,7 @@ bool PairToPair::FindHitsOnBothEnds(const BEDPE &a, const vector<MATE> &qualityH
     for (map<unsigned int, vector<MATE>, less<unsigned int> >::iterator m = hitsMap.begin(); m != hitsMap.end(); ++m) {
         
         // hits on both sides
-        if (m->second.size() == 2) {
+        if (m->second.size() >= 2) {
             bothFound = true;
             MATE b1 = m->second[0];
             MATE b2 = m->second[1];
-- 
GitLab