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: 19 November 2010 (DB)
\r
7 // ---------------------------------------------------------------------------
\r
8 // Uses BGZF routines were adapted from the bgzf.c code developed at the Broad
\r
10 // ---------------------------------------------------------------------------
\r
11 // Provides the basic functionality for producing BAM files
\r
12 // ***************************************************************************
\r
17 #include <api/api_global.h>
\r
18 #include <api/BamAlignment.h>
\r
21 namespace BamTools {
\r
23 class API_EXPORT BamWriter {
\r
25 // constructor/destructor
\r
32 // closes the alignment archive
\r
34 // opens the alignment archive
\r
35 bool Open(const std::string& filename,
\r
36 const std::string& samHeader,
\r
37 const BamTools::RefVector& referenceSequences,
\r
38 bool writeUncompressed = false);
\r
39 // saves the alignment to the alignment archive
\r
40 void SaveAlignment(const BamTools::BamAlignment& al);
\r
42 // private implementation
\r
44 struct BamWriterPrivate;
\r
45 BamWriterPrivate* d;
\r
48 } // namespace BamTools
\r
50 #endif // BAMWRITER_H
\r