/// Calculate global alignment of x against y.
Calculate global alignment of x against y.
Calculate global alignment of x against y .
pub fn global(&mut self, x: TextSlice<'_>, y: TextSlice<'_>) -> Alignment {
        // Store the current clip penalties
        let clip_penalties = [
            self.scoring.xclip_prefix,
            self.scoring.xclip_suffix,
            self.scoring.yclip_prefix,
            self.scoring.yclip_suffix,
        ];
        // Temporarily Over-write the clip penalties
        self.scoring.xclip_prefix = MIN_SCORE;
        self.scoring.xclip_suffix = MIN_SCORE;
        self.scoring.yclip_prefix = MIN_SCORE;
        self.scoring.yclip_suffix = MIN_SCORE;
        // Compute the alignment
        let mut alignment = self.custom(x, y);
        alignment.mode = AlignmentMode::Global;
        // Set the clip penalties to the original values
        self.scoring.xclip_prefix = clip_penalties[0];
        self.scoring.xclip_suffix = clip_penalties[1];
        self.scoring.yclip_prefix = clip_penalties[2];
        self.scoring.yclip_suffix = clip_penalties[3];
        alignment
    }
pub fn global ( & mut self , x : TextSlice < ' _ > , y : TextSlice < ' _ > ) -> Alignment { // Store the current clip penalties let clip_penalties = [ self . scoring . xclip_prefix , self . scoring . xclip_suffix , self . scoring . yclip_prefix , self . scoring . yclip_suffix , ] ; // Temporarily Over-write the clip penalties self . scoring . xclip_prefix = MIN_SCORE ; self . scoring . xclip_suffix = MIN_SCORE ; self . scoring . yclip_prefix = MIN_SCORE ; self . scoring . yclip_suffix = MIN_SCORE ; // Compute the alignment let mut alignment = self . custom ( x , y ) ; alignment . mode = AlignmentMode :: Global ; // Set the clip penalties to the original values self . scoring . xclip_prefix = clip_penalties [ 0 ] ; self . scoring . xclip_suffix = clip_penalties [ 1 ] ; self . scoring . yclip_prefix = clip_penalties [ 2 ] ; self . scoring . yclip_suffix = clip_penalties [ 3 ] ; alignment }
Calculate global alignment of x against y.
Calculate global alignment of x against y .
&mut self
x
TextSlice<'_>
y
TextSlice<'_>