| OpenMS 2.5.0

Classes | Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
OptimizePeakDeconvolution Class Reference

This class provides the deconvolution of peak regions using non-linear optimization. More...

`#include <OpenMS/TRANSFORMATIONS/RAW2PEAK/OptimizePeakDeconvolution.h>`

Inheritance diagram for OptimizePeakDeconvolution:

## Classes

struct | Data
| Class containing the data needed for optimization. More...

## Public Types

Type definitions
typedef std::vector< Peak1D > | RawDataVector
typedef RawDataVector::iterator | PeakIterator

## Public Member Functions

bool | optimize (std::vector< PeakShape > &peaks, Data &data)
| Performs a nonlinear optimization of the peaks that belong to the current isotope pattern. More...
Size | getNumberOfPeaks_ (Int charge, std::vector< PeakShape > &temp_shapes, Data &data)
Constructors and Destructor
| OptimizePeakDeconvolution ()
| Constructor. More...
| OptimizePeakDeconvolution (const OptimizePeakDeconvolution &opt)
| Copy-Constructor. More...
| ~OptimizePeakDeconvolution () override
| Destructor. More...
Assignment
OptimizePeakDeconvolution & | operator= (const OptimizePeakDeconvolution &opt)
const OptimizationFunctions::PenaltyFactorsIntensity & | getPenalties () const
| Non-mutable access to the penalty parameter. More...
void | setPenalties (const OptimizationFunctions::PenaltyFactorsIntensity &penalties)
| Mutable access to the penalty parameter. More...
Int | getCharge () const
| Non-mutable access to the charge. More...
void | setCharge (const Int charge)
| Mutable access to the charge. 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...
virtual DefaultParamHandler & | operator= (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 Param & | getParameters () const
| Non-mutable access to the parameters. More...
const Param & | getDefaults () const
| Non-mutable access to the default parameters. More...
const String & | getName () 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...

## Protected Member Functions

void | setNumberOfPeaks_ (Data &data, const std::vector< PeakShape > &temp_shapes, Int charge)
| A function to determine the number of peaks that lie in the current m/z interval given the distance between the peaks by the current charge state. More...
void | updateMembers_ () override
| This method is used to update extra member variables at the end of the setParameters() method. More...
Protected Member Functions inherited from DefaultParamHandler
void | defaultsToParam_ ()
| Updates the parameters after the defaults have been set in the constructor. More...

## Protected Attributes

OptimizationFunctions::PenaltyFactorsIntensity | penalties_
Int | charge_
| Charge state of the current isotope pattern. 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< String > | subsections_
| 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...

## Static Protected Attributes

static const double | dist_
| distance between two isotopic peaks More...

## Detailed Description

This class provides the deconvolution of peak regions using non-linear optimization.

Given a vector of peak shapes, this class optimizes all peak shapes parameters using a non-linear optimization. For the non-linear optimization we use the Levenberg-Marquardt algorithm. There are a few constraints for the parameters: the positions are equidistant according to the peptide mass rule, e.g. two consecutive isotopic peaks are 1.003/charge away from each other. Besides the peaks have all the same left and right width, respectively.

Parameters of this class are:

Name | Type | Default | Restrictions | Description
--- | --- | --- | --- | ---
max_iteration | int | 10 |  | maximal number of iterations for the fitting step
eps_abs | float | 1.0e-04 |  | if the absolute error gets smaller than this value the fitting is stopped
eps_rel | float | 1.0e-04 |  | if the relative error gets smaller than this value the fitting is stopped
fwhm_threshold | float | 1.0 |  | If a peaks is broader than fwhm_threshold, it is assumed that it contains another peaks and an additional peak is added.
penalties:left_width | float | 0.0 |  | penalty term for the fitting of the left width:If the left width gets too broad or negative during the fitting it can be penalized.
penalties:right_width | float | 0.0 |  | penalty term for the fitting of the right width:If the right width gets too broad or negative during the fitting it can be penalized.
penalties:height | float | 0.0 |  | penalty term for the fitting of the intensity:If it gets negative during the fitting it can be penalized.
penalties:position | float | 0.0 |  | penalty term for the fitting of the peak position:If the position changes more than 0.5Da during the fitting it can be penalized as well as discrepancies of the peptide mass rule.

Note:

- If a section name is documented, the documentation is displayed as tooltip.
- Advanced parameter names are italic.

## Class Documentation

## ◆ OpenMS::OptimizePeakDeconvolution::Data

struct OpenMS::OptimizePeakDeconvolution::Data

Class containing the data needed for optimization.

Class Members
Int | charge |
vector< PeakShape > | peaks |
PenaltyFactorsIntensity | penalties |
vector< double > | positions |
vector< double > | signal |

## Member Typedef Documentation

## ◆ PeakIterator

typedef RawDataVector::iterator PeakIterator

## ◆ RawDataVector

typedef std::vector<Peak1D> RawDataVector

## Constructor & Destructor Documentation

## ◆ OptimizePeakDeconvolution() [1/2]

OptimizePeakDeconvolution | ( |  | ) |

Constructor.

## ◆ OptimizePeakDeconvolution() [2/2]

OptimizePeakDeconvolution | ( | const OptimizePeakDeconvolution & | opt | ) |

inline

Copy-Constructor.

## ◆ ~OptimizePeakDeconvolution()

~OptimizePeakDeconvolution | ( |  | ) |

inline override

Destructor.

## Member Function Documentation

## ◆ getCharge()

Int getCharge | ( |  | ) | const

inline

Non-mutable access to the charge.

## ◆ getNumberOfPeaks_()

Size getNumberOfPeaks_ | ( | Int | charge,
|  | std::vector< PeakShape > & | temp_shapes,
|  | Data & | data
| ) |  |

## ◆ getPenalties()

const OptimizationFunctions::PenaltyFactorsIntensity& getPenalties | ( |  | ) | const

inline

Non-mutable access to the penalty parameter.

Accessors

## ◆ operator=()

OptimizePeakDeconvolution& operator= | ( | const OptimizePeakDeconvolution & | opt | ) |

inline

References OptimizePeakDeconvolution::charge_, DefaultParamHandler::operator=(), and OptimizePeakDeconvolution::penalties_.

## ◆ optimize()

bool optimize | ( | std::vector< PeakShape > & | peaks,
|  | Data & | data
| ) |  |

Performs a nonlinear optimization of the peaks that belong to the current isotope pattern.

## ◆ setCharge()

void setCharge | ( | const Int | charge | ) |

inline

Mutable access to the charge.

## ◆ setNumberOfPeaks_()

void setNumberOfPeaks_ | ( | Data & | data,
|  | const std::vector< PeakShape > & | temp_shapes,
|  | Int | charge
| ) |  |

protected

A function to determine the number of peaks that lie in the current m/z interval given the distance between the peaks by the current charge state.

## ◆ setPenalties()

void setPenalties | ( | const OptimizationFunctions::PenaltyFactorsIntensity & | penalties | ) |

inline

Mutable access to the penalty parameter.

## ◆ updateMembers_()

void updateMembers_ | ( |  | ) |

override protected virtual

This method is used to update extra member variables at the end of the setParameters() method.

Also call it at the end of the derived classes' copy constructor and assignment operator.

The default implementation is empty.

Reimplemented from DefaultParamHandler.

## Member Data Documentation

## ◆ charge_

Int charge_

protected

Charge state of the current isotope pattern.

Referenced by OptimizePeakDeconvolution::operator=().

## ◆ dist_

const double dist_

static protected

distance between two isotopic peaks

## ◆ penalties_

OptimizationFunctions::PenaltyFactorsIntensity penalties_

protected

Referenced by OptimizePeakDeconvolution::operator=().