OpenMS
IdentificationSummary.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: Axel Walter $
6 // $Authors: Axel Walter $
7 // --------------------------------------------------------------------------
8 
9 #pragma once
10 
13 #include <OpenMS/QC/QCBase.h>
14 #include <vector>
23 namespace OpenMS
24 {
25  class OPENMS_DLLAPI IdentificationSummary : public QCBase
26  {
27  public:
29  IdentificationSummary() = default;
30 
32  virtual ~IdentificationSummary() = default;
33 
34  // small struct for unique peptide / protein identifications (considering sequence only)
35  // count: number of unique identifications, fdr_threshold: significance threshold if score type is FDR, else -1
36  struct OPENMS_DLLAPI UniqueID {
37  UInt count = 0;
38  float fdr_threshold = -1.0;
39  };
40 
41  // stores identification summary values calculated by compute function
42  struct OPENMS_DLLAPI Result {
43  UInt peptide_spectrum_matches = 0;
46  float missed_cleavages_mean = 0;
47  double protein_hit_scores_mean = 0;
48  double peptide_length_mean = 0;
49 
50  bool operator==(const Result& rhs) const;
51  };
52 
67  Result compute(std::vector<ProteinIdentification>& prot_ids, std::vector<PeptideIdentification>& pep_ids);
68 
69  const String& getName() const override;
70 
71  QCBase::Status requirements() const override;
72 
73  private:
74  const String name_ = "Summary of detected Proteins and Peptides from idXML file";
75  };
76 } // namespace OpenMS
Stores and handles combinations of enum values, e.g. a set of flags as bits flipped in an UInt64.
Definition: FlagSet.h:28
Definition: IdentificationSummary.h:26
IdentificationSummary()=default
Constructor.
const String & getName() const override
Returns the name of the metric.
virtual ~IdentificationSummary()=default
Destructor.
QCBase::Status requirements() const override
Returns the input data requirements of the compute(...) function.
Result compute(std::vector< ProteinIdentification > &prot_ids, std::vector< PeptideIdentification > &pep_ids)
computes a summary of an idXML file
Definition: IdentificationSummary.h:36
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
unsigned int UInt
Unsigned integer type.
Definition: Types.h:64
Main OpenMS namespace.
Definition: openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19
Definition: IdentificationSummary.h:42
UniqueID unique_peptides
Definition: IdentificationSummary.h:44
bool operator==(const Result &rhs) const
UniqueID unique_proteins
Definition: IdentificationSummary.h:45