OpenMS
TIC.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: Tom Waschischeck $
7 // --------------------------------------------------------------------------
8 
9 #pragma once
10 
11 #include <OpenMS/QC/QCBase.h>
12 
23 namespace OpenMS
24 {
25  class MzTabMetaData;
26  class MSExperiment;
27  class MSChromatogram;
28 
29  class OPENMS_DLLAPI TIC : public QCBase
30  {
31  public:
33  TIC() = default;
34 
36  virtual ~TIC() = default;
37 
38  // stores TIC values calculated by compute function
39  struct OPENMS_DLLAPI Result {
40  std::vector<UInt> intensities; // TIC intensities
41  std::vector<float> relative_intensities;
42  std::vector<float> retention_times; // TIC RTs in seconds
43  UInt area = 0; // Area under TIC
44  UInt fall = 0; // MS1 signal fall (10x) count
45  UInt jump = 0; // MS1 signal jump (10x) count
46 
47  bool operator==(const Result& rhs) const;
48  };
49 
50 
62  Result compute(const MSExperiment& exp, float bin_size = 0, UInt ms_level = 1);
63 
64  const String& getName() const override;
65 
66  const std::vector<MSChromatogram>& getResults() const;
67 
68  QCBase::Status requirements() const override;
69 
71  void addMetaDataMetricsToMzTab(MzTabMetaData& meta, std::vector<Result>& tics);
72 
73  private:
74  const String name_ = "TIC";
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
In-Memory representation of a mass spectrometry run.
Definition: MSExperiment.h:46
all meta data of a mzTab file. Please refer to specification for documentation.
Definition: MzTab.h:115
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
Definition: TIC.h:30
virtual ~TIC()=default
Destructor.
Result compute(const MSExperiment &exp, float bin_size=0, UInt ms_level=1)
Compute Total Ion Count and applies the resampling algorithm, if a bin size in RT seconds greater tha...
const String & getName() const override
Returns the name of the metric.
TIC()=default
Constructor.
const std::vector< MSChromatogram > & getResults() const
QCBase::Status requirements() const override
Returns the input data requirements of the compute(...) function.
void addMetaDataMetricsToMzTab(MzTabMetaData &meta, std::vector< Result > &tics)
append QC data for given metrics to mzTab's MTD section
unsigned int UInt
Unsigned integer type.
Definition: Types.h:68
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:22
Definition: TIC.h:39
bool operator==(const Result &rhs) const
std::vector< float > relative_intensities
Definition: TIC.h:41
std::vector< UInt > intensities
Definition: TIC.h:40
std::vector< float > retention_times
Definition: TIC.h:42