1 // ***************************************************************************
2 // bamtools_fasta.h (c) 2010 Derek Barnett, Erik Garrison
3 // Marth Lab, Department of Biology, Boston College
4 // ---------------------------------------------------------------------------
5 // Last modified: 19 November 2010
6 // ---------------------------------------------------------------------------
7 // Provides FASTA reading/indexing functionality.
8 // ***************************************************************************
10 #ifndef BAMTOOLS_FASTA_H
11 #define BAMTOOLS_FASTA_H
13 #include <utils/utils_global.h>
18 class UTILS_EXPORT Fasta {
25 // file-handling methods
28 bool Open(const std::string& filename, const std::string& indexFilename = "");
30 // sequence access methods
32 bool GetBase(const int& refID, const int& position, char& base);
33 bool GetSequence(const int& refId, const int& start, const int& stop, std::string& sequence);
35 // index-handling methods
37 bool CreateIndex(const std::string& indexFilename);
39 // internal implementation
47 #endif // BAMTOOLS_FASTA_H