]> git.donarmstrong.com Git - bamtools.git/blob - src/api/BamWriter.h
Migrated to CMake build system.
[bamtools.git] / src / api / BamWriter.h
1 // ***************************************************************************\r
2 // BamWriter.h (c) 2009 Michael Str�mberg, Derek Barnett\r
3 // Marth Lab, Department of Biology, Boston College\r
4 // All rights reserved.\r
5 // ---------------------------------------------------------------------------\r
6 // Last modified: 18 September 2010 (DB)\r
7 // ---------------------------------------------------------------------------\r
8 // Uses BGZF routines were adapted from the bgzf.c code developed at the Broad\r
9 // Institute.\r
10 // ---------------------------------------------------------------------------\r
11 // Provides the basic functionality for producing BAM files\r
12 // ***************************************************************************\r
13 \r
14 #ifndef BAMWRITER_H\r
15 #define BAMWRITER_H\r
16 \r
17 #include <string>\r
18 #include "BamAlignment.h"\r
19 \r
20 namespace BamTools {\r
21 \r
22 class BamWriter {\r
23 \r
24     // constructor/destructor\r
25     public:\r
26         BamWriter(void);\r
27         ~BamWriter(void);\r
28 \r
29     // public interface\r
30     public:\r
31         // closes the alignment archive\r
32         void Close(void);\r
33         // opens the alignment archive\r
34         bool Open(const std::string& filename, \r
35                   const std::string& samHeader, \r
36                   const BamTools::RefVector& referenceSequences, \r
37                   bool writeUncompressed = false);\r
38         // saves the alignment to the alignment archive\r
39         void SaveAlignment(const BamTools::BamAlignment& al);\r
40 \r
41     // private implementation\r
42     private:\r
43         struct BamWriterPrivate;\r
44         BamWriterPrivate* d;\r
45 };\r
46 \r
47 } // namespace BamTools\r
48 \r
49 #endif // BAMWRITER_H\r