OpenMS
MultiplexDeltaMassesGenerator.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-2023.
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: Lars Nilse $
32 // $Authors: Lars Nilse $
33 // --------------------------------------------------------------------------
34 
35 #pragma once
36 
42 
43 #include <vector>
44 #include <algorithm>
45 #include <iosfwd>
46 
47 
48 namespace OpenMS
49 {
60  class OPENMS_DLLAPI MultiplexDeltaMassesGenerator :
61  public DefaultParamHandler
62  {
63  public:
64 
68  struct OPENMS_DLLAPI Label
69  {
73  double delta_mass;
74 
75  Label(String sn, String ln, String d, double dm);
76  };
77 
82 
92  MultiplexDeltaMassesGenerator(String labels, int missed_cleavages, std::map<String,double> label_mass_shift);
93 
99 
107  void printSamplesLabelsList(std::ostream &stream) const;
108 
121  void printDeltaMassesList(std::ostream &stream) const;
122 
128  std::vector<MultiplexDeltaMasses> getDeltaMassesList();
129 
133  const std::vector<MultiplexDeltaMasses>& getDeltaMassesList() const;
134 
142  std::vector<std::vector<String> > getSamplesLabelsList();
143 
151  const std::vector<std::vector<String> >& getSamplesLabelsList() const;
152 
158  String getLabelShort(const String& label);
159 
165  String getLabelLong(const String& label);
166 
176 
177  private:
178 
183 
187  std::vector<String> labels_list_;
188 
192  std::vector<std::vector<String> > samples_labels_;
193 
198 
202  std::vector<MultiplexDeltaMasses> delta_masses_list_;
203 
207  std::vector<Label> label_master_list_;
208 
213  std::map<String, double> label_delta_mass_;
214 
219  std::map<String, String> label_short_long_;
220 
225  std::map<String, String> label_long_short_;
226 
231  };
232 
233 }
234 
Representation of a peptide/protein sequence.
Definition: AASequence.h:112
A base class for all classes handling default parameters.
Definition: DefaultParamHandler.h:92
generates complete list of all possible mass shifts due to isotopic labelling
Definition: MultiplexDeltaMassesGenerator.h:62
std::map< String, String > label_short_long_
mapping from a short label (as in the user params) to a long label (as in PSI-MS name) e....
Definition: MultiplexDeltaMassesGenerator.h:219
const std::vector< MultiplexDeltaMasses > & getDeltaMassesList() const
returns the list of mass shift patterns
void generateKnockoutDeltaMasses()
generate all mass shifts that can occur due to the absence of one or multiple peptides (e....
MultiplexDeltaMasses::LabelSet extractLabelSet(const AASequence &sequence)
extract the label set from the sequence
String getLabelShort(const String &label)
returns the short label string
int missed_cleavages_
maximum number of missed cleavages
Definition: MultiplexDeltaMassesGenerator.h:197
std::vector< MultiplexDeltaMasses > getDeltaMassesList()
returns the list of mass shift patterns
void printSamplesLabelsList(std::ostream &stream) const
write the list of labels for each of the sample
std::vector< Label > label_master_list_
master list of all labels
Definition: MultiplexDeltaMassesGenerator.h:207
String labels_
isotopic labels
Definition: MultiplexDeltaMassesGenerator.h:182
std::vector< MultiplexDeltaMasses > delta_masses_list_
list of all possible mass shift patterns
Definition: MultiplexDeltaMassesGenerator.h:202
std::vector< String > labels_list_
flat list of all occurring isotopic labels
Definition: MultiplexDeltaMassesGenerator.h:187
void fillLabelMasterList_()
fill label master list
std::vector< std::vector< String > > samples_labels_
list of samples with their corresponding labels
Definition: MultiplexDeltaMassesGenerator.h:192
MultiplexDeltaMassesGenerator(String labels, int missed_cleavages, std::map< String, double > label_mass_shift)
constructor
String getLabelLong(const String &label)
returns the long label string
const std::vector< std::vector< String > > & getSamplesLabelsList() const
returns the list of samples with their corresponding labels
std::map< String, String > label_long_short_
mapping from a long label (as in PSI-MS name) to a short label (as in the user params) e....
Definition: MultiplexDeltaMassesGenerator.h:225
std::map< String, double > label_delta_mass_
mapping from single label to delta mass e.g. "Arg10" -> 10.0082686
Definition: MultiplexDeltaMassesGenerator.h:213
std::vector< std::vector< String > > getSamplesLabelsList()
returns the list of samples with their corresponding labels
void printDeltaMassesList(std::ostream &stream) const
write the list of all mass patterns
std::multiset< String > LabelSet
set of labels associated with a mass shift
Definition: MultiplexDeltaMasses.h:72
A more convenient string class.
Definition: String.h:60
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:48
complete label information
Definition: MultiplexDeltaMassesGenerator.h:69
String short_name
Definition: MultiplexDeltaMassesGenerator.h:70
String description
Definition: MultiplexDeltaMassesGenerator.h:72
double delta_mass
Definition: MultiplexDeltaMassesGenerator.h:73
String long_name
Definition: MultiplexDeltaMassesGenerator.h:71
Label(String sn, String ln, String d, double dm)