/// Find ending nucleotide position of a deletion that immediately follows and adjacent to the frame shift
Find ending nucleotide position of a deletion that immediately follows and adjacent to the frame shift
Find ending nucleotide position of a deletion that immediately follows and adjacent to the frame shift
pub fn find_mask_end(seq: &[Nuc], frame_shift_nuc_range_rel: &Range) -> usize {
  // From end, rewind backwards to find the last adjacent nuc deletion
  let mut end = frame_shift_nuc_range_rel.end;
  while end < seq.len() && seq[end].is_gap() {
    end += 1;
  }
  // `end` now points to the nuc that is 1 past the deletion. Which is correct - we use semi-open ranges.
  end
}
pub fn find_mask_end ( seq : & [ Nuc ] , frame_shift_nuc_range_rel : & Range ) -> usize { // From end, rewind backwards to find the last adjacent nuc deletion let mut end = frame_shift_nuc_range_rel . end ; while end < seq . len ( ) && seq [ end ] . is_gap ( ) { end += 1 ; } // `end` now points to the nuc that is 1 past the deletion. Which is correct - we use semi-open ranges. end }
Find ending nucleotide position of a deletion that immediately follows and adjacent to the frame shift
Find ending nucleotide position of a deletion that immediately follows and adjacent to the frame shift
seq
&[Nuc]
frame_shift_nuc_range_rel
&Range