// Marth Lab, Department of Biology, Boston College\r
// All rights reserved.\r
// ---------------------------------------------------------------------------\r
-// Last modified: 2 September 2010 (DB)\r
+// Last modified: 3 September 2010 (DB)\r
// ---------------------------------------------------------------------------\r
// Uses BGZF routines were adapted from the bgzf.c code developed at the Broad\r
// Institute.\r
// performs random-access jump to reference, position\r
bool Jump(int refID, int position = 0);\r
// opens BAM file (and optional BAM index file, if provided)\r
- bool Open(const std::string& filename, const std::string& indexFilename = "");\r
+ // @lookForIndex - if no indexFilename provided, look for an existing index file\r
+ // @preferStandardIndex - if true, give priority in index file searching to standard BAM index\r
+ bool Open(const std::string& filename, \r
+ const std::string& indexFilename = "", \r
+ const bool lookForIndex = false, \r
+ const bool preferStandardIndex = false);\r
// returns file pointer to beginning of alignments\r
bool Rewind(void);\r
// sets a region of interest (with left & right bound reference/position)\r
// BAM index operations\r
// ----------------------\r
\r
- // creates index for BAM file, saves to file (default = bamFilename + ".bai")\r
- bool CreateIndex(bool useDefaultIndex = true);\r
+ // 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
\r
// private implementation\r
private:\r