| OpenMS 2.5.0

Classes | Public Types | Public Member Functions | Static Public Attributes | Private Attributes | List of all members
FragmentMassError Class Reference

`#include <OpenMS/QC/FragmentMassError.h>`

Inheritance diagram for FragmentMassError:

## Classes

struct | FMEStatistics
| Structure for storing results: average and variance of all FragmentMassErrors in ppm. More...

## Public Types

enum | ToleranceUnit { AUTO, PPM, DA, SIZE_OF_TOLERANCEUNIT }
Public Types inherited from QCBase
enum | Requires : UInt64 { FAIL, RAWMZML, POSTFDRFEAT, PREFDRFEAT, CONTAMINANTS, TRAFOALIGN, SIZE_OF_REQUIRES }
| Enum to encode a file type as a bit. More...

## Public Member Functions

| FragmentMassError ()=default
| Default constructor. More...
virtual | ~FragmentMassError ()=default
| Destructor. More...
void | compute (FeatureMap &fmap, const MSExperiment &exp, const QCBase::SpectraMap &map_to_spectrum, ToleranceUnit tolerance_unit=ToleranceUnit::AUTO, double tolerance=20)
| computes FragmentMassError in ppm and Dalton (only of the first PeptideHit of each PepID) More...
const String & | getName () const override
| returns the name of the metric More...
const std::vector< FMEStatistics > & | getResults () const
| returns results More...
QCBase::Status | requires () const override
| Returns the input data requirements of the compute(...) function. More...

## Static Public Attributes

static const std::string | names_of_toleranceUnit []
| strings corresponding to enum ToleranceUnit More...
Static Public Attributes inherited from QCBase
static const std::string | names_of_requires []
| strings corresponding to enum Requires More...

## Private Attributes

const String | name_ = "FragmentMassError"
| name of the metric More...
std::vector< FMEStatistics > | results_ {}
| container that stores results More...

## Additional Inherited Members

Static Public Member Functions inherited from QCBase
template<typename MAP , typename T >
static void | iterateFeatureMap (MAP &fmap, T lambda)
| function, which iterates through all PeptideIdentifications of a given FeatureMap and applies a given lambda function More...

## Class Documentation

## ◆ OpenMS::FragmentMassError::FMEStatistics

struct OpenMS::FragmentMassError::FMEStatistics

Structure for storing results: average and variance of all FragmentMassErrors in ppm.

Class Members
double | average_ppm |
double | variance_ppm |

## Member Enumeration Documentation

## ◆ ToleranceUnit

enum ToleranceUnit

strong

Enumerator
AUTO |
PPM |
DA |
SIZE_OF_TOLERANCEUNIT |

## Constructor & Destructor Documentation

## ◆ FragmentMassError()

FragmentMassError | ( |  | ) |

default

Default constructor.

## ◆ ~FragmentMassError()

virtual ~FragmentMassError | ( |  | ) |

virtual default

Destructor.

## Member Function Documentation

## ◆ compute()

void compute | ( | FeatureMap & | fmap,
|  | const MSExperiment & | exp,
|  | const QCBase::SpectraMap & | map_to_spectrum,
|  | ToleranceUnit | tolerance_unit = `ToleranceUnit::AUTO`,
|  | double | tolerance = `20`
| ) |  |

computes FragmentMassError in ppm and Dalton (only of the first PeptideHit of each PepID)

Stores average and variance of FragmentMassErrors in ppm as a struct in a vector. Each FragmentMassError (in ppm) is stored in the first PeptideHit of the corresponding PeptideIdentification as metavalue "fragment_mass_error_ppm". Each FragmentMassError (in Da) is stored in the first PeptideHit of the corresponding PeptideIdentification as metavalue "fragment_mass_error_da".

Parameters

  fmap | Input FeatureMap for annotation and data for theoretical spectra
  exp | Input MSExperiment for MS2 spectra; spectra should be sorted (ascending RT)
  map_to_spectrum | Map to find index of spectrum given by meta value at PepID
  tolerance | Search window for matching peaks; distance has to be lower than tolerance value
  tolerance_unit | Tolerance in ppm or Dalton (if auto was chosen, the unit and value will taken from FeatureMap metadata)

Exceptions

  Exceptions::MissingInformation | If fragment mass tolerance is missing in metadata of FeatureMap
  Exception::InvalidParameter | PeptideID is missing meta value 'spectrum_reference'
  Exception::IllegalArgument | Spectrum for a PepID has ms-level of 1
  Exception::MissingInformation | If no fragmentation method given in a MS2 precursor
  Exception::InvalidParameter | If the fragmentation method is not ECD, ETD, CID or HCD

## ◆ getName()

const String& getName | ( |  | ) | const

override virtual

returns the name of the metric

Implements QCBase.

## ◆ getResults()

const std::vector<FMEStatistics>& getResults | ( |  | ) | const

returns results

## ◆ requires()

QCBase::Status requires | ( |  | ) | const

override virtual

Returns the input data requirements of the compute(...) function.

Returns
  Status for RAWMZML and POSTFDRFEAT

Implements QCBase.

## Member Data Documentation

## ◆ name_

const String name_ = "FragmentMassError"

private

name of the metric

## ◆ names_of_toleranceUnit

const std::string names_of_toleranceUnit[]

static

strings corresponding to enum ToleranceUnit

## ◆ results_

std::vector<FMEStatistics> results_ {}

private

container that stores results