6
|
1 // ***************************************************************************
|
|
2 // BamWriter.h (c) 2009 Michael Str�mberg, Derek Barnett
|
|
3 // Marth Lab, Department of Biology, Boston College
|
|
4 // All rights reserved.
|
|
5 // ---------------------------------------------------------------------------
|
|
6 // Last modified: 19 November 2010 (DB)
|
|
7 // ---------------------------------------------------------------------------
|
|
8 // Provides the basic functionality for producing BAM files
|
|
9 // ***************************************************************************
|
|
10
|
|
11 #ifndef BAMWRITER_H
|
|
12 #define BAMWRITER_H
|
|
13
|
|
14 #include <api_global.h>
|
|
15 #include <BamAlignment.h>
|
|
16 #include <string>
|
|
17
|
|
18 namespace BamTools {
|
|
19
|
|
20 namespace Internal {
|
|
21 class BamWriterPrivate;
|
|
22 } // namespace Internal
|
|
23
|
|
24 class API_EXPORT BamWriter {
|
|
25
|
|
26 // constructor/destructor
|
|
27 public:
|
|
28 BamWriter(void);
|
|
29 ~BamWriter(void);
|
|
30
|
|
31 // public interface
|
|
32 public:
|
|
33 // closes the alignment archive
|
|
34 void Close(void);
|
|
35 // opens the alignment archive
|
|
36 bool Open(const std::string& filename,
|
|
37 const std::string& samHeader,
|
|
38 const BamTools::RefVector& referenceSequences,
|
|
39 bool writeUncompressed = false);
|
|
40 // saves the alignment to the alignment archive
|
|
41 void SaveAlignment(const BamTools::BamAlignment& al);
|
|
42
|
|
43 // private implementation
|
|
44 private:
|
|
45 Internal::BamWriterPrivate* d;
|
|
46 };
|
|
47
|
|
48 } // namespace BamTools
|
|
49
|
|
50 #endif // BAMWRITER_H
|