void Device::onPropertiesChanged(const QString& interface, const QVariantMap& changed_properties, const QStringList& invalidated_properties) { update(); if (changed_properties.contains("Paired") && changed_properties["Paired"].toBool()) { emit paired(deviceInterface->path()); } }
pair<Sam,Sam> SamPairIterator::fetch_next_pair() { if (!m_supp_alignments.empty()) // pending supplementary alignments have priority return next_supplementary_alignment(); if (!read_sam(m_sam_record_ptr1)) return make_pair(Sam{}, Sam{}); // we have reached the end of file const auto read1 = make_sam(m_sam_record_ptr1); if (!primary(m_sam_record_ptr1) || !read1.paired() || !read_sam(m_sam_record_ptr2)) // unpaired reads go in immediately and by themselves return make_pair(read1, Sam{}); if (primary(m_sam_record_ptr2)) // proper paired alignments return here return make_pair(read1, make_sam(m_sam_record_ptr2)); return make_pair(read1, next_primary_alignment(m_sam_record_ptr2)); // still haven't found the second primary alignment so search for it while pushing all the secondary/supplementary alignments to the queue }