/// Decides whether a given mutation should be reported as mutation causing change in a given PCR primer
Decides whether a given mutation should be reported as mutation causing change in a given PCR primer
Decides whether a given mutation should be reported as mutation causing change in a given PCR primer
fn should_report_primer_mutation(sub: &NucSub, primer: &PcrPrimer) -> bool {
  // Don't report mutation if mutation is outside of the primer range
  if !primer.range.contains(sub.pos) {
    return false;
  }
  // Don't report mutation if primer contains matching ambiguous nucleotide at this position
  return !primer
    .non_acgts
    .iter()
    .any(|non_acgt| non_acgt.pos == sub.pos && is_nuc_match(non_acgt.qry, sub.qry));
}
fn should_report_primer_mutation ( sub : & NucSub , primer : & PcrPrimer ) -> bool { // Don't report mutation if mutation is outside of the primer range if ! primer . range . contains ( sub . pos ) { return false ; } // Don't report mutation if primer contains matching ambiguous nucleotide at this position return ! primer . non_acgts . iter ( ) . any ( | non_acgt | non_acgt . pos == sub . pos && is_nuc_match ( non_acgt . qry , sub . qry ) ) ; }
Decides whether a given mutation should be reported as mutation causing change in a given PCR primer
Decides whether a given mutation should be reported as mutation causing change in a given PCR primer
sub
&NucSub
primer
&PcrPrimer