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,
Lysine = 11,
Methionine = 12,
Phenylalanine = 13,
Proline = 14,
Serine = 15,
Threonine = 16,
Tryptophan = 17,
Tyrosine = 18,
Valine = 19,
AmbiguousAsparagine = 20,
AmbiguousLeucine = 21,
AmbiguousGlutamine = 22,
Selenocysteine = 23,
Pyrrolysine = 24,
Unknown = 25,
}
Expand description
An amino acid, alongside the standard ones some ambiguous (B/J/Z/X) and non-standard (U/O) are included.
Variants§
Alanine = 0
Arginine = 1
Asparagine = 2
AsparticAcid = 3
Cysteine = 4
Glutamine = 5
GlutamicAcid = 6
Glycine = 7
Histidine = 8
Isoleucine = 9
Leucine = 10
Lysine = 11
Methionine = 12
Phenylalanine = 13
Proline = 14
Serine = 15
Threonine = 16
Tryptophan = 17
Tyrosine = 18
Valine = 19
AmbiguousAsparagine = 20
AmbiguousLeucine = 21
AmbiguousGlutamine = 22
Selenocysteine = 23
Pyrrolysine = 24
Unknown = 25
Implementations§
source§impl AminoAcid
impl AminoAcid
All amino acid property classes according to IMGT.
IMGT standardized criteria for statistical analysis of immunoglobulin V-REGION amino acid properties
Christelle Pommié, Séverine Levadoux, Robert Sabatier, Gérard Lefranc, Marie-Paule Lefranc
Adapted to include J,B,Z,U,O, and X.
pub const fn physiochemical_class(self) -> PhysiochemicalClass
pub const fn chemical_class(self) -> ChemicalClass
pub const fn volume_class(self) -> VolumeClass
pub const fn hydropathy_class(self) -> HydropathyClass
pub const fn charge_class(self) -> ChargeClass
pub const fn polarity_class(self) -> PolarityClass
pub const fn hydrogen_bond_class(self) -> HydrogenBondClass
source§impl AminoAcid
impl AminoAcid
sourcepub const TOTAL_NUMBER: usize = 26usize
pub const TOTAL_NUMBER: usize = 26usize
The total number of amino acids
sourcepub fn from_dna(dna: &str) -> Result<Option<Self>, NotACodon>
pub fn from_dna(dna: &str) -> Result<Option<Self>, NotACodon>
Translate the dna codon into the corresponding amino acid according to the standard DNA codon table. It returns None for a stop codon. https://en.wikipedia.org/wiki/DNA_and_RNA_codon_tables
§Errors
It returns Err(NotACodon)
when the given codon is not a valid dna codon.
source§impl AminoAcid
impl AminoAcid
pub const A: Self = Self::Alanine
pub const B: Self = Self::AmbiguousAsparagine
pub const C: Self = Self::Cysteine
pub const D: Self = Self::AsparticAcid
pub const E: Self = Self::GlutamicAcid
pub const F: Self = Self::Phenylalanine
pub const G: Self = Self::Glycine
pub const H: Self = Self::Histidine
pub const I: Self = Self::Isoleucine
pub const J: Self = Self::AmbiguousLeucine
pub const K: Self = Self::Lysine
pub const L: Self = Self::Leucine
pub const M: Self = Self::Methionine
pub const N: Self = Self::Asparagine
pub const O: Self = Self::Pyrrolysine
pub const P: Self = Self::Proline
pub const Q: Self = Self::Glutamine
pub const R: Self = Self::Arginine
pub const S: Self = Self::Serine
pub const T: Self = Self::Threonine
pub const U: Self = Self::Selenocysteine
pub const V: Self = Self::Valine
pub const W: Self = Self::Tryptophan
pub const X: Self = Self::Unknown
pub const Y: Self = Self::Tyrosine
pub const Z: Self = Self::AmbiguousGlutamine
pub const Ala: Self = Self::Alanine
pub const Cys: Self = Self::Cysteine
pub const Asn: Self = Self::Asparagine
pub const Asp: Self = Self::AsparticAcid
pub const Asx: Self = Self::AmbiguousAsparagine
pub const Glu: Self = Self::GlutamicAcid
pub const Phe: Self = Self::Phenylalanine
pub const Gly: Self = Self::Glycine
pub const His: Self = Self::Histidine
pub const Ile: Self = Self::Isoleucine
pub const Xle: Self = Self::AmbiguousLeucine
pub const Lys: Self = Self::Lysine
pub const Leu: Self = Self::Leucine
pub const Met: Self = Self::Methionine
pub const Pyl: Self = Self::Pyrrolysine
pub const Pro: Self = Self::Proline
pub const Gln: Self = Self::Glutamine
pub const Glx: Self = Self::AmbiguousGlutamine
pub const Arg: Self = Self::Arginine
pub const Ser: Self = Self::Serine
pub const Thr: Self = Self::Threonine
pub const Sec: Self = Self::Selenocysteine
pub const Val: Self = Self::Valine
pub const Trp: Self = Self::Tryptophan
pub const Tyr: Self = Self::Tyrosine
pub const Xaa: Self = Self::Unknown
sourcepub const UNIQUE_MASS_AMINO_ACIDS: &'static [Self] = _
pub const UNIQUE_MASS_AMINO_ACIDS: &'static [Self] = _
All amino acids with a unique mass (no I/L in favour of J, no B, no Z, and no X)
sourcepub const CANONICAL_AMINO_ACIDS: &'static [Self] = _
pub const CANONICAL_AMINO_ACIDS: &'static [Self] = _
All 20 canonical amino acids
pub fn satellite_ion_fragments(self) -> Multi<MolecularFormula>
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>
pub const fn char(self) -> char
sourcepub fn canonical_identical(self, rhs: Self) -> bool
pub fn canonical_identical(self, rhs: Self) -> bool
Check if two amino acids are considered identical. X is identical to anything, J to IL, B to ND, Z to EQ.
Trait Implementations§
source§impl<'de> Deserialize<'de> for AminoAcid
impl<'de> Deserialize<'de> for AminoAcid
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl MultiChemical for AminoAcid
impl MultiChemical for AminoAcid
source§impl Ord for AminoAcid
impl Ord for AminoAcid
source§impl PartialEq for AminoAcid
impl PartialEq for AminoAcid
source§impl PartialOrd for AminoAcid
impl PartialOrd for AminoAcid
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read more