OpenMS
Loading...
Searching...
No Matches
IsobaricQuantitationMethod.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: Timo Sachsenberg $
6// $Authors: Stephan Aiche $
7// --------------------------------------------------------------------------
8
9#pragma once
10
14
16
17#include <array>
18#include <memory>
19#include <string_view>
20#include <utility>
21#include <vector>
22
23namespace OpenMS
24{
25
26 // Forward declarations
27 template <typename Value>
28 class Matrix;
29
33 class OPENMS_DLLAPI IsobaricQuantitationMethod :
35 {
36public:
37
39 enum class MethodType
40 {
41 UNKNOWN = 0,
42 TMT_6PLEX,
43 TMT_10PLEX,
44 TMT_11PLEX,
45 TMT_16PLEX,
46 TMT_18PLEX,
47 TMT_32PLEX,
48 TMT_35PLEX,
49 ITRAQ_4PLEX,
50 ITRAQ_8PLEX,
51 SIZE_OF_METHODTYPE
52 };
53
56 static std::string_view methodTypeName(MethodType mt);
57
60 static std::string_view methodDisplayName(MethodType mt);
61
63 static MethodType methodTypeFromName(std::string_view name);
64
72 static std::unique_ptr<IsobaricQuantitationMethod> create(MethodType mt);
73
78 {
80 std::string name;
84 std::string description;
88 std::vector<Int> affected_channels;
89
91 IsobaricChannelInformation(std::string local_name,
92 const Int local_id,
93 std::string local_description,
94 const Peak2D::CoordinateType& local_center,
95 const std::vector<Int>& affected_channels) :
96 name(std::move(local_name)),
97 id(local_id),
98 description(std::move(local_description)),
99 center(local_center),
100 affected_channels(affected_channels)
101 {
102 }
103 };
104
107
110
111 typedef std::vector<IsobaricChannelInformation> IsobaricChannelList;
112
118 const std::string& getMethodName() const;
119
121 MethodType getMethodType() const { return iso_method_; }
122
128 virtual const IsobaricChannelList& getChannelInformation() const = 0;
129
135 virtual Size getNumberOfChannels() const = 0;
136
141
145 virtual Size getReferenceChannel() const = 0;
146
147protected:
150
157 Matrix<double> stringListToIsotopeCorrectionMatrix_(const std::vector<std::string>& stringlist) const;
158
159private:
162 };
163} // namespace
164
A base class for all classes handling default parameters.
Definition DefaultParamHandler.h:66
Abstract base class describing an isobaric quantitation method in terms of the used channels and an i...
Definition IsobaricQuantitationMethod.h:35
static std::string_view methodTypeName(MethodType mt)
virtual Matrix< double > getIsotopeCorrectionMatrix() const =0
Returns an isotope correction matrix suitable for the given quantitation method.
static std::unique_ptr< IsobaricQuantitationMethod > create(MethodType mt)
Factory: creates a new instance of the concrete quantitation method identified by mt.
MethodType
Identifies a concrete isobaric quantitation method. UNKNOWN is used as a sentinel (disabled/none).
Definition IsobaricQuantitationMethod.h:40
const std::string & getMethodName() const
Returns a unique name for the quantitation method (its canonical identifier, e.g. "tmt6plex").
Matrix< double > stringListToIsotopeCorrectionMatrix_(const std::vector< std::string > &stringlist) const
Helper function to convert a string list containing an isotope correction matrix into a Matrix<double...
virtual Size getNumberOfChannels() const =0
Gives the number of channels available for this quantitation method.
~IsobaricQuantitationMethod() override
d'tor
IsobaricQuantitationMethod(MethodType method_type)
c'tor for derived classes: sets the underlying param-handler name and records the concrete method_typ...
virtual Size getReferenceChannel() const =0
Returns the index of the reference channel in the IsobaricChannelList (see IsobaricQuantitationMethod...
std::vector< IsobaricChannelInformation > IsobaricChannelList
Definition IsobaricQuantitationMethod.h:111
MethodType iso_method_
The concrete isobaric method this instance represents; set by the c'tor and returned by getMethodType...
Definition IsobaricQuantitationMethod.h:161
static std::string_view methodDisplayName(MethodType mt)
static MethodType methodTypeFromName(std::string_view name)
Returns the MethodType corresponding to name (canonical identifier as returned by methodTypeName()),...
IsobaricQuantitationMethod()=delete
Default c'tor is deleted: a concrete method must be constructed with its MethodType (see the protecte...
MethodType getMethodType() const
Returns the MethodType enum value of this quantitation method.
Definition IsobaricQuantitationMethod.h:121
virtual const IsobaricChannelList & getChannelInformation() const =0
Returns information on the different channels used by the quantitation method.
A 2D matrix class with efficient buffer access for NumPy interoperability.
Definition Matrix.h:35
double CoordinateType
Coordinate type (of the position)
Definition Peak2D.h:39
@ UNKNOWN
Unknown or unrecognized ion type.
int Int
Signed integer type.
Definition Types.h:72
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition Types.h:97
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19
STL namespace.
Summary of an isobaric quantitation channel.
Definition IsobaricQuantitationMethod.h:78
std::string description
Optional description of the channel.
Definition IsobaricQuantitationMethod.h:84
Int id
The id of the channel.
Definition IsobaricQuantitationMethod.h:82
IsobaricChannelInformation(std::string local_name, const Int local_id, std::string local_description, const Peak2D::CoordinateType &local_center, const std::vector< Int > &affected_channels)
C'tor.
Definition IsobaricQuantitationMethod.h:91
std::string name
The name of the channel.
Definition IsobaricQuantitationMethod.h:80
Peak2D::CoordinateType center
The expected centroid position of the channel peak in m/z.
Definition IsobaricQuantitationMethod.h:86
std::vector< Int > affected_channels
Ids of the affected channels. Must contain 4 or 8 entries, depending on the number of columns in the ...
Definition IsobaricQuantitationMethod.h:88