Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
FeatureFindingMetabo Class Reference

Method for the assembly of mass traces belonging to the same isotope pattern, i.e., that are compatible in retention times, mass-to-charge ratios, and isotope abundances. More...

#include <OpenMS/FILTERING/DATAREDUCTION/FeatureFindingMetabo.h>

Inheritance diagram for FeatureFindingMetabo:
DefaultParamHandler ProgressLogger

Public Member Functions

 FeatureFindingMetabo ()
 Default constructor. More...
 
virtual ~FeatureFindingMetabo ()
 Default destructor. More...
 
void run (std::vector< MassTrace > &, FeatureMap &)
 main method of FeatureFindingMetabo More...
 
- Public Member Functions inherited from DefaultParamHandler
 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 &param)
 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...
 
- Public Member Functions inherited from ProgressLogger
 ProgressLogger ()
 Constructor. More...
 
 ~ProgressLogger ()
 Destructor. More...
 
 ProgressLogger (const ProgressLogger &other)
 Copy constructor. More...
 
ProgressLogger & operator= (const ProgressLogger &other)
 Assignment Operator. More...
 
void setLogType (LogType type) const
 Sets the progress log that should be used. The default type is NONE! More...
 
LogType getLogType () const
 Returns the type of progress log being used. More...
 
void startProgress (SignedSize begin, SignedSize end, const String &label) const
 Initializes the progress display. More...
 
void setProgress (SignedSize value) const
 Sets the current progress. More...
 
void endProgress () const
 Ends the progress display. More...
 

Protected Member Functions

virtual void updateMembers_ ()
 This method is used to update extra member variables at the end of the setParameters() method. More...
 
- Protected Member Functions inherited from DefaultParamHandler
void defaultsToParam_ ()
 Updates the parameters after the defaults have been set in the constructor. More...
 

Private Member Functions

double computeCosineSim_ (const std::vector< double > &, const std::vector< double > &) const
 private member functions More...
 
double computeOLSCoeff_ (const std::vector< double > &, const std::vector< double > &) const
 
bool isLegalIsotopePattern_ (const FeatureHypothesis &) const
 
bool isLegalIsotopePattern2_ (const FeatureHypothesis &) const
 Compare intensities of feature hypothesis with model. More...
 
void loadIsotopeModel_ (const String &)
 
double scoreMZ_ (const MassTrace &, const MassTrace &, Size isotopic_position, Size charge) const
 Perform mass to charge scoring of two multiple mass traces. More...
 
double scoreMZ2_ (const MassTrace &, const MassTrace &, Size isotopic_position, Size charge) const
 
double scoreRT_ (const MassTrace &, const MassTrace &) const
 Perform retention time scoring of two multiple mass traces. More...
 
double computeAveragineSimScore_ (const std::vector< double > &intensities, const double &molecular_weight)
 Perform intensity scoring using the averagine model (for peptides only) More...
 
void findLocalFeatures_ (const std::vector< const MassTrace * > &candidates, std::vector< FeatureHypothesis > &output_hypotheses)
 Identify groupings of mass traces based on a set of reasonable candidates. More...
 

Private Attributes

svm_model * isotope_filt_svm_
 SVM parameters. More...
 
std::vector< double > svm_feat_centers_
 
std::vector< double > svm_feat_scales_
 
double total_intensity_
 
double local_rt_range_
 parameter stuff More...
 
double local_mz_range_
 
Size charge_lower_bound_
 
Size charge_upper_bound_
 
double chrom_fwhm_
 
bool report_summed_ints_
 
bool enable_RT_filtering_
 
bool disable_isotope_filtering_
 
String isotope_model_
 
String metabo_iso_noisemodel_
 
bool use_smoothed_intensities_
 

Additional Inherited Members

- Public Types inherited from ProgressLogger
enum  LogType { CMD, GUI, NONE }
 Possible log types. More...
 
- Static Protected Member Functions inherited from ProgressLogger
static String logTypeToFactoryName_ (LogType type)
 Return the name of the factory product used for this log type. More...
 
- Protected Attributes inherited from DefaultParamHandler
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...
 
- Protected Attributes inherited from ProgressLogger
LogType type_
 
time_t last_invoke_
 
ProgressLoggerImpl * current_logger_
 
- Static Protected Attributes inherited from ProgressLogger
static int recursion_depth_
 

Detailed Description

Method for the assembly of mass traces belonging to the same isotope pattern, i.e., that are compatible in retention times, mass-to-charge ratios, and isotope abundances.

In FeatureFindingMetabo, mass traces detected by the MassTraceDetection method and afterwards split into individual chromatographic peaks by the ElutionPeakDetection method are assembled to composite features if they are compatible with respect to RTs, m/z ratios, and isotopic intensities. To this end, feature hypotheses are formulated exhaustively based on the set of mass traces detected within a local RT and m/z region. These feature hypotheses are scored by their similarity to real metabolite isotope patterns. The score is derived from independent models for retention time shifts and m/z differences between isotopic mass traces. Hypotheses with correct or false isotopic abundances are distinguished by a SVM model. Mass traces that could not be assembled or low-intensity metabolites with only a monoisotopic mass trace to observe are left in the resulting FeatureMap as singletons with the undefined charge state of 0.

Reference: Kenar et al., doi: 10.1074/mcp.M113.031278

Constructor & Destructor Documentation

Default constructor.

virtual ~FeatureFindingMetabo ( )
virtual

Default destructor.

Member Function Documentation

double computeAveragineSimScore_ ( const std::vector< double > &  intensities,
const double &  molecular_weight 
)
private

Perform intensity scoring using the averagine model (for peptides only)

Compare the isotopic intensity distribution with the theoretical one expected for peptides, using the averagine model. Compute the cosine similarity between the two values.

double computeCosineSim_ ( const std::vector< double > &  ,
const std::vector< double > &   
) const
private

private member functions

Computes the cosine similarity between two vectors

The cosine similarity (or cosine distance) is the cosine of the angle between two vectors or the normalized dot product of two vectors.

See also https://en.wikipedia.org/wiki/Cosine_similarity

double computeOLSCoeff_ ( const std::vector< double > &  ,
const std::vector< double > &   
) const
private

unused function ??? TODO: remove

void findLocalFeatures_ ( const std::vector< const MassTrace * > &  candidates,
std::vector< FeatureHypothesis > &  output_hypotheses 
)
private

Identify groupings of mass traces based on a set of reasonable candidates.

Takes a set of reasonable candidates for mass trace grouping and checks all combinations of charge and isotopic positions on the candidates. It is assumed that candidates[0] is the monoisotopic trace.

The resulting possible groupings are appended to output_hypotheses.

bool isLegalIsotopePattern2_ ( const FeatureHypothesis &  ) const
private

Compare intensities of feature hypothesis with model.

Use a pre-trained SVM model to evaluate the intensity distribution of a given feature hypothesis. The model is trained on the monoisotopic and the first tree isotopic traces of each feature and uses the scaled ratios between the traces as input.

Reference: Kenar et al., doi: 10.1074/mcp.M113.031278

bool isLegalIsotopePattern_ ( const FeatureHypothesis &  ) const
private

Only used in debugging output ??? -> seems old model with 7 traces TODO: remove

void loadIsotopeModel_ ( const String &  )
private
void run ( std::vector< MassTrace > &  ,
FeatureMap &   
)

main method of FeatureFindingMetabo

double scoreMZ2_ ( const MassTrace &  ,
const MassTrace &  ,
Size  isotopic_position,
Size  charge 
) const
private

Not used any more ??? -> seems to be old model TODO: remove

double scoreMZ_ ( const MassTrace &  ,
const MassTrace &  ,
Size  isotopic_position,
Size  charge 
) const
private

Perform mass to charge scoring of two multiple mass traces.

Scores two mass traces based on the m/z and the hypothesis that one trace is an isotopic trace of the other one. The isotopic position (which trace it is) and the charge for the hypothesis are given as additional parameters. The scoring is described in Kenar et al., and is based on a random sample of 115 000 compounds drawn from a comprehensive set of 24 million putative sum formulas, of which the isotopic distribution was accurately calculated. Thus, a theoretical mu and sigma are calculated as:

mu = 1.000857 * j + 0.001091 u sigma = 0.0016633 j * 0.0004751

where j is the isotopic peak considered. A similarity score based on agreement with the model is then computed.

Reference: Kenar et al., doi: 10.1074/mcp.M113.031278

double scoreRT_ ( const MassTrace &  ,
const MassTrace &   
) const
private

Perform retention time scoring of two multiple mass traces.

Computes the similarity of the two peak shapes using cosine similarity (see computeCosineSim_) if some conditions are fulfilled. Mainly the overlap between the two peaks at FHWM needs to exceed a certain threshold. The threshold is set at 0.7 (i.e. 70 % overlap) as also described in Kenar et al.

Note
this only works for equally sampled mass traces, e.g. they need to come from the same map (not for SRM measurements for example).
virtual void updateMembers_ ( )
protectedvirtual

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.

Member Data Documentation

Size charge_lower_bound_
private
Size charge_upper_bound_
private
double chrom_fwhm_
private
bool disable_isotope_filtering_
private
bool enable_RT_filtering_
private
svm_model* isotope_filt_svm_
private

SVM parameters.

String isotope_model_
private
double local_mz_range_
private
double local_rt_range_
private

parameter stuff

String metabo_iso_noisemodel_
private
bool report_summed_ints_
private
std::vector<double> svm_feat_centers_
private
std::vector<double> svm_feat_scales_
private
double total_intensity_
private
bool use_smoothed_intensities_
private

OpenMS / TOPP release 2.0.0 Documentation generated on Tue Jan 31 2017 06:40:18 using doxygen 1.8.8