OpenMS
Loading...
Searching...
No Matches
TIC.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: Chris Bielow $
6// $Authors: Tom Waschischeck $
7// --------------------------------------------------------------------------
8
9#pragma once
10
11#include <OpenMS/QC/QCBase.h>
12
13namespace OpenMS
14{
15 class MzTabMetaData;
16 class MSExperiment;
17 class MSChromatogram;
18
32 class OPENMS_DLLAPI TIC : public QCBase
33 {
34 public:
36 TIC() = default;
37
39 virtual ~TIC() = default;
40
48 struct OPENMS_DLLAPI Result {
49 std::vector<UInt> intensities;
50 std::vector<float> relative_intensities;
51 std::vector<float> retention_times;
52 UInt area = 0;
53 UInt fall = 0;
54 UInt jump = 0;
55
56 bool operator==(const Result& rhs) const;
57 };
58
59
78 Result compute(const MSExperiment& exp, float bin_size = 0, UInt ms_level = 1);
79
81 const std::string& getName() const override;
82
83 const std::vector<MSChromatogram>& getResults() const;
84
86 QCBase::Status requirements() const override;
87
101 void addMetaDataMetricsToMzTab(MzTabMetaData& meta, const std::vector<Result>& tics);
102
103 private:
104 const std::string name_ = "TIC";
105 };
106} // 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:49
all meta data of a mzTab file. Please refer to specification for documentation.
Definition MzTab.h:118
This class serves as an abstract base class for all QC classes.
Definition QCBase.h:29
Total Ion Current (TIC) as a QC metric.
Definition TIC.h:33
const std::string & getName() const override
Name of this QC metric ("TIC").
virtual ~TIC()=default
Destructor.
Result compute(const MSExperiment &exp, float bin_size=0, UInt ms_level=1)
Compute the Total Ion Current trace and stability metrics.
void addMetaDataMetricsToMzTab(MzTabMetaData &meta, const std::vector< Result > &tics)
Append the TIC traces from tics to the MTD section of meta as custom parameters.
TIC()=default
Default constructor.
QCBase::Status requirements() const override
Input-data requirements of compute (raw mzML data).
const std::vector< MSChromatogram > & getResults() const
unsigned int UInt
Unsigned integer type.
Definition Types.h:64
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19
Computed Total Ion Current trace plus stability counters.
Definition TIC.h:48
bool operator==(const Result &rhs) const
std::vector< float > relative_intensities
Per-bin intensities rescaled to [0, 100] of the maximum bin (0 when the maximum is 0).
Definition TIC.h:50
std::vector< UInt > intensities
Per-bin TIC intensities.
Definition TIC.h:49
std::vector< float > retention_times
Per-bin retention times (seconds).
Definition TIC.h:51