OpenMS  2.4.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-2018.
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 <iostream>
46 
47 namespace OpenMS
48 {
59  class OPENMS_DLLAPI MultiplexDeltaMassesGenerator :
60  public DefaultParamHandler
61  {
62  public:
63 
67  struct OPENMS_DLLAPI Label
68  {
72  double delta_mass;
73 
74  Label(String sn, String ln, String d, double dm);
75  };
76 
81 
91  MultiplexDeltaMassesGenerator(String labels, int missed_cleavages, std::map<String,double> label_mass_shift);
92 
97  void generateKnockoutDeltaMasses();
98 
106  void printSamplesLabelsList() const;
107 
118  void printDeltaMassesList() const;
119 
123  std::vector<MultiplexDeltaMasses> getDeltaMassesList();
124 
128  const std::vector<MultiplexDeltaMasses>& getDeltaMassesList() const;
129 
137  std::vector<std::vector<String> > getSamplesLabelsList();
138 
146  const std::vector<std::vector<String> >& getSamplesLabelsList() const;
147 
153  String getLabelShort(String label);
154 
160  String getLabelLong(String label);
161 
170  MultiplexDeltaMasses::LabelSet extractLabelSet(AASequence sequence);
171 
172  private:
173 
178 
182  std::vector<String> labels_list_;
183 
187  std::vector<std::vector<String> > samples_labels_;
188 
193 
197  std::vector<MultiplexDeltaMasses> delta_masses_list_;
198 
202  std::vector<Label> label_master_list_;
203 
208  std::map<String, double> label_delta_mass_;
209 
214  std::map<String, String> label_short_long_;
215 
220  std::map<String, String> label_long_short_;
221 
225  void fillLabelMasterList_();
226  };
227 
228 }
229 
std::vector< std::vector< String > > samples_labels_
list of samples with their corresponding labels
Definition: MultiplexDeltaMassesGenerator.h:187
A more convenient string class.
Definition: String.h:57
std::vector< String > labels_list_
flat list of all occurring isotopic labels
Definition: MultiplexDeltaMassesGenerator.h:182
int missed_cleavages_
maximum number of missed cleavages
Definition: MultiplexDeltaMassesGenerator.h:192
String short_name
Definition: MultiplexDeltaMassesGenerator.h:69
std::vector< Label > label_master_list_
master list of all labels
Definition: MultiplexDeltaMassesGenerator.h:202
Representation of a peptide/protein sequence.
Definition: AASequence.h:107
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:46
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:214
String labels_
isotopic labels
Definition: MultiplexDeltaMassesGenerator.h:177
String description
Definition: MultiplexDeltaMassesGenerator.h:71
std::multiset< String > LabelSet
set of labels associated with a mass shift
Definition: MultiplexDeltaMasses.h:73
std::map< String, double > label_delta_mass_
mapping from single label to delta mass e.g. "Arg10" -> 10.0082686
Definition: MultiplexDeltaMassesGenerator.h:208
std::vector< MultiplexDeltaMasses > delta_masses_list_
list of all possible mass shift patterns
Definition: MultiplexDeltaMassesGenerator.h:197
generates complete list of all possible mass shifts due to isotopic labelling
Definition: MultiplexDeltaMassesGenerator.h:59
String long_name
Definition: MultiplexDeltaMassesGenerator.h:70
A base class for all classes handling default parameters.
Definition: DefaultParamHandler.h:91
complete label information
Definition: MultiplexDeltaMassesGenerator.h:67
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:220
double delta_mass
Definition: MultiplexDeltaMassesGenerator.h:72