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

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:
DefaultParamHandler

Public Member Functions

SpectrumAnnotatoroperator= (const SpectrumAnnotator &tsg)
 assignment operator More...
 
Constructors and Destructors
 SpectrumAnnotator ()
 default constructor More...
 
 SpectrumAnnotator (const SpectrumAnnotator &source)
 copy constructor More...
 
virtual ~SpectrumAnnotator ()
 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_ ()
 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 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 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< 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...
 

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]

default constructor

◆ SpectrumAnnotator() [2/2]

SpectrumAnnotator ( const SpectrumAnnotator source)

copy constructor

◆ ~SpectrumAnnotator()

virtual ~SpectrumAnnotator ( )
virtual

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
piA spectrums identifications to be annotated, looking up matches from a spectrum and the theoretical spectrum inferred from the identifications sequence
specA PeakSpectrum containing the peaks from which the pi identifications are made
tgA TheoreticalSpectrumGenerator to infer the theoretical spectrum. Its own parameters define which ion types are referred
saA 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
specA PeakSpectrum containing the peaks from which the pi identifications are made
phA spectrums identifications to be used for the annotation, looking up matches from a spectrum and the theoretical spectrum inferred from the identifications sequence
tgA TheoreticalSpectrumGenerator to infer the theoretical spectrum. Its own parameters define which ion types are referred
saA 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_ ( )
virtual

overwrite

Reimplemented from DefaultParamHandler.

Member Data Documentation

◆ basic_statistics_

bool basic_statistics_
protected

◆ ct_regex_

const boost::regex ct_regex_
staticprotected

◆ 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_
staticprotected

◆ nt_regex_

const boost::regex nt_regex_
staticprotected

◆ precursor_statistics_

bool precursor_statistics_
protected

◆ seriesposition_regex_

const boost::regex seriesposition_regex_
staticprotected

◆ SN_statistics_

bool SN_statistics_
protected

◆ terminal_series_match_ratio_

bool terminal_series_match_ratio_
protected

◆ topNmatch_fragmenterrors_

unsigned topNmatch_fragmenterrors_
protected

OpenMS / TOPP release 2.3.0 Documentation generated on Tue Jan 9 2018 18:22:13 using doxygen 1.8.13