OpenMS  3.0.0
TIC.h
Go to the documentation of this file.
1 // --------------------------------------------------------------------------
2 // OpenMS -- Open-Source Mass Spectrometry
3 // --------------------------------------------------------------------------
4 // Copyright The OpenMS Team -- Eberhard Karls University Tuebingen,
5 // ETH Zurich, and Freie Universitaet Berlin 2002-2022.
6 //
7 // This software is released under a three-clause BSD license:
8 // * Redistributions of source code must retain the above copyright
9 // notice, this list of conditions and the following disclaimer.
10 // * Redistributions in binary form must reproduce the above copyright
11 // notice, this list of conditions and the following disclaimer in the
12 // documentation and/or other materials provided with the distribution.
13 // * Neither the name of any author or any participating institution
14 // may be used to endorse or promote products derived from this software
15 // without specific prior written permission.
16 // For a full list of authors, refer to the file AUTHORS.
17 // --------------------------------------------------------------------------
18 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 // ARE DISCLAIMED. IN NO EVENT SHALL ANY OF THE AUTHORS OR THE CONTRIBUTING
22 // INSTITUTIONS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
23 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
24 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
25 // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
26 // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
27 // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
28 // ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 //
30 // --------------------------------------------------------------------------
31 // $Maintainer: Chris Bielow $
32 // $Authors: Tom Waschischeck $
33 // --------------------------------------------------------------------------
34 
35 #pragma once
36 
37 #include <OpenMS/QC/QCBase.h>
38 
49 namespace OpenMS
50 {
51  class MzTabMetaData;
52  class MSExperiment;
53  class MSChromatogram;
54 
55  class OPENMS_DLLAPI TIC : public QCBase
56  {
57  public:
59  TIC() = default;
60 
62  virtual ~TIC() = default;
63 
64  // stores TIC values calculated by compute function
65  struct OPENMS_DLLAPI Result
66  {
67  std::vector<UInt> intensities; // TIC intensities
68  std::vector<float> relative_intensities;
69  std::vector<float> retention_times; // TIC RTs in seconds
70  UInt area = 0; // Area under TIC
71  UInt fall = 0; // MS1 signal fall (10x) count
72  UInt jump = 0; // MS1 signal jump (10x) count
73 
74  bool operator==(const Result& rhs) const;
75  };
76 
77 
89  Result compute(const MSExperiment& exp, float bin_size = 0, UInt ms_level = 1);
90 
91  const String& getName() const override;
92 
93  const std::vector<MSChromatogram>& getResults() const ;
94 
95  QCBase::Status requires() const override;
96 
98  void addMetaDataMetricsToMzTab(MzTabMetaData& meta, std::vector<Result>& tics);
99 
100  private:
101  const String name_ = "TIC";
102  };
103 }
OpenMS::TIC::Result::relative_intensities
std::vector< float > relative_intensities
Definition: TIC.h:68
OpenMS::String
A more convenient string class.
Definition: String.h:58
OpenMS::MSExperiment
In-Memory representation of a mass spectrometry run.
Definition: MSExperiment.h:70
OpenMS::TIC::Result::retention_times
std::vector< float > retention_times
Definition: TIC.h:69
OpenMS::MzTabMetaData
all meta data of a mzTab file. Please refer to specification for documentation.
Definition: MzTab.h:140
OpenMS
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47
OpenMS::TIC
Definition: TIC.h:55
OpenMS::TIC::Result
Definition: TIC.h:65
OpenMS::QCBase
This class serves as an abstract base class for all QC classes.
Definition: QCBase.h:54
OpenMS::UInt
unsigned int UInt
Unsigned integer type.
Definition: Types.h:94
OpenMS::Internal::operator==
bool operator==(const IDBoostGraph::ProteinGroup &lhs, const IDBoostGraph::ProteinGroup &rhs)
OpenMS::FlagSet
Stores and handles combinations of enum values, e.g. a set of flags as bits flipped in an UInt64.
Definition: FlagSet.h:53
OpenMS::TIC::Result::intensities
std::vector< UInt > intensities
Definition: TIC.h:67
QCBase.h