pub fn custom_with_expanded_matches(
        &mut self,
        x: TextSlice<'_>,
        y: TextSlice<'_>,
        matches: Vec<(u32, u32)>,
        allowed_mismatches: Option<usize>,
        use_lcskpp_union: bool,
    ) -> Alignment {
        let expanded_matches = match allowed_mismatches {
            Some(m) => sparse::expand_kmer_matches(x, y, self.k, &matches, m),
            None => matches,
        };

        self.band = if use_lcskpp_union {
            let match_score = match self.scoring.match_scores {
                Some((m, _)) => m,
                None => DEFAULT_MATCH_SCORE,
            };
            let path = sparse::sdpkpp_union_lcskpp_path(
                &expanded_matches,
                self.k,
                match_score as u32,
                self.scoring.gap_open,
                self.scoring.gap_extend,
            );
            Band::create_from_match_path(
                x,
                y,
                self.k,
                self.w,
                &self.scoring,
                &path,
                &expanded_matches,
            )
        } else {
            Band::create_with_matches(x, y, self.k, self.w, &self.scoring, &expanded_matches)
        };

        self.compute_alignment(x, y)
    }
/// Compute the alignment with custom clip penalties with the kmer matches
/// between x and y being pre-computed as a Vector of pairs (xpos, ypos)
/// and sorted. The matches are expanded diagonally in both directions
/// allowing upto a user specified number of mismatches. This is useful
/// in constructing the band correctly, particularly when a higher frequency
/// of mismatches are expected.
///
/// # Arguments
///
/// * `x` - Textslice
/// * `y` - Textslice
/// * `matches` - Vector of kmer matching pairs (xpos, ypos)
/// * `allowed_mismatches` - Extend the matches diagonally allowing upto
/// the specified number of mismatches (Option<usize>)
/// * `use_lcskpp_union` - Extend the results from sdpkpp using lcskpp
Compute the alignment with custom clip penalties with the kmer matches
between x and y being pre-computed as a Vector of pairs (xpos, ypos)
and sorted. The matches are expanded diagonally in both directions
allowing upto a user specified number of mismatches. This is useful
in constructing the band correctly, particularly when a higher frequency
of mismatches are expected.
Compute the alignment with custom clip penalties with the kmer matches between x and y being pre - computed as a Vector of pairs ( xpos ypos ) and sorted . The matches are expanded diagonally in both directions allowing upto a user specified number of mismatches . This is useful in constructing the band correctly particularly when a higher frequency of mismatches are expected .
pub fn custom_with_expanded_matches(
        &mut self,
        x: TextSlice<'_>,
        y: TextSlice<'_>,
        matches: Vec<(u32, u32)>,
        allowed_mismatches: Option<usize>,
        use_lcskpp_union: bool,
    ) -> Alignment {
        let expanded_matches = match allowed_mismatches {
            Some(m) => sparse::expand_kmer_matches(x, y, self.k, &matches, m),
            None => matches,
        };
        self.band = if use_lcskpp_union {
            let match_score = match self.scoring.match_scores {
                Some((m, _)) => m,
                None => DEFAULT_MATCH_SCORE,
            };
            let path = sparse::sdpkpp_union_lcskpp_path(
                &expanded_matches,
                self.k,
                match_score as u32,
                self.scoring.gap_open,
                self.scoring.gap_extend,
            );
            Band::create_from_match_path(
                x,
                y,
                self.k,
                self.w,
                &self.scoring,
                &path,
                &expanded_matches,
            )
        } else {
            Band::create_with_matches(x, y, self.k, self.w, &self.scoring, &expanded_matches)
        };
        self.compute_alignment(x, y)
    }
pub fn custom_with_expanded_matches ( & mut self , x : TextSlice < ' _ > , y : TextSlice < ' _ > , matches : Vec < ( u32 , u32 ) > , allowed_mismatches : Option < usize > , use_lcskpp_union : bool , ) -> Alignment { let expanded_matches = match allowed_mismatches { Some ( m ) => sparse :: expand_kmer_matches ( x , y , self . k , & matches , m ) , None => matches , } ; self . band = if use_lcskpp_union { let match_score = match self . scoring . match_scores { Some ( ( m , _ ) ) => m , None => DEFAULT_MATCH_SCORE , } ; let path = sparse :: sdpkpp_union_lcskpp_path ( & expanded_matches , self . k , match_score as u32 , self . scoring . gap_open , self . scoring . gap_extend , ) ; Band :: create_from_match_path ( x , y , self . k , self . w , & self . scoring , & path , & expanded_matches , ) } else { Band :: create_with_matches ( x , y , self . k , self . w , & self . scoring , & expanded_matches ) } ; self . compute_alignment ( x , y ) }
Compute the alignment with custom clip penalties with the kmer matches
between x and y being pre-computed as a Vector of pairs (xpos, ypos)
and sorted.
Compute the alignment with custom clip penalties with the kmer matches between x and y being pre - computed as a Vector of pairs ( xpos ypos ) and sorted .
&mut self
x
TextSlice<'_>
y
TextSlice<'_>
matches
Vec<(u32, u32)>
allowed_mismatches
Option<usize>
use_lcskpp_union
bool
&mut self
x
TextSlice<'_>
y
TextSlice<'_>
matches
Vec<(u32, u32)>
allowed_mismatches
Option<usize>
use_lcskpp_union
bool