pub fn find_codon_mask_range(nuc_rel_aln: &Range, query: &[Nuc], coord_map: &CoordMap, gene: &Gene) -> Range {
  // extend the frame shifted region to a mask that includes leading and trailing gaps
  let mask_nuc_rel_aln = find_nuc_mask_range(query, nuc_rel_aln);
  // map that mask to reference coordinates within the gene
  let mask_nuc_rel_ref = coord_map.feature_aln_to_feature_ref_range(gene, &mask_nuc_rel_aln);
  // determine corresponding reference codons
  let mut mask_codon_range = gene.nuc_to_codon_range(&mask_nuc_rel_ref);

  // Nuc mask can span beyond the gene. Prevent peptide mask overflow.
  mask_codon_range.end = mask_codon_range.end.min(gene.len_codon());
  mask_codon_range
}
/// Finds codon range to be masked. The aminoacids belonging to frame shift need to be masked, because they are not
/// biological and can produce a lot of noisy mutations that don't exist.
Finds codon range to be masked. The aminoacids belonging to frame shift need to be masked, because they are not
biological and can produce a lot of noisy mutations that don't exist.
Finds codon range to be masked . The aminoacids belonging to frame shift need to be masked because they are not biological and can produce a lot of noisy mutations that don ' t exist .
pub fn find_codon_mask_range(nuc_rel_aln: &Range, query: &[Nuc], coord_map: &CoordMap, gene: &Gene) -> Range {
  // extend the frame shifted region to a mask that includes leading and trailing gaps
  let mask_nuc_rel_aln = find_nuc_mask_range(query, nuc_rel_aln);
  // map that mask to reference coordinates within the gene
  let mask_nuc_rel_ref = coord_map.feature_aln_to_feature_ref_range(gene, &mask_nuc_rel_aln);
  // determine corresponding reference codons
  let mut mask_codon_range = gene.nuc_to_codon_range(&mask_nuc_rel_ref);
  // Nuc mask can span beyond the gene. Prevent peptide mask overflow.
  mask_codon_range.end = mask_codon_range.end.min(gene.len_codon());
  mask_codon_range
}
pub fn find_codon_mask_range ( nuc_rel_aln : & Range , query : & [ Nuc ] , coord_map : & CoordMap , gene : & Gene ) -> Range { // extend the frame shifted region to a mask that includes leading and trailing gaps let mask_nuc_rel_aln = find_nuc_mask_range ( query , nuc_rel_aln ) ; // map that mask to reference coordinates within the gene let mask_nuc_rel_ref = coord_map . feature_aln_to_feature_ref_range ( gene , & mask_nuc_rel_aln ) ; // determine corresponding reference codons let mut mask_codon_range = gene . nuc_to_codon_range ( & mask_nuc_rel_ref ) ; // Nuc mask can span beyond the gene. Prevent peptide mask overflow. mask_codon_range . end = mask_codon_range . end . min ( gene . len_codon ( ) ) ; mask_codon_range }
Finds codon range to be masked.
Finds codon range to be masked .
nuc_rel_aln
&Range
query
&[Nuc]
coord_map
&CoordMap
gene
&Gene
nuc_rel_aln
&Range
query
&[Nuc]
coord_map
&CoordMap
gene
&Gene