| OpenMS 2.5.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
37 #include <OpenMS/KERNEL/StandardTypes.h>
38 #include <OpenMS/CHEMISTRY/AASequence.h>
39 #include <OpenMS/DATASTRUCTURES/String.h>
40 #include <OpenMS/DATASTRUCTURES/DefaultParamHandler.h>
41 #include <OpenMS/TRANSFORMATIONS/FEATUREFINDER/MultiplexDeltaMasses.h>
42
43 #include <vector>
44 #include <algorithm>
45 #include <iostream>
46 #include <ostream>
47
48
49 namespace OpenMS
50 {
61 class OPENMS_DLLAPI MultiplexDeltaMassesGenerator :
62 public DefaultParamHandler
63 {
64 public:
65
69 struct OPENMS_DLLAPI Label
70 {
71 String short_name;
72 String long_name;
73 String description;
74 double delta_mass;
75
76 Label(String sn, String ln, String d, double dm);
77 };
78
82 MultiplexDeltaMassesGenerator();
83
93 MultiplexDeltaMassesGenerator(String labels, int missed_cleavages, std::map<String,double> label_mass_shift);
94
99 void generateKnockoutDeltaMasses();
100
108 void printSamplesLabelsList(std::ostream &stream) const;
109
122 void printDeltaMassesList(std::ostream &stream) const;
123
129 std::vector<MultiplexDeltaMasses> getDeltaMassesList();
130
134 const std::vector<MultiplexDeltaMasses>& getDeltaMassesList() const;
135
143 std::vector<std::vector<String> > getSamplesLabelsList();
144
152 const std::vector<std::vector<String> >& getSamplesLabelsList() const;
153
159 String getLabelShort(String label);
160
166 String getLabelLong(String label);
167
176 MultiplexDeltaMasses::LabelSet extractLabelSet(AASequence sequence);
177
178 private:
179
183 String labels_;
184
188 std::vector<String> labels_list_;
189
193 std::vector<std::vector<String> > samples_labels_;
194
198 int missed_cleavages_;
199
203 std::vector<MultiplexDeltaMasses> delta_masses_list_;
204
208 std::vector<Label> label_master_list_;
209
214 std::map<String, double> label_delta_mass_;
215
220 std::map<String, String> label_short_long_;
221
226 std::map<String, String> label_long_short_;
227
231 void fillLabelMasterList_();
232 };
233
234 }
235
OpenMS::String
A more convenient string class.
Definition: String.h:58
OpenMS::DefaultParamHandler
A base class for all classes handling default parameters.
Definition: DefaultParamHandler.h:91
MultiplexDeltaMasses.h
AASequence.h
OpenMS::MultiplexDeltaMassesGenerator::missed_cleavages_
int missed_cleavages_
maximum number of missed cleavages
Definition: MultiplexDeltaMassesGenerator.h:198
OpenMS::MultiplexDeltaMassesGenerator::Label::short_name
String short_name
Definition: MultiplexDeltaMassesGenerator.h:71
StandardTypes.h
OpenMS::MultiplexDeltaMassesGenerator::Label::delta_mass
double delta_mass
Definition: MultiplexDeltaMassesGenerator.h:74
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:220
OpenMS::MultiplexDeltaMassesGenerator::Label::long_name
String long_name
Definition: MultiplexDeltaMassesGenerator.h:72
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:214
OpenMS::MultiplexDeltaMasses::LabelSet
std::multiset< String > LabelSet
set of labels associated with a mass shift
Definition: MultiplexDeltaMasses.h:73
OpenMS::AASequence
Representation of a peptide/protein sequence.
Definition: AASequence.h:113
OpenMS::MultiplexDeltaMassesGenerator::Label::description
String description
Definition: MultiplexDeltaMassesGenerator.h:73
OpenMS::MultiplexDeltaMassesGenerator::labels_
String labels_
isotopic labels
Definition: MultiplexDeltaMassesGenerator.h:183
String.h
OpenMS
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:46
DefaultParamHandler.h
OpenMS::MultiplexDeltaMassesGenerator::delta_masses_list_
std::vector< MultiplexDeltaMasses > delta_masses_list_
list of all possible mass shift patterns
Definition: MultiplexDeltaMassesGenerator.h:203
OpenMS::MultiplexDeltaMassesGenerator::Label
complete label information
Definition: MultiplexDeltaMassesGenerator.h:69
OpenMS::MultiplexDeltaMassesGenerator::label_master_list_
std::vector< Label > label_master_list_
master list of all labels
Definition: MultiplexDeltaMassesGenerator.h:208
OpenMS::MultiplexDeltaMassesGenerator::samples_labels_
std::vector< std::vector< String > > samples_labels_
list of samples with their corresponding labels
Definition: MultiplexDeltaMassesGenerator.h:193
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:226
OpenMS::MultiplexDeltaMassesGenerator
generates complete list of all possible mass shifts due to isotopic labelling
Definition: MultiplexDeltaMassesGenerator.h:61
OpenMS::MultiplexDeltaMassesGenerator::labels_list_
std::vector< String > labels_list_
flat list of all occurring isotopic labels
Definition: MultiplexDeltaMassesGenerator.h:188