/// Masks frame shifts in the nucleotide sequence with `N`
Masks frame shifts in the nucleotide sequence with `N`
Masks frame shifts in the nucleotide sequence with ` N `
pub fn mask_nuc_frame_shifts_in_place(seq: &mut [Nuc], frame_shifts: &[FrameShift]) {
  // TODO: this is a very C-like function. Try to replace the indexed loop with something more idiomatic
  for frame_shift in frame_shifts {
    let mut current = frame_shift.nuc_rel.begin;
    let end = frame_shift.nuc_rel.end;
    while current < end {
      if !seq[current].is_gap() {
        seq[current] = Nuc::N;
      }
      current += 1;
    }
  }
}
pub fn mask_nuc_frame_shifts_in_place ( seq : & mut [ Nuc ] , frame_shifts : & [ FrameShift ] ) { // TODO: this is a very C-like function. Try to replace the indexed loop with something more idiomatic for frame_shift in frame_shifts { let mut current = frame_shift . nuc_rel . begin ; let end = frame_shift . nuc_rel . end ; while current < end { if ! seq [ current ] . is_gap ( ) { seq [ current ] = Nuc :: N ; } current += 1 ; } } }
Masks frame shifts in the nucleotide sequence with `N`
Masks frame shifts in the nucleotide sequence with ` N `
seq
&mut [Nuc]
frame_shifts
&[FrameShift]