/// Detects nucleotide frame shifts in the query sequence
/// and the corresponding aminoacid frame shifts in the query peptide
Detects nucleotide frame shifts in the query sequence
and the corresponding aminoacid frame shifts in the query peptide
Detects nucleotide frame shifts in the query sequence and the corresponding aminoacid frame shifts in the query peptide
pub fn frame_shifts_detect(qry_gene_seq: &[Nuc], ref_gene_seq: &[Nuc]) -> Vec<Range> {
  debug_assert_eq!(ref_gene_seq.len(), qry_gene_seq.len());
  let length = ref_gene_seq.len() as i32;
  let mut detector = FrameShiftDetector::new(0);
  for pos in 0..length {
    if ref_gene_seq[pos as usize].is_gap() {
      detector.add_insertion(pos);
    } else if qry_gene_seq[pos as usize].is_gap() {
      detector.add_deletion(pos);
    } else {
      detector.advance(pos);
    }
  }
  detector.done(length);
  detector.get_frame_shifts()
}
pub fn frame_shifts_detect ( qry_gene_seq : & [ Nuc ] , ref_gene_seq : & [ Nuc ] ) -> Vec < Range > { debug_assert_eq ! ( ref_gene_seq len ( ) qry_gene_seq len ( ) ) ; let length = ref_gene_seq . len ( ) as i32 ; let mut detector = FrameShiftDetector :: new ( 0 ) ; for pos in 0 .. length { if ref_gene_seq [ pos as usize ] . is_gap ( ) { detector . add_insertion ( pos ) ; } else if qry_gene_seq [ pos as usize ] . is_gap ( ) { detector . add_deletion ( pos ) ; } else { detector . advance ( pos ) ; } } detector . done ( length ) ; detector . get_frame_shifts ( ) }
Detects nucleotide frame shifts in the query sequence
and the corresponding aminoacid frame shifts in the query peptide
Detects nucleotide frame shifts in the query sequence and the corresponding aminoacid frame shifts in the query peptide
qry_gene_seq
&[Nuc]
ref_gene_seq
&[Nuc]