rustms::algorithm::peptide

Function calculate_product_ion_mz

Source
pub fn calculate_product_ion_mz(
    sequence: &str,
    kind: FragmentType,
    charge: Option<i32>,
) -> f64
Expand description

calculate the monoisotopic m/z of a peptide product ion for a given fragment type and charge

Arguments:

  • sequence - peptide sequence
  • kind - fragment type
  • charge - charge

Returns:

  • mz - monoisotopic mass of the peptide

ยงExamples

use rustms::algorithm::peptide::calculate_product_ion_mz;
use rustms::chemistry::constants::MASS_PROTON;
use rustms::proteomics::peptide::FragmentType;
let sequence = "PEPTIDEH";
let mz = calculate_product_ion_mz(sequence, FragmentType::Y, Some(1));
assert_eq!(mz, 936.4188766862999 + MASS_PROTON);