Skip to content

Commit

Permalink
Merge branch 'main' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
douweschulte committed Dec 1, 2023
2 parents 722cc20 + 10a1432 commit 122be3e
Show file tree
Hide file tree
Showing 4 changed files with 383 additions and 116 deletions.
2 changes: 2 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,11 @@
"Nonose",
"novor",
"Opair",
"Phospho",
"Psicose",
"Psimod",
"psms",
"pyro",
"Pyruvyl",
"Quant",
"Ribf",
Expand Down
49 changes: 49 additions & 0 deletions src/aminoacids.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,55 @@ impl AminoAcid {
pub const Tyr: Self = Self::Tyrosine;
pub const Xaa: Self = Self::Unknown;

/// All amino acids with a unique mass (no I/L in favour of J, no B, no Z, and no X)
pub const UNIQUE_MASS_AMINO_ACIDS: &[Self] = &[
Self::Glycine,
Self::Alanine,
Self::Arginine,
Self::Asparagine,
Self::AsparticAcid,
Self::Cysteine,
Self::Glutamine,
Self::GlutamicAcid,
Self::Histidine,
Self::AmbiguousLeucine,
Self::Lysine,
Self::Methionine,
Self::Phenylalanine,
Self::Proline,
Self::Serine,
Self::Threonine,
Self::Tryptophan,
Self::Tyrosine,
Self::Valine,
Self::Selenocysteine,
Self::Pyrrolysine,
];

/// All 20 canonical amino acids
pub const CANONICAL_AMINO_ACIDS: &[Self] = &[
Self::Glycine,
Self::Alanine,
Self::Arginine,
Self::Asparagine,
Self::AsparticAcid,
Self::Cysteine,
Self::Glutamine,
Self::GlutamicAcid,
Self::Histidine,
Self::Leucine,
Self::Isoleucine,
Self::Lysine,
Self::Methionine,
Self::Phenylalanine,
Self::Proline,
Self::Serine,
Self::Threonine,
Self::Tryptophan,
Self::Tyrosine,
Self::Valine,
];

// TODO: Take side chain mutations into account (maybe define pyrrolysine as a mutation)
pub fn satellite_ion_fragments(&self) -> Vec<MolecularFormula> {
match self {
Expand Down
Loading

0 comments on commit 122be3e

Please sign in to comment.