pub fn local(&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 = 0;
        self.scoring.xclip_suffix = 0;
        self.scoring.yclip_prefix = 0;
        self.scoring.yclip_suffix = 0;

        // Compute the alignment
        let mut alignment = self.custom(x, y);
        alignment.mode = AlignmentMode::Local;

        // Filter out Xclip and Yclip from alignment.operations
        alignment.filter_clip_operations();

        // 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 local alignment of x against y.
Calculate local alignment of x against y.
Calculate local alignment of x against y .
pub fn local(&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 = 0;
        self.scoring.xclip_suffix = 0;
        self.scoring.yclip_prefix = 0;
        self.scoring.yclip_suffix = 0;
        // Compute the alignment
        let mut alignment = self.custom(x, y);
        alignment.mode = AlignmentMode::Local;
        // Filter out Xclip and Yclip from alignment.operations
        alignment.filter_clip_operations();
        // 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 local ( & 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 = 0 ; self . scoring . xclip_suffix = 0 ; self . scoring . yclip_prefix = 0 ; self . scoring . yclip_suffix = 0 ; // Compute the alignment let mut alignment = self . custom ( x , y ) ; alignment . mode = AlignmentMode :: Local ; // Filter out Xclip and Yclip from alignment.operations alignment . filter_clip_operations ( ) ; // 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 local alignment of x against y.
Calculate local alignment of x against y .
&mut self
x
TextSlice<'_>
y
TextSlice<'_>
&mut self
x
TextSlice<'_>
y
TextSlice<'_>