]> git.donarmstrong.com Git - bamtools.git/blobdiff - src/api/BamAux.h
Converted intervals from 0-based, CLOSED to 0-based, HALF-OPEN
[bamtools.git] / src / api / BamAux.h
index 14e65476b4c1f69d02bf02e417ededdcc5e02985..610b3fccd8ed019343097c51de00f47f2507134a 100644 (file)
@@ -2,7 +2,7 @@
 // BamAux.h (c) 2009 Derek Barnett, Michael Str�mberg\r
 // Marth Lab, Department of Biology, Boston College\r
 // ---------------------------------------------------------------------------\r
-// Last modified: 7 October 2011 (DB)\r
+// Last modified: 8 October 2011 (DB)\r
 // ---------------------------------------------------------------------------\r
 // Provides data structures & utility methods that are used throughout the API.\r
 // ***************************************************************************\r
@@ -78,6 +78,13 @@ typedef std::vector<RefData> RefVector;
     \brief Represents a sequential genomic region\r
 \r
     Allowed to span multiple (sequential) references.\r
+\r
+    \warning BamRegion now represents a zero-based, HALF-OPEN interval.\r
+    In previous versions of BamTools (0.x & 1.x) all intervals were treated\r
+    as zero-based, CLOSED. I whole-heartedly apologize for any inconsistencies this\r
+    may have caused if you assumed that BT was always half-open; full aplogies also\r
+    to those who recognized that BamTools originally used a closed interval, but may\r
+    need to update their code to reflect this new change.\r
 */\r
 struct API_EXPORT BamRegion {\r
   \r
@@ -123,7 +130,7 @@ struct API_EXPORT BamRegion {
 \r
     //! Returns true if region has a right boundary\r
     bool isRightBoundSpecified(void) const {\r
-        return ( RightRefID >= 0 && RightPosition >= 0 );\r
+        return ( RightRefID >= 0 && RightPosition >= 1 );\r
     }\r
 };\r
 \r