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

ModelFitter< PeakType, FeatureType > Class Template Reference
[FeatureFinder]

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>

Inheritance diagram for ModelFitter< PeakType, FeatureType >:
FeaFiModule< PeakType, FeatureType > FeatureFinderDefs DefaultParamHandler

List of all members.

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< PeakTypeRawDataArrayType
 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.
ModelFitteroperator= (const ModelFitter &)
 Not implemented.
 ModelFitter (const ModelFitter &)
 Not implemented.

Detailed Description

template<class PeakType, class FeatureType>
class OpenMS::ModelFitter< PeakType, FeatureType >

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.

Todo:
Fix problem with other peak types than Peak1D and enable the respective tests for FeatureFinderAlgorithmSimple, FeatureFinderAlgorithmSimplest, FeatureFinderAlgorithmWavelet (Clemens)
Parameters of this class are:

NameTypeDefaultRestrictionsDescription
fit_algorithm stringsimple simple, simplest, waveletFitting algorithm type (internal parameter).
max_iteration int500 min: 1Maximum number of iterations for fitting with Levenberg-Marquardt algorithm.
deltaAbsError float0.0001 min: 0Absolute error used by the Levenberg-Marquardt algorithm.
deltaRelError float0.0001 min: 0Relative error used by the Levenberg-Marquardt algorithm.
tolerance_stdev_bounding_box float3 min: 0Bounding 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 float0.0500000007450581 min: 0 max: 1Cutoff peaks with a predicted intensity below intensity_cutoff_factor times the maximal intensity of the model
feature_intensity_sum int1 min: 0 max: 1Determines what is reported as feature intensity.
1: the sum of peak intensities;
0: the maximum intensity of all peaks
min_num_peaks:final int5 min: 1Minimum number of peaks left after cutoff. If smaller, feature will be discarded.
min_num_peaks:extended int10 min: 1Minimum number of peaks after extension. If smaller, feature will be discarded.
rt:interpolation_step float0.200000002980232 min: 0Step size in seconds used to interpolate model for RT.
mz:interpolation_step float0.0299999993294477 min: 0.001Interpolation step size for m/z.
mz:model_type:first int1 min: 0Numeric id of first m/z model fitted (usually indicating the charge state), 0 = no isotope pattern (fit a single gaussian).
mz:model_type:last int4 min: 0Numeric id of last m/z model fitted (usually indicating the charge state), 0 = no isotope pattern (fit a single gaussian).
quality:type stringCorrelation Correlation, RankCorrelationType of the quality measure used to assess the fit of model vs data.
quality:minimum float0.649999976158142 min: 0 max: 1Minimum quality of fit, features below this threshold are discarded.
isotope_model:stdev:first float0.0399999991059303 min: 0First standard deviation to be considered for isotope model.
isotope_model:stdev:last float0.119999997317791 min: 0Last standard deviation to be considered for isotope model.
isotope_model:stdev:step float0.0399999991059303 min: 0Step size for standard deviations considered for isotope model.
isotope_model:averagines:C float0.0444398894906044 min: 0Number of C atoms per Dalton of the mass.
isotope_model:averagines:H float0.0698157176375389 min: 0Number of H atoms per Dalton of the mass.
isotope_model:averagines:N float0.0122177302837372 min: 0Number of N atoms per Dalton of the mass.
isotope_model:averagines:O float0.0132939899340272 min: 0Number of O atoms per Dalton of the mass.
isotope_model:averagines:S float0.000375250005163252 min: 0Number of S atoms per Dalton of the mass.
isotope_model:isotope:trim_right_cutoff float0.00100000004749745 min: 0Cutoff for averagine distribution, trailing isotopes below this relative intensity are not considered.
isotope_model:isotope:maximum int100 min: 1Maximum number of isotopes being used for the IsotopeModel.
isotope_model:isotope:distance float1.00049495697021 min: 0Distance between consecutive isotopic peaks.

Note:

Member Typedef Documentation

typedef FeaFiModule<PeakType, FeatureType> Base

Isotope charge.

Single coordinate.

typedef IndexSet::const_iterator IndexSetIter

IndexSet iterator.

Single intensity.

Quality of a feature.

typedef std::vector<PeakType> RawDataArrayType

Raw data container type using for the temporary storage of the input data.


Member Enumeration Documentation

anonymous enum
Enumerator:
RT 
MZ 

Constructor & Destructor Documentation

virtual ~ModelFitter (  )  [inline, virtual]

Destructor.

ModelFitter (  )  [private]

Not implemented.

ModelFitter ( const ModelFitter< PeakType, FeatureType > &   )  [private]

Not implemented.


Member Function Documentation

Feature fit ( const ChargedIndexSet index_set  )  [inline]

Return next feature.

Exceptions:
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().

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.

Parameters:
mz The monoisotopic m/z that occurres in the current data set.

References ModelFitter< PeakType, FeatureType >::monoisotopic_mz_.


Member Data Documentation

statistics

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_().

Int first_mz_model_ [protected]

first mz model (0=Gaussian, 1....n = charge )

Referenced by ModelFitter< PeakType, FeatureType >::fit(), and ModelFitter< PeakType, FeatureType >::updateMembers_().

QualityType quality_rt_ [protected]

fit quality in RT dimension

Referenced by ModelFitter< PeakType, FeatureType >::fit().


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