Skip to main content

Alignment

Struct Alignment 

Source
pub struct Alignment { /* private fields */ }
Expand description

Sequence alignment result.

Implementations§

Source§

impl Alignment

Source

pub fn get_score(&self) -> i32

Get alignment score.

Source

pub fn get_end_query(&self) -> i32

Get end position of query sequence.

Source

pub fn get_end_ref(&self) -> i32

Get end position of the reference sequence.

Source

pub fn get_matches(&self) -> Result<i32>

Get number of matches in the alignment.

Source

pub fn get_similar(&self) -> i32

Source

pub fn get_length(&self) -> Result<i32>

Get alignment length.

Source

pub fn get_score_table(&self) -> Result<Table<'_>>

Get the score table.

The table has dimensions (query_len, ref_len) and contains alignment scores for all positions in the dynamic programming table.

§Example
let result = aligner.align(Some(query), reference)?;
let table = result.get_score_table()?;

// Access specific cell
if let Some(score) = table.get(0, 0) {
    println!("Score at (0, 0): {}", score);
}

// Get final score
println!("Final score: {}", table.last());
Source

pub fn get_matches_table(&self) -> Result<Table<'_>>

Get the matches table.

Source

pub fn get_similar_table(&self) -> Result<Table<'_>>

Get the similar table.

Source

pub fn get_length_table(&self) -> Result<Table<'_>>

Get the length table.

Source

pub fn get_score_row(&self) -> Result<&[i32]>

Get score row.

Source

pub fn get_matches_row(&self) -> Result<&[i32]>

Get matches row.

Source

pub fn get_similar_row(&self) -> Result<&[i32]>

Get similar row.

Source

pub fn get_length_row(&self) -> Result<&[i32]>

Get length row.

Source

pub fn get_score_col(&self) -> Result<&[i32]>

Get score column.

Source

pub fn get_matches_col(&self) -> Result<&[i32]>

Get matches column.

Source

pub fn get_similar_col(&self) -> Result<&[i32]>

Get similar column.

Source

pub fn get_length_col(&self) -> Result<&[i32]>

Get length column

Source

pub fn get_trace_table(&self) -> Result<TracebackTable<'_>>

Get the trace table.

Source

pub fn print_traceback(&self, query: &[u8], reference: &[u8])

Get alignment strings and statistics

Source

pub fn get_traceback_strings( &self, query: &[u8], reference: &[u8], ) -> Result<Traceback>

Get alignment strings.

Source

pub fn get_cigar(&self, query: &[u8], reference: &[u8]) -> Result<String>

Get CIGAR string.

Source

pub fn is_global(&self) -> bool

Check if the alignment mode is global.

Source

pub fn is_semi_global(&self) -> bool

Check if the alignment mode is semi-global.

Source

pub fn is_local(&self) -> bool

Check if the alignment mode is local.

Source

pub fn is_saturated(&self) -> bool

Check if the solution width is saturated (i.e., using 8-bit solution width first and falling back to 16-bit if necessary).

Source

pub fn is_banded(&self) -> bool

Check if banded alignment is used.

Source

pub fn is_scan(&self) -> bool

Check if vector strategy is scan.

Source

pub fn is_striped(&self) -> bool

Check if vector strategy is striped.

Source

pub fn is_diag(&self) -> bool

Check if vector strategy is diagonal.

Source

pub fn is_blocked(&self) -> bool

Source

pub fn is_stats(&self) -> bool

Check if statistics are returned from alignment.

Source

pub fn is_stats_table(&self) -> bool

Check if result is a stats table

Source

pub fn is_table(&self) -> bool

Check if result is a table

Source

pub fn is_rowcol(&self) -> bool

Check if result is a last row and column of table

Source

pub fn is_stats_rowcol(&self) -> bool

Check if result is a row and column of table with additional statistics.

Source

pub fn is_trace(&self) -> bool

Check if result is trace enabled.

Trait Implementations§

Source§

impl Clone for Alignment

Source§

fn clone(&self) -> Alignment

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Alignment

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. 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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

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>,

Source§

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.