| OpenMS 2.5.0

Protected Types | Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
ConsensusIDAlgorithmSimilarity Class Referenceabstract
Analysis » Identification

Abstract base class for ConsensusID algorithms that take peptide similarity into account. More...

`#include <OpenMS/ANALYSIS/ID/ConsensusIDAlgorithmSimilarity.h>`

Inheritance diagram for ConsensusIDAlgorithmSimilarity:

## Protected Types

typedef std::map< std::pair< AASequence, AASequence >, double > | SimilarityCache
| Mapping: pair of peptide sequences -> sequence similarity. More...
Protected Types inherited from ConsensusIDAlgorithm
typedef std::map< AASequence, std::pair< Int, std::vector< double > > > | SequenceGrouping
| Mapping: peptide sequence -> (charge, scores) More...

## Protected Member Functions

| ConsensusIDAlgorithmSimilarity ()
| Default constructor. More...
virtual double | getSimilarity_ (AASequence seq1, AASequence seq2)=0
| Sequence similarity calculation (to be implemented by subclasses). More...
Protected Member Functions inherited from ConsensusIDAlgorithm
| ConsensusIDAlgorithm ()
| Default constructor. More...
void | updateMembers_ () override
| Docu in base class. More...
void | compareChargeStates_ (Int &recorded_charge, Int new_charge, const AASequence &peptide)
| Compare (and possibly update) charge state information. More...
Protected Member Functions inherited from DefaultParamHandler
void | defaultsToParam_ ()
| Updates the parameters after the defaults have been set in the constructor. More...

## Protected Attributes

SimilarityCache | similarities_
| Cache for already computed sequence similarities. More...
Protected Attributes inherited from ConsensusIDAlgorithm
Size | considered_hits_
| Number of peptide hits considered per ID run (input parameter) More...
Size | number_of_runs_
| Number of ID runs. More...
double | min_support_
| Fraction of required support by other ID runs (input parameter) More...
bool | count_empty_
| Count empty runs in "min_support" calculation? (input parameter) 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...

## Private Member Functions

| ConsensusIDAlgorithmSimilarity (const ConsensusIDAlgorithmSimilarity &)
| Not implemented. More...
ConsensusIDAlgorithmSimilarity & | operator= (const ConsensusIDAlgorithmSimilarity &)
| Not implemented. More...
void | apply_ (std::vector< PeptideIdentification > &ids, SequenceGrouping &results) override
| Consensus scoring. More...

## Additional Inherited Members

Public Member Functions inherited from ConsensusIDAlgorithm
void | apply (std::vector< PeptideIdentification > &ids, Size number_of_runs=0)
| Calculates the consensus ID for a set of peptide identifications of one spectrum or (consensus) feature. More...
| ~ConsensusIDAlgorithm () override
| Virtual destructor. 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...

## Detailed Description

Abstract base class for ConsensusID algorithms that take peptide similarity into account.

Similarity-based algorithms require posterior error probabilities (PEPs) as peptide scores, in order to combine scores and similarities into a consensus score for each peptide. See the following publication for the formula governing this calculation:

Nahnsen et al.: Probabilistic consensus scoring improves tandem mass spectrometry peptide identification (J. Proteome Res., 2011, PMID: 21644507).

Derived classes should implement getSimilarity_(), which defines how similarity of two peptide sequences is quantified.

Parameters of this class are:

Name | Type | Default | Restrictions | Description
--- | --- | --- | --- | ---
filter:considered_hits | int | 0 | min: 0 | The number of top hits in each ID run that are considered for consensus scoring ('0' for all hits).
filter:min_support | float | 0.0 | min: 0.0 max: 1.0 | For each peptide hit from an ID run, the fraction of other ID runs that must support that hit (otherwise it is removed).
filter:count_empty | string | false | true, false | Count empty ID runs (i.e. those containing no peptide hit for the current spectrum) when calculating 'min_support'?

Note:

- If a section name is documented, the documentation is displayed as tooltip.
- Advanced parameter names are italic.

## Member Typedef Documentation

## ◆ SimilarityCache

typedef std::map<std::pair<AASequence, AASequence>, double> SimilarityCache

protected

Mapping: pair of peptide sequences -> sequence similarity.

## Constructor & Destructor Documentation

## ◆ ConsensusIDAlgorithmSimilarity() [1/2]

ConsensusIDAlgorithmSimilarity | ( |  | ) |

protected

Default constructor.

## ◆ ConsensusIDAlgorithmSimilarity() [2/2]

ConsensusIDAlgorithmSimilarity | ( | const ConsensusIDAlgorithmSimilarity & |  | ) |

private

Not implemented.

## Member Function Documentation

## ◆ apply_()

void apply_ | ( | std::vector< PeptideIdentification > & | ids,
|  | SequenceGrouping & | results
| ) |  |

override private virtual

Consensus scoring.

Implements ConsensusIDAlgorithm.

## ◆ getSimilarity_()

virtual double getSimilarity_ | ( | AASequence | seq1,
|  | AASequence | seq2
| ) |  |

protected pure virtual

Sequence similarity calculation (to be implemented by subclasses).

Implementations should use/update the cache of previously computed similarities.

Returns
  Similarity between two sequences in the range [0, 1]

Implemented in ConsensusIDAlgorithmPEPMatrix, and ConsensusIDAlgorithmPEPIons.

## ◆ operator=()

ConsensusIDAlgorithmSimilarity& operator= | ( | const ConsensusIDAlgorithmSimilarity & |  | ) |

private

Not implemented.

## Member Data Documentation

## ◆ similarities_

SimilarityCache similarities_

protected

Cache for already computed sequence similarities.