]> git.donarmstrong.com Git - bamtools.git/blob - src/utils/bamtools_fasta.h
Added UTILS_EXPORT macro to classes in BamTools utility library
[bamtools.git] / src / utils / bamtools_fasta.h
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 // ***************************************************************************
10
11 #ifndef BAMTOOLS_FASTA_H
12 #define BAMTOOLS_FASTA_H
13
14 #include <utils/utils_global.h>
15 #include <string>
16
17 namespace BamTools {
18
19 class UTILS_EXPORT Fasta {
20   
21     // ctor & dtor
22     public:
23         Fasta(void);
24         ~Fasta(void);
25         
26     // file-handling methods
27     public:
28         bool Close(void);
29         bool Open(const std::string& filename, const std::string& indexFilename = "");
30         
31     // sequence access methods
32     public:
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);
35         
36     // index-handling methods
37     public:
38         bool CreateIndex(const std::string& indexFilename);
39
40     // internal implementation
41     private:
42         struct FastaPrivate;
43         FastaPrivate* d;
44 };
45   
46 } // BAMTOOLS_FASTA_H
47   
48 #endif // BAMTOOLS_FASTA_H