Struct parasail_rs::AlignerBuilder

source ·
pub struct AlignerBuilder { /* private fields */ }
Expand description

Aligner builder

Implementations§

source§

impl AlignerBuilder

source

pub fn global(&mut self) -> &mut Self

Set alignment mode to global (Needleman-Wunsch).

source

pub fn semi_global(&mut self) -> &mut Self

Set alignment mode to semi-global

source

pub fn local(&mut self) -> &mut Self

Set alignment mode to local (Smith-Watermann).

source

pub fn matrix(&mut self, matrix: Matrix) -> &mut Self

Set scoring matrix. The default is an identity matrix for DNA sequences. For more information on creating matrices, see the Matrix struct. Default is an identity matrix for DNA sequences.

source

pub fn gap_open(&mut self, gap_open: i32) -> &mut Self

Set gap open penalty. Note that this should be passed as a positive integer. Default = 5.

source

pub fn gap_extend(&mut self, gap_extend: i32) -> &mut Self

Set gap extend penalty. Note that this should be passed as a positive integer. Default = 2

source

pub fn profile(&mut self, profile: Profile) -> &mut Self

Set query profile. No query profile is set by default.

source

pub fn allow_query_gaps(&mut self, allow_gaps: Vec<String>) -> &mut Self

Set allowed gaps on query sequence for semi-global alignment. By default, gaps are allowed at the beginning and end of the query sequence. Example:

use parasail_rs::Aligner;

// allow gaps at the beginning of the query sequence
let allow_gaps = vec![String::from("prefix")];
let aligner = Aligner::new().allow_query_gaps(allow_gaps).build();
source

pub fn allow_ref_gaps(&mut self, allow_gaps: Vec<String>) -> &mut Self

Set allowed gaps on reference sequence for semi-global alignment. By default, gaps are allowed at the beginning and end of the reference sequence. Example:

use parasail_rs::Aligner;

// allow gaps at the beginning of the reference sequence
let allow_gaps = vec![String::from("suffix")];
let aligner = Aligner::new().allow_query_gaps(allow_gaps).build();
source

pub fn striped(&mut self) -> &mut Self

Use striped vectorization method

source

pub fn scan(&mut self) -> &mut Self

Use scan vectorization method

source

pub fn diag(&mut self) -> &mut Self

Use diagonal vectorization method

source

pub fn use_stats(&mut self) -> &mut Self

Set whether to use statistics for alignment. By default, statistics are not used. Note that enabling stats and traceback is not supported. Enabling stats will disable traceback if it is enabled.

source

pub fn use_table(&mut self) -> &mut Self

Set whether to return the score table. By default, the score table is not returned. Note that enabling traceback and tables is not supported. Enabling tables will disable traceback.

source

pub fn use_last_rowcol(&mut self) -> &mut Self

Set whether to return the last row and column of the score table. By default, the last row and column are not returned. Note that if both use_table and use_last_rowcol are set to true, use_table will be ignored and only the last row and column will be returned.

source

pub fn use_trace(&mut self) -> &mut Self

Set whether to enable traceback capability. By default, traceback is not enabled. Note that enabling traceback along with tables or stats is not supported. Enabling traceback will disable tables and stats if they are enabled.

source

pub fn bandwith(&mut self, bandwith: i32) -> &mut Self

source

pub fn build(&mut self) -> Aligner

Build the aligner.

Trait Implementations§

source§

impl Default for AlignerBuilder

Default aligner uses global alignment with an identity matrix for DNA sequences and no gap penalties. No profile, trace, table, or stats options are set. Vectorization strategy is set to striped by default.

source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.