A RT Profile fitter using an Exponential Gaussian Hybrid background model. More...
#include <OpenMS/TRANSFORMATIONS/FEATUREFINDER/EGHTraceFitter.h>
Public Member Functions | |
EGHTraceFitter () | |
EGHTraceFitter (const EGHTraceFitter &other) | |
EGHTraceFitter & | operator= (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) |
![]() | |
TraceFitter () | |
default constructor. More... | |
TraceFitter (const TraceFitter &source) | |
copy constructor More... | |
virtual TraceFitter & | operator= (const TraceFitter &source) |
assignment operator More... | |
virtual | ~TraceFitter () |
destructor More... | |
![]() | |
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 ¶m) |
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 | |
std::pair< DoubleReal, DoubleReal > | getAlphaBoundaries_ (const DoubleReal alpha) const |
Return an ordered pair of the positions where the EGH reaches a height of alpha * height of the EGH. More... | |
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. More... | |
void | printState_ (SignedSize iter, gsl_multifit_fdfsolver *s) |
![]() | |
void | optimize_ (FeatureFinderAlgorithmPickedHelperStructs::MassTraces< PeakType > &traces, const Size num_params, double x_init[], Int(*residual)(const gsl_vector *x, void *params, gsl_vector *f), Int(*jacobian)(const gsl_vector *x, void *params, gsl_matrix *J), Int(*evaluate)(const gsl_vector *x, void *params, gsl_vector *f, gsl_matrix *J)) |
![]() | |
void | defaultsToParam_ () |
Updates the parameters after the defaults have been set in the constructor. More... | |
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, DoubleReal > | sigma_5_bound_ |
std::pair< DoubleReal, DoubleReal > | fwhm_bound_ |
DoubleReal | region_rt_span_ |
![]() | |
DoubleReal | epsilon_abs_ |
Absolute error. More... | |
DoubleReal | epsilon_rel_ |
Relative error. More... | |
SignedSize | max_iterations_ |
Maximum number of iterations. More... | |
![]() | |
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 Size | NUM_PARAMS_ = 4 |
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:Name | Type | Default | Restrictions | Description |
---|---|---|---|---|
max_iteration | int | 500 | Maximum number of iterations using by Levenberg-Marquardt algorithm. | |
epsilon_abs | float | 0.0001 | Absolute error used by the Levenberg-Marquardt algorithm. | |
epsilon_rel | float | 0.0001 | Relative error used by the Levenberg-Marquardt algorithm. |
|
inline |
|
inline |
|
inlinevirtual |
|
inlinevirtual |
Checks if the fitted model is not to big
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_.
|
inlinevirtual |
Checks if the fitted model fills out at least 'min_rt_span' of the RT span
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_.
|
inlinevirtual |
Returns the theoretical value of the fitted model at position k in the passed Mass Trace
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_, OpenMS::Constants::k, FeatureFinderAlgorithmPickedHelperStructs::MassTrace< PeakType >::peaks, EGHTraceFitter< PeakType >::sigma_square_, EGHTraceFitter< PeakType >::tau_, and FeatureFinderAlgorithmPickedHelperStructs::MassTrace< PeakType >::theoretical_int.
|
inlinestaticprotected |
|
inlinevirtual |
Main method of the TraceFitter which triggers the actual fitting.
Implements TraceFitter< PeakType >.
References EGHTraceFitter< PeakType >::apex_rt_, EGHTraceFitter< PeakType >::height_, EGHTraceFitter< PeakType >::NUM_PARAMS_, TraceFitter< PeakType >::optimize_(), EGHTraceFitter< PeakType >::setInitialParameters_(), EGHTraceFitter< PeakType >::sigma_square_, and EGHTraceFitter< PeakType >::tau_.
|
inlineprotected |
Return an ordered pair of the positions where the EGH reaches a height of alpha * height of the EGH.
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_().
|
inlinevirtual |
Returns the center position of the fitted model
Implements TraceFitter< PeakType >.
References EGHTraceFitter< PeakType >::apex_rt_.
|
inlinevirtual |
???
Implements TraceFitter< PeakType >.
References EGHTraceFitter< PeakType >::fwhm_bound_, and EGHTraceFitter< PeakType >::height_.
|
inlinevirtual |
Returns the mass trace width at half max (FWHM)
Implements TraceFitter< PeakType >.
References EGHTraceFitter< PeakType >::getAlphaBoundaries_().
|
inlinevirtual |
Returns a textual representation of the fitted model function, that can be plotted using Gnuplot
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.
|
inlinevirtual |
Returns the height of the fitted model
Implements TraceFitter< PeakType >.
References EGHTraceFitter< PeakType >::height_.
|
inlinevirtual |
Returns the lower bound of the fitted RT model
Implements TraceFitter< PeakType >.
References EGHTraceFitter< PeakType >::sigma_5_bound_.
|
inlineprotectedvirtual |
Updates all member variables to the fitted values stored in the solver.
s | The solver containing the fitted parameter values. |
Implements TraceFitter< PeakType >.
References EGHTraceFitter< PeakType >::apex_rt_, EGHTraceFitter< PeakType >::fwhm_bound_, EGHTraceFitter< PeakType >::getAlphaBoundaries_(), EGHTraceFitter< PeakType >::height_, EGHTraceFitter< PeakType >::sigma_5_bound_, EGHTraceFitter< PeakType >::sigma_square_, and EGHTraceFitter< PeakType >::tau_.
|
inline |
References EGHTraceFitter< PeakType >::sigma_square_.
|
inline |
References EGHTraceFitter< PeakType >::tau_.
|
inlinevirtual |
Returns the upper bound of the fitted RT model
Implements TraceFitter< PeakType >.
References EGHTraceFitter< PeakType >::sigma_5_bound_.
|
inlinestaticprotected |
|
inline |
References EGHTraceFitter< PeakType >::apex_rt_, EGHTraceFitter< PeakType >::fwhm_bound_, EGHTraceFitter< PeakType >::height_, TraceFitter< PeakType >::operator=(), EGHTraceFitter< PeakType >::sigma_5_bound_, EGHTraceFitter< PeakType >::sigma_square_, EGHTraceFitter< PeakType >::tau_, and EGHTraceFitter< PeakType >::updateMembers_().
|
inlineprotectedvirtual |
Prints the state of the current iteration (e.g., values of the parameters)
iter | Number of current iteration. |
s | The solver that also contains all the parameters. |
Implements TraceFitter< PeakType >.
References LOG_DEBUG.
|
inlinestaticprotected |
References FeatureFinderAlgorithmPickedHelperStructs::MassTraces< PeakType >::baseline, FeatureFinderAlgorithmPickedHelperStructs::MassTrace< PeakType >::peaks, and FeatureFinderAlgorithmPickedHelperStructs::MassTrace< PeakType >::theoretical_int.
Referenced by EGHTraceFitter< PeakType >::evaluate_().
|
inlineprotected |
References EGHTraceFitter< PeakType >::apex_rt_, FeatureFinderAlgorithmPickedHelperStructs::MassTraces< PeakType >::baseline, Peak2D::getIntensity(), EGHTraceFitter< PeakType >::height_, LOG_DEBUG, FeatureFinderAlgorithmPickedHelperStructs::MassTraces< PeakType >::max_trace, EGHTraceFitter< PeakType >::region_rt_span_, EGHTraceFitter< PeakType >::sigma_square_, and EGHTraceFitter< PeakType >::tau_.
Referenced by EGHTraceFitter< PeakType >::fit().
|
inlineprotectedvirtual |
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 >.
References TraceFitter< PeakType >::updateMembers_().
Referenced by EGHTraceFitter< PeakType >::EGHTraceFitter(), and EGHTraceFitter< PeakType >::operator=().
|
protected |
Referenced by EGHTraceFitter< PeakType >::computeTheoretical(), EGHTraceFitter< PeakType >::EGHTraceFitter(), EGHTraceFitter< PeakType >::fit(), EGHTraceFitter< PeakType >::getAlphaBoundaries_(), EGHTraceFitter< PeakType >::getCenter(), EGHTraceFitter< PeakType >::getGnuplotFormula(), EGHTraceFitter< PeakType >::getOptimizedParameters_(), EGHTraceFitter< PeakType >::operator=(), and EGHTraceFitter< PeakType >::setInitialParameters_().
|
protected |
|
protected |
Referenced by EGHTraceFitter< PeakType >::computeTheoretical(), EGHTraceFitter< PeakType >::EGHTraceFitter(), EGHTraceFitter< PeakType >::fit(), EGHTraceFitter< PeakType >::getFeatureIntensityContribution(), EGHTraceFitter< PeakType >::getGnuplotFormula(), EGHTraceFitter< PeakType >::getHeight(), EGHTraceFitter< PeakType >::getOptimizedParameters_(), EGHTraceFitter< PeakType >::operator=(), and EGHTraceFitter< PeakType >::setInitialParameters_().
|
staticprotected |
Referenced by EGHTraceFitter< PeakType >::fit().
|
protected |
|
protected |
Referenced by EGHTraceFitter< PeakType >::checkMaximalRTSpan(), EGHTraceFitter< PeakType >::checkMinimalRTSpan(), EGHTraceFitter< PeakType >::EGHTraceFitter(), EGHTraceFitter< PeakType >::getLowerRTBound(), EGHTraceFitter< PeakType >::getOptimizedParameters_(), EGHTraceFitter< PeakType >::getUpperRTBound(), and EGHTraceFitter< PeakType >::operator=().
|
protected |
Referenced by EGHTraceFitter< PeakType >::computeTheoretical(), EGHTraceFitter< PeakType >::EGHTraceFitter(), EGHTraceFitter< PeakType >::fit(), EGHTraceFitter< PeakType >::getAlphaBoundaries_(), EGHTraceFitter< PeakType >::getGnuplotFormula(), EGHTraceFitter< PeakType >::getOptimizedParameters_(), EGHTraceFitter< PeakType >::getSigmaSquare(), EGHTraceFitter< PeakType >::operator=(), and EGHTraceFitter< PeakType >::setInitialParameters_().
|
protected |
Referenced by EGHTraceFitter< PeakType >::computeTheoretical(), EGHTraceFitter< PeakType >::EGHTraceFitter(), EGHTraceFitter< PeakType >::fit(), EGHTraceFitter< PeakType >::getAlphaBoundaries_(), EGHTraceFitter< PeakType >::getGnuplotFormula(), EGHTraceFitter< PeakType >::getOptimizedParameters_(), EGHTraceFitter< PeakType >::getTau(), EGHTraceFitter< PeakType >::operator=(), and EGHTraceFitter< PeakType >::setInitialParameters_().
OpenMS / TOPP release 1.11.1 | Documentation generated on Thu Nov 14 2013 11:19:34 using doxygen 1.8.5 |