]> git.donarmstrong.com Git - bamtools.git/blobdiff - BamMultiReader.h
Minor formatting cleanup in BamIndex.*
[bamtools.git] / BamMultiReader.h
index 3d9024c40ce9927e13e3588acb82d4d09b7711a7..bd36d7160e0d18aee8d63c8699262c4a296695bc 100644 (file)
@@ -3,7 +3,7 @@
 // Marth Lab, Department of Biology, Boston College\r
 // All rights reserved.\r
 // ---------------------------------------------------------------------------\r
-// Last modified: 22 February 2010 (EG)\r
+// Last modified: 20 July 2010 (DB)\r
 // ---------------------------------------------------------------------------\r
 // Functionality for simultaneously reading multiple BAM files\r
 // ***************************************************************************\r
@@ -43,6 +43,9 @@ class BamMultiReader {
         int CurrentRefID;\r
         int CurrentLeft;\r
 \r
+        // region under analysis, specified using SetRegion\r
+        BamRegion Region;\r
+\r
         // ----------------------\r
         // BAM file operations\r
         // ----------------------\r
@@ -56,11 +59,15 @@ class BamMultiReader {
         // indexes.\r
         // @coreMode - setup our first alignments using GetNextAlignmentCore();\r
         // also useful for merging\r
-        void Open(const vector<string> filenames, bool openIndexes = true, bool coreMode = false);\r
+        bool Open(const vector<string> filenames, bool openIndexes = true, bool coreMode = false, bool useDefaultIndex = true);\r
 \r
         // performs random-access jump to reference, position\r
         bool Jump(int refID, int position = 0);\r
 \r
+        // sets the target region\r
+        bool SetRegion(const BamRegion& region);\r
+        bool SetRegion(const int&, const int&, const int&, const int&); // convenience function to above\r
+\r
         // returns file pointers to beginning of alignments\r
         bool Rewind(void);\r
 \r
@@ -99,13 +106,14 @@ class BamMultiReader {
         // ----------------------\r
 \r
         // creates index for BAM files which lack them, saves to files (default = bamFilename + ".bai")\r
-        bool CreateIndexes(void);\r
+        bool CreateIndexes(bool useDefaultIndex = true);\r
 \r
         //const int GetReferenceID(const string& refName) const;\r
 \r
         // utility\r
         void PrintFilenames(void);\r
         void DumpAlignmentIndex(void);\r
+        void UpdateAlignments(void); // updates our alignment cache\r
 \r
     // private implementation\r
     private:\r