From 956e384b0cfbd794691a8f645f33efad20122ebc Mon Sep 17 00:00:00 2001
From: Aaron <aaronquinlan@gmail.com>
Date: Fri, 20 Jul 2012 20:42:07 -0400
Subject: [PATCH] reset each bedpe

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

diff --git a/src/shuffleBed/shuffleBed.cpp b/src/shuffleBed/shuffleBed.cpp
index ac6f6228..5d72af4d 100644
--- a/src/shuffleBed/shuffleBed.cpp
+++ b/src/shuffleBed/shuffleBed.cpp
@@ -106,7 +106,7 @@ void BedShuffle::Shuffle() {
         int lineNum = 0;     // current input line number
         BedLineStatus status;
 
-        BEDPE bedEntry;
+        BEDPE bedEntry, nullBedPE;
         _bedpe->Open();
         while ((status = _bedpe->GetNextBedPE(bedEntry, lineNum)) != BED_INVALID) 
         {
@@ -114,6 +114,7 @@ void BedShuffle::Shuffle() {
                 ChoosePairedLocus(bedEntry);
                 _bedpe->reportBedPENewLine(bedEntry);
             }
+            bedEntry = nullBedPE;
         }
         _bedpe->Close();
     }
@@ -201,7 +202,7 @@ void BedShuffle::ShuffleWithExclusions() {
                     cerr << "Error, line " << _bed->_lineNum 
                          << ": tried " << MAX_TRIES 
                          << " potential loci for entry, but could not avoid "
-                         << "excluded regions.  Ignoring entry and moving on." 
+                         << "excluded regions.  Ignoring entry and moving on."
                          << endl;
                 }
                 else {
-- 
GitLab