Simulates MS signals for a given set of peptides. More...
#include <OpenMS/SIMULATION/RawMSSignalSimulation.h>
Classes | |
| struct | ContaminantInfo |
Public Member Functions | |
| RawMSSignalSimulation & | operator= (const RawMSSignalSimulation &source) |
| void | loadContaminants () |
| void | generateRawSignals (FeatureMapSim &features, MSSimExperiment &experiment, MSSimExperiment &experiment_ct, FeatureMapSim &contaminants) |
| fill experiment with signals and noise More... | |
Constructors and Destructors | |
| RawMSSignalSimulation (const SimRandomNumberGenerator &rng) | |
| Constructor taking a random generator. More... | |
| RawMSSignalSimulation (const RawMSSignalSimulation &source) | |
| Copy constructor. More... | |
| virtual | ~RawMSSignalSimulation () |
| 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 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... | |
| ~ProgressLogger () | |
| Destructor. 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 Types | |
| enum | IONIZATIONMETHOD { IM_ESI = 0, IM_MALDI = 1, IM_ALL = 2 } |
| enum | PROFILESHAPE { RT_RECTANGULAR, RT_GAUSSIAN } |
| enum | RESOLUTIONMODEL { RES_CONSTANT, RES_LINEAR, RES_SQRT } |
Protected Member Functions | |
| RawMSSignalSimulation () | |
| Default constructor. More... | |
| void | updateMembers_ () |
| Synchronize members with param class. More... | |
| void | setDefaultParams_ () |
| Set default parameters. More... | |
| void | add1DSignal_ (Feature &feature, MSSimExperiment &experiment, MSSimExperiment &experiment_ct) |
| Add a 1D signal for a single feature. More... | |
| void | add2DSignal_ (Feature &feature, MSSimExperiment &experiment, MSSimExperiment &experiment_ct) |
| Add a 2D signal for a single feature. More... | |
| void | samplePeptideModel1D_ (const IsotopeModel &iso, const SimCoordinateType mz_start, const SimCoordinateType mz_end, MSSimExperiment &experiment, MSSimExperiment &experiment_ct, Feature &activeFeature) |
| Samples signals for the given 1D model. More... | |
| void | samplePeptideModel2D_ (const ProductModel< 2 > &pm, const SimCoordinateType mz_start, const SimCoordinateType mz_end, SimCoordinateType rt_start, SimCoordinateType rt_end, MSSimExperiment &experiment, MSSimExperiment &experiment_ct, Feature &activeFeature) |
| Samples signals for the given 2D model. More... | |
| void | chooseElutionProfile_ (EGHModel *const elutionmodel, Feature &feature, const double scale, const DoubleReal rt_sampling_rate, const MSSimExperiment &experiment) |
| Add the correct Elution profile to the passed ProductModel. More... | |
| void | createContaminants_ (FeatureMapSim &contaminants, MSSimExperiment &exp, MSSimExperiment &exp_ct) |
| build contaminant feature map More... | |
| void | addShotNoise_ (MSSimExperiment &experiment, SimCoordinateType minimal_mz_measurement_limit, SimCoordinateType maximal_mz_measurement_limit) |
| Add shot noise to the experiment. More... | |
| void | addWhiteNoise_ (MSSimExperiment &experiment) |
| Add white noise to the experiment. More... | |
| void | addDetectorNoise_ (MSSimExperiment &experiment) |
| Add detector noise to the experiment. More... | |
| void | addBaseLine_ (MSSimExperiment &experiment, SimCoordinateType minimal_mz_measurement_limit) |
| Add a base line to the experiment. More... | |
| void | getSamplingGrid_ (std::vector< SimCoordinateType > &grid, const SimCoordinateType mz_min, const SimCoordinateType mz_max, const Int step_Da) |
| get the mz grid where all m/z values will be mapped to More... | |
| void | compressSignals_ (MSSimExperiment &experiment) |
| Compress signales in a single RT scan (to merge signals which were sampled overlapping) More... | |
| SimIntensityType | getFeatureScaledIntensity_ (const SimIntensityType feature_intensity, const SimIntensityType natural_scaling_factor) |
Computes a rescaled feature intensity based on the set parameters for feature intensity scaling and the passed parameter natural_scaling_factor. More... | |
| DoubleReal | getResolution_ (const DoubleReal query_mz, const DoubleReal resolution, const RESOLUTIONMODEL model) const |
| Compute resolution at a given m/z given a base resolution and how it degrades with increasing m/z. More... | |
| DoubleReal | getPeakWidth_ (const DoubleReal mz, const bool is_gaussian) const |
| compute the peak's SD (Gaussian) at a given m/z (internally the resolution model is used) More... | |
Protected Member Functions inherited from DefaultParamHandler | |
| void | defaultsToParam_ () |
| Updates the parameters after the defaults have been set in the constructor. More... | |
Protected Attributes | |
| Int | sampling_points_per_FWHM_ |
| number of points sampled per peak's FWHM More... | |
| SimCoordinateType | mz_error_mean_ |
| Mean of peak m/z error. More... | |
| SimCoordinateType | mz_error_stddev_ |
| Standard deviation of peak m/z error. More... | |
| SimIntensityType | intensity_scale_ |
| Scaling factor of peak intensities. More... | |
| SimIntensityType | intensity_scale_stddev_ |
| Standard deviation of peak intensity scaling. More... | |
| RESOLUTIONMODEL | res_model_ |
| model of how resolution behaves with increasing m/z More... | |
| DoubleReal | res_base_ |
| base resolution at 400 Th More... | |
| std::vector< SimCoordinateType > | grid_ |
| m/z sampling grid for all signals More... | |
| SimRandomNumberGenerator const * | rnd_gen_ |
| Random number generator. More... | |
| std::vector< ContaminantInfo > | contaminants_ |
| std::vector< std::vector < double > > | threaded_random_numbers_ |
| std::vector< Size > | threaded_random_numbers_index_ |
| bool | contaminants_loaded_ |
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_ |
| SignedSize | begin_ |
| SignedSize | end_ |
| SignedSize | value_ |
| QProgressDialog * | dlg_ |
| StopWatch | stop_watch_ |
| time_t | last_invoke_ |
Static Protected Attributes | |
| static const Size | THREADED_RANDOM_NUMBER_POOL_SIZE_ = 500 |
Static Protected Attributes inherited from ProgressLogger | |
| static int | recursion_depth_ |
Additional Inherited Members | |
Public Types inherited from ProgressLogger | |
| enum | LogType { CMD, GUI, NONE } |
| Possible log types. More... | |
Simulates MS signals for a given set of peptides.
Simulates MS signals for a given set of peptides, with charge annotation, given detectabilities, predicted retention times and charge values.
Parameters of this class are:| Name | Type | Default | Restrictions | Description |
|---|---|---|---|---|
| enabled | string | true | true, false | Enable RAW signal simulation? (select 'false' if you only need feature-maps) |
| ionization_type | string | ESI | MALDI, ESI | Type of Ionization (MALDI or ESI) |
| peak_shape | string | Gaussian | Gaussian, Lorentzian | Peak Shape used around each isotope peak (be aware that the area under the curve is constant for both types, but the maximal height will differ (~ 2:3 = Lorentz:Gaussian) due to the wider base of the Lorentzian. |
| resolution:value | int | 50000 | Instrument resolution at 400 Th. | |
| resolution:type | string | linear | constant, linear, sqrt | How does resolution change with increasing m/z?! QTOFs usually show 'constant' behavior, FTs have linear degradation, and on Orbitraps the resolution decreases with square root of mass. |
| baseline:scaling | float | 0 | min: 0 | Scale of baseline. Set to 0 to disable simulation of baseline. |
| baseline:shape | float | 0.5 | min: 0 | The baseline is modeled by an exponential probability density function (pdf) with f(x) = shape*e^(- shape*x) |
| mz:sampling_points | int | 3 | min: 2 | Number of raw data points per FWHM of the peak. |
| contaminants:file | string | examples/simulation/contaminants.csv | Contaminants file with sum formula and absolute RT interval. See 'OpenMS/examples/simulation/contaminants.txt' for details. | |
| variation:mz:error_stddev | float | 0 | Standard deviation for m/z errors. Set to 0 to disable simulation of m/z errors. | |
| variation:mz:error_mean | float | 0 | Average systematic m/z error (Da) | |
| variation:intensity:scale | float | 100 | min: 0 | Constant scale factor of the feature intensity. Set to 1.0 to get the real intensity values provided in the FASTA file. |
| variation:intensity:scale_stddev | float | 0 | min: 0 | Standard deviation of peak intensity (relative to the scaled peak height). Set to 0 to get simple rescaled intensities. |
| noise:shot:rate | float | 0 | min: 0 | Poisson rate of shot noise per unit m/z. Set this to 0 to disable simulation of shot noise. |
| noise:shot:intensity-mean | float | 1 | Shot noise intensity mean (exponentially distributed with given mean). | |
| noise:white:mean | float | 0 | Mean value of white noise being added to each measured signal. | |
| noise:white:stddev | float | 0 | Standard deviation of white noise being added to each measured signal. | |
| noise:detector:mean | float | 0 | Mean value of the detector noise being added to the complete measurement. | |
| noise:detector:stddev | float | 0 | Standard deviation of the detector noise being added to the complete measurement. |
|
protected |
|
protected |
|
protected |
| RawMSSignalSimulation | ( | const SimRandomNumberGenerator & | rng | ) |
Constructor taking a random generator.
| RawMSSignalSimulation | ( | const RawMSSignalSimulation & | source | ) |
Copy constructor.
|
virtual |
Destructor.
|
protected |
Default constructor.
|
protected |
Add a 1D signal for a single feature.
| feature | The feature which should be simulated |
| experiment | The experiment to which the simulated signals should be added |
| experiment_ct | Ground truth for picked peaks |
|
protected |
Add a 2D signal for a single feature.
| feature | The feature which should be simulated |
| experiment | The experiment to which the simulated signals should be added |
| experiment_ct | Ground truth for picked peaks |
|
protected |
Add a base line to the experiment.
|
protected |
Add detector noise to the experiment.
|
protected |
Add shot noise to the experiment.
|
protected |
Add white noise to the experiment.
|
protected |
Add the correct Elution profile to the passed ProductModel.
|
protected |
Compress signales in a single RT scan (to merge signals which were sampled overlapping)
|
protected |
build contaminant feature map
| void generateRawSignals | ( | FeatureMapSim & | features, |
| MSSimExperiment & | experiment, | ||
| MSSimExperiment & | experiment_ct, | ||
| FeatureMapSim & | contaminants | ||
| ) |
fill experiment with signals and noise
|
protected |
Computes a rescaled feature intensity based on the set parameters for feature intensity scaling and the passed parameter natural_scaling_factor.
| feature_intensity | Intensity of the current feature. |
| natural_scaling_factor | Additional scaling factor used by some of the sampling models. |
|
protected |
compute the peak's SD (Gaussian) at a given m/z (internally the resolution model is used)
|
protected |
Compute resolution at a given m/z given a base resolution and how it degrades with increasing m/z.
| query_mz | The m/z value where the resolution should be estimated |
| resolution | The resolution at 400 Th |
| model | The model describing how resolution behaves, i.e.
|
|
protected |
get the mz grid where all m/z values will be mapped to
| void loadContaminants | ( | ) |
load the contaminants from contaminants:file param You do not have to call this function before calling generateRawSignals(), but it might be useful to check if the contaminant file is valid
| RawMSSignalSimulation& operator= | ( | const RawMSSignalSimulation & | source | ) |
|
protected |
Samples signals for the given 1D model.
| iso | The isotope model from which the signals will be sampled |
| mz_start | Start coordinate (in m/z dimension) of the region where the signals will be sampled |
| mz_end | End coordinate (in m/z dimension) of the region where the signals will be sampled |
| experiment | Experiment to which the sampled signals will be added |
| experiment_ct | Experiment to which the centroided Ground Truth sampled signals will be added |
| activeFeature | The current feature that is simulated |
|
protected |
Samples signals for the given 2D model.
| pm | The product model from which the signals will be sampled |
| mz_start | Start coordinate (in m/z dimension) of the region where the signals will be sampled |
| mz_end | End coordinate (in m/z dimension) of the region where the signals will be sampled |
| rt_start | Start coordinate (in rt dimension) of the region where the signals will be sampled |
| rt_end | End coordinate (in rt dimension) of the region where the signals will be sampled |
| experiment | Experiment to which the sampled signals will be added |
| experiment_ct | Experiment to which the centroided Ground Truth sampled signals will be added |
| activeFeature | The current feature that is simulated |
|
protected |
Set default parameters.
|
protectedvirtual |
Synchronize members with param class.
Reimplemented from DefaultParamHandler.
|
protected |
|
protected |
|
protected |
m/z sampling grid for all signals
|
protected |
Scaling factor of peak intensities.
|
protected |
Standard deviation of peak intensity scaling.
|
protected |
Mean of peak m/z error.
|
protected |
Standard deviation of peak m/z error.
|
protected |
base resolution at 400 Th
|
protected |
model of how resolution behaves with increasing m/z
|
protected |
Random number generator.
|
protected |
number of points sampled per peak's FWHM
|
staticprotected |
|
protected |
threaded_random_numbers keeps a set of random numbers for each thread simulating a feature.
|
protected |
Indicates which random numbers each thread has used already and if the random number pool should be rebuild.
| OpenMS / TOPP release 1.11.1 | Documentation generated on Thu Nov 14 2013 11:19:33 using doxygen 1.8.5 |