Struct bio::alignment::pairwise::Aligner [] [src]

pub struct Aligner<'a, F> where F: 'a + Fn(u8, u8) -> i32 {
    // some fields omitted
}

A generalized Smith-Waterman aligner.

Methods

impl<'a, F> Aligner<'a, F> where F: Fn(u8, u8) -> i32
[src]

fn new(gap_open: i32, gap_extend: i32, score: &'a F) -> Self

Create new aligner instance with given gap open and gap extend penalties and the score function.

Arguments

  • gap_open - the score for opening a gap (should be negative)
  • gap_extend - the score for extending a gap (should be negative)
  • score - function that returns the score for substitutions (also see bio::scores)

fn with_capacity(m: usize, n: usize, gap_open: i32, gap_extend: i32, score: &'a F) -> Self

Create new aligner instance. The size hints help to avoid unnecessary memory allocations.

Arguments

  • m - the expected size of x
  • n - the expected size of y
  • gap_open - the score for opening a gap (should be negative)
  • gap_extend - the score for extending a gap (should be negative)
  • score - function that returns the score for substitutions (also see bio::scores)

fn global(&mut self, x: TextSlice, y: TextSlice) -> Alignment

Calculate global alignment of x against y.

fn semiglobal(&mut self, x: TextSlice, y: TextSlice) -> Alignment

Calculate semiglobal alignment of x against y (x is global, y is local).

fn local(&mut self, x: TextSlice, y: TextSlice) -> Alignment

Calculate local alignment of x against y.