Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes

EGHTraceFitter< PeakType > Class Template Reference

A RT Profile fitter using an Exponential Gaussian Hybrid background model. More...

#include <OpenMS/TRANSFORMATIONS/FEATUREFINDER/EGHTraceFitter.h>

Inheritance diagram for EGHTraceFitter< PeakType >:
TraceFitter< PeakType > DefaultParamHandler

List of all members.

Public Member Functions

 EGHTraceFitter ()
 EGHTraceFitter (const EGHTraceFitter &other)
EGHTraceFitteroperator= (const EGHTraceFitter &source)
virtual ~EGHTraceFitter ()
void fit (FeatureFinderAlgorithmPickedHelperStructs::MassTraces< PeakType > &traces)
DoubleReal getLowerRTBound () const
DoubleReal getTau () const
DoubleReal getUpperRTBound () const
DoubleReal getHeight () const
DoubleReal getSigmaSquare () const
DoubleReal getCenter () const
bool checkMaximalRTSpan (const DoubleReal max_rt_span)
virtual bool checkMinimalRTSpan (const std::pair< DoubleReal, DoubleReal > &rt_bounds, const DoubleReal min_rt_span)
DoubleReal computeTheoretical (const FeatureFinderAlgorithmPickedHelperStructs::MassTrace< PeakType > &trace, Size k)
virtual DoubleReal getFeatureIntensityContribution ()
DoubleReal getFWHM () const
virtual String getGnuplotFormula (FeatureFinderAlgorithmPickedHelperStructs::MassTrace< PeakType > const &trace, const char function_name, const DoubleReal baseline, const DoubleReal rt_shift)

Protected Member Functions

std::pair< DoubleReal, DoubleRealgetAlphaBoundaries_ (const DoubleReal alpha) const
 Return an ordered pair of the positions where the EGH reaches a height of alpha * height of the EGH.
void getOptimizedParameters_ (gsl_multifit_fdfsolver *fdfsolver)
void setInitialParameters_ (FeatureFinderAlgorithmPickedHelperStructs::MassTraces< PeakType > &traces)
virtual void updateMembers_ ()
 This method is used to update extra member variables at the end of the setParameters() method.
void printState_ (SignedSize iter, gsl_multifit_fdfsolver *s)

Static Protected Member Functions

static Int residual_ (const gsl_vector *param, void *data, gsl_vector *f)
static Int jacobian_ (const gsl_vector *param, void *data, gsl_matrix *J)
static Int evaluate_ (const gsl_vector *param, void *data, gsl_vector *f, gsl_matrix *J)

Protected Attributes

DoubleReal apex_rt_
DoubleReal height_
DoubleReal sigma_square_
DoubleReal tau_
std::pair< DoubleReal, DoubleRealsigma_5_bound_
std::pair< DoubleReal, DoubleRealfwhm_bound_
DoubleReal region_rt_span_

Static Protected Attributes

static const Size NUM_PARAMS_ = 4

Detailed Description

template<class PeakType>
class OpenMS::EGHTraceFitter< PeakType >

A RT Profile fitter using an Exponential Gaussian Hybrid background model.

Lan K, Jorgenson JW. A hybrid of exponential and gaussian functions as a simple model of asymmetric chromatographic peaks. Journal of Chromatography A. 915 (1-2)p. 1-13. Available at: http://linkinghub.elsevier.com/retrieve/pii/S0021967301005945

Parameters of this class are:

NameTypeDefaultRestrictionsDescription
max_iteration int500  Maximum number of iterations using by Levenberg-Marquardt algorithm.
epsilon_abs float0.0001  Absolute error used by the Levenberg-Marquardt algorithm.
epsilon_rel float0.0001  Relative error used by the Levenberg-Marquardt algorithm.

Note:
Experimental classes:
Needs further testing on real data. Note that the tests are currently also focused on testing the EGH as replacement for the gaussian.

Constructor & Destructor Documentation

EGHTraceFitter (  )  [inline]
virtual ~EGHTraceFitter (  )  [inline, virtual]

Member Function Documentation

bool checkMaximalRTSpan ( const DoubleReal  max_rt_span  )  [inline, virtual]

Checks if the fitted model is not to big

Parameters:
max_rt_span Maximum RT span in relation to extended area that the model is allowed to have

Implements TraceFitter< PeakType >.

References EGHTraceFitter< PeakType >::region_rt_span_, and EGHTraceFitter< PeakType >::sigma_5_bound_.

virtual bool checkMinimalRTSpan ( const std::pair< DoubleReal, DoubleReal > &  rt_bounds,
const DoubleReal  min_rt_span 
) [inline, virtual]

Checks if the fitted model fills out at least 'min_rt_span' of the RT span

Parameters:
rt_bounds RT boundaries of the fitted model
min_rt_span Minimum RT span in relation to extended area that has to remain after model fitting

Implements TraceFitter< PeakType >.

References EGHTraceFitter< PeakType >::sigma_5_bound_.

DoubleReal computeTheoretical ( const FeatureFinderAlgorithmPickedHelperStructs::MassTrace< PeakType > &  trace,
Size  k 
) [inline, virtual]

Returns the theoretical value of the fitted model at position k in the passed Mass Trace

Parameters:
trace the mass trace for which the value should be computed
k use the position of the k-th peak to compute the value

Implements TraceFitter< PeakType >.

References EGHTraceFitter< PeakType >::apex_rt_, EGHTraceFitter< PeakType >::height_, FeatureFinderAlgorithmPickedHelperStructs::MassTrace< PeakType >::peaks, EGHTraceFitter< PeakType >::sigma_square_, EGHTraceFitter< PeakType >::tau_, and FeatureFinderAlgorithmPickedHelperStructs::MassTrace< PeakType >::theoretical_int.

static Int evaluate_ ( const gsl_vector *  param,
void *  data,
gsl_vector *  f,
gsl_matrix *  J 
) [inline, static, protected]
std::pair<DoubleReal, DoubleReal> getAlphaBoundaries_ ( const DoubleReal  alpha  )  const [inline, protected]

Return an ordered pair of the positions where the EGH reaches a height of alpha * height of the EGH.

Parameters:
alpha The alpha at which the boundaries should be computed

References EGHTraceFitter< PeakType >::apex_rt_, EGHTraceFitter< PeakType >::sigma_square_, and EGHTraceFitter< PeakType >::tau_.

Referenced by EGHTraceFitter< PeakType >::getFWHM(), and EGHTraceFitter< PeakType >::getOptimizedParameters_().

DoubleReal getCenter (  )  const [inline, virtual]

Returns the center position of the fitted model

Implements TraceFitter< PeakType >.

References EGHTraceFitter< PeakType >::apex_rt_.

virtual DoubleReal getFeatureIntensityContribution (  )  [inline, virtual]
DoubleReal getFWHM (  )  const [inline, virtual]

Returns the mass trace width at half max (FWHM)

Implements TraceFitter< PeakType >.

References EGHTraceFitter< PeakType >::getAlphaBoundaries_().

virtual String getGnuplotFormula ( FeatureFinderAlgorithmPickedHelperStructs::MassTrace< PeakType > const &  trace,
const char  function_name,
const DoubleReal  baseline,
const DoubleReal  rt_shift 
) [inline, virtual]

Returns a textual representation of the fitted model function, that can be plotted using Gnuplot

Parameters:
trace The MassTrace that should be plotted
function_name The name of the function (e.g. f(x) -> function_name = f)
baseline The intensity of the baseline
rt_shift A shift value, that allows to plot all RT profiles side by side, even if they would overlap in reality. This should be 0 for the first mass trace and increase by a fixed value for each mass trace.

Implements TraceFitter< PeakType >.

References EGHTraceFitter< PeakType >::apex_rt_, EGHTraceFitter< PeakType >::height_, EGHTraceFitter< PeakType >::sigma_square_, EGHTraceFitter< PeakType >::tau_, and FeatureFinderAlgorithmPickedHelperStructs::MassTrace< PeakType >::theoretical_int.

DoubleReal getHeight (  )  const [inline, virtual]

Returns the height of the fitted model

Implements TraceFitter< PeakType >.

References EGHTraceFitter< PeakType >::height_.

DoubleReal getLowerRTBound (  )  const [inline, virtual]

Returns the lower bound of the fitted RT model

Implements TraceFitter< PeakType >.

References EGHTraceFitter< PeakType >::sigma_5_bound_.

void getOptimizedParameters_ ( gsl_multifit_fdfsolver *  s  )  [inline, protected, virtual]
DoubleReal getSigmaSquare (  )  const [inline]
DoubleReal getTau (  )  const [inline]
DoubleReal getUpperRTBound (  )  const [inline, virtual]

Returns the upper bound of the fitted RT model

Implements TraceFitter< PeakType >.

References EGHTraceFitter< PeakType >::sigma_5_bound_.

static Int jacobian_ ( const gsl_vector *  param,
void *  data,
gsl_matrix *  J 
) [inline, static, protected]
void printState_ ( SignedSize  iter,
gsl_multifit_fdfsolver *  s 
) [inline, protected, virtual]

Prints the state of the current iteration (e.g., values of the parameters)

Parameters:
iter Number of current iteration.
s The solver that also contains all the parameters.

Implements TraceFitter< PeakType >.

References LOG_DEBUG.

virtual void updateMembers_ (  )  [inline, 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 TraceFitter< PeakType >.

Referenced by EGHTraceFitter< PeakType >::EGHTraceFitter(), and EGHTraceFitter< PeakType >::operator=().


Member Data Documentation

const Size NUM_PARAMS_ = 4 [static, protected]

OpenMS / TOPP release 1.10.0 Documentation generated on Thu Mar 7 2013 09:42:56 using doxygen 1.7.1