Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
Classes | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Static Protected Attributes

RawMSSignalSimulation Class Reference
[Simulation]

Simulates MS signals for a given set of peptides. More...

#include <OpenMS/SIMULATION/RawMSSignalSimulation.h>

Inheritance diagram for RawMSSignalSimulation:
DefaultParamHandler ProgressLogger

List of all members.

Classes

struct  ContaminantInfo

Public Member Functions

RawMSSignalSimulationoperator= (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< SimCoordinateTypegrid_
 m/z sampling grid for all signals
SimRandomNumberGenerator const * rnd_gen_
 Random number generator.
std::vector< ContaminantInfocontaminants_
std::vector< std::vector
< double > > 
threaded_random_numbers_
std::vector< Sizethreaded_random_numbers_index_
bool contaminants_loaded_

Static Protected Attributes

static const Size THREADED_RANDOM_NUMBER_POOL_SIZE_ = 500

Detailed Description

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:

NameTypeDefaultRestrictionsDescription
enabled stringtrue true, falseEnable RAW signal simulation? (select 'false' if you only need feature-maps)
ionization_type stringESI MALDI, ESIType of Ionization (MALDI or ESI)
peak_shape stringGaussian Gaussian, LorentzianPeak 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 int50000  Instrument resolution at 400 Th.
resolution:type stringlinear constant, linear, sqrtHow 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 float0 min: 0Scale of baseline. Set to 0 to disable simulation of baseline.
baseline:shape float0.5 min: 0The baseline is modeled by an exponential probability density function (pdf) with f(x) = shape*e^(- shape*x)
mz:sampling_points int3 min: 2Number of raw data points per FWHM of the peak.
contaminants:file stringexamples/simulation/contaminants.csv  Contaminants file with sum formula and absolute RT interval. See 'OpenMS/examples/simulation/contaminants.txt' for details.
variation:mz:error_stddev float0  Standard deviation for m/z errors. Set to 0 to disable simulation of m/z errors.
variation:mz:error_mean float0  Average systematic m/z error (Da)
variation:intensity:scale float100 min: 0Constant 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 float0 min: 0Standard deviation of peak intensity (relative to the scaled peak height). Set to 0 to get simple rescaled intensities.
noise:shot:rate float0 min: 0Poisson rate of shot noise per unit m/z. Set this to 0 to disable simulation of shot noise.
noise:shot:intensity-mean float1  Shot noise intensity mean (exponentially distributed with given mean).
noise:white:mean float0  Mean value of white noise being added to each measured signal.
noise:white:stddev float0  Standard deviation of white noise being added to each measured signal.
noise:detector:mean float0  Mean value of the detector noise being added to the complete measurement.
noise:detector:stddev float0  Standard deviation of the detector noise being added to the complete measurement.

Note:

Member Enumeration Documentation

enum IONIZATIONMETHOD [protected]
Enumerator:
IM_ESI 
IM_MALDI 
IM_ALL 
enum PROFILESHAPE [protected]
Enumerator:
RT_RECTANGULAR 
RT_GAUSSIAN 
enum RESOLUTIONMODEL [protected]
Enumerator:
RES_CONSTANT 
RES_LINEAR 
RES_SQRT 

Constructor & Destructor Documentation

Constructor taking a random generator.

RawMSSignalSimulation ( const RawMSSignalSimulation source  ) 

Copy constructor.

virtual ~RawMSSignalSimulation (  )  [virtual]

Destructor.

RawMSSignalSimulation (  )  [protected]

Default constructor.


Member Function Documentation

void add1DSignal_ ( Feature feature,
MSSimExperiment experiment,
MSSimExperiment experiment_ct 
) [protected]

Add a 1D signal for a single feature.

Parameters:
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.

Parameters:
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.

Parameters:
feature_intensity Intensity of the current feature.
natural_scaling_factor Additional scaling factor used by some of the sampling models.
Returns:
Rescaled feature intensity.
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.

Parameters:
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.

  • RES_CONSTANT: resolution does not change with m/z (this will just return resolution)
  • RES_LINEAR: resolution decreases linear with m/z, i.e. at 800 Th, it will have 50% of original
  • RES_SQRT: the resolution decreases with square root of mass, i.e. at 1600 Th, it will have 50% of original (sqrt(400) = sqrt(1600)*0.5)
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.

Parameters:
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.

Parameters:
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.


Member Data Documentation

std::vector<ContaminantInfo> contaminants_ [protected]
bool contaminants_loaded_ [protected]
std::vector<SimCoordinateType> grid_ [protected]

m/z sampling grid for all signals

Scaling factor of peak intensities.

Standard deviation of peak intensity scaling.

Mean of peak m/z error.

Standard deviation of peak m/z error.

DoubleReal res_base_ [protected]

base resolution at 400 Th

model of how resolution behaves with increasing m/z

SimRandomNumberGenerator const* rnd_gen_ [protected]

Random number generator.

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