![]() |
OpenMS
|
A RT Profile fitter using an Exponential Gaussian Hybrid background model. More...
#include <OpenMS/FEATUREFINDER/EGHTraceFitter.h>
Classes | |
| class | EGHTraceFunctor |
Public Member Functions | |
| EGHTraceFitter () | |
| EGHTraceFitter (const EGHTraceFitter &other) | |
| EGHTraceFitter & | operator= (const EGHTraceFitter &source) |
| ~EGHTraceFitter () override | |
| void | fit (FeatureFinderAlgorithmPickedHelperStructs::MassTraces &traces) override |
Run the LM fit on traces. | |
| double | getLowerRTBound () const override |
| Lower RT bound of the fitted RT model. | |
| double | getTau () const |
| double | getUpperRTBound () const override |
| Upper RT bound of the fitted RT model. | |
| double | getHeight () const override |
| Height of the fitted RT model at its centre. | |
| double | getSigma () const |
| double | getCenter () const override |
| Centre of the fitted RT model. | |
| bool | checkMaximalRTSpan (const double max_rt_span) override |
Whether the fitted RT model stays within max_rt_span of the extended search area. | |
| bool | checkMinimalRTSpan (const std::pair< double, double > &rt_bounds, const double min_rt_span) override |
Whether the fitted RT model covers at least min_rt_span of the extended search area. | |
| double | getValue (double rt) const override |
Evaluate the fitted model at retention time rt. | |
| double | getArea () override |
| Area under the fitted RT model. | |
| double | getFWHM () const override |
| Full width at half maximum of the fitted RT model. | |
| std::string | getGnuplotFormula (const FeatureFinderAlgorithmPickedHelperStructs::MassTrace &trace, const char function_name, const double baseline, const double rt_shift) override |
Gnuplot expression of the fitted model for trace. | |
Public Member Functions inherited from TraceFitter | |
| TraceFitter () | |
Default constructor; registers the "max_iteration" and "weighted" defaults on DefaultParamHandler. | |
| TraceFitter (const TraceFitter &source) | |
| Copy constructor. | |
| TraceFitter & | operator= (const TraceFitter &source) |
| Assignment operator. | |
| ~TraceFitter () override | |
| Destructor. | |
| double | computeTheoretical (const FeatureFinderAlgorithmPickedHelperStructs::MassTrace &trace, Size k) const |
Evaluate the fitted model at the RT of the k-th peak of trace, scaled by the trace's theoretical intensity. | |
Public Member Functions inherited from DefaultParamHandler | |
| DefaultParamHandler (const std::string &name) | |
| Constructor with name that is displayed in error messages. | |
| DefaultParamHandler (const DefaultParamHandler &rhs) | |
| Copy constructor. | |
| virtual | ~DefaultParamHandler () |
| Destructor. | |
| DefaultParamHandler & | operator= (const DefaultParamHandler &rhs) |
| Assignment operator. | |
| virtual bool | operator== (const DefaultParamHandler &rhs) const |
| Equality operator. | |
| void | setParameters (const Param ¶m) |
| Sets the parameters. | |
| const Param & | getParameters () const |
| Non-mutable access to the parameters. | |
| const Param & | getDefaults () const |
| Non-mutable access to the default parameters. | |
| const std::string & | getName () const |
| Non-mutable access to the name. | |
| void | setName (const std::string &name) |
| Mutable access to the name. | |
| const std::vector< std::string > & | getSubsections () const |
| Non-mutable access to the registered subsections. | |
Protected Member Functions | |
| std::pair< double, double > | getAlphaBoundaries_ (const double alpha) const |
| Return an ordered pair of the positions where the EGH reaches a height of alpha * height of the EGH. | |
| void | getOptimizedParameters_ (const std::vector< double > &x_init) override |
| Subclass hook: copy the optimised parameter vector back into the subclass's model fields. | |
| void | setInitialParameters_ (FeatureFinderAlgorithmPickedHelperStructs::MassTraces &traces) |
| void | updateMembers_ () override |
| This method is used to update extra member variables at the end of the setParameters() method. | |
Protected Member Functions inherited from TraceFitter | |
| void | updateMembers_ () override |
| This method is used to update extra member variables at the end of the setParameters() method. | |
| void | optimize_ (std::vector< double > &x_init, GenericFunctor &functor) |
Run Levenberg-Marquardt on functor starting from x_init. | |
Protected Member Functions inherited from DefaultParamHandler | |
| void | defaultsToParam_ () |
| Updates the parameters after the defaults have been set in the constructor. | |
Protected Attributes | |
| double | apex_rt_ |
| double | height_ |
| double | sigma_ |
| double | tau_ |
| std::pair< double, double > | sigma_5_bound_ |
| double | region_rt_span_ |
Protected Attributes inherited from TraceFitter | |
| SignedSize | max_iterations_ |
Maximum number of LM iterations; refreshed from "max_iteration" in updateMembers_. | |
| bool | weighted_ |
Whether mass traces are weighted by theoretical intensity during fitting; refreshed from "weighted" in updateMembers_. | |
Protected Attributes inherited from DefaultParamHandler | |
| Param | param_ |
| Container for current parameters. | |
| Param | defaults_ |
| Container for default parameters. This member should be filled in the constructor of derived classes! | |
| std::vector< std::string > | subsections_ |
| Container for registered subsections. This member should be filled in the constructor of derived classes! | |
| std::string | error_name_ |
| Name that is displayed in error messages during the parameter checking. | |
| bool | check_defaults_ |
| If this member is set to false no checking if parameters in done;. | |
| bool | warn_empty_defaults_ |
| If this member is set to false no warning is emitted when defaults are empty;. | |
Static Protected Attributes | |
| static const double | EPSILON_COEFS_ [] |
| Coefficients to calculate the proportionality factor for the peak area. | |
| static const Size | NUM_PARAMS_ |
Additional Inherited Members | |
Static Public Member Functions inherited from DefaultParamHandler | |
| static void | writeParametersToMetaValues (const Param &write_this, MetaInfoInterface &write_here, const std::string &key_prefix="") |
| Writes all parameters to meta values. | |
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 used by the Levenberg-Marquardt algorithm. | |
| weighted | string | false | true, false | Weight mass traces according to their theoretical intensities. |
| EGHTraceFitter | ( | ) |
| EGHTraceFitter | ( | const EGHTraceFitter & | other | ) |
|
override |
|
overridevirtual |
Whether the fitted RT model stays within max_rt_span of the extended search area.
| [in] | max_rt_span | Maximum allowed RT span of the fitted model relative to the extended search area, as a fraction. |
true when the model does not exceed max_rt_span of the search area. Implements TraceFitter.
|
overridevirtual |
Whether the fitted RT model covers at least min_rt_span of the extended search area.
| [in] | rt_bounds | RT boundaries of the extended search area (lower, upper). |
| [in] | min_rt_span | Minimum RT span the fitted model must cover relative to rt_bounds, as a fraction. |
true when the model spans at least min_rt_span of the search area. Implements TraceFitter.
|
overridevirtual |
Run the LM fit on traces.
Subclasses fill the model parameters and (typically) call optimize_ on a problem-specific functor.
| [in,out] | traces | Mass traces to fit; subclasses may set additional bookkeeping on traces. |
Implements TraceFitter.
|
protected |
Return an ordered pair of the positions where the EGH reaches a height of alpha * height of the EGH.
| [in] | alpha | The alpha at which the boundaries should be computed |
|
overridevirtual |
Area under the fitted RT model.
Implements TraceFitter.
|
overridevirtual |
Centre of the fitted RT model.
Implements TraceFitter.
|
overridevirtual |
Full width at half maximum of the fitted RT model.
Implements TraceFitter.
|
overridevirtual |
Gnuplot expression of the fitted model for trace.
| [in] | trace | Mass trace whose theoretical intensity scales the expression. |
| [in] | function_name | Name of the function in the resulting expression (e.g. 'f' for "f(x)"). |
| [in] | baseline | Intensity of the plotted baseline. |
| [in] | rt_shift | RT offset added to the expression so several traces can be plotted side by side (typically 0 for the first trace and incremented for subsequent traces). |
String. Implements TraceFitter.
|
overridevirtual |
Height of the fitted RT model at its centre.
Implements TraceFitter.
|
overridevirtual |
Lower RT bound of the fitted RT model.
Implements TraceFitter.
|
overrideprotectedvirtual |
Subclass hook: copy the optimised parameter vector back into the subclass's model fields.
Called by optimize_ after the LM solver has converged.
| [in] | s | Optimised parameter vector (size matches the functor's inputs). |
Implements TraceFitter.
| double getSigma | ( | ) | const |
| double getTau | ( | ) | const |
|
overridevirtual |
Upper RT bound of the fitted RT model.
Implements TraceFitter.
|
overridevirtual |
Evaluate the fitted model at retention time rt.
| [in] | rt | Retention time at which to evaluate the model. |
rt. Implements TraceFitter.
| EGHTraceFitter & operator= | ( | const EGHTraceFitter & | source | ) |
|
protected |
|
overrideprotectedvirtual |
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.
|
protected |
|
staticprotected |
Coefficients to calculate the proportionality factor for the peak area.
|
protected |
|
staticprotected |
|
protected |
|
protected |
|
protected |
|
protected |