OpenMS
MzCalibration.h
Go to the documentation of this file.
1 // Copyright (c) 2002-2023, The OpenMS Team -- EKU Tuebingen, ETH Zurich, and FU Berlin
2 // SPDX-License-Identifier: BSD-3-Clause
3 //
4 // --------------------------------------------------------------------------
5 // $Maintainer: Chris Bielow $
6 // $Authors: Juliane Schmachtenberg $
7 // --------------------------------------------------------------------------
8 
9 #pragma once
10 
12 #include <OpenMS/QC/QCBase.h>
13 
14 namespace OpenMS
15 {
16  class FeatureMap;
17  class MSExperiment;
18  class PeptideIdentification;
19 
31  class OPENMS_DLLAPI MzCalibration : public QCBase
32  {
33  public:
36 
38  virtual ~MzCalibration() = default;
39 
49  void compute(FeatureMap& features, const MSExperiment& exp, const QCBase::SpectraMap& map_to_spectrum);
50 
53  Status requirements() const override;
54 
56  const String& getName() const override;
57 
58  private:
60  void addMzMetaValues_(PeptideIdentification& peptide_ID, const MSExperiment& exp, const QCBase::SpectraMap& map_to_spectrum);
61 
62  double mz_raw_;
63  double mz_ref_;
64  bool no_mzml_;
65  };
66 } // namespace OpenMS
A container for features.
Definition: FeatureMap.h:80
Stores and handles combinations of enum values, e.g. a set of flags as bits flipped in an UInt64.
Definition: FlagSet.h:28
In-Memory representation of a mass spectrometry run.
Definition: MSExperiment.h:46
QC metric calculating (un)calibrated m/z error.
Definition: MzCalibration.h:32
void compute(FeatureMap &features, const MSExperiment &exp, const QCBase::SpectraMap &map_to_spectrum)
Writes results as meta values to the PeptideIdentification of the given FeatureMap.
void addMzMetaValues_(PeptideIdentification &peptide_ID, const MSExperiment &exp, const QCBase::SpectraMap &map_to_spectrum)
calculate the m/z values and m/z errors and add them to the PeptideIdentification
const String & getName() const override
Returns the name of the metric.
double mz_ref_
Definition: MzCalibration.h:63
double mz_raw_
Definition: MzCalibration.h:62
Status requirements() const override
virtual ~MzCalibration()=default
Destructor.
bool no_mzml_
Definition: MzCalibration.h:64
MzCalibration()
Constructor.
Represents the peptide hits for a spectrum.
Definition: PeptideIdentification.h:39
Map to find a spectrum via its NativeID.
Definition: QCBase.h:63
This class serves as an abstract base class for all QC classes.
Definition: QCBase.h:29
A more convenient string class.
Definition: String.h:34
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:22