Enum rustyms::AminoAcid

source ·
pub enum AminoAcid {
Show 26 variants Alanine = 0, Arginine = 1, Asparagine = 2, AsparticAcid = 3, Cysteine = 4, Glutamine = 5, GlutamicAcid = 6, Glycine = 7, Histidine = 8, Isoleucine = 9, Leucine = 10, AmbiguousLeucine = 11, Lysine = 12, Methionine = 13, Phenylalanine = 14, Proline = 15, Serine = 16, Threonine = 17, Tryptophan = 18, Tyrosine = 19, Valine = 20, Selenocysteine = 21, Pyrrolysine = 22, Unknown = 23, AmbiguousAsparagine = 24, AmbiguousGlutamine = 25,
}
Expand description

An amino acid, alongside the standard ones some ambiguous (J/X) and non-standard (U/O) are included. https://www.insdc.org/submitting-standards/feature-table/#7.4.3

Variants§

§

Alanine = 0

§

Arginine = 1

§

Asparagine = 2

§

AsparticAcid = 3

§

Cysteine = 4

§

Glutamine = 5

§

GlutamicAcid = 6

§

Glycine = 7

§

Histidine = 8

§

Isoleucine = 9

§

Leucine = 10

§

AmbiguousLeucine = 11

§

Lysine = 12

§

Methionine = 13

§

Phenylalanine = 14

§

Proline = 15

§

Serine = 16

§

Threonine = 17

§

Tryptophan = 18

§

Tyrosine = 19

§

Valine = 20

§

Selenocysteine = 21

§

Pyrrolysine = 22

§

Unknown = 23

§

AmbiguousAsparagine = 24

§

AmbiguousGlutamine = 25

Implementations§

source§

impl AminoAcid

source

pub const A: Self = Self::Alanine

source

pub const B: Self = Self::AmbiguousAsparagine

source

pub const C: Self = Self::Cysteine

source

pub const D: Self = Self::AsparticAcid

source

pub const E: Self = Self::GlutamicAcid

source

pub const F: Self = Self::Phenylalanine

source

pub const G: Self = Self::Glycine

source

pub const H: Self = Self::Histidine

source

pub const I: Self = Self::Isoleucine

source

pub const J: Self = Self::AmbiguousLeucine

source

pub const K: Self = Self::Lysine

source

pub const L: Self = Self::Leucine

source

pub const M: Self = Self::Methionine

source

pub const N: Self = Self::Asparagine

source

pub const O: Self = Self::Pyrrolysine

source

pub const P: Self = Self::Proline

source

pub const Q: Self = Self::Glutamine

source

pub const R: Self = Self::Arginine

source

pub const S: Self = Self::Serine

source

pub const T: Self = Self::Threonine

source

pub const U: Self = Self::Selenocysteine

source

pub const V: Self = Self::Valine

source

pub const W: Self = Self::Tryptophan

source

pub const X: Self = Self::Unknown

source

pub const Y: Self = Self::Tyrosine

source

pub const Z: Self = Self::AmbiguousGlutamine

source

pub const Ala: Self = Self::Alanine

source

pub const Cys: Self = Self::Cysteine

source

pub const Asn: Self = Self::Asparagine

source

pub const Asp: Self = Self::AsparticAcid

source

pub const Asx: Self = Self::AmbiguousAsparagine

source

pub const Glu: Self = Self::GlutamicAcid

source

pub const Phe: Self = Self::Phenylalanine

source

pub const Gly: Self = Self::Glycine

source

pub const His: Self = Self::Histidine

source

pub const Ile: Self = Self::Isoleucine

source

pub const Xle: Self = Self::AmbiguousLeucine

source

pub const Lys: Self = Self::Lysine

source

pub const Leu: Self = Self::Leucine

source

pub const Met: Self = Self::Methionine

source

pub const Pyl: Self = Self::Pyrrolysine

source

pub const Pro: Self = Self::Proline

source

pub const Gln: Self = Self::Glutamine

source

pub const Glx: Self = Self::AmbiguousGlutamine

source

pub const Arg: Self = Self::Arginine

source

pub const Ser: Self = Self::Serine

source

pub const Thr: Self = Self::Threonine

source

pub const Sec: Self = Self::Selenocysteine

source

pub const Val: Self = Self::Valine

source

pub const Trp: Self = Self::Tryptophan

source

pub const Tyr: Self = Self::Tyrosine

source

pub const Xaa: Self = Self::Unknown

source

pub fn satellite_ion_fragments(&self) -> Vec<MolecularFormula>

source

pub fn fragments( &self, n_term: &[(MolecularFormula, String)], c_term: &[(MolecularFormula, String)], modifications: &MolecularFormula, charge_carriers: &MolecularCharge, sequence_index: usize, sequence_length: usize, ions: &PossibleIons<'_>, peptide_index: usize ) -> Vec<Fragment>

source

pub const fn char(&self) -> char

Trait Implementations§

source§

impl Chemical for AminoAcid

source§

fn formula(&self) -> MolecularFormula

Get the molecular formula
source§

impl Clone for AminoAcid

source§

fn clone(&self) -> AminoAcid

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl Debug for AminoAcid

source§

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

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for AminoAcid

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Hash for AminoAcid

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl Ord for AminoAcid

source§

fn cmp(&self, other: &AminoAcid) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for AminoAcid

source§

fn eq(&self, other: &AminoAcid) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for AminoAcid

source§

fn partial_cmp(&self, other: &AminoAcid) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl Serialize for AminoAcid

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl TryFrom<&str> for AminoAcid

§

type Error = ()

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

fn try_from(value: &str) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<char> for AminoAcid

§

type Error = ()

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

fn try_from(value: char) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<u8> for AminoAcid

§

type Error = ()

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

fn try_from(value: u8) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl Copy for AminoAcid

source§

impl Eq for AminoAcid

source§

impl StructuralEq for AminoAcid

source§

impl StructuralPartialEq for AminoAcid

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

§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
source§

impl<T> ToOwned for T
where T: Clone,

§

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

§

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.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

source§

impl<T> Scalar for T
where T: 'static + Clone + PartialEq + Debug,