OpenMS
2.8.0
|
Simulates Protein ionization. More...
#include <OpenMS/SIMULATION/IonizationSimulation.h>
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... | |
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 DefaultParamHandler & | operator= (const DefaultParamHandler &rhs) |
Assignment operator. More... | |
virtual bool | operator== (const DefaultParamHandler &rhs) const |
Equality operator. More... | |
void | setParameters (const Param ¶m) |
Sets the parameters. More... | |
const Param & | getParameters () const |
Non-mutable access to the parameters. More... | |
const Param & | getDefaults () const |
Non-mutable access to the default parameters. More... | |
const String & | getName () 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... | |
virtual | ~ProgressLogger () |
Destructor. More... | |
ProgressLogger (const ProgressLogger &other) | |
Copy constructor. More... | |
ProgressLogger & | operator= (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... | |
void | nextProgress () const |
increment progress by 1 (according to range begin-end) More... | |
Constructors and Destructors | |
IonizationType | ionization_type_ |
ESI or MALDI ionization. More... | |
std::set< String > | basic_residues_ |
double | esi_probability_ |
Probability for the binomial distribution of ESI charge states. More... | |
std::vector< double > | esi_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< double > | maldi_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... | |
SimTypes::MutableSimRandomNumberGeneratorPtr | rnd_gen_ |
Random number generator. More... | |
IonizationSimulation (SimTypes::MutableSimRandomNumberGeneratorPtr) | |
IonizationSimulation (const IonizationSimulation &source) | |
Copy constructor. More... | |
~IonizationSimulation () override | |
Destructor. More... | |
IonizationSimulation & | operator= (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... | |
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) const |
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_ () override |
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... | |
Additional Inherited Members | |
Static Public Member Functions inherited from DefaultParamHandler | |
static void | writeParametersToMetaValues (const Param &write_this, MetaInfoInterface &write_here, const String &key_prefix="") |
Writes all parameters to meta values. More... | |
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... | |
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< String > | subsections_ |
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_ |
ProgressLoggerImpl * | current_logger_ |
Static Protected Attributes inherited from ProgressLogger | |
static int | recursion_depth_ |
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:Name | Type | Default | Restrictions | Description |
---|---|---|---|---|
ionization_type | string | ESI | MALDI, ESI | Type 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, Tyr | List 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 | int | 3 | 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 | float | 0.8 | Probability for the binomial distribution of the ESI charge states | |
maldi:ionization_probabilities | float list | [0.9, 0.1, 0.0] | List of probabilities for different charge states (starting at charge=1, 2, ...) during MALDI ionization (the list must sum up to 1.0) | |
mz:lower_measurement_limit | float | 200.0 | min: 0.0 | Lower m/z detector limit |
mz:upper_measurement_limit | float | 1200.0 | min: 0.0 | Upper m/z detector limit |
enum IonizationType |
Default constructor.
IonizationSimulation | ( | const IonizationSimulation & | source | ) |
Copy constructor.
|
override |
Destructor.
|
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.
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.
features | FeatureMap which will be ionized |
charge_consensus | ConsensusMap which groups children(=charge variants) of input-features |
experiment | SimTypes::MSSimExperiment map which contains the simulated experiment |
|
private |
ionize using ESI
|
private |
ionize using MALDI
|
inlineprivate |
check if feature is within mz bounds of detector
IonizationSimulation& operator= | ( | const IonizationSimulation & | source | ) |
Assignment operator.
|
private |
set defaults
|
private |
set meta values, mz etc after adducts are ready
|
overrideprivatevirtual |
Synchronize members with param class.
Reimplemented from DefaultParamHandler.
|
private |
|
private |
Corresponding table to esi_impurity_probabilities_
holding the actual element and its charge.
|
private |
Discrete distribution of impure charge adducts like Na+, K+, Ca++ etc besides the usual H+.
|
private |
Probability for the binomial distribution of ESI charge states.
|
private |
ESI or MALDI ionization.
|
private |
Preprocessed table of discrete distribution (MALDI charges)
|
private |
Maximal charge that any impure adduct from parameter list has.
|
private |
Maximum m/z detected by mass analyser.
|
private |
Minimum m/z detected by mass analyser.
|
protected |
Random number generator.