pub fn find_mask_begin(seq: &[Nuc], frame_shift_nuc_range_rel: &Range) -> usize {
  // From begin, rewind to find the first adjacent nuc deletion
  let mut begin = frame_shift_nuc_range_rel.begin - 1;
  if begin > 0 {
    while seq[begin].is_gap() {
      begin -= 1;
    }
  }

  // `begin` now points to the nuc that is immediately before the deletion.
  // Go back one nuc to make it point to the deletion.
  begin + 1
}
/// Find beginning nucleotide position of a deletion that immediately proceeds and adjacent to the frame shift
Find beginning nucleotide position of a deletion that immediately proceeds and adjacent to the frame shift
Find beginning nucleotide position of a deletion that immediately proceeds and adjacent to the frame shift
pub fn find_mask_begin(seq: &[Nuc], frame_shift_nuc_range_rel: &Range) -> usize {
  // From begin, rewind to find the first adjacent nuc deletion
  let mut begin = frame_shift_nuc_range_rel.begin - 1;
  if begin > 0 {
    while seq[begin].is_gap() {
      begin -= 1;
    }
  }
  // `begin` now points to the nuc that is immediately before the deletion.
  // Go back one nuc to make it point to the deletion.
  begin + 1
}
pub fn find_mask_begin ( seq : & [ Nuc ] , frame_shift_nuc_range_rel : & Range ) -> usize { // From begin, rewind to find the first adjacent nuc deletion let mut begin = frame_shift_nuc_range_rel . begin - 1 ; if begin > 0 { while seq [ begin ] . is_gap ( ) { begin -= 1 ; } } // `begin` now points to the nuc that is immediately before the deletion. // Go back one nuc to make it point to the deletion. begin + 1 }
Find beginning nucleotide position of a deletion that immediately proceeds and adjacent to the frame shift
Find beginning nucleotide position of a deletion that immediately proceeds and adjacent to the frame shift
seq
&[Nuc]
frame_shift_nuc_range_rel
&Range
seq
&[Nuc]
frame_shift_nuc_range_rel
&Range