Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
Static Public Member Functions | List of all members
OPXLSpectrumProcessingAlgorithms Class Reference

#include <OpenMS/ANALYSIS/XLMS/OPXLSpectrumProcessingAlgorithms.h>

Static Public Member Functions

static PeakSpectrum mergeAnnotatedSpectra (PeakSpectrum &first_spectrum, PeakSpectrum &second_spectrum)
 Merges two spectra into one while correctly considering metainfo in DataArrays. More...
 
static PeakMap preprocessSpectra (PeakMap &exp, double fragment_mass_tolerance_xlinks, bool fragment_mass_tolerance_unit_ppm, Size peptide_min_size, Int min_precursor_charge, Int max_precursor_charge, bool labeled)
 Preprocesses spectra. More...
 
static void getSpectrumAlignment (std::vector< std::pair< Size, Size > > &alignment, const PeakSpectrum &s1, const PeakSpectrum &s2, double tolerance, bool relative_tolerance, double intensity_cutoff=0.0)
 Computes a spectrum alignment while considering fragment charges stored in a IntegerDataArray and an intensity difference ratio. More...
 
static PeakSpectrum deisotopeAndSingleChargeMSSpectrum (PeakSpectrum &old_spectrum, Int min_charge, Int max_charge, double fragment_tolerance, bool fragment_tolerance_unit_ppm, bool keep_only_deisotoped=false, Size min_isopeaks=3, Size max_isopeaks=10, bool make_single_charged=false)
 Deisotopes a spectrum and stores the determined charges in an IntegerDataArray. More...
 

Member Function Documentation

◆ deisotopeAndSingleChargeMSSpectrum()

static PeakSpectrum deisotopeAndSingleChargeMSSpectrum ( PeakSpectrum old_spectrum,
Int  min_charge,
Int  max_charge,
double  fragment_tolerance,
bool  fragment_tolerance_unit_ppm,
bool  keep_only_deisotoped = false,
Size  min_isopeaks = 3,
Size  max_isopeaks = 10,
bool  make_single_charged = false 
)
static

Deisotopes a spectrum and stores the determined charges in an IntegerDataArray.

If keep_only_deisotoped is false, the peaks that could not be deisotoped are assigned the charge 0. If an isotopic pattern contains more peaks than max_isopeaks, the rest are ignored for the current pattern.

Parameters
old_spectrumThe spectrum to be deisotoped
min_chargeMinimal charge to consider for the isotope patterns
max_chargeMaximal charge to consider for the isotope patterns
fragment_toleranceThe mass tolerance for matching peaks of an isotope pattern
fragment_tolerance_unit_ppmTrue, if the given tolerance is in ppm, false if it is in Da
keep_only_deisotopedTrue if the peaks that could not be deisotoped should be discarded
min_isopeaksThe minimal number of consecutive peaks in an isotopic pattern, before it gets acknowledged as an isotopic pattern
max_isopeaksThe maximal number of consecutive peaks in an isotopic pattern.
make_single_chargedIf true, all peaks with charges larger than 1 are replaced with peaks with their corresponding single charged MZ
Returns
A PeakSpectrum annotated with charges

◆ getSpectrumAlignment()

static void getSpectrumAlignment ( std::vector< std::pair< Size, Size > > &  alignment,
const PeakSpectrum s1,
const PeakSpectrum s2,
double  tolerance,
bool  relative_tolerance,
double  intensity_cutoff = 0.0 
)
static

Computes a spectrum alignment while considering fragment charges stored in a IntegerDataArray and an intensity difference ratio.

Parameters
alignmentThe empty alignment, that will be filled by the algorithm
s1The first spectrum to be aligned
s2the second spectrum to be aligned
toleranceThe peak mass tolerance
relative_toleranceTrue if the given tolerance is a ppm tolerance, false if tolerance is in Da
intensity_cutoffPeaks will only be aligned if intensity1 / intensity2 > intensity_cutoff, with intensity1 being the lower of the two compared peaks and intensity2 the higher one. Set to 0 to ignore intensity differences.

◆ mergeAnnotatedSpectra()

static PeakSpectrum mergeAnnotatedSpectra ( PeakSpectrum first_spectrum,
PeakSpectrum second_spectrum 
)
static

Merges two spectra into one while correctly considering metainfo in DataArrays.

Parameters
first_spectrum
second_spectrum
Returns
A PeakSpectrum containing all peaks from both input spectra

◆ preprocessSpectra()

static PeakMap preprocessSpectra ( PeakMap exp,
double  fragment_mass_tolerance_xlinks,
bool  fragment_mass_tolerance_unit_ppm,
Size  peptide_min_size,
Int  min_precursor_charge,
Int  max_precursor_charge,
bool  labeled 
)
static

Preprocesses spectra.

Filters out spectra with too few peaks (based on peptide_min_size) and those that do not fit into the precursor charge range. Removes zero intensity peaks and normalizes intensities. If the given tolerance is low enough, deisotoping is performed. Otherwise only the 500 most intense peaks are kept, if the param labeled is false. The number of returned spectra is equal to the number of input spectra for labeled data (otherwise not necessarily).

Parameters
exp
fragment_mass_tolerance_xlinks
fragment_mass_tolerance_unit_ppm
peptide_min_size
min_precursor_charge
max_precursor_charge
labeled
Returns
A PeakMap of preprocessed spectra

OpenMS / TOPP release 2.3.0 Documentation generated on Tue Jan 9 2018 18:22:11 using doxygen 1.8.13