]> git.donarmstrong.com Git - bamtools.git/commitdiff
Did some housekeeping in BamAux.h - moved some constants to the files where they...
authorDerek <derekwbarnett@gmail.com>
Thu, 16 Sep 2010 05:47:58 +0000 (01:47 -0400)
committerDerek <derekwbarnett@gmail.com>
Thu, 16 Sep 2010 05:47:58 +0000 (01:47 -0400)
src/api/BamAux.h
src/api/BamIndex.cpp
src/api/BamWriter.cpp

index a122b24496e74c4ffa581b646983818989545791..daad5a0a026e55cd7a0b377d66c488e9d9cf9165 100644 (file)
@@ -3,7 +3,7 @@
 // Marth Lab, Department of Biology, Boston College\r
 // All rights reserved.\r
 // ---------------------------------------------------------------------------\r
-// Last modified: 15 September 2010 (DB)\r
+// Last modified: 16 September 2010 (DB)\r
 // ---------------------------------------------------------------------------\r
 // Provides the basic constants, data structures, etc. for using BAM files\r
 // ***************************************************************************\r
 namespace BamTools {\r
 \r
 // BAM constants\r
-const int BAM_CORE_SIZE   = 32;\r
-const int BAM_CMATCH      = 0;\r
-const int BAM_CINS        = 1;\r
-const int BAM_CDEL        = 2;\r
-const int BAM_CREF_SKIP   = 3;\r
-const int BAM_CSOFT_CLIP  = 4;\r
-const int BAM_CHARD_CLIP  = 5;\r
-const int BAM_CPAD        = 6;\r
 const int BAM_CIGAR_SHIFT = 4;\r
 const int BAM_CIGAR_MASK  = ((1 << BAM_CIGAR_SHIFT) - 1);\r
-\r
-// BAM index constants\r
-const int MAX_BIN           = 37450;   // =(8^6-1)/7+1\r
-const int BAM_MIN_CHUNK_GAP = 32768;\r
-const int BAM_LIDX_SHIFT    = 14;\r
-\r
-// Explicit variable sizes\r
-const int BT_SIZEOF_INT = 4;\r
+const int BAM_CORE_SIZE   = 32;\r
 \r
 struct CigarOp;\r
 \r
index c628b793f3eb03b1c8f51f6671c98ff86ccbd266..a7f93de5fcbc5bef610667178a61614549b1db3c 100644 (file)
@@ -3,7 +3,7 @@
 // Marth Lab, Department of Biology, Boston College
 // All rights reserved.
 // ---------------------------------------------------------------------------
-// Last modified: 10 September 2010 (DB)
+// Last modified: 16 September 2010 (DB)
 // ---------------------------------------------------------------------------
 // Provides index functionality - both for the default (standardized) BAM 
 // index format (.bai) as well as a BamTools-specific (nonstandard) index 
@@ -52,6 +52,10 @@ bool BamIndex::HasAlignments(const int& referenceID) {
  
 namespace BamTools { 
 
+// BAM index constants
+const int MAX_BIN           = 37450;    // =(8^6-1)/7+1
+const int BAM_LIDX_SHIFT    = 14;  
+  
 // --------------------------------------------------
 // BamStandardIndex data structures & typedefs
 struct Chunk {
index 2be38bbe9d160668448c8d48a8e421025139f445..c3c94efa1d99231f77bca2fb6075b35f522c4b01 100644 (file)
@@ -3,7 +3,7 @@
 // Marth Lab, Department of Biology, Boston College\r
 // All rights reserved.\r
 // ---------------------------------------------------------------------------\r
-// Last modified: 17 August 2010 (DB)\r
+// Last modified: 16 September 2010 (DB)\r
 // ---------------------------------------------------------------------------\r
 // Uses BGZF routines were adapted from the bgzf.c code developed at the Broad\r
 // Institute.\r
 using namespace BamTools;\r
 using namespace std;\r
 \r
+namespace BamTools {\r
+\r
+// BAM constants\r
+const int BT_SIZEOF_INT   = 4;\r
+const int BAM_CMATCH      = 0;\r
+const int BAM_CINS        = 1;\r
+const int BAM_CDEL        = 2;\r
+const int BAM_CREF_SKIP   = 3;\r
+const int BAM_CSOFT_CLIP  = 4;\r
+const int BAM_CHARD_CLIP  = 5;\r
+const int BAM_CPAD        = 6;\r
+\r
+} // namespace BamTools\r
+\r
 struct BamWriter::BamWriterPrivate {\r
 \r
     // data members\r