Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
Public Types | Public Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
IonizationSimulation Class Reference

Simulates Protein ionization. More...

#include <OpenMS/SIMULATION/IonizationSimulation.h>

Inheritance diagram for IonizationSimulation:
DefaultParamHandler ProgressLogger

Public Types

enum  IonizationType { MALDI, ESI }
 possible ionization methods More...
 
- Public Types inherited from ProgressLogger
enum  LogType { CMD, GUI, NONE }
 Possible log types. More...
 

Public Member Functions

 IonizationSimulation ()
 Default constructor. More...
 
IonizationSimulationoperator= (const IonizationSimulation &source)
 Assignment operator. More...
 
void ionize (SimTypes::FeatureMapSim &features, ConsensusMap &charge_consensus, SimTypes::MSSimExperiment &experiment)
 Ionize all peptide features inside the Feature-Map. More...
 
Constructors and Destructors
 IonizationSimulation (SimTypes::MutableSimRandomNumberGeneratorPtr)
 
 IonizationSimulation (const IonizationSimulation &source)
 Copy constructor. More...
 
virtual ~IonizationSimulation ()
 Destructor. More...
 
- Public Member Functions inherited from DefaultParamHandler
 DefaultParamHandler (const String &name)
 Constructor with name that is displayed in error messages. More...
 
 DefaultParamHandler (const DefaultParamHandler &rhs)
 Copy constructor. More...
 
virtual ~DefaultParamHandler ()
 Destructor. More...
 
virtual DefaultParamHandleroperator= (const DefaultParamHandler &rhs)
 Assignment operator. More...
 
virtual bool operator== (const DefaultParamHandler &rhs) const
 Equality operator. More...
 
void setParameters (const Param &param)
 Sets the parameters. More...
 
const ParamgetParameters () const
 Non-mutable access to the parameters. More...
 
const ParamgetDefaults () const
 Non-mutable access to the default parameters. More...
 
const StringgetName () const
 Non-mutable access to the name. More...
 
void setName (const String &name)
 Mutable access to the name. More...
 
const std::vector< String > & getSubsections () const
 Non-mutable access to the registered subsections. More...
 
- Public Member Functions inherited from ProgressLogger
 ProgressLogger ()
 Constructor. More...
 
 ~ProgressLogger ()
 Destructor. More...
 
 ProgressLogger (const ProgressLogger &other)
 Copy constructor. More...
 
ProgressLoggeroperator= (const ProgressLogger &other)
 Assignment Operator. More...
 
void setLogType (LogType type) const
 Sets the progress log that should be used. The default type is NONE! More...
 
LogType getLogType () const
 Returns the type of progress log being used. More...
 
void startProgress (SignedSize begin, SignedSize end, const String &label) const
 Initializes the progress display. More...
 
void setProgress (SignedSize value) const
 Sets the current progress. More...
 
void endProgress () const
 Ends the progress display. More...
 

Protected Attributes

SimTypes::MutableSimRandomNumberGeneratorPtr rnd_gen_
 Random number generator. More...
 
- Protected Attributes inherited from DefaultParamHandler
Param param_
 Container for current parameters. More...
 
Param defaults_
 Container for default parameters. This member should be filled in the constructor of derived classes! More...
 
std::vector< Stringsubsections_
 Container for registered subsections. This member should be filled in the constructor of derived classes! More...
 
String error_name_
 Name that is displayed in error messages during the parameter checking. More...
 
bool check_defaults_
 If this member is set to false no checking if parameters in done;. More...
 
bool warn_empty_defaults_
 If this member is set to false no warning is emitted when defaults are empty;. More...
 
- Protected Attributes inherited from ProgressLogger
LogType type_
 
time_t last_invoke_
 
ProgressLoggerImplcurrent_logger_
 

Private Member Functions

void ionizeEsi_ (SimTypes::FeatureMapSim &, ConsensusMap &charge_consensus)
 ionize using ESI More...
 
void ionizeMaldi_ (SimTypes::FeatureMapSim &, ConsensusMap &charge_consensus)
 ionize using MALDI More...
 
bool isFeatureValid_ (const Feature &feature)
 check if feature is within mz bounds of detector More...
 
void setFeatureProperties_ (Feature &f, const double &adduct_mass, const String &adduct_formula, const SimTypes::SimChargeType charge, const SimTypes::SimIntensityType new_intensity, const Size parent_index)
 set meta values, mz etc after adducts are ready More...
 
void setDefaultParams_ ()
 set defaults More...
 
void updateMembers_ ()
 Synchronize members with param class. More...
 
UInt countIonizedResidues_ (const AASequence &) const
 counts all basic residues inside the amino acid sequence to give an upper bound on the maximal charge during ESI ionization More...
 

Private Attributes

IonizationType ionization_type_
 ESI or MALDI ionization. More...
 
std::set< Stringbasic_residues_
 
double esi_probability_
 Probability for the binomial distribution of ESI charge states. More...
 
std::vector< doubleesi_impurity_probabilities_
 Discrete distribution of impure charge adducts like Na+, K+, Ca++ etc besides the usual H+. More...
 
Adduct::AdductsType esi_adducts_
 Corresponding table to esi_impurity_probabilities_ holding the actual element and its charge. More...
 
Size max_adduct_charge_
 Maximal charge that any impure adduct from parameter list has. More...
 
std::vector< doublemaldi_probabilities_
 Preprocessed table of discrete distribution (MALDI charges) More...
 
SimTypes::SimCoordinateType maximal_mz_measurement_limit_
 Maximum m/z detected by mass analyser. More...
 
SimTypes::SimCoordinateType minimal_mz_measurement_limit_
 Minimum m/z detected by mass analyser. More...
 

Additional Inherited Members

- Protected Member Functions inherited from DefaultParamHandler
void defaultsToParam_ ()
 Updates the parameters after the defaults have been set in the constructor. More...
 
- Static Protected Member Functions inherited from ProgressLogger
static String logTypeToFactoryName_ (LogType type)
 Return the name of the factory product used for this log type. More...
 
- Static Protected Attributes inherited from ProgressLogger
static int recursion_depth_
 

Detailed Description

Simulates Protein ionization.

Supports ESI and MALDI. The abundance values are distributed among the charge states based on a binomial distribution for the ESI and based on discrete distribution for MALDI. In ESI mode, this class also supports different adduct types in addition to H+ (e.g. NH4+, K+) which can be specified by the user and influence the mass and induce more charge variation.

Parameters of this class are:

NameTypeDefaultRestrictionsDescription
ionization_type stringESI MALDI, ESIType of Ionization (MALDI or ESI)
esi:ionized_residues string list[Arg, Lys, His] Ala, Cys, Asp, Glu, Phe, Gly, His, Ile, Lys, Leu, Met, Asn, Pro, Gln, Arg, Sec, Ser, Thr, Val, Trp, TyrList of residues (as three letter code) that will be considered during ES ionization. The N-term is always assumed to carry a charge. This parameter will be ignored during MALDI ionization.
esi:charge_impurity string list[H+:1]  List of charged ions that contribute to charge with weight of occurrence (their sum is scaled to 1 internally), e.g. ['H:1'] or ['H:0.7' 'Na:0.3'], ['H:4' 'Na:1'] (which internally translates to ['H:0.8' 'Na:0.2'])
esi:max_impurity_set_size int3  Maximal @#combinations of charge impurities allowed (each generating one feature) per charge state. E.g. assuming charge=3 and this parameter is 2, then we could choose to allow '3H+, 2H+Na+' features (given a certain 'charge_impurity' constraints), but no '3H+, 2H+Na+, 3Na+'
esi:ionization_probability float0.8  Probability for the binomial distribution of the ESI charge states
maldi:ionization_probabilities float list[0.9, 0.1]  List of probabilities for the different charge states during MALDI ionization (the list must sum up to 1.0)
mz:lower_measurement_limit float200 min: 0Lower m/z detector limit.
mz:upper_measurement_limit float2500 min: 0Upper m/z detector limit.

Note:

Member Enumeration Documentation

◆ IonizationType

possible ionization methods

Enumerator
MALDI 
ESI 

Constructor & Destructor Documentation

◆ IonizationSimulation() [1/3]

Default constructor.

◆ IonizationSimulation() [2/3]

◆ IonizationSimulation() [3/3]

Copy constructor.

◆ ~IonizationSimulation()

virtual ~IonizationSimulation ( )
virtual

Destructor.

Member Function Documentation

◆ countIonizedResidues_()

UInt countIonizedResidues_ ( const AASequence ) const
private

counts all basic residues inside the amino acid sequence to give an upper bound on the maximal charge during ESI ionization

The N-term contributes +1 always. All other ionizable residues (according to param "esi:ionized_residues") in the sequence are summed up.

◆ ionize()

void ionize ( SimTypes::FeatureMapSim features,
ConsensusMap charge_consensus,
SimTypes::MSSimExperiment experiment 
)

Ionize all peptide features inside the Feature-Map.

Depending on the parameters the passed peptide features are ionized by MALDI or by ESI.

Parameters
featuresFeatureMap which will be ionized
charge_consensusConsensusMap which groups children(=charge variants) of input-features
experimentSimTypes::MSSimExperiment map which contains the simulated experiment

◆ ionizeEsi_()

void ionizeEsi_ ( SimTypes::FeatureMapSim ,
ConsensusMap charge_consensus 
)
private

ionize using ESI

◆ ionizeMaldi_()

void ionizeMaldi_ ( SimTypes::FeatureMapSim ,
ConsensusMap charge_consensus 
)
private

ionize using MALDI

◆ isFeatureValid_()

bool isFeatureValid_ ( const Feature feature)
inlineprivate

check if feature is within mz bounds of detector

◆ operator=()

IonizationSimulation& operator= ( const IonizationSimulation source)

Assignment operator.

◆ setDefaultParams_()

void setDefaultParams_ ( )
private

set defaults

◆ setFeatureProperties_()

void setFeatureProperties_ ( Feature f,
const double adduct_mass,
const String adduct_formula,
const SimTypes::SimChargeType  charge,
const SimTypes::SimIntensityType  new_intensity,
const Size  parent_index 
)
private

set meta values, mz etc after adducts are ready

◆ updateMembers_()

void updateMembers_ ( )
privatevirtual

Synchronize members with param class.

Reimplemented from DefaultParamHandler.

Member Data Documentation

◆ basic_residues_

std::set<String> basic_residues_
private

◆ esi_adducts_

Adduct::AdductsType esi_adducts_
private

Corresponding table to esi_impurity_probabilities_ holding the actual element and its charge.

◆ esi_impurity_probabilities_

std::vector<double> esi_impurity_probabilities_
private

Discrete distribution of impure charge adducts like Na+, K+, Ca++ etc besides the usual H+.

◆ esi_probability_

double esi_probability_
private

Probability for the binomial distribution of ESI charge states.

◆ ionization_type_

IonizationType ionization_type_
private

ESI or MALDI ionization.

◆ maldi_probabilities_

std::vector<double> maldi_probabilities_
private

Preprocessed table of discrete distribution (MALDI charges)

◆ max_adduct_charge_

Size max_adduct_charge_
private

Maximal charge that any impure adduct from parameter list has.

◆ maximal_mz_measurement_limit_

SimTypes::SimCoordinateType maximal_mz_measurement_limit_
private

Maximum m/z detected by mass analyser.

◆ minimal_mz_measurement_limit_

SimTypes::SimCoordinateType minimal_mz_measurement_limit_
private

Minimum m/z detected by mass analyser.

◆ rnd_gen_

Random number generator.


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