Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages

TwoDOptimization Class Reference
[PeakPicking]

#include <OpenMS/TRANSFORMATIONS/RAW2PEAK/TwoDOptimization.h>

Inheritance diagram for TwoDOptimization:

DefaultParamHandler

List of all members.


Detailed Description

This class provides the two-dimensional optimization of the picked peak parameters.

Given the picked peaks, this class optimizes the peak parameters of each isotope pattern using a non-linear optimization. The peaks of adjacent scans are adjusted to achieve that a peak occuring in several scans has always the same m/z position. For the optimization the Levenberg-Marquardt algorithm provided from the GSL is used. The optimized parameters are the m/z values, the left and right width, which shall be equal for a peak in all scans, and the peaks' heights.

TwoDOptimization Parameters are explained on a separate page.

Public Member Functions

 TwoDOptimization ()
 Constructor.
 TwoDOptimization (const TwoDOptimization &opt)
 Copy constructor.
virtual ~TwoDOptimization ()
 Destructor.
TwoDOptimizationoperator= (const TwoDOptimization &opt)
 Assignment operator.
DoubleReal getMZTolerance () const
 Non-mutable access to the matching epsilon.
void setMZTolerance (double tolerance_mz)
 Mutable access to the matching epsilon.
DoubleReal getMaxPeakDistance () const
 Non-mutable access to the maximal peak distance in a cluster.
void setMaxPeakDistance (double max_peak_distance)
 Mutable access to the maximal peak distance in a cluster.
DoubleReal getMaxAbsError () const
 Non-mutable access to the maximal absolute error.
void setMaxAbsError (double eps_abs)
 Mutable access to the maximal absolute error.
DoubleReal getMaxRelError () const
 Non-mutable access to the maximal relative error.
void setMaxRelError (double eps_rel)
 Mutable access to the maximal relative error.
Int getMaxIterations () const
 Non-mutable access to the maximal number of iterations.
void setMaxIterations (int max_iteration)
 Mutable access to the maximal number of iterations.
const
OptimizationFunctions::PenaltyFactorsIntensity
getPenalties () const
 Non-mutable access to the minimal number of adjacent scans.
void setPenalties (OptimizationFunctions::PenaltyFactorsIntensity &penalties)
 Mutable access to the minimal number of adjacent scans.
template<typename InputSpectrumIterator, typename OutputPeakType>
void optimize (InputSpectrumIterator &first, InputSpectrumIterator &last, MSExperiment< OutputPeakType > &ms_exp, bool real2D=true)

Protected Member Functions

void updateMembers_ ()
 update members method from DefaultParamHandler to update the members
template<>
void optimizeRegions_ (MSExperiment< RawDataPoint1D >::const_iterator &first, MSExperiment< RawDataPoint1D >::const_iterator &last, MSExperiment< PickedPeak1D > &ms_exp)
template<>
void optimizeRegionsScanwise_ (MSExperiment< RawDataPoint1D >::const_iterator &first, MSExperiment< RawDataPoint1D >::const_iterator &last, MSExperiment< PickedPeak1D > &ms_exp)
Auxiliary Functions for the search of matching regions
std::vector< double >::iterator searchInScan_ (std::vector< double >::iterator scan_begin, std::vector< double >::iterator scan_end, double current_mz)
template<typename InputSpectrumIterator, typename OutputPeakType>
void optimizeRegions_ (InputSpectrumIterator &first, InputSpectrumIterator &last, MSExperiment< OutputPeakType > &ms_exp)
template<typename InputSpectrumIterator, typename OutputPeakType>
void optimizeRegionsScanwise_ (InputSpectrumIterator &first, InputSpectrumIterator &last, MSExperiment< OutputPeakType > &ms_exp)
template<typename InputSpectrumIterator, typename OutputPeakType>
void getRegionEndpoints_ (MSExperiment< OutputPeakType > &exp, InputSpectrumIterator &first, InputSpectrumIterator &last, unsigned int iso_map_idx, double noise_level)
 Get the indices of the first and last raw data point of this region.
void findMatchingPeaks_ (std::multimap< double, IsotopeCluster >::iterator &it, MSExperiment< PickedPeak1D > &ms_exp)
 Identify matching peak in a peak cluster.

Protected Attributes

std::multimap< double,
IsotopeCluster
iso_map_
 stores the retention time of each isotopic cluster
std::multimap< double,
IsotopeCluster >
::const_iterator 
curr_region_
 Pointer to the current region.
double max_peak_distance_
 upper bound for distance between two peaks belonging to the same region
double tolerance_mz_
 threshold for the difference in the peak position of two matching peaks
std::map< int, std::vector
< MSExperiment< PickedPeak1D >
::SpectrumType::Iterator > > 
matching_peaks_
 Indices of peaks in the adjacent scans matching peaks in the scan with no. ref_scan.
double eps_abs_
 Convergence Parameter: Maximal absolute error.
double eps_rel_
 Convergence Parameter: Maximal relative error.
int max_iteration_
 Convergence Parameter: Maximal number of iterations.
bool real_2D_
 Optimization considering all scans of a cluster or optimization of each scan separately.
OptimizationFunctions::PenaltyFactorsIntensity penalties_
 Penalty factors for some parameters in the optimization.

Classes

struct  IndexLess
 Comparator for the retention time. More...


Constructor & Destructor Documentation

TwoDOptimization (  ) 

Constructor.

TwoDOptimization ( const TwoDOptimization opt  ) 

Copy constructor.

virtual ~TwoDOptimization (  )  [inline, virtual]

Destructor.


Member Function Documentation

TwoDOptimization& operator= ( const TwoDOptimization opt  ) 

Assignment operator.

DoubleReal getMZTolerance (  )  const [inline]

Non-mutable access to the matching epsilon.

void setMZTolerance ( double  tolerance_mz  )  [inline]

Mutable access to the matching epsilon.

DoubleReal getMaxPeakDistance (  )  const [inline]

Non-mutable access to the maximal peak distance in a cluster.

void setMaxPeakDistance ( double  max_peak_distance  )  [inline]

Mutable access to the maximal peak distance in a cluster.

DoubleReal getMaxAbsError (  )  const [inline]

Non-mutable access to the maximal absolute error.

void setMaxAbsError ( double  eps_abs  )  [inline]

Mutable access to the maximal absolute error.

DoubleReal getMaxRelError (  )  const [inline]

Non-mutable access to the maximal relative error.

void setMaxRelError ( double  eps_rel  )  [inline]

Mutable access to the maximal relative error.

Int getMaxIterations (  )  const [inline]

Non-mutable access to the maximal number of iterations.

void setMaxIterations ( int  max_iteration  )  [inline]

Mutable access to the maximal number of iterations.

const OptimizationFunctions::PenaltyFactorsIntensity& getPenalties (  )  const [inline]

Non-mutable access to the minimal number of adjacent scans.

void setPenalties ( OptimizationFunctions::PenaltyFactorsIntensity penalties  )  [inline]

Mutable access to the minimal number of adjacent scans.

void optimize ( InputSpectrumIterator &  first,
InputSpectrumIterator &  last,
MSExperiment< OutputPeakType > &  ms_exp,
bool  real2D = true 
) [inline]

Find two dimensional peak clusters and optimize their peak parameters

std::vector<double>::iterator searchInScan_ ( std::vector< double >::iterator  scan_begin,
std::vector< double >::iterator  scan_end,
double  current_mz 
) [protected]

void optimizeRegions_ ( InputSpectrumIterator &  first,
InputSpectrumIterator &  last,
MSExperiment< OutputPeakType > &  ms_exp 
) [inline, protected]

Performs 2D optimization of all regions

void optimizeRegionsScanwise_ ( InputSpectrumIterator &  first,
InputSpectrumIterator &  last,
MSExperiment< OutputPeakType > &  ms_exp 
) [inline, protected]

Performs an optimization of all regions by calling OptimizePick

void getRegionEndpoints_ ( MSExperiment< OutputPeakType > &  exp,
InputSpectrumIterator &  first,
InputSpectrumIterator &  last,
unsigned int  iso_map_idx,
double  noise_level 
) [inline, protected]

Get the indices of the first and last raw data point of this region.

void findMatchingPeaks_ ( std::multimap< double, IsotopeCluster >::iterator it,
MSExperiment< PickedPeak1D > &  ms_exp 
) [protected]

Identify matching peak in a peak cluster.

void updateMembers_ (  )  [protected, virtual]

update members method from DefaultParamHandler to update the members

Reimplemented from DefaultParamHandler.

void optimizeRegions_ ( MSExperiment< RawDataPoint1D >::const_iterator &  first,
MSExperiment< RawDataPoint1D >::const_iterator &  last,
MSExperiment< PickedPeak1D > &  ms_exp 
) [inline, protected]

void optimizeRegionsScanwise_ ( MSExperiment< RawDataPoint1D >::const_iterator &  first,
MSExperiment< RawDataPoint1D >::const_iterator &  last,
MSExperiment< PickedPeak1D > &  ms_exp 
) [inline, protected]


Member Data Documentation

std::multimap<double,IsotopeCluster> iso_map_ [protected]

stores the retention time of each isotopic cluster

std::multimap<double,IsotopeCluster>::const_iterator curr_region_ [protected]

Pointer to the current region.

double max_peak_distance_ [protected]

upper bound for distance between two peaks belonging to the same region

double tolerance_mz_ [protected]

threshold for the difference in the peak position of two matching peaks

std::map<int, std::vector<MSExperiment<PickedPeak1D >::SpectrumType::Iterator > > matching_peaks_ [protected]

Indices of peaks in the adjacent scans matching peaks in the scan with no. ref_scan.

double eps_abs_ [protected]

Convergence Parameter: Maximal absolute error.

double eps_rel_ [protected]

Convergence Parameter: Maximal relative error.

int max_iteration_ [protected]

Convergence Parameter: Maximal number of iterations.

bool real_2D_ [protected]

Optimization considering all scans of a cluster or optimization of each scan separately.

OptimizationFunctions::PenaltyFactorsIntensity penalties_ [protected]

Penalty factors for some parameters in the optimization.


The documentation for this class was generated from the following file:
Generated Tue Apr 1 15:36:48 2008 -- using doxygen 1.5.4 OpenMS / TOPP 1.1