Struct rustyms::Protease

source ·
pub struct Protease {
    pub n_term: Vec<Option<Vec<AminoAcid>>>,
    pub c_term: Vec<Option<Vec<AminoAcid>>>,
}
Expand description

A protease defined by it ability to cut at any site identified by the right amino acids at the n and c terminal. Each position is identified by an option, a none means that there is no specificity at this position. If there is a specificity at a certain position any amino acid that is contained in the set is allowed (see AminoAcid::canonical_identical).

Fields§

§n_term: Vec<Option<Vec<AminoAcid>>>

The amino acids n terminal of the cut site.

§c_term: Vec<Option<Vec<AminoAcid>>>

The amino acids c terminal of the cut site.

Implementations§

source§

impl Protease

source

pub fn new(n_term: &[AminoAcid], c_term: &[AminoAcid]) -> Self

Define a simple protease that cuts exactly between the specified sequences.

source

pub fn n_terminal_of(residues: &[AminoAcid]) -> Self

Define a protease that cuts on the n terminal side of the provided amino acids.

source

pub fn c_terminal_of(residues: &[AminoAcid]) -> Self

Define a protease that cuts on the c terminal side of the provided amino acids.

source

pub fn match_locations(&self, sequence: &[SequenceElement]) -> Vec<usize>

All locations in the given sequence where this protease could cut

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

source§

const ALIGN: usize = _

The alignment of pointer.
§

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

§

type Output = T

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