@@ -618,7 +618,7 @@ void AlignmentDB::_clear_region()
618618
619619// added by dorukb
620620bool AlignmentDB::find_event_coords_for_region_for_record (const SequenceAlignmentRecordInfo& sequence_record,
621- const int start_pos, const int stop_pos, int & event_begin_idx, int & event_end_idx)
621+ const int start_pos, const int stop_pos, int & event_begin_idx, int & event_end_idx, bool & event_mismatch )
622622{
623623
624624 int r1 = 0 , r2 = 0 ;
@@ -631,7 +631,7 @@ bool AlignmentDB::find_event_coords_for_region_for_record(const SequenceAlignmen
631631 }
632632
633633 std::vector<int > event_inds_for_bases;
634- bool success = find_scrappie_events_for_basecall (sequence_record, event_inds_for_bases);
634+ bool success = find_scrappie_events_for_basecall (sequence_record, event_inds_for_bases, event_mismatch );
635635
636636 if (success)
637637 {
@@ -649,11 +649,11 @@ bool AlignmentDB::find_event_coords_for_region_for_record(const SequenceAlignmen
649649
650650// added by dorukb
651651bool AlignmentDB::find_event_coords_for_given_read_coords (const SequenceAlignmentRecordInfo& sequence_record,
652- const int r1, const int r2, int & event_begin_idx, int & event_end_idx) const
652+ const int r1, const int r2, int & event_begin_idx, int & event_end_idx, bool & event_mismatch ) const
653653{
654654
655655 std::vector<int > event_inds_for_bases;
656- bool success = find_scrappie_events_for_basecall (sequence_record, event_inds_for_bases);
656+ bool success = find_scrappie_events_for_basecall (sequence_record, event_inds_for_bases, event_mismatch );
657657
658658 if (success)
659659 {
@@ -672,9 +672,9 @@ bool AlignmentDB::find_event_coords_for_given_read_coords(const SequenceAlignmen
672672}
673673
674674
675- bool AlignmentDB::find_scrappie_events_for_basecall (const SequenceAlignmentRecordInfo& sequence_record, std::vector<int >& event_indices_for_bases) const
675+ bool AlignmentDB::find_scrappie_events_for_basecall (const SequenceAlignmentRecordInfo& sequence_record, std::vector<int >& event_indices_for_bases, bool & event_mismatch ) const
676676{
677-
677+ event_mismatch = false ;
678678 SquiggleRead* sr;
679679 if (m_squiggle_read_map.find (sequence_record.read_name ) != m_squiggle_read_map.end ())
680680 {
@@ -687,7 +687,8 @@ bool AlignmentDB::find_scrappie_events_for_basecall(const SequenceAlignmentRecor
687687 std::abort ();
688688 }
689689
690- bool success = map_events_to_basecall (sr, event_indices_for_bases);
690+
691+ bool success = map_events_to_basecall (sr, event_indices_for_bases, event_mismatch);
691692 return success;
692693
693694}
0 commit comments