1 #ifndef __gamgee__sam_pair_iterator__
2 #define __gamgee__sam_pair_iterator__
6 #include "htslib/sam.h"
31 SamPairIterator(samFile * sam_file_ptr,
const std::shared_ptr<bam_hdr_t>& sam_header_ptr);
64 using SamPtrQueue = std::queue<std::shared_ptr<bam1_t>>;
66 SamPtrQueue m_supp_alignments;
67 samFile * m_sam_file_ptr;
68 const std::shared_ptr<bam_hdr_t> m_sam_header_ptr;
69 std::shared_ptr<bam1_t> m_sam_record_ptr1;
70 std::shared_ptr<bam1_t> m_sam_record_ptr2;
71 std::pair<Sam,Sam> m_sam_records;
73 std::pair<Sam,Sam> fetch_next_pair();
74 bool read_sam(std::shared_ptr<bam1_t>& record_ptr);
75 Sam make_sam(std::shared_ptr<bam1_t>& record_ptr);
76 Sam next_primary_alignment(std::shared_ptr<bam1_t>& record_ptr);
77 std::pair<Sam,Sam> next_supplementary_alignment();
std::pair< Sam, Sam > operator++()
pre-fetches the next record and tests for end of file
Definition: sam_pair_iterator.cpp:44
std::pair< Sam, Sam > operator*()
dereference operator (needed by for-each loop)
Definition: sam_pair_iterator.cpp:40
bool operator!=(const SamPairIterator &rhs)
inequality operator (needed by for-each loop)
Definition: sam_pair_iterator.cpp:49
Utility class to manipulate a Sam record.
Definition: sam.h:19
SamPairIterator()
creates an empty iterator (used for the end() method)
Definition: sam_pair_iterator.cpp:15
Utility class to enable for-each style iteration by pairs in the SamReader class. ...
Definition: sam_pair_iterator.h:17