| OpenMS 2.5.0

Classes | Public Member Functions | Private Attributes | List of all members
Ms2IdentificationRate Class Reference

This class is a metric for the QualityControl-ToppTool. More...

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

Inheritance diagram for Ms2IdentificationRate:

## Classes

struct | IdentificationRateData
| Structure for storing results. More...

## Public Member Functions

| Ms2IdentificationRate ()=default
| Default constructor. More...
virtual | ~Ms2IdentificationRate ()=default
| Destructor. More...
void | compute (const FeatureMap &feature_map, const MSExperiment &exp, bool force_fdr=false)
| computes Ms2 Identification Rate More...
const String & | getName () const override
| returns the name of the metric More...
const std::vector< IdentificationRateData > & | getResults () const
| returns results More...
QCBase::Status | requires () const override
| Returns the input data requirements of the compute(...) function. More...

## Private Attributes

const String | name_ = "Ms2IdentificationRate"
| name of the metric More...
std::vector< IdentificationRateData > | rate_result_
| container that stores results More...

## Additional Inherited Members

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...
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...
Static Public Attributes inherited from QCBase
static const std::string | names_of_requires []
| strings corresponding to enum Requires More...

## Detailed Description

This class is a metric for the QualityControl-ToppTool.

This class computes the MS2 Identification Rate (as #identified PSMs divided by total number of MS2 scans) given a FeatureMap and an MSExperiment. Only pep-ids with FDR metavalue 'target_decoy' equal to 'target' are counted, unless force_fdr flag is set (assumes all pep-ids are target peptides)

## Class Documentation

## ◆ OpenMS::Ms2IdentificationRate::IdentificationRateData

struct OpenMS::Ms2IdentificationRate::IdentificationRateData

Structure for storing results.

Class Members
double | identification_rate |
UInt64 | num_ms2_spectra |
UInt64 | num_peptide_identification |

## Constructor & Destructor Documentation

## ◆ Ms2IdentificationRate()

Ms2IdentificationRate | ( |  | ) |

default

Default constructor.

## ◆ ~Ms2IdentificationRate()

virtual ~Ms2IdentificationRate | ( |  | ) |

virtual default

Destructor.

## Member Function Documentation

## ◆ compute()

void compute | ( | const FeatureMap & | feature_map,
|  | const MSExperiment & | exp,
|  | bool | force_fdr = `false`
| ) |  |

computes Ms2 Identification Rate

stores results as a struct in a vector Only pep-ids with FDR metavalue annotation as 'target' are counted, unless force_fdr flag is set (assumes all pep-ids are target peptides)

Parameters

  feature_map | Input FeatureMap with target/decoy annotation
  exp | MSExperiment for counting number of MS2 spectra
  force_fdr | Count all(!) PepIDs towards number of identified MS2 spectra (ignore target/decoy information if any)

Exceptions

  Exception::MissingInformation | is thrown if the FeatureXML is empty
  Exception::MissingInformation | is thrown if the mzML is empty
  Exception::MissingInformation | is thrown if the experiment doesn't contain MS2 spectra
  Exception::Precondition | is thrown if there are more identifications than MS2 spectra

## ◆ getName()

const String& getName | ( |  | ) | const

override virtual

returns the name of the metric

Implements QCBase.

## ◆ getResults()

const std::vector<IdentificationRateData>& 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_ = "Ms2IdentificationRate"

private

name of the metric

## ◆ rate_result_

std::vector<IdentificationRateData> rate_result_

private

container that stores results