1 #ifndef gamgee__sam_pair_iterator__guard
2 #define gamgee__sam_pair_iterator__guard
31 SamPairIterator(
const std::shared_ptr<htsFile>& sam_file_ptr,
const std::shared_ptr<bam_hdr_t>& sam_header_ptr);
71 using SamPtrQueue = std::queue<std::shared_ptr<bam1_t>>;
73 SamPtrQueue m_supp_alignments;
74 std::shared_ptr<htsFile> m_sam_file_ptr;
75 std::shared_ptr<bam_hdr_t> m_sam_header_ptr;
76 std::shared_ptr<bam1_t> m_sam_record_ptr1;
77 std::shared_ptr<bam1_t> m_sam_record_ptr2;
78 std::pair<Sam,Sam> m_sam_records;
80 std::pair<Sam,Sam> fetch_next_pair();
81 bool read_sam(std::shared_ptr<bam1_t>& record_ptr);
82 Sam make_sam(std::shared_ptr<bam1_t>& record_ptr);
83 Sam next_primary_alignment(std::shared_ptr<bam1_t>& record_ptr);
84 std::pair<Sam,Sam> next_supplementary_alignment();
89 #endif // gamgee__sam_pair_iterator__guard
std::pair< Sam, Sam > operator++()
pre-fetches the next record and tests for end of file
Definition: sam_pair_iterator.cpp:35
std::pair< Sam, Sam > operator*()
dereference operator (needed by for-each loop)
Definition: sam_pair_iterator.cpp:31
bool operator!=(const SamPairIterator &rhs)
inequality operator (needed by for-each loop)
Definition: sam_pair_iterator.cpp:40
SamPairIterator & operator=(const SamPairIterator &other)=delete
Definition: exceptions.h:9
Utility class to manipulate a Sam record.
Definition: sam.h:20
SamPairIterator()
creates an empty iterator (used for the end() method)
Definition: sam_pair_iterator.cpp:16
Utility class to enable for-each style iteration by pairs in the SamReader class. ...
Definition: sam_pair_iterator.h:17