OpenMS  2.4.0
List of all members
MSSim Class Reference

Central class for simulation of mass spectrometry experiments. More...

#include <OpenMS/SIMULATION/MSSim.h>

Inheritance diagram for MSSim:
DefaultParamHandler ProgressLogger

Constructors and Destructors

SimTypes::MSSimExperiment experiment_
 Holds the simulated data. More...
 
SimTypes::MSSimExperiment peak_map_
 Holds the ground-truth on generated peaks positions and intensities. More...
 
SimTypes::FeatureMapSimVector feature_maps_
 Holds the ground-truth on generated features. More...
 
ConsensusMap consensus_map_
 Holds consensus ground-truth about the charge associations. More...
 
SimTypes::FeatureMapSim contaminants_map_
 Holds the ground-truth on generated contaminants. More...
 
BaseLabelerlabeler_
 Labeling functionality. More...
 
 MSSim ()
 Default constructor. More...
 
 ~MSSim () override
 Destructor. More...
 
void simulate (SimTypes::MutableSimRandomNumberGeneratorPtr rnd_gen, SimTypes::SampleChannels &peptides)
 General purpose function to simulate a mass spectrometry run. More...
 
const SimTypes::MSSimExperimentgetExperiment () const
 Access the simulated experiment. More...
 
const SimTypes::FeatureMapSimgetSimulatedFeatures () const
 Access the simulated features. More...
 
ConsensusMapgetChargeConsensus ()
 Access the charge consensus map of simulated features. More...
 
const SimTypes::FeatureMapSimgetContaminants () const
 Access the contaminants feature map of simulated features. More...
 
ConsensusMapgetLabelingConsensus ()
 Access the labeling consensus map of simulated features. More...
 
const SimTypes::MSSimExperimentgetPeakMap () const
 Access the picked (centroided) experiment. More...
 
void getIdentifications (std::vector< ProteinIdentification > &proteins, std::vector< PeptideIdentification > &peptides) const
 Access the simulated identifications (proteins and peptides) More...
 
void getMS2Identifications (std::vector< ProteinIdentification > &proteins, std::vector< PeptideIdentification > &peptides) const
 Access the simulated MS2 identifications (proteins and peptides) More...
 
void getFeatureIdentifications (std::vector< ProteinIdentification > &proteins, std::vector< PeptideIdentification > &peptides) const
 Access the simulated identifications (proteins and peptides) from feature annotations. More...
 
Param getParameters () const
 Returns the default parameters for simulation including the labeling technique with name labeling_name. More...
 
void syncParams_ (Param &p, bool to_outer)
 handle global params More...
 
void createFeatureMap_ (const SimTypes::SampleProteins &peptides, SimTypes::FeatureMapSim &features, Size map_index)
 Convert a list of peptides with given abundance values into a FeatureMap. More...
 
void updateMembers_ () override
 Synchronize members with param class. More...
 

Additional Inherited Members

- Public Types inherited from ProgressLogger
enum  LogType { CMD, GUI, NONE }
 Possible log types. 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...
 
void nextProgress () const
 increment progress by 1 (according to range begin-end) 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< 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_
 
- Static Protected Attributes inherited from ProgressLogger
static int recursion_depth_
 

Detailed Description

Central class for simulation of mass spectrometry experiments.

This implementation is an extended and rewritten version of the concepts and ideas presented in:

Ole Schulz-Trieglaff, Nico Pfeifer, Clemens Gropl, Oliver Kohlbacher, and Knut Reinert.
LC-MSsim - A simulation software for liquid chromatography mass spectrometry data.
BMC Bioinformatics 9:423, 2008.

See also
DetectabilitySimulation
DigestSimulation
IonizationSimulation
RawMSSignalSimulation
RTSimulation

Constructor & Destructor Documentation

◆ MSSim()

MSSim ( )

Default constructor.

◆ ~MSSim()

~MSSim ( )
override

Destructor.

Member Function Documentation

◆ createFeatureMap_()

void createFeatureMap_ ( const SimTypes::SampleProteins peptides,
SimTypes::FeatureMapSim features,
Size  map_index 
)
protected

Convert a list of peptides with given abundance values into a FeatureMap.

◆ getChargeConsensus()

ConsensusMap& getChargeConsensus ( )

Access the charge consensus map of simulated features.

◆ getContaminants()

const SimTypes::FeatureMapSim& getContaminants ( ) const

Access the contaminants feature map of simulated features.

◆ getExperiment()

const SimTypes::MSSimExperiment& getExperiment ( ) const

Access the simulated experiment.

◆ getFeatureIdentifications()

void getFeatureIdentifications ( std::vector< ProteinIdentification > &  proteins,
std::vector< PeptideIdentification > &  peptides 
) const

Access the simulated identifications (proteins and peptides) from feature annotations.

Parameters
proteinsWill be filled with a single ProteinIdentification holding all ProteinHits.
peptidesWill be filled with PeptideIdentifications for all simulated features.

◆ getIdentifications()

void getIdentifications ( std::vector< ProteinIdentification > &  proteins,
std::vector< PeptideIdentification > &  peptides 
) const

Access the simulated identifications (proteins and peptides)

If an MS2 signal has been simulated, identifications are generated based on their corresponding MS2 spectra. If MS2 simulation has been disabled, peptide IDs are generated from feature annotations. Otherwise, the -out_id idXML file would be empty if MS2 simulation is disabled (which is the default).

Parameters
proteinsWill be filled with a single ProteinIdentification holding all ProteinHits.
peptidesWill be filled with PeptideIdentifications.

◆ getLabelingConsensus()

ConsensusMap& getLabelingConsensus ( )

Access the labeling consensus map of simulated features.

◆ getMS2Identifications()

void getMS2Identifications ( std::vector< ProteinIdentification > &  proteins,
std::vector< PeptideIdentification > &  peptides 
) const

Access the simulated MS2 identifications (proteins and peptides)

Parameters
proteinsWill be filled with a single ProteinIdentification holding all ProteinHits used in the simulated MS2 spectra.
peptidesWill be filled with PeptideIdentifications for each simulated MS2 spectra holding all contributing peptides scored by their intensity contribution.

◆ getParameters()

Param getParameters ( ) const

Returns the default parameters for simulation including the labeling technique with name labeling_name.

◆ getPeakMap()

const SimTypes::MSSimExperiment& getPeakMap ( ) const

Access the picked (centroided) experiment.

◆ getSimulatedFeatures()

const SimTypes::FeatureMapSim& getSimulatedFeatures ( ) const

Access the simulated features.

◆ simulate()

void simulate ( SimTypes::MutableSimRandomNumberGeneratorPtr  rnd_gen,
SimTypes::SampleChannels peptides 
)

General purpose function to simulate a mass spectrometry run.

Parameters
rnd_genrandom number generator which will be passed to the different classes
peptidesList of peptides and abundances that will be simulated

◆ syncParams_()

void syncParams_ ( Param p,
bool  to_outer 
)
protected

handle global params

◆ updateMembers_()

void updateMembers_ ( )
overrideprotectedvirtual

Synchronize members with param class.

Reimplemented from DefaultParamHandler.

Member Data Documentation

◆ consensus_map_

ConsensusMap consensus_map_
private

Holds consensus ground-truth about the charge associations.

◆ contaminants_map_

SimTypes::FeatureMapSim contaminants_map_
private

Holds the ground-truth on generated contaminants.

◆ experiment_

SimTypes::MSSimExperiment experiment_
private

Holds the simulated data.

◆ feature_maps_

SimTypes::FeatureMapSimVector feature_maps_
private

Holds the ground-truth on generated features.

◆ labeler_

BaseLabeler* labeler_
private

Labeling functionality.

◆ peak_map_

SimTypes::MSSimExperiment peak_map_
private

Holds the ground-truth on generated peaks positions and intensities.