OpenMS
MultiplexDeltaMasses.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: Lars Nilse $
6 // $Authors: Lars Nilse $
7 // --------------------------------------------------------------------------
8 
9 #pragma once
10 
13 
14 #include <vector>
15 #include <set>
16 #include <algorithm>
17 #include <iostream>
18 
19 namespace OpenMS
20 {
36  class OPENMS_DLLAPI MultiplexDeltaMasses
37  {
38  public:
39 
46  typedef std::multiset<String> LabelSet;
47 
51  struct OPENMS_DLLAPI DeltaMass
52  {
53  double delta_mass;
55 
56  DeltaMass(double dm, LabelSet ls);
57 
58  // delta mass with a label set containing a single label
59  DeltaMass(double dm, const String& l);
60  };
61 
66 
70  MultiplexDeltaMasses(const std::vector<DeltaMass>& dm);
71 
75  std::vector<DeltaMass>& getDeltaMasses();
76 
80  const std::vector<DeltaMass>& getDeltaMasses() const;
81 
85  static String labelSetToString(const LabelSet& ls);
86 
87  private:
88 
93  std::vector<DeltaMass> delta_masses_;
94 
95  };
96 
97  bool operator<(const MultiplexDeltaMasses &dm1, const MultiplexDeltaMasses &dm2);
98 
99 }
100 
101 
data structure for mass shift pattern
Definition: MultiplexDeltaMasses.h:37
std::multiset< String > LabelSet
set of labels associated with a mass shift
Definition: MultiplexDeltaMasses.h:46
MultiplexDeltaMasses(const std::vector< DeltaMass > &dm)
constructor
std::vector< DeltaMass > & getDeltaMasses()
returns delta masses
static String labelSetToString(const LabelSet &ls)
converts a label set to a string
const std::vector< DeltaMass > & getDeltaMasses() const
returns delta masses
std::vector< DeltaMass > delta_masses_
mass shifts between peptides (including zero mass shift for first peptide)
Definition: MultiplexDeltaMasses.h:93
A more convenient string class.
Definition: String.h:34
Main OpenMS namespace.
Definition: openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19
bool operator<(const MultiplexDeltaMasses &dm1, const MultiplexDeltaMasses &dm2)
mass shift with corresponding label set
Definition: MultiplexDeltaMasses.h:52
LabelSet label_set
Definition: MultiplexDeltaMasses.h:54
DeltaMass(double dm, const String &l)
double delta_mass
Definition: MultiplexDeltaMasses.h:53