| OpenMS 2.5.0

Public Member Functions | Protected Attributes | Static Protected Attributes | List of all members
SpectrumAnnotator Class Reference
Chemistry

Annotates spectra from identifications and theoretical spectra or identifications from spectra and theoretical spectra matching with various options. More...

`#include <OpenMS/CHEMISTRY/SpectrumAnnotator.h>`

Inheritance diagram for SpectrumAnnotator:

## Public Member Functions

SpectrumAnnotator & | operator= (const SpectrumAnnotator &tsg)
| assignment operator More...
Constructors and Destructors
| SpectrumAnnotator ()
| default constructor More...
| SpectrumAnnotator (const SpectrumAnnotator &source)
| copy constructor More...
| ~SpectrumAnnotator () override
| destructor More...
Available annotators
void | annotateMatches (PeakSpectrum &spec, const PeptideHit &ph, const TheoreticalSpectrumGenerator &tg, const SpectrumAlignment &sa) const
| Adds ion match annotation to the `spec` input spectrum. More...
void | addIonMatchStatistics (PeptideIdentification &pi, MSSpectrum &spec, const TheoreticalSpectrumGenerator &tg, const SpectrumAlignment &sa) const
| Adds ion match statistics to `pi` PeptideIdentifcation. More...
void | updateMembers_ () override
| overwrite 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...

## Protected Attributes

bool | basic_statistics_
bool | list_of_ions_matched_
bool | max_series_
bool | SN_statistics_
bool | precursor_statistics_
unsigned | topNmatch_fragmenterrors_
bool | fragmenterror_statistics_
bool | terminal_series_match_ratio_
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...

## Static Protected Attributes

static const boost::regex | nt_regex_
static const boost::regex | ct_regex_
static const boost::regex | noloss_regex_
static const boost::regex | seriesposition_regex_

## Additional Inherited Members

Protected Member Functions inherited from DefaultParamHandler
void | defaultsToParam_ ()
| Updates the parameters after the defaults have been set in the constructor. More...

## Detailed Description

Annotates spectra from identifications and theoretical spectra or identifications from spectra and theoretical spectra matching with various options.

## Constructor & Destructor Documentation

## ◆ SpectrumAnnotator() [1/2]

SpectrumAnnotator | ( |  | ) |

default constructor

## ◆ SpectrumAnnotator() [2/2]

SpectrumAnnotator | ( | const SpectrumAnnotator & | source | ) |

copy constructor

## ◆ ~SpectrumAnnotator()

~SpectrumAnnotator | ( |  | ) |

override

destructor

## Member Function Documentation

## ◆ addIonMatchStatistics()

void addIonMatchStatistics | ( | PeptideIdentification & | pi,
|  | MSSpectrum & | spec,
|  | const TheoreticalSpectrumGenerator & | tg,
|  | const SpectrumAlignment & | sa
| ) |  | const

Adds ion match statistics to `pi` PeptideIdentifcation.

Parameters

  pi | A spectrums identifications to be annotated, looking up matches from a spectrum and the theoretical spectrum inferred from the identifications sequence
  spec | A PeakSpectrum containing the peaks from which the `pi` identifications are made
  tg | A TheoreticalSpectrumGenerator to infer the theoretical spectrum. Its own parameters define which ion types are referred
  sa | A SpectrumAlignment to match the theoretical spectrum with the measured. Its own parameters define the match tolerance

The ion match statistics are added as UserParams to either the PeptideIdentification (parameters of the matching) and PeptideHit. The parameters of the TheoreticalSpectrumGenerator define the comprehensiveness of the available matching. The parameters of SpectrumAlignment define the matching tolerance. See the parameter section of this class for the available statistics.

## ◆ annotateMatches()

void annotateMatches | ( | PeakSpectrum & | spec,
|  | const PeptideHit & | ph,
|  | const TheoreticalSpectrumGenerator & | tg,
|  | const SpectrumAlignment & | sa
| ) |  | const

Adds ion match annotation to the `spec` input spectrum.

Parameters

  spec | A PeakSpectrum containing the peaks from which the `pi` identifications are made
  ph | A spectrums identifications to be used for the annotation, looking up matches from a spectrum and the theoretical spectrum inferred from the identifications sequence
  tg | A TheoreticalSpectrumGenerator to infer the theoretical spectrum. Its own parameters define which ion types are referred
  sa | A SpectrumAlignment to match the theoretical spectrum with the measured. Its own parameters define the match tolerance

The matches are added as DataArrays to the spectrum (Names: IonName and IonMatchError). The parameters of the TheoreticalSpectrumGenerator define the comprehensiveness of the available matching. The parameters of SpectrumAlignment define the matching tolerance. See the parameter section of this class for the available options.

## ◆ operator=()

SpectrumAnnotator& operator= | ( | const SpectrumAnnotator & | tsg | ) |

assignment operator

## ◆ updateMembers_()

void updateMembers_ | ( |  | ) |

override virtual

overwrite

Reimplemented from DefaultParamHandler.

## Member Data Documentation

## ◆ basic_statistics_

bool basic_statistics_

protected

## ◆ ct_regex_

const boost::regex ct_regex_

static protected

## ◆ fragmenterror_statistics_

bool fragmenterror_statistics_

protected

## ◆ list_of_ions_matched_

bool list_of_ions_matched_

protected

## ◆ max_series_

bool max_series_

protected

## ◆ noloss_regex_

const boost::regex noloss_regex_

static protected

## ◆ nt_regex_

const boost::regex nt_regex_

static protected

## ◆ precursor_statistics_

bool precursor_statistics_

protected

## ◆ seriesposition_regex_

const boost::regex seriesposition_regex_

static protected

## ◆ SN_statistics_

bool SN_statistics_

protected

## ◆ terminal_series_match_ratio_

bool terminal_series_match_ratio_

protected

## ◆ topNmatch_fragmenterrors_

unsigned topNmatch_fragmenterrors_

protected