From f50d16f0062144dd29b7dc92b120b25878c94fae Mon Sep 17 00:00:00 2001 From: Jeremiah Wala Date: Thu, 18 Jun 2015 17:00:36 -0400 Subject: [PATCH] fixed off by one issue --- src/GenomicRegion.cpp | 4 ++-- src/GenomicRegionCollection.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/GenomicRegion.cpp b/src/GenomicRegion.cpp index e44c349dd..2c7bfc307 100644 --- a/src/GenomicRegion.cpp +++ b/src/GenomicRegion.cpp @@ -145,9 +145,9 @@ GenomicRegion::GenomicRegion(const std::string& reg, bam_hdr_t* h) } chr = tid; - pos1 = beg; + pos1 = beg+1; pos2 = end; - + } // constructor for SnowTools::GenomicRegion that takes strings. Assumes chr string is in diff --git a/src/GenomicRegionCollection.cpp b/src/GenomicRegionCollection.cpp index 9938e8f95..18b6ee8df 100644 --- a/src/GenomicRegionCollection.cpp +++ b/src/GenomicRegionCollection.cpp @@ -408,7 +408,7 @@ GenomicRegionCollection::GenomicRegionCollection(const T& gr) template GRC GenomicRegionCollection::intersection(GRC& subject, bool ignore_strand /* false */) { - std::vector sub, que; + std::vector sub, que; GRC out = this->findOverlaps(subject, que, sub, ignore_strand); return out; }