inline int32_t right() const { if (isPaired()) { return std::max(bam_pos(read1) + bam_seq_len(read1), bam_pos(read2) + bam_seq_len(read2)); } else { return bam_pos(read1) + bam_seq_len(read1); } }
inline uint32_t fragLen() const { if (!isPaired()) { return 0; } auto leftmost1 = bam_pos(read1); auto leftmost2 = bam_pos(read2); // The length of the mapped read that is "rightmost" w.r.t. the forward strand. auto rightmostLen = (leftmost1 < leftmost2) ? bam_seq_len(read2) : bam_seq_len(read1); return std::abs(leftmost1 - leftmost2) + rightmostLen; //return std::abs(read1->core.isize) + std::abs(read1->core.l_qseq) + std::abs(read2->core.l_qseq); }
inline int32_t right() { return left() + bam_seq_len(read); }