// 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
// 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
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 {
// 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