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 | |
Constructors and Destructors | |
| RawMSSignalSimulation (const SimRandomNumberGenerator &rng) | |
| Constructor taking a random generator. | |
| RawMSSignalSimulation (const RawMSSignalSimulation &source) | |
| Copy constructor. | |
| virtual | ~RawMSSignalSimulation () |
| Destructor. | |
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. | |
| void | updateMembers_ () |
| Synchronize members with param class. | |
| void | setDefaultParams_ () |
| Set default parameters. | |
| void | add1DSignal_ (Feature &feature, MSSimExperiment &experiment, MSSimExperiment &experiment_ct) |
| Add a 1D signal for a single feature. | |
| void | add2DSignal_ (Feature &feature, MSSimExperiment &experiment, MSSimExperiment &experiment_ct) |
| Add a 2D signal for a single feature. | |
| 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. | |
| 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. | |
| 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. | |
| void | createContaminants_ (FeatureMapSim &contaminants, MSSimExperiment &exp, MSSimExperiment &exp_ct) |
| build contaminant feature map | |
| void | addShotNoise_ (MSSimExperiment &experiment, SimCoordinateType minimal_mz_measurement_limit, SimCoordinateType maximal_mz_measurement_limit) |
| Add shot noise to the experiment. | |
| void | addWhiteNoise_ (MSSimExperiment &experiment) |
| Add white noise to the experiment. | |
| void | addDetectorNoise_ (MSSimExperiment &experiment) |
| Add detector noise to the experiment. | |
| void | addBaseLine_ (MSSimExperiment &experiment, SimCoordinateType minimal_mz_measurement_limit) |
| Add a base line to the experiment. | |
| 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 | |
| void | compressSignals_ (MSSimExperiment &experiment) |
| Compress signales in a single RT scan (to merge signals which were sampled overlapping). | |
| 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. | |
| 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. | |
| 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) | |
Protected Attributes | |
| Int | sampling_points_per_FWHM_ |
| number of points sampled per peak's FWHM | |
| SimCoordinateType | mz_error_mean_ |
| Mean of peak m/z error. | |
| SimCoordinateType | mz_error_stddev_ |
| Standard deviation of peak m/z error. | |
| SimIntensityType | intensity_scale_ |
| Scaling factor of peak intensities. | |
| SimIntensityType | intensity_scale_stddev_ |
| Standard deviation of peak intensity scaling. | |
| RESOLUTIONMODEL | res_model_ |
| model of how resolution behaves with increasing m/z | |
| DoubleReal | res_base_ |
| base resolution at 400 Th | |
| std::vector< SimCoordinateType > | grid_ |
| m/z sampling grid for all signals | |
| SimRandomNumberGenerator const * | rnd_gen_ |
| Random number generator. | |
| std::vector< ContaminantInfo > | contaminants_ |
| std::vector< std::vector < double > > | threaded_random_numbers_ |
| std::vector< Size > | threaded_random_numbers_index_ |
| bool | contaminants_loaded_ |
Static Protected Attributes | |
| static const Size | THREADED_RANDOM_NUMBER_POOL_SIZE_ = 500 |
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. |
enum IONIZATIONMETHOD [protected] |
enum PROFILESHAPE [protected] |
enum RESOLUTIONMODEL [protected] |
| RawMSSignalSimulation | ( | const SimRandomNumberGenerator & | rng | ) |
Constructor taking a random generator.
| RawMSSignalSimulation | ( | const RawMSSignalSimulation & | source | ) |
Copy constructor.
| virtual ~RawMSSignalSimulation | ( | ) | [virtual] |
Destructor.
| RawMSSignalSimulation | ( | ) | [protected] |
Default constructor.
| void add1DSignal_ | ( | Feature & | feature, | |
| MSSimExperiment & | experiment, | |||
| MSSimExperiment & | experiment_ct | |||
| ) | [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 |
| void add2DSignal_ | ( | Feature & | feature, | |
| MSSimExperiment & | experiment, | |||
| MSSimExperiment & | experiment_ct | |||
| ) | [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 |
| void addBaseLine_ | ( | MSSimExperiment & | experiment, | |
| SimCoordinateType | minimal_mz_measurement_limit | |||
| ) | [protected] |
Add a base line to the experiment.
| void addDetectorNoise_ | ( | MSSimExperiment & | experiment | ) | [protected] |
Add detector noise to the experiment.
| void addShotNoise_ | ( | MSSimExperiment & | experiment, | |
| SimCoordinateType | minimal_mz_measurement_limit, | |||
| SimCoordinateType | maximal_mz_measurement_limit | |||
| ) | [protected] |
Add shot noise to the experiment.
| void addWhiteNoise_ | ( | MSSimExperiment & | experiment | ) | [protected] |
Add white noise to the experiment.
| void chooseElutionProfile_ | ( | EGHModel *const | elutionmodel, | |
| Feature & | feature, | |||
| const double | scale, | |||
| const DoubleReal | rt_sampling_rate, | |||
| const MSSimExperiment & | experiment | |||
| ) | [protected] |
Add the correct Elution profile to the passed ProductModel.
| void compressSignals_ | ( | MSSimExperiment & | experiment | ) | [protected] |
Compress signales in a single RT scan (to merge signals which were sampled overlapping).
| void createContaminants_ | ( | FeatureMapSim & | contaminants, | |
| MSSimExperiment & | exp, | |||
| MSSimExperiment & | exp_ct | |||
| ) | [protected] |
build contaminant feature map
| void generateRawSignals | ( | FeatureMapSim & | features, | |
| MSSimExperiment & | experiment, | |||
| MSSimExperiment & | experiment_ct, | |||
| FeatureMapSim & | contaminants | |||
| ) |
fill experiment with signals and noise
| SimIntensityType getFeatureScaledIntensity_ | ( | const SimIntensityType | feature_intensity, | |
| const SimIntensityType | natural_scaling_factor | |||
| ) | [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. |
| DoubleReal getPeakWidth_ | ( | const DoubleReal | mz, | |
| const bool | is_gaussian | |||
| ) | const [protected] |
compute the peak's SD (Gaussian) at a given m/z (internally the resolution model is used)
| DoubleReal getResolution_ | ( | const DoubleReal | query_mz, | |
| const DoubleReal | resolution, | |||
| const RESOLUTIONMODEL | model | |||
| ) | const [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.
|
| void getSamplingGrid_ | ( | std::vector< SimCoordinateType > & | grid, | |
| const SimCoordinateType | mz_min, | |||
| const SimCoordinateType | mz_max, | |||
| const Int | step_Da | |||
| ) | [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 | ) |
| void samplePeptideModel1D_ | ( | const IsotopeModel & | iso, | |
| const SimCoordinateType | mz_start, | |||
| const SimCoordinateType | mz_end, | |||
| MSSimExperiment & | experiment, | |||
| MSSimExperiment & | experiment_ct, | |||
| Feature & | activeFeature | |||
| ) | [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 |
| 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 | |||
| ) | [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 |
| void setDefaultParams_ | ( | ) | [protected] |
Set default parameters.
| void updateMembers_ | ( | ) | [protected] |
Synchronize members with param class.
std::vector<ContaminantInfo> contaminants_ [protected] |
bool contaminants_loaded_ [protected] |
std::vector<SimCoordinateType> grid_ [protected] |
m/z sampling grid for all signals
SimIntensityType intensity_scale_ [protected] |
Scaling factor of peak intensities.
SimIntensityType intensity_scale_stddev_ [protected] |
Standard deviation of peak intensity scaling.
SimCoordinateType mz_error_mean_ [protected] |
Mean of peak m/z error.
SimCoordinateType mz_error_stddev_ [protected] |
Standard deviation of peak m/z error.
DoubleReal res_base_ [protected] |
base resolution at 400 Th
RESOLUTIONMODEL res_model_ [protected] |
model of how resolution behaves with increasing m/z
SimRandomNumberGenerator const* rnd_gen_ [protected] |
Random number generator.
Int sampling_points_per_FWHM_ [protected] |
number of points sampled per peak's FWHM
const Size THREADED_RANDOM_NUMBER_POOL_SIZE_ = 500 [static, protected] |
std::vector<std::vector<double> > threaded_random_numbers_ [protected] |
threaded_random_numbers keeps a set of random numbers for each thread simulating a feature.
std::vector<Size> threaded_random_numbers_index_ [protected] |
Indicates which random numbers each thread has used already and if the random number pool should be rebuild.
| OpenMS / TOPP release 1.10.0 | Documentation generated on Thu Mar 7 2013 09:42:56 using doxygen 1.7.1 |