mscore::algorithm::isotope

Function generate_averagine_spectra

Source
pub fn generate_averagine_spectra(
    masses: Vec<f64>,
    charges: Vec<i32>,
    min_intensity: i32,
    k: i32,
    resolution: i32,
    centroid: bool,
    num_threads: usize,
    amp: Option<f64>,
) -> Vec<MzSpectrum>
Expand description

generate the averagine spectra for a given list of masses and charges using multiple threads

Arguments:

  • masses - list of masses of the peptides
  • charges - list of charges of the peptides
  • min_intensity - minimum intensity for a peak to be included in the result
  • k - number of isotopes to consider
  • resolution - resolution of the isotope pattern
  • centroid - whether to centroid the spectrum
  • num_threads - number of threads to use
  • amp - amplitude of the isotope pattern

Returns:

  • Vec<MzSpectrum> - list of averagine spectra

ยงExamples

use mscore::algorithm::isotope::generate_averagine_spectra;

let masses = vec![3000.0, 3000.0];
let charges = vec![2, 3];
let spectra = generate_averagine_spectra(masses, charges, 1, 10, 3, true, 4, None);