1 // ***************************************************************************
2 // BamWriter_p.h (c) 2010 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 // ***************************************************************************
18 // This file is not part of the BamTools API. It exists purely as an
19 // implementation detail. This header file may change from version to
20 // version without notice, or even be removed.
24 #include <api/BamAux.h>
35 class BamWriterPrivate {
39 BamWriterPrivate(void);
40 ~BamWriterPrivate(void);
42 // "public" interface to BamWriter
45 bool Open(const std::string& filename,
46 const std::string& samHeader,
47 const BamTools::RefVector& referenceSequences,
48 bool isWriteUncompressed);
49 bool Open(const std::string& filename,
50 const std::string& samHeader,
51 const BamTools::RefVector& referenceSequences,
52 bool isWriteUncompressed);
53 void SaveAlignment(const BamAlignment& al);
57 const unsigned int CalculateMinimumBin(const int begin, int end) const;
58 void CreatePackedCigar(const std::vector<BamTools::CigarOp>& cigarOperations, std::string& packedCigar);
59 void EncodeQuerySequence(const std::string& query, std::string& encodedQuery);
67 } // namespace Internal
68 } // namespace BamTools
70 #endif // BAMWRITER_P_H