OpenMS
DDAWorkflowCommons Class Reference

Common functions for DDA workflows. More...

#include <OpenMS/ANALYSIS/QUANTITATION/DDAWorkflowCommons.h>

Static Public Member Functions

static std::map< String, StringmapMzML2Ids (StringList &in, StringList &in_ids)
 
static std::map< String, StringmapId2MzMLs (const std::map< String, String > &m2i)
 Small helper to get the mapping from id files to mzML files. More...
 
static double estimateMedianChromatographicFWHM (MSExperiment &ms_centroided)
 
static void recalibrateMS1 (MSExperiment &ms_centroided, PeptideIdentificationList &peptide_ids, const String &id_file_abs_path="")
 Recalibrates the masses of the MSExperiment using peptide identifications. More...
 
static void calculateSeeds (const MSExperiment &ms_centroided, const double intensity_threshold, FeatureMap &seeds, double median_fwhm, Size charge_min=2, Size charge_max=5)
 Extracts seeding features from centroided MS data (e.g., for untarged extraction). More...
 

Detailed Description

Common functions for DDA workflows.

Member Function Documentation

◆ calculateSeeds()

static void calculateSeeds ( const MSExperiment ms_centroided,
const double  intensity_threshold,
FeatureMap seeds,
double  median_fwhm,
Size  charge_min = 2,
Size  charge_max = 5 
)
static

Extracts seeding features from centroided MS data (e.g., for untarged extraction).

MS1 spectra are subjected to a threshold filter to removelow-intensity peaks, and then uses the FeatureFinderMultiplex algorithm to identify potential seeding features. The function also takes into account the median full width at half maximum (FWHM) of the peaks to adjust the FeatureFinderMultiplex parameters for better seed detection.

Parameters
[in]ms_centroided<const MSExperiment&> The centroided MSExperiment object. Only MS1 level spectra are considered for seed feature calculation.
[in]intensity_thresholdIntensity threshold below which peaks are discarded.
[out]seedsThe FeatureMap object where the identified seeding features will be stored.
[in]median_fwhmThe median FWHM of the peaks, used to adjust the FeatureFinderMultiplex parameters for seed detection.
[in]charge_minMinimum charge state to consider for feature seeds (default: 2).
[in]charge_maxMaximum charge state to consider for feature seeds (default: 5).
Note
The function employs a ThresholdMower filter with hardcoded parameters (m/z tolerance: 20 ppm, intensity cutoff: intensity_threshold, below cutoff: remove) and the FeatureFinderMultiplex algorithm with parameters optimized for seed feature detection in DDA workflows. These parameters may be refined or exposed as function arguments in future implementations for more flexibility.

◆ estimateMedianChromatographicFWHM()

static double estimateMedianChromatographicFWHM ( MSExperiment ms_centroided)
static

Estimates the median chromatographic full width at half maximum (FWHM) for a given MSExperiment.

Parameters
[in]ms_centroidedThe centroided MSExperiment for which to estimate the FWHM.
Returns
The estimated median chromatographic FWHM in retention time units.
Note
FWHM is a measure of peak width and is crucial for chromatographic peak detection and feature finding. The estimation is based on the top 1000 intensity mass traces to focus on prominent chromatographic peaks.

◆ mapId2MzMLs()

static std::map<String, String> mapId2MzMLs ( const std::map< String, String > &  m2i)
static

Small helper to get the mapping from id files to mzML files.

Basically just reverses the mapMzML2Ids function. Potential improvement: Could be combined into a single function exposed to the user.

Parameters
[in]m2i<const std::map<String, String>&> The mzML to id file mapping generated by mapMzML2Ids.
Returns
<std::map<String, String>> A map where keys are id file paths and values are corresponding mzML file paths.

◆ mapMzML2Ids()

static std::map<String, String> mapMzML2Ids ( StringList in,
StringList in_ids 
)
static

◆ recalibrateMS1()

static void recalibrateMS1 ( MSExperiment ms_centroided,
PeptideIdentificationList peptide_ids,
const String id_file_abs_path = "" 
)
static

Recalibrates the masses of the MSExperiment using peptide identifications.

This function recalibrates the masses of the MSExperiment by applying a mass recalibration based on the theoretical masses from identification data.

Parameters
[in,out]ms_centroided<MSExperiment&> The MSExperiment object containing the centroided spectra, which will be recalibrated in place.
[in]peptide_ids<PeptideIdentificationList&> The vector of PeptideIdentification objects containing the peptide identifications.
id_file_abs_pathThe absolute path of the identification file.
Note
Mass recalibration is essential to improve mass accuracy, which is critical for correct peptide identification and quantification.