X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=src%2Fapi%2FBamMultiReader.h;h=76d0810e2f6fa411b5cf00e80426304292c03d69;hb=9f1ce8c47aeadb6dc1320b52ee671c3341b97935;hp=561ce7a1e4d4407e2c85975b3a2ab2cd455a5ee3;hpb=c1fc1c5423ca73a1b5bcbe790650821d73e5959c;p=bamtools.git diff --git a/src/api/BamMultiReader.h b/src/api/BamMultiReader.h index 561ce7a..76d0810 100644 --- a/src/api/BamMultiReader.h +++ b/src/api/BamMultiReader.h @@ -2,7 +2,7 @@ // BamMultiReader.h (c) 2010 Erik Garrison, Derek Barnett // Marth Lab, Department of Biology, Boston College // --------------------------------------------------------------------------- -// Last modified: 15 March 2011 (DB) +// Last modified: 10 October 2011 (DB) // --------------------------------------------------------------------------- // Convenience class for reading multiple BAM files. // *************************************************************************** @@ -10,8 +10,8 @@ #ifndef BAMMULTIREADER_H #define BAMMULTIREADER_H -#include -#include +#include "api/api_global.h" +#include "api/BamReader.h" #include #include #include @@ -25,12 +25,6 @@ namespace Internal { class API_EXPORT BamMultiReader { - public: - enum SortOrder { SortedByPosition = 0 - , SortedByReadName - , Unsorted - }; - // constructor / destructor public: BamMultiReader(void); @@ -44,9 +38,9 @@ class API_EXPORT BamMultiReader { // ---------------------- // closes all open BAM files - void Close(void); + bool Close(void); // close only the requested BAM file - void CloseFile(const std::string& filename); + bool CloseFile(const std::string& filename); // returns list of filenames for all open BAM files const std::vector Filenames(void) const; // returns true if multireader has any open BAM files @@ -73,12 +67,9 @@ class API_EXPORT BamMultiReader { // retrieves next available alignment bool GetNextAlignment(BamAlignment& alignment); - // retrieves next available alignmnet (without populating the alignment's string data fields) + // retrieves next available alignment (without populating the alignment's string data fields) bool GetNextAlignmentCore(BamAlignment& alignment); - // sets the expected sorting order for reading across multiple BAM files - void SetSortOrder(const SortOrder& order); - // ---------------------- // access auxiliary data // ---------------------- @@ -109,12 +100,12 @@ class API_EXPORT BamMultiReader { // changes the caching behavior of the index data void SetIndexCacheMode(const BamIndex::IndexCacheMode& mode); - // deprecated methods - public: - // returns \c true if all BAM files have index data available. - bool IsIndexLoaded(void) const; - // convenience method for printing filenames to stdout - void PrintFilenames(void) const; + // ---------------------- + // error handling + // ---------------------- + + // returns a human-readable description of the last error that occurred + std::string GetErrorString(void) const; // private implementation private: