- // creates index for BAM file, saves to file\r
- // default behavior is to create the BAM standard index (".bai")\r
- // set flag to false to create the BamTools-specific index (".bti")\r
- bool CreateIndex(bool useStandardIndex = true);\r
+ // creates an index file for current BAM file, using the requested index type\r
+ bool CreateIndex(const BamIndex::IndexType& type = BamIndex::STANDARD);\r
+ // returns true if index data is available\r
+ bool HasIndex(void) const;\r
+ // looks in BAM file's directory for a matching index file\r
+ bool LocateIndex(const BamIndex::IndexType& preferredType = BamIndex::STANDARD);\r
+ // opens a BAM index file\r
+ bool OpenIndex(const std::string& indexFilename);\r
+ // sets a custom BamIndex on this reader\r
+ void SetIndex(BamIndex* index);\r
+\r
+ // ----------------------\r
+ // error handling\r
+ // ----------------------\r
+\r
+ // returns a human-readable description of the last error that occurred\r
+ std::string GetErrorString(void) const;\r