Tests a group of data points in an LC-MS map for goodness-of-fit with a 2D averagine model. More...
#include <OpenMS/TRANSFORMATIONS/FEATUREFINDER/ModelFitter.h>
Public Types | |
| enum | { RT = Peak2D::RT, MZ = Peak2D::MZ } |
| typedef IndexSet::const_iterator | IndexSetIter |
| IndexSet iterator. | |
| typedef Feature::QualityType | QualityType |
| Quality of a feature. | |
| typedef Feature::CoordinateType | CoordinateType |
| Single coordinate. | |
| typedef Feature::IntensityType | IntensityType |
| Single intensity. | |
| typedef Feature::ChargeType | ChargeType |
| Isotope charge. | |
| typedef FeaFiModule< PeakType, FeatureType > | Base |
| FeaFiModule. | |
| typedef std::vector< PeakType > | RawDataArrayType |
| Raw data container type using for the temporary storage of the input data. | |
Public Member Functions | |
| ModelFitter (const MSExperiment< PeakType > *map, FeatureMap< FeatureType > *features, FeatureFinder *ff) | |
| Constructor. | |
| virtual | ~ModelFitter () |
| Destructor. | |
| void | setMonoIsotopicMass (CoordinateType mz) |
| Sets or fixed the monoisotopic m/z at a specific position. | |
| Feature | fit (const ChargedIndexSet &index_set) |
| Return next feature. | |
Protected Member Functions | |
| virtual void | updateMembers_ () |
| QualityType | fitMZLoop_ (const ChargedIndexSet &set, const ChargeType &charge) |
| main fit loop | |
| QualityType | evaluate_ (const IndexSet &set) const |
| evaluate 2d-model | |
| QualityType | fitRT_ (InterpolationModel *&model) const |
| 1d fit in RT | |
| QualityType | fitMZ_ (InterpolationModel *&model, const ChargeType &charge) const |
| 1d fit in MZ | |
| void | doProjectionDim_ (const Int dim, const ChargedIndexSet &index_set, RawDataArrayType &set) const |
| Project the raw data into 1-dim array. | |
Protected Attributes | |
| ProductModel< 2 > | model2D_ |
| 2D model | |
| Math::BasicStatistics | mz_stat_ |
| statistics for mz | |
| Math::AsymmetricStatistics | rt_stat_ |
| statistics for rt | |
| RawDataArrayType | mz_input_data_ |
| mz raw data | |
| RawDataArrayType | rt_input_data_ |
| rt raw data | |
| CoordinateType | tolerance_stdev_box_ |
| tolerance used for bounding box | |
| CoordinateType | monoisotopic_mz_ |
| monoistopic mass | |
| CoordinateType | interpolation_step_mz_ |
| interpolation step size (in m/z) | |
| CoordinateType | interpolation_step_rt_ |
| interpolation step size (in retention time) | |
| Int | max_isotope_ |
| maximum isotopic rank to be considered | |
| CoordinateType | iso_stdev_first_ |
| first stdev | |
| CoordinateType | iso_stdev_last_ |
| last stdev | |
| CoordinateType | iso_stdev_stepsize_ |
| step size | |
| Int | first_mz_model_ |
| first mz model (0=Gaussian, 1....n = charge ) | |
| Int | last_mz_model_ |
| last mz model | |
| CoordinateType | isotope_stdev_ |
| isotope stdev | |
| String | algorithm_ |
| algorithm | |
| Int | max_iteration_ |
| Maximum number of iterations. | |
| CoordinateType | deltaAbsError_ |
| Absolute error. | |
| CoordinateType | deltaRelError_ |
| Relative error. | |
| Math::BasicStatistics | basic_stat_ |
| statistics | |
| QualityType | quality_rt_ |
| fit quality in RT dimension | |
| QualityType | quality_mz_ |
| fit quality in MZ dimension | |
Private Member Functions | |
| ModelFitter () | |
| Not implemented. | |
| ModelFitter & | operator= (const ModelFitter &) |
| Not implemented. | |
| ModelFitter (const ModelFitter &) | |
| Not implemented. | |
Tests a group of data points in an LC-MS map for goodness-of-fit with a 2D averagine model.
The ModelFitter class uses a gaussian or isotope model in m/z and bigauss, lmagauss (bigauss with Levenberg-Marquardt) or emg (exponentially modified Gaussian with lma optimized parameters) in retention time.
For the isotope model, we test different charge states and peaks widths.
| Name | Type | Default | Restrictions | Description |
|---|---|---|---|---|
| fit_algorithm | string | simple | simple, simplest, wavelet | Fitting algorithm type (internal parameter). |
| max_iteration | int | 500 | min: 1 | Maximum number of iterations for fitting with Levenberg-Marquardt algorithm. |
| deltaAbsError | float | 0.0001 | min: 0 | Absolute error used by the Levenberg-Marquardt algorithm. |
| deltaRelError | float | 0.0001 | min: 0 | Relative error used by the Levenberg-Marquardt algorithm. |
| tolerance_stdev_bounding_box | float | 3 | min: 0 | Bounding box has range [minimim of data, maximum of data] enlarged by tolerance_stdev_bounding_box times the standard deviation of the data |
| intensity_cutoff_factor | float | 0.0500000007450581 | min: 0 max: 1 | Cutoff peaks with a predicted intensity below intensity_cutoff_factor times the maximal intensity of the model |
| feature_intensity_sum | int | 1 | min: 0 max: 1 | Determines what is reported as feature intensity. 1: the sum of peak intensities; 0: the maximum intensity of all peaks |
| min_num_peaks:final | int | 5 | min: 1 | Minimum number of peaks left after cutoff. If smaller, feature will be discarded. |
| min_num_peaks:extended | int | 10 | min: 1 | Minimum number of peaks after extension. If smaller, feature will be discarded. |
| rt:interpolation_step | float | 0.200000002980232 | min: 0 | Step size in seconds used to interpolate model for RT. |
| mz:interpolation_step | float | 0.0299999993294477 | min: 0.001 | Interpolation step size for m/z. |
| mz:model_type:first | int | 1 | min: 0 | Numeric id of first m/z model fitted (usually indicating the charge state), 0 = no isotope pattern (fit a single gaussian). |
| mz:model_type:last | int | 4 | min: 0 | Numeric id of last m/z model fitted (usually indicating the charge state), 0 = no isotope pattern (fit a single gaussian). |
| quality:type | string | Correlation | Correlation, RankCorrelation | Type of the quality measure used to assess the fit of model vs data. |
| quality:minimum | float | 0.649999976158142 | min: 0 max: 1 | Minimum quality of fit, features below this threshold are discarded. |
| isotope_model:stdev:first | float | 0.0399999991059303 | min: 0 | First standard deviation to be considered for isotope model. |
| isotope_model:stdev:last | float | 0.119999997317791 | min: 0 | Last standard deviation to be considered for isotope model. |
| isotope_model:stdev:step | float | 0.0399999991059303 | min: 0 | Step size for standard deviations considered for isotope model. |
| isotope_model:averagines:C | float | 0.0444398894906044 | min: 0 | Number of C atoms per Dalton of the mass. |
| isotope_model:averagines:H | float | 0.0698157176375389 | min: 0 | Number of H atoms per Dalton of the mass. |
| isotope_model:averagines:N | float | 0.0122177302837372 | min: 0 | Number of N atoms per Dalton of the mass. |
| isotope_model:averagines:O | float | 0.0132939899340272 | min: 0 | Number of O atoms per Dalton of the mass. |
| isotope_model:averagines:S | float | 0.000375250005163252 | min: 0 | Number of S atoms per Dalton of the mass. |
| isotope_model:isotope:trim_right_cutoff | float | 0.00100000004749745 | min: 0 | Cutoff for averagine distribution, trailing isotopes below this relative intensity are not considered. |
| isotope_model:isotope:maximum | int | 100 | min: 1 | Maximum number of isotopes being used for the IsotopeModel. |
| isotope_model:isotope:distance | float | 1.00049495697021 | min: 0 | Distance between consecutive isotopic peaks. |
| typedef FeaFiModule<PeakType, FeatureType> Base |
| typedef Feature::ChargeType ChargeType |
Isotope charge.
Single coordinate.
| typedef IndexSet::const_iterator IndexSetIter |
IndexSet iterator.
| typedef Feature::IntensityType IntensityType |
Single intensity.
| typedef Feature::QualityType QualityType |
Quality of a feature.
| typedef std::vector<PeakType> RawDataArrayType |
Raw data container type using for the temporary storage of the input data.
| ModelFitter | ( | const MSExperiment< PeakType > * | map, | |
| FeatureMap< FeatureType > * | features, | |||
| FeatureFinder * | ff | |||
| ) | [inline] |
Constructor.
References StringList::create(), DefaultParamHandler::defaults_, DefaultParamHandler::defaultsToParam_(), Param::setMaxFloat(), Param::setMaxInt(), Param::setMinFloat(), Param::setMinInt(), DefaultParamHandler::setName(), Param::setSectionDescription(), Param::setValidStrings(), and Param::setValue().
| virtual ~ModelFitter | ( | ) | [inline, virtual] |
Destructor.
| ModelFitter | ( | ) | [private] |
Not implemented.
| ModelFitter | ( | const ModelFitter< PeakType, FeatureType > & | ) | [private] |
Not implemented.
| void doProjectionDim_ | ( | const Int | dim, | |
| const ChargedIndexSet & | index_set, | |||
| RawDataArrayType & | set | |||
| ) | const [inline, protected] |
Project the raw data into 1-dim array.
References ModelFitter< PeakType, FeatureType >::algorithm_, FeaFiModule< PeakType, FeatureType >::getPeakIntensity(), FeaFiModule< PeakType, FeatureType >::getPeakMz(), FeaFiModule< PeakType, FeatureType >::getPeakRt(), and ModelFitter< PeakType, FeatureType >::MZ.
Referenced by ModelFitter< PeakType, FeatureType >::fit().
| QualityType evaluate_ | ( | const IndexSet & | set | ) | const [inline, protected] |
evaluate 2d-model
References ModelFitter< PeakType, FeatureType >::algorithm_, ProductModel< 2 >::getIntensity(), FeaFiModule< PeakType, FeatureType >::getPeakIntensity(), FeaFiModule< PeakType, FeatureType >::getPeakMz(), Param::getValue(), ModelFitter< PeakType, FeatureType >::model2D_, DefaultParamHandler::param_, OpenMS::Math::pearsonCorrelationCoefficient(), and OpenMS::Math::rankCorrelationCoefficient().
Referenced by ModelFitter< PeakType, FeatureType >::fitMZLoop_().
| Feature fit | ( | const ChargedIndexSet & | index_set | ) | [inline] |
Return next feature.
| Exception::UnableToFit | is thrown if fitting cannot be performed | |
| Exception::InvalidParameter | if first and last charge to test do not define a range (first<=last) |
References FeaFiModule< PeakType, FeatureType >::addConvexHull(), IsotopeCluster::ChargedIndexSet::charge, ModelDescription< D >::createModel(), ModelFitter< PeakType, FeatureType >::doProjectionDim_(), Feature::encloses(), FeaFiModule< PeakType, FeatureType >::ff_, ModelFitter< PeakType, FeatureType >::first_mz_model_, ModelFitter< PeakType, FeatureType >::fitMZLoop_(), ModelFitter< PeakType, FeatureType >::fitRT_(), ConvexHull2D::getBoundingBox(), BaseFeature::getCharge(), Feature::getConvexHull(), ProductModel< 2 >::getIntensity(), ProductModel< 2 >::getModel(), Feature::getModelDescription(), Peak2D::getMZ(), DefaultParamHandler::getName(), Feature::getOverallQuality(), FeatureFinder::getPeakFlag(), FeaFiModule< PeakType, FeatureType >::getPeakIntensity(), FeaFiModule< PeakType, FeatureType >::getPeakMz(), FeaFiModule< PeakType, FeatureType >::getPeakRt(), Feature::getQuality(), Peak2D::getRT(), Feature::getSubordinates(), Param::getValue(), BaseModel< D >::isContained(), ModelFitter< PeakType, FeatureType >::last_mz_model_, ModelFitter< PeakType, FeatureType >::model2D_, ModelFitter< PeakType, FeatureType >::MZ, ModelFitter< PeakType, FeatureType >::mz_input_data_, ModelFitter< PeakType, FeatureType >::mz_stat_, DefaultParamHandler::param_, ModelFitter< PeakType, FeatureType >::quality_mz_, ModelFitter< PeakType, FeatureType >::quality_rt_, ModelFitter< PeakType, FeatureType >::RT, ModelFitter< PeakType, FeatureType >::rt_input_data_, ModelFitter< PeakType, FeatureType >::rt_stat_, BaseFeature::setCharge(), BaseModel< D >::setCutOff(), Peak2D::setIntensity(), MetaInfoInterface::setMetaValue(), ProductModel< 2 >::setModel(), Feature::setModelDescription(), Peak2D::setMZ(), Feature::setOverallQuality(), Feature::setQuality(), Peak2D::setRT(), ProductModel< 2 >::setScale(), AsymmetricStatistics< Real >::update(), and BasicStatistics< RealT >::update().
Referenced by FeatureFinderAlgorithmSimplest< PeakType, FeatureType >::run(), and FeatureFinderAlgorithmSimple< PeakType, FeatureType >::run().
| QualityType fitMZ_ | ( | InterpolationModel *& | model, | |
| const ChargeType & | charge | |||
| ) | const [inline, protected] |
1d fit in MZ
References ModelFitter< PeakType, FeatureType >::algorithm_, ModelFitter< PeakType, FeatureType >::deltaAbsError_, ModelFitter< PeakType, FeatureType >::deltaRelError_, Fitter1D::fit1d(), ModelFitter< PeakType, FeatureType >::interpolation_step_mz_, ModelFitter< PeakType, FeatureType >::isotope_stdev_, ModelFitter< PeakType, FeatureType >::max_isotope_, ModelFitter< PeakType, FeatureType >::max_iteration_, BasicStatistics< RealT >::mean(), ModelFitter< PeakType, FeatureType >::monoisotopic_mz_, ModelFitter< PeakType, FeatureType >::mz_input_data_, ModelFitter< PeakType, FeatureType >::mz_stat_, DefaultParamHandler::setParameters(), Param::setValue(), ModelFitter< PeakType, FeatureType >::tolerance_stdev_box_, and BasicStatistics< RealT >::variance().
Referenced by ModelFitter< PeakType, FeatureType >::fitMZLoop_().
| QualityType fitMZLoop_ | ( | const ChargedIndexSet & | set, | |
| const ChargeType & | charge | |||
| ) | [inline, protected] |
main fit loop
References ModelFitter< PeakType, FeatureType >::evaluate_(), ModelFitter< PeakType, FeatureType >::fitMZ_(), ModelFitter< PeakType, FeatureType >::iso_stdev_first_, ModelFitter< PeakType, FeatureType >::iso_stdev_last_, ModelFitter< PeakType, FeatureType >::iso_stdev_stepsize_, ModelFitter< PeakType, FeatureType >::isotope_stdev_, ModelFitter< PeakType, FeatureType >::model2D_, ModelFitter< PeakType, FeatureType >::MZ, ModelFitter< PeakType, FeatureType >::quality_mz_, and ProductModel< 2 >::setModel().
Referenced by ModelFitter< PeakType, FeatureType >::fit().
| QualityType fitRT_ | ( | InterpolationModel *& | model | ) | const [inline, protected] |
1d fit in RT
References ModelFitter< PeakType, FeatureType >::algorithm_, ModelFitter< PeakType, FeatureType >::deltaAbsError_, ModelFitter< PeakType, FeatureType >::deltaRelError_, Fitter1D::fit1d(), ModelFitter< PeakType, FeatureType >::interpolation_step_rt_, ModelFitter< PeakType, FeatureType >::max_iteration_, BasicStatistics< RealT >::mean(), ModelFitter< PeakType, FeatureType >::rt_input_data_, ModelFitter< PeakType, FeatureType >::rt_stat_, DefaultParamHandler::setParameters(), Param::setValue(), ModelFitter< PeakType, FeatureType >::tolerance_stdev_box_, BasicStatistics< RealT >::variance(), AsymmetricStatistics< Real >::variance1(), and AsymmetricStatistics< Real >::variance2().
Referenced by ModelFitter< PeakType, FeatureType >::fit().
| ModelFitter& operator= | ( | const ModelFitter< PeakType, FeatureType > & | ) | [private] |
Not implemented.
| void setMonoIsotopicMass | ( | CoordinateType | mz | ) | [inline] |
Sets or fixed the monoisotopic m/z at a specific position.
| mz | The monoisotopic m/z that occurres in the current data set. |
References ModelFitter< PeakType, FeatureType >::monoisotopic_mz_.
| virtual void updateMembers_ | ( | ) | [inline, protected, virtual] |
References ModelFitter< PeakType, FeatureType >::algorithm_, ModelFitter< PeakType, FeatureType >::deltaAbsError_, ModelFitter< PeakType, FeatureType >::deltaRelError_, ModelFitter< PeakType, FeatureType >::first_mz_model_, Param::getValue(), ModelFitter< PeakType, FeatureType >::interpolation_step_mz_, ModelFitter< PeakType, FeatureType >::interpolation_step_rt_, ModelFitter< PeakType, FeatureType >::iso_stdev_first_, ModelFitter< PeakType, FeatureType >::iso_stdev_last_, ModelFitter< PeakType, FeatureType >::iso_stdev_stepsize_, ModelFitter< PeakType, FeatureType >::last_mz_model_, ModelFitter< PeakType, FeatureType >::max_isotope_, ModelFitter< PeakType, FeatureType >::max_iteration_, DefaultParamHandler::param_, and ModelFitter< PeakType, FeatureType >::tolerance_stdev_box_.
String algorithm_ [protected] |
Math::BasicStatistics basic_stat_ [protected] |
statistics
CoordinateType deltaAbsError_ [protected] |
Absolute error.
Test for the convergence of the sequence by comparing the last iteration step dx with the absolute error epsabs and relative error epsrel to the current position x
Referenced by ModelFitter< PeakType, FeatureType >::fitMZ_(), ModelFitter< PeakType, FeatureType >::fitRT_(), and ModelFitter< PeakType, FeatureType >::updateMembers_().
CoordinateType deltaRelError_ [protected] |
Relative error.
Referenced by ModelFitter< PeakType, FeatureType >::fitMZ_(), ModelFitter< PeakType, FeatureType >::fitRT_(), and ModelFitter< PeakType, FeatureType >::updateMembers_().
Int first_mz_model_ [protected] |
first mz model (0=Gaussian, 1....n = charge )
Referenced by ModelFitter< PeakType, FeatureType >::fit(), and ModelFitter< PeakType, FeatureType >::updateMembers_().
CoordinateType interpolation_step_mz_ [protected] |
interpolation step size (in m/z)
Referenced by ModelFitter< PeakType, FeatureType >::fitMZ_(), and ModelFitter< PeakType, FeatureType >::updateMembers_().
CoordinateType interpolation_step_rt_ [protected] |
interpolation step size (in retention time)
Referenced by ModelFitter< PeakType, FeatureType >::fitRT_(), and ModelFitter< PeakType, FeatureType >::updateMembers_().
CoordinateType iso_stdev_first_ [protected] |
first stdev
Referenced by ModelFitter< PeakType, FeatureType >::fitMZLoop_(), and ModelFitter< PeakType, FeatureType >::updateMembers_().
CoordinateType iso_stdev_last_ [protected] |
last stdev
Referenced by ModelFitter< PeakType, FeatureType >::fitMZLoop_(), and ModelFitter< PeakType, FeatureType >::updateMembers_().
CoordinateType iso_stdev_stepsize_ [protected] |
step size
Referenced by ModelFitter< PeakType, FeatureType >::fitMZLoop_(), and ModelFitter< PeakType, FeatureType >::updateMembers_().
CoordinateType isotope_stdev_ [protected] |
isotope stdev
Referenced by ModelFitter< PeakType, FeatureType >::fitMZ_(), and ModelFitter< PeakType, FeatureType >::fitMZLoop_().
Int last_mz_model_ [protected] |
last mz model
Referenced by ModelFitter< PeakType, FeatureType >::fit(), and ModelFitter< PeakType, FeatureType >::updateMembers_().
Int max_isotope_ [protected] |
maximum isotopic rank to be considered
Referenced by ModelFitter< PeakType, FeatureType >::fitMZ_(), and ModelFitter< PeakType, FeatureType >::updateMembers_().
Int max_iteration_ [protected] |
Maximum number of iterations.
Referenced by ModelFitter< PeakType, FeatureType >::fitMZ_(), ModelFitter< PeakType, FeatureType >::fitRT_(), and ModelFitter< PeakType, FeatureType >::updateMembers_().
ProductModel<2> model2D_ [protected] |
CoordinateType monoisotopic_mz_ [protected] |
monoistopic mass
Referenced by ModelFitter< PeakType, FeatureType >::fitMZ_(), and ModelFitter< PeakType, FeatureType >::setMonoIsotopicMass().
RawDataArrayType mz_input_data_ [protected] |
mz raw data
Referenced by ModelFitter< PeakType, FeatureType >::fit(), and ModelFitter< PeakType, FeatureType >::fitMZ_().
Math::BasicStatistics mz_stat_ [protected] |
statistics for mz
Referenced by ModelFitter< PeakType, FeatureType >::fit(), and ModelFitter< PeakType, FeatureType >::fitMZ_().
QualityType quality_mz_ [protected] |
fit quality in MZ dimension
Referenced by ModelFitter< PeakType, FeatureType >::fit(), and ModelFitter< PeakType, FeatureType >::fitMZLoop_().
QualityType quality_rt_ [protected] |
fit quality in RT dimension
Referenced by ModelFitter< PeakType, FeatureType >::fit().
RawDataArrayType rt_input_data_ [protected] |
rt raw data
Referenced by ModelFitter< PeakType, FeatureType >::fit(), and ModelFitter< PeakType, FeatureType >::fitRT_().
Math::AsymmetricStatistics rt_stat_ [protected] |
statistics for rt
Referenced by ModelFitter< PeakType, FeatureType >::fit(), and ModelFitter< PeakType, FeatureType >::fitRT_().
CoordinateType tolerance_stdev_box_ [protected] |
tolerance used for bounding box
Referenced by ModelFitter< PeakType, FeatureType >::fitMZ_(), ModelFitter< PeakType, FeatureType >::fitRT_(), and ModelFitter< PeakType, FeatureType >::updateMembers_().
| OpenMS / TOPP release 1.10.0 | Documentation generated on Thu Mar 7 2013 09:42:57 using doxygen 1.7.1 |