Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
IonizationSimulation.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-2017.
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: Chris Bielow$
32 // $Authors: Stephan Aiche, Chris Bielow$
33 // --------------------------------------------------------------------------
34 
35 #ifndef OPENMS_SIMULATION_IONIZATIONSIMULATION_H
36 #define OPENMS_SIMULATION_IONIZATIONSIMULATION_H
37 
43 
44 // STL includes
45 #include <set>
46 
47 namespace OpenMS
48 {
49 
64  class OPENMS_DLLAPI IonizationSimulation :
65  public DefaultParamHandler,
66  public ProgressLogger
67  {
68 
69 public:
71  typedef enum
72  {
74  ESI
76 
79 
85 
88 
90  virtual ~IonizationSimulation();
92 
94  IonizationSimulation& operator=(const IonizationSimulation& source);
95 
106  void ionize(SimTypes::FeatureMapSim& features, ConsensusMap& charge_consensus, SimTypes::MSSimExperiment& experiment);
107 
108 private:
109  class CompareCmpByEF_;
110 
112  void ionizeEsi_(SimTypes::FeatureMapSim&, ConsensusMap& charge_consensus);
113 
115  void ionizeMaldi_(SimTypes::FeatureMapSim&, ConsensusMap& charge_consensus);
116 
118  inline bool isFeatureValid_(const Feature& feature);
119 
121  void setFeatureProperties_(Feature& f,
122  const double& adduct_mass,
123  const String& adduct_formula,
124  const SimTypes::SimChargeType charge,
125  const SimTypes::SimIntensityType new_intensity,
126  const Size parent_index);
127 
129  void setDefaultParams_();
130 
132  void updateMembers_();
133 
139  UInt countIonizedResidues_(const AASequence&) const;
140 
141 
142  // Members //
143 
145  IonizationType ionization_type_;
146 
147  /*
148  @brief List of residues that are counted as basic during execution of countBasicResidues_
149 */
150  std::set<String> basic_residues_;
151 
156 
160  std::vector<double> esi_impurity_probabilities_;
161 
162 
167 
172 
176  std::vector<double> maldi_probabilities_;
177 
182 
183 protected:
186  };
187 
188 }
189 
190 #endif // OPENMS_SIMULATION_IONIZATIONSIMULATION_H
191 
SimTypes::SimCoordinateType maximal_mz_measurement_limit_
Maximum m/z detected by mass analyser.
Definition: IonizationSimulation.h:179
SimTypes::MutableSimRandomNumberGeneratorPtr rnd_gen_
Random number generator.
Definition: IonizationSimulation.h:185
A more convenient string class.
Definition: String.h:57
Simulates Protein ionization.
Definition: IonizationSimulation.h:64
double esi_probability_
Probability for the binomial distribution of ESI charge states.
Definition: IonizationSimulation.h:155
A container for features.
Definition: FeatureMap.h:94
unsigned int UInt
Unsigned integer type.
Definition: Types.h:95
IonizationType
possible ionization methods
Definition: IonizationSimulation.h:71
boost::shared_ptr< SimRandomNumberGenerator > MutableSimRandomNumberGeneratorPtr
Definition: SimTypes.h:175
A container for consensus elements.
Definition: ConsensusMap.h:72
Representation of a peptide/protein sequence.
Definition: AASequence.h:108
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47
SimTypes::SimCoordinateType minimal_mz_measurement_limit_
Minimum m/z detected by mass analyser.
Definition: IonizationSimulation.h:181
std::vector< Adduct > AdductsType
Definition: Adduct.h:49
Size max_adduct_charge_
Maximal charge that any impure adduct from parameter list has.
Definition: IonizationSimulation.h:171
std::vector< double > esi_impurity_probabilities_
Discrete distribution of impure charge adducts like Na+, K+, Ca++ etc besides the usual H+...
Definition: IonizationSimulation.h:160
std::set< String > basic_residues_
Definition: IonizationSimulation.h:150
Adduct::AdductsType esi_adducts_
Corresponding table to esi_impurity_probabilities_ holding the actual element and its charge...
Definition: IonizationSimulation.h:166
std::vector< double > maldi_probabilities_
Preprocessed table of discrete distribution (MALDI charges)
Definition: IonizationSimulation.h:176
An LC-MS feature.
Definition: Feature.h:70
IonizationType ionization_type_
ESI or MALDI ionization.
Definition: IonizationSimulation.h:145
Feature::ChargeType SimChargeType
Charge of a peptide.
Definition: SimTypes.h:66
In-Memory representation of a mass spectrometry experiment.
Definition: MSExperiment.h:82
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:128
Base class for all classes that want to report their progress.
Definition: ProgressLogger.h:55
A base class for all classes handling default parameters.
Definition: DefaultParamHandler.h:92
Definition: IonizationSimulation.h:73

OpenMS / TOPP release 2.3.0 Documentation generated on Tue Jan 9 2018 18:22:01 using doxygen 1.8.13