OpenMS
MultiplexDeltaMassesGenerator.h
Go to the documentation of this file.
1 // Copyright (c) 2002-2023, The OpenMS Team -- 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 
16 
17 #include <vector>
18 #include <algorithm>
19 #include <iosfwd>
20 
21 
22 namespace OpenMS
23 {
34  class OPENMS_DLLAPI MultiplexDeltaMassesGenerator :
35  public DefaultParamHandler
36  {
37  public:
38 
42  struct OPENMS_DLLAPI Label
43  {
47  double delta_mass;
48 
49  Label(String sn, String ln, String d, double dm);
50  };
51 
56 
66  MultiplexDeltaMassesGenerator(String labels, int missed_cleavages, std::map<String,double> label_mass_shift);
67 
73 
81  void printSamplesLabelsList(std::ostream &stream) const;
82 
95  void printDeltaMassesList(std::ostream &stream) const;
96 
102  std::vector<MultiplexDeltaMasses> getDeltaMassesList();
103 
107  const std::vector<MultiplexDeltaMasses>& getDeltaMassesList() const;
108 
116  std::vector<std::vector<String> > getSamplesLabelsList();
117 
125  const std::vector<std::vector<String> >& getSamplesLabelsList() const;
126 
132  String getLabelShort(const String& label);
133 
139  String getLabelLong(const String& label);
140 
150 
151  private:
152 
157 
161  std::vector<String> labels_list_;
162 
166  std::vector<std::vector<String> > samples_labels_;
167 
172 
176  std::vector<MultiplexDeltaMasses> delta_masses_list_;
177 
181  std::vector<Label> label_master_list_;
182 
187  std::map<String, double> label_delta_mass_;
188 
193  std::map<String, String> label_short_long_;
194 
199  std::map<String, String> label_long_short_;
200 
205  };
206 
207 }
208 
Representation of a peptide/protein sequence.
Definition: AASequence.h:86
A base class for all classes handling default parameters.
Definition: DefaultParamHandler.h:66
generates complete list of all possible mass shifts due to isotopic labelling
Definition: MultiplexDeltaMassesGenerator.h:36
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:193
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:171
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:181
String labels_
isotopic labels
Definition: MultiplexDeltaMassesGenerator.h:156
std::vector< MultiplexDeltaMasses > delta_masses_list_
list of all possible mass shift patterns
Definition: MultiplexDeltaMassesGenerator.h:176
std::vector< String > labels_list_
flat list of all occurring isotopic labels
Definition: MultiplexDeltaMassesGenerator.h:161
void fillLabelMasterList_()
fill label master list
std::vector< std::vector< String > > samples_labels_
list of samples with their corresponding labels
Definition: MultiplexDeltaMassesGenerator.h:166
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:199
std::map< String, double > label_delta_mass_
mapping from single label to delta mass e.g. "Arg10" -> 10.0082686
Definition: MultiplexDeltaMassesGenerator.h:187
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:46
A more convenient string class.
Definition: String.h:34
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:22
complete label information
Definition: MultiplexDeltaMassesGenerator.h:43
String short_name
Definition: MultiplexDeltaMassesGenerator.h:44
String description
Definition: MultiplexDeltaMassesGenerator.h:46
double delta_mass
Definition: MultiplexDeltaMassesGenerator.h:47
String long_name
Definition: MultiplexDeltaMassesGenerator.h:45
Label(String sn, String ln, String d, double dm)