BamWriter.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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: 8 December 2009 (DB)
  7. // ---------------------------------------------------------------------------
  8. // Uses BGZF routines were adapted from the bgzf.c code developed at the Broad
  9. // Institute.
  10. // ---------------------------------------------------------------------------
  11. // Provides the basic functionality for producing BAM files
  12. // ***************************************************************************
  13. #ifndef BAMWRITER_H
  14. #define BAMWRITER_H
  15. // C++ includes
  16. #include <string>
  17. // BamTools includes
  18. #include "BamAux.h"
  19. namespace BamTools {
  20. class BamWriter {
  21. // constructor/destructor
  22. public:
  23. BamWriter(void);
  24. ~BamWriter(void);
  25. // public interface
  26. public:
  27. // closes the alignment archive
  28. void Close(void);
  29. // opens the alignment archive
  30. void Open(const std::string& filename, const std::string& samHeader, const BamTools::RefVector& referenceSequences);
  31. // saves the alignment to the alignment archive
  32. void SaveAlignment(const BamTools::BamAlignment& al);
  33. // private implementation
  34. private:
  35. struct BamWriterPrivate;
  36. BamWriterPrivate* d;
  37. };
  38. } // namespace BamTools
  39. #endif // BAMWRITER_H