OpenMS  2.6.0
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-2020.
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 
98  void generateKnockoutDeltaMasses();
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(String label);
159 
165  String getLabelLong(String label);
166 
175  MultiplexDeltaMasses::LabelSet extractLabelSet(AASequence sequence);
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 
230  void fillLabelMasterList_();
231  };
232 
233 }
234 
DefaultParamHandler.h
OpenMS::MultiplexDeltaMassesGenerator::Label::long_name
String long_name
Definition: MultiplexDeltaMassesGenerator.h:71
OpenMS::MultiplexDeltaMassesGenerator::Label::short_name
String short_name
Definition: MultiplexDeltaMassesGenerator.h:70
OpenMS::MultiplexDeltaMassesGenerator::labels_list_
std::vector< String > labels_list_
flat list of all occurring isotopic labels
Definition: MultiplexDeltaMassesGenerator.h:187
OpenMS::MultiplexDeltaMasses::LabelSet
std::multiset< String > LabelSet
set of labels associated with a mass shift
Definition: MultiplexDeltaMasses.h:73
OpenMS::MultiplexDeltaMassesGenerator::label_master_list_
std::vector< Label > label_master_list_
master list of all labels
Definition: MultiplexDeltaMassesGenerator.h:207
OpenMS::String
A more convenient string class.
Definition: String.h:59
OpenMS::MultiplexDeltaMassesGenerator::Label
complete label information
Definition: MultiplexDeltaMassesGenerator.h:68
OpenMS::DefaultParamHandler
A base class for all classes handling default parameters.
Definition: DefaultParamHandler.h:92
OpenMS
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:46
OpenMS::MultiplexDeltaMassesGenerator::label_long_short_
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
OpenMS::MultiplexDeltaMassesGenerator::labels_
String labels_
isotopic labels
Definition: MultiplexDeltaMassesGenerator.h:182
OpenMS::MultiplexDeltaMassesGenerator::missed_cleavages_
int missed_cleavages_
maximum number of missed cleavages
Definition: MultiplexDeltaMassesGenerator.h:197
OpenMS::MultiplexDeltaMassesGenerator::samples_labels_
std::vector< std::vector< String > > samples_labels_
list of samples with their corresponding labels
Definition: MultiplexDeltaMassesGenerator.h:192
OpenMS::MultiplexDeltaMassesGenerator::label_short_long_
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
MultiplexDeltaMasses.h
OpenMS::MultiplexDeltaMassesGenerator::Label::delta_mass
double delta_mass
Definition: MultiplexDeltaMassesGenerator.h:73
AASequence.h
OpenMS::MultiplexDeltaMassesGenerator::delta_masses_list_
std::vector< MultiplexDeltaMasses > delta_masses_list_
list of all possible mass shift patterns
Definition: MultiplexDeltaMassesGenerator.h:202
OpenMS::MultiplexDeltaMassesGenerator::Label::description
String description
Definition: MultiplexDeltaMassesGenerator.h:72
String.h
OpenMS::AASequence
Representation of a peptide/protein sequence.
Definition: AASequence.h:111
OpenMS::MultiplexDeltaMassesGenerator
generates complete list of all possible mass shifts due to isotopic labelling
Definition: MultiplexDeltaMassesGenerator.h:60
OpenMS::MultiplexDeltaMassesGenerator::label_delta_mass_
std::map< String, double > label_delta_mass_
mapping from single label to delta mass e.g. "Arg10" -> 10.0082686
Definition: MultiplexDeltaMassesGenerator.h:213
StandardTypes.h