1 // ***************************************************************************
2 // bamtools_fasta.h (c) 2010 Derek Barnett, Erik Garrison
3 // Marth Lab, Department of Biology, Boston College
4 // All rights reserved.
5 // ---------------------------------------------------------------------------
6 // Last modified: 19 November 2010
7 // ---------------------------------------------------------------------------
8 // Provides FASTA reading/indexing functionality.
9 // ***************************************************************************
11 #ifndef BAMTOOLS_FASTA_H
12 #define BAMTOOLS_FASTA_H
14 #include <utils/utils_global.h>
19 class UTILS_EXPORT Fasta {
26 // file-handling methods
29 bool Open(const std::string& filename, const std::string& indexFilename = "");
31 // sequence access methods
33 bool GetBase(const int& refID, const int& position, char& base);
34 bool GetSequence(const int& refId, const int& start, const int& stop, std::string& sequence);
36 // index-handling methods
38 bool CreateIndex(const std::string& indexFilename);
40 // internal implementation
48 #endif // BAMTOOLS_FASTA_H