OpenMS
PSMExplainedIonCurrent.h
Go to the documentation of this file.
1 // Copyright (c) 2002-present, OpenMS Inc. -- EKU Tuebingen, ETH Zurich, and FU Berlin
2 // SPDX-License-Identifier: BSD-3-Clause
3 //
4 // --------------------------------------------------------------------------
5 // $Maintainer: Tom Waschischeck$
6 // $Authors: Tom Waschischeck$
7 // --------------------------------------------------------------------------
8 
9 #pragma once
10 
12 #include <OpenMS/QC/QCBase.h>
13 #include <vector>
14 
15 namespace OpenMS
16 {
17  class FeatureMap;
18  class MSExperiment;
19  class PeptideIdentification;
20  class WindowMower;
21 
22  class OPENMS_DLLAPI PSMExplainedIonCurrent : public QCBase
23  {
24  public:
27 
29  virtual ~PSMExplainedIonCurrent() = default;
30 
34  struct Statistics {
35  double average_correctness = 0;
36  double variance_correctness = 0;
37  };
38 
60  void compute(FeatureMap& fmap, const MSExperiment& exp, const QCBase::SpectraMap& map_to_spectrum, ToleranceUnit tolerance_unit = ToleranceUnit::AUTO, double tolerance = 20);
61 
80  void compute(std::vector<PeptideIdentification>& pep_ids, const ProteinIdentification::SearchParameters& search_params, const MSExperiment& exp, const QCBase::SpectraMap& map_to_spectrum,
81  ToleranceUnit tolerance_unit = ToleranceUnit::AUTO, double tolerance = 20);
82 
84  const String& getName() const override;
85 
87  const std::vector<Statistics>& getResults() const;
88 
89 
94  QCBase::Status requirements() const override;
95 
96  private:
98  std::vector<Statistics> results_ {};
99 
100  static double annotatePSMExplainedIonCurrent_(PeptideIdentification& pep_id, const MSExperiment& exp, const QCBase::SpectraMap& map_to_spectrum, WindowMower& filter,
101  PSMExplainedIonCurrent::ToleranceUnit tolerance_unit, double tolerance);
102  };
103 
104 } // 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
Definition: PSMExplainedIonCurrent.h:23
void compute(std::vector< PeptideIdentification > &pep_ids, const ProteinIdentification::SearchParameters &search_params, const MSExperiment &exp, const QCBase::SpectraMap &map_to_spectrum, ToleranceUnit tolerance_unit=ToleranceUnit::AUTO, double tolerance=20)
computes PSMExplainedIonCurrent (only of the first PeptideHit of each PepID)
void compute(FeatureMap &fmap, const MSExperiment &exp, const QCBase::SpectraMap &map_to_spectrum, ToleranceUnit tolerance_unit=ToleranceUnit::AUTO, double tolerance=20)
computes PSMExplainedIonCurrent (only of the first PeptideHit of each PepID)
const String & getName() const override
returns the name of the metric
static double annotatePSMExplainedIonCurrent_(PeptideIdentification &pep_id, const MSExperiment &exp, const QCBase::SpectraMap &map_to_spectrum, WindowMower &filter, PSMExplainedIonCurrent::ToleranceUnit tolerance_unit, double tolerance)
QCBase::Status requirements() const override
Returns the input data requirements of the compute(...) function.
virtual ~PSMExplainedIonCurrent()=default
Destructor.
PSMExplainedIonCurrent()=default
Default constructor.
const std::vector< Statistics > & getResults() const
returns results
Structure for storing results: average and variance over all PSMs.
Definition: PSMExplainedIonCurrent.h:34
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
ToleranceUnit
Definition: QCBase.h:49
A more convenient string class.
Definition: String.h:34
Retains the highest peaks in a sliding or jumping window.
Definition: WindowMower.h:30
Main OpenMS namespace.
Definition: openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19
Search parameters of the DB search.
Definition: ProteinIdentification.h:247