OpenMS
SwathMapMassCorrection Class Reference

A class containing correction functions for Swath MS maps. More...

#include <OpenMS/ANALYSIS/OPENSWATH/SwathMapMassCorrection.h>

Inheritance diagram for SwathMapMassCorrection:
[legend]
Collaboration diagram for SwathMapMassCorrection:
[legend]

Public Member Functions

 SwathMapMassCorrection ()
 Constructor. More...
 
 ~SwathMapMassCorrection () override=default
 Destructor. More...
 
void updateMembers_ () override
 Synchronize members with param class. More...
 
void correctMZ (const std::map< String, OpenMS::MRMFeatureFinderScoring::MRMTransitionGroupType * > &transition_group_map, const OpenSwath::LightTargetedExperiment &targeted_exp, std::vector< OpenSwath::SwathMap > &swath_maps, const bool pasef)
 Correct the m/z values of a SWATH map based on the RT-normalization peptides. More...
 
void correctIM (const std::map< String, OpenMS::MRMFeatureFinderScoring::MRMTransitionGroupType * > &transition_group_map, const OpenSwath::LightTargetedExperiment &targeted_exp, const std::vector< OpenSwath::SwathMap > &swath_maps, const bool pasef, TransformationDescription &im_trafo)
 Correct the ion mobility values of a SWATH map based on the RT-normalization peptides. More...
 
std::vector< OpenSwath::SwathMapfindSwathMapsPasef (const OpenMS::MRMFeatureFinderScoring::MRMTransitionGroupType &transition_group, const std::vector< OpenSwath::SwathMap > &swath_maps)
 Computes the SwathMaps for PASEF data in which windows can have the same m/z but differ by ion mobility. More...
 
- Public Member Functions inherited from DefaultParamHandler
 DefaultParamHandler (const String &name)
 Constructor with name that is displayed in error messages. More...
 
 DefaultParamHandler (const DefaultParamHandler &rhs)
 Copy constructor. More...
 
virtual ~DefaultParamHandler ()
 Destructor. More...
 
DefaultParamHandleroperator= (const DefaultParamHandler &rhs)
 Assignment operator. More...
 
virtual bool operator== (const DefaultParamHandler &rhs) const
 Equality operator. More...
 
void setParameters (const Param &param)
 Sets the parameters. More...
 
const ParamgetParameters () const
 Non-mutable access to the parameters. More...
 
const ParamgetDefaults () const
 Non-mutable access to the default parameters. More...
 
const StringgetName () const
 Non-mutable access to the name. More...
 
void setName (const String &name)
 Mutable access to the name. More...
 
const std::vector< String > & getSubsections () const
 Non-mutable access to the registered subsections. More...
 

Private Attributes

double mz_extraction_window_
 
bool mz_extraction_window_ppm_
 
bool ms1_im_
 
double im_extraction_window_
 
String mz_correction_function_
 
String im_correction_function_
 
String debug_im_file_
 
String debug_mz_file_
 

Additional Inherited Members

- Static Public Member Functions inherited from DefaultParamHandler
static void writeParametersToMetaValues (const Param &write_this, MetaInfoInterface &write_here, const String &key_prefix="")
 Writes all parameters to meta values. More...
 
- Protected Member Functions inherited from DefaultParamHandler
void defaultsToParam_ ()
 Updates the parameters after the defaults have been set in the constructor. More...
 
- Protected Attributes inherited from DefaultParamHandler
Param param_
 Container for current parameters. More...
 
Param defaults_
 Container for default parameters. This member should be filled in the constructor of derived classes! More...
 
std::vector< Stringsubsections_
 Container for registered subsections. This member should be filled in the constructor of derived classes! More...
 
String error_name_
 Name that is displayed in error messages during the parameter checking. More...
 
bool check_defaults_
 If this member is set to false no checking if parameters in done;. More...
 
bool warn_empty_defaults_
 If this member is set to false no warning is emitted when defaults are empty;. More...
 

Detailed Description

A class containing correction functions for Swath MS maps.

This class can use a set of pre-determined points in a Swath-MS map to correct all maps according to the m/z shift found in those fixed points.

Constructor & Destructor Documentation

◆ SwathMapMassCorrection()

Constructor.

◆ ~SwathMapMassCorrection()

~SwathMapMassCorrection ( )
overridedefault

Destructor.

Member Function Documentation

◆ correctIM()

void correctIM ( const std::map< String, OpenMS::MRMFeatureFinderScoring::MRMTransitionGroupType * > &  transition_group_map,
const OpenSwath::LightTargetedExperiment targeted_exp,
const std::vector< OpenSwath::SwathMap > &  swath_maps,
const bool  pasef,
TransformationDescription im_trafo 
)

Correct the ion mobility values of a SWATH map based on the RT-normalization peptides.

This extracts the full spectra at the most likely elution time of the calibrant peptides and fits a linear regression curve to correct for a possible ion mobility (drift time) shift of the empirical drift time vs the theoretically expected drift time. The resulting linear transformation is stored using a TransformationDescription object.

Parameters
transition_group_mapA MRMFeatureFinderScoring result map
swath_mapsThe raw swath maps from the current run
targeted_expThe corresponding spectral library (required for extraction coordinates)
pasefwhether the data is PASEF data with possible overlapping m/z windows (with different ion mobility). In this case, the "best" SWATH window (with precursor cetntered around IM) is chosen.
im_trafoThe resulting map containing the transformation

◆ correctMZ()

void correctMZ ( const std::map< String, OpenMS::MRMFeatureFinderScoring::MRMTransitionGroupType * > &  transition_group_map,
const OpenSwath::LightTargetedExperiment targeted_exp,
std::vector< OpenSwath::SwathMap > &  swath_maps,
const bool  pasef 
)

Correct the m/z values of a SWATH map based on the RT-normalization peptides.

This extracts the full spectra at the most likely elution time of the calibrant peptides and fits a regression curve to correct for a possible mass shift of the empirical masses vs the theoretically expected masses. Several types of regressions are available (see below corr_type parameter).

The function will replace the pointers stored in swath_maps with a transforming map that will contain corrected m/z values.

Parameters
transition_group_mapA MRMFeatureFinderScoring result map
targeted_expThe corresponding spectral library (required for extraction coordinates)
swath_mapsThe raw swath maps from the current run, will be modified (replaced with a corrected version)
pasefWhether the data is PASEF data with possible overlapping m/z windows (with different ion mobility). In this case, the "best" SWATH window (with precursor cetntered around IM) is chosen.

◆ findSwathMapsPasef()

std::vector<OpenSwath::SwathMap> findSwathMapsPasef ( const OpenMS::MRMFeatureFinderScoring::MRMTransitionGroupType transition_group,
const std::vector< OpenSwath::SwathMap > &  swath_maps 
)

Computes the SwathMaps for PASEF data in which windows can have the same m/z but differ by ion mobility.

For each precursor, the SwathMap is chosen based on library m/z and ion mobility. If two or more SwathMaps isolate the same precursor the SwathMap in which the precursor is more centered across ion mobility is chosen.

Parameters
[in]transition_groupA MRMTransitionGroup for which the SwathMap is assigned to
[out]swath_mapsA vector containing the a single entry, the swath map which the MRMFeature is assigned to

◆ updateMembers_()

void updateMembers_ ( )
overridevirtual

Synchronize members with param class.

Reimplemented from DefaultParamHandler.

Member Data Documentation

◆ debug_im_file_

String debug_im_file_
private

◆ debug_mz_file_

String debug_mz_file_
private

◆ im_correction_function_

String im_correction_function_
private

◆ im_extraction_window_

double im_extraction_window_
private

◆ ms1_im_

bool ms1_im_
private

◆ mz_correction_function_

String mz_correction_function_
private

◆ mz_extraction_window_

double mz_extraction_window_
private

◆ mz_extraction_window_ppm_

bool mz_extraction_window_ppm_
private