AlignIndex

Struct AlignIndex 

Source
pub struct AlignIndex<const STEPS: u16, Source> { /* private fields */ }
Expand description

An alignment index to store a collection of sequences to do alignment against with one or more other sequences. This improves performance because it can cache some intermediate results.

Implementations§

Source§

impl<const STEPS: u16, Source: HasPeptidoform<SimpleLinear> + Clone> AlignIndex<STEPS, Source>

Source

pub fn new(sequences: impl IntoIterator<Item = Source>, mode: MassMode) -> Self

Create a new index for alignments

Source

pub fn align_one<'a, Other: HasPeptidoform<SimpleLinear> + Clone + 'a>( &'a self, other: Other, scoring: AlignScoring<'a>, align_type: AlignType, ) -> impl ExactSizeIterator<Item = Alignment<Source, Other>>

Align a single peptidoform to the index

Source

pub fn align_one_filtered<'a, Other: HasPeptidoform<SimpleLinear> + Clone + 'a>( &'a self, other: Other, filter: impl Fn(&Source) -> bool + 'a, scoring: AlignScoring<'a>, align_type: AlignType, ) -> impl Iterator<Item = Alignment<Source, Other>>

Align a single peptidoform to the index but only for the source sequences that match the given filter.

Source

pub fn align<'a, Other: HasPeptidoform<SimpleLinear> + Clone + 'a>( &'a self, others: impl IntoIterator<Item = Other>, scoring: AlignScoring<'a>, align_type: AlignType, ) -> impl Iterator<Item = impl ExactSizeIterator<Item = Alignment<Source, Other>>>

Align multiple peptides to this index

Source§

impl<const STEPS: u16, Source: HasPeptidoform<SimpleLinear> + Clone + Sync + Send> AlignIndex<STEPS, Source>

Source

pub fn par_align_one<'a, Other: HasPeptidoform<SimpleLinear> + Clone + 'a + Send + Sync>( &'a self, other: Other, scoring: AlignScoring<'a>, align_type: AlignType, ) -> impl ParallelIterator<Item = Alignment<Source, Other>>

Align a single peptidoform to the index in parallel

Source

pub fn par_align_one_filtered<'a, Other: HasPeptidoform<SimpleLinear> + Clone + 'a + Send + Sync>( &'a self, other: Other, filter: impl Fn(&Source) -> bool + Sync + Send + 'a, scoring: AlignScoring<'a>, align_type: AlignType, ) -> impl ParallelIterator<Item = Alignment<Source, Other>>

Align a single peptidoform to the index in parallel but only for the source sequences that match the given filter.

Source§

impl<const STEPS: u16, Source: HasPeptidoform<SimpleLinear> + Clone + Sync> AlignIndex<STEPS, Source>

Source

pub fn par_align<'a, Other: HasPeptidoform<SimpleLinear> + Clone + 'a + Sync + Send>( &'a self, others: impl IntoParallelIterator<Item = Other>, scoring: AlignScoring<'a>, align_type: AlignType, ) -> impl ParallelIterator<Item = impl ExactSizeIterator<Item = Alignment<Source, Other>>>

Align multiple peptides to this index in parallel

Trait Implementations§

Source§

impl<const STEPS: u16, Source: Debug> Debug for AlignIndex<STEPS, Source>

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<const STEPS: u16, Source> Freeze for AlignIndex<STEPS, Source>

§

impl<const STEPS: u16, Source> !RefUnwindSafe for AlignIndex<STEPS, Source>

§

impl<const STEPS: u16, Source> Send for AlignIndex<STEPS, Source>
where Source: Send,

§

impl<const STEPS: u16, Source> Sync for AlignIndex<STEPS, Source>
where Source: Sync,

§

impl<const STEPS: u16, Source> Unpin for AlignIndex<STEPS, Source>
where Source: Unpin,

§

impl<const STEPS: u16, Source> !UnwindSafe for AlignIndex<STEPS, Source>

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> HighestOf<T> for T

Source§

type HighestLevel = T

This is the highest complexity level out of Self and the type parameter
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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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.
Source§

impl<T> AtLeast<T> for T

Source§

impl<T> AtMax<T> for T