OpenMS  2.7.0
Classes | Public Member Functions | Protected Member Functions | List of all members
IDDecoyProbability Class Reference

IDDecoyProbability calculates probabilities using decoy approach. More...

#include <OpenMS/ANALYSIS/ID/IDDecoyProbability.h>

Inheritance diagram for IDDecoyProbability:
[legend]
Collaboration diagram for IDDecoyProbability:
[legend]

Classes

struct  Transformation_
 struct to be used to store a transformation (used for fitting) More...
 

Public Member Functions

 IDDecoyProbability ()
 Default constructor. More...
 
 IDDecoyProbability (const IDDecoyProbability &rhs)
 Copy constructor. More...
 
 ~IDDecoyProbability () override
 Destructor. More...
 
IDDecoyProbabilityoperator= (const IDDecoyProbability &rhs)
 assignment operator More...
 
void apply (std::vector< PeptideIdentification > &prob_ids, const std::vector< PeptideIdentification > &fwd_ids, const std::vector< PeptideIdentification > &rev_ids)
 Converts the forward and reverse identification into probabilities. More...
 
void apply (std::vector< PeptideIdentification > &ids)
 
- 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 DefaultParamHandleroperator= (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 ParamgetParameters () const
 Non-mutable access to the parameters. More...
 
const ParamgetDefaults () const
 Non-mutable access to the default parameters. More...
 
const StringgetName () 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

void normalizeBins_ (const std::vector< double > &scores, std::vector< double > &binned, Transformation_ &trafo)
 
double getProbability_ (const Math::GammaDistributionFitter::GammaDistributionFitResult &result_gamma, const Transformation_ &gamma_trafo, const Math::GaussFitter::GaussFitResult &result_gauss, const Transformation_ &gauss_trafo, double score)
 
void generateDistributionImage_ (const std::vector< double > &ids, const String &formula, const String &filename)
 
void generateDistributionImage_ (const std::vector< double > &all_ids, const Transformation_ &all_trans, const String &fwd_formula, const String &rev_formula, const String &filename)
 
void apply_ (std::vector< PeptideIdentification > &ids, const std::vector< double > &rev_scores, const std::vector< double > &fwd_scores, const std::vector< double > &all_scores)
 
- Protected Member Functions inherited from DefaultParamHandler
virtual void updateMembers_ ()
 This method is used to update extra member variables at the end of the setParameters() method. More...
 
void defaultsToParam_ ()
 Updates the parameters after the defaults have been set in the constructor. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from DefaultParamHandler
static void writeParametersToMetaValues (const Param &write_this, MetaInfoInterface &write_here, const String &prefix="")
 Writes all parameters to meta values. 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< Stringsubsections_
 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...
 

Detailed Description

IDDecoyProbability calculates probabilities using decoy approach.

This class calculates the probabilities using a target decoy approach. Like in peptide prophet the forward distribution is modeled using a gaussian distribution the reverse scores are modeled using a gamma distribution.

Constructor & Destructor Documentation

◆ IDDecoyProbability() [1/2]

Default constructor.

◆ IDDecoyProbability() [2/2]

Copy constructor.

◆ ~IDDecoyProbability()

~IDDecoyProbability ( )
override

Destructor.

Member Function Documentation

◆ apply() [1/2]

void apply ( std::vector< PeptideIdentification > &  ids)

◆ apply() [2/2]

void apply ( std::vector< PeptideIdentification > &  prob_ids,
const std::vector< PeptideIdentification > &  fwd_ids,
const std::vector< PeptideIdentification > &  rev_ids 
)

Converts the forward and reverse identification into probabilities.

Parameters
prob_idsOutput of the algorithm which includes identifications with probability based scores
fwd_idsInput parameter which represents the identifications of the forward search
rev_idsInput parameter which represents the identifications of the reversed search

◆ apply_()

void apply_ ( std::vector< PeptideIdentification > &  ids,
const std::vector< double > &  rev_scores,
const std::vector< double > &  fwd_scores,
const std::vector< double > &  all_scores 
)
protected

◆ generateDistributionImage_() [1/2]

void generateDistributionImage_ ( const std::vector< double > &  all_ids,
const Transformation_ all_trans,
const String fwd_formula,
const String rev_formula,
const String filename 
)
protected

◆ generateDistributionImage_() [2/2]

void generateDistributionImage_ ( const std::vector< double > &  ids,
const String formula,
const String filename 
)
protected

◆ getProbability_()

double getProbability_ ( const Math::GammaDistributionFitter::GammaDistributionFitResult result_gamma,
const Transformation_ gamma_trafo,
const Math::GaussFitter::GaussFitResult result_gauss,
const Transformation_ gauss_trafo,
double  score 
)
protected

◆ normalizeBins_()

void normalizeBins_ ( const std::vector< double > &  scores,
std::vector< double > &  binned,
Transformation_ trafo 
)
protected

◆ operator=()

IDDecoyProbability& operator= ( const IDDecoyProbability rhs)

assignment operator