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

SvmTheoreticalSpectrumGenerator Class Reference
[Chemistry]

Simulates ms2 spectra with support vector machines. More...

#include <OpenMS/CHEMISTRY/SvmTheoreticalSpectrumGenerator.h>

Inheritance diagram for SvmTheoreticalSpectrumGenerator:
DefaultParamHandler

List of all members.

Classes

struct  DescriptorSet
 A set of descriptors for a single training row. More...
struct  IonType
 nested class More...
struct  SvmModelParameterSet
 Simple container storing the model parameters required for simulation. More...

Public Member Functions

void simulate (RichPeakSpectrum &spectrum, const AASequence &peptide, const gsl_rng *rng, Size precursor_charge)
 Generate the MS/MS according to the given probabilistic model.
void load ()
 Load a trained Svm and Prob. models.
const std::vector< IonType > & getIonTypes ()
 return the set of ion types that are modeled by the loaded SVMs
Constructors and Destructors

 SvmTheoreticalSpectrumGenerator ()
 Default constructor.
 SvmTheoreticalSpectrumGenerator (const SvmTheoreticalSpectrumGenerator &source)
 Copy constructor.
SvmTheoreticalSpectrumGeneratoroperator= (const SvmTheoreticalSpectrumGenerator &tsg)
 Assignment operator.
virtual ~SvmTheoreticalSpectrumGenerator ()
 Destructor.

Protected Types

typedef std::map< IonType,
DoubleReal
IntensityMap

Protected Member Functions

void scaleSingleFeature_ (double &value, double feature_min, double feature_max, double lower=-1.0, double upper=1.0)
 scale value to the intervall [lower,max] given the maximal and minimal entries for a feature
void scaleDescriptorSet_ (DescriptorSet &desc, double lower, double upper)
 scale value to the intervall [lower,max] given the maximal and minimal entries for a feature
Size generateDescriptorSet_ (AASequence peptide, Size position, IonType type, Size precursor_charge, DescriptorSet &desc_set)
 generate the desciptors for an input peptide and a given fragmentation position
String ResidueTypeToString_ (Residue::ResidueType type)
 Returns the ResidueType (e.g. AIon, BIon) as string for peak annotation.
void updateMembers_ ()
 This method is used to update extra member variables at the end of the setParameters() method.

Static Protected Member Functions

static void initializeMaps_ ()
 initialized the maps

Protected Attributes

Size precursor_charge_
 charge of the precursors used for training
SvmModelParameterSet mp_
 set of model parameters read from model file
std::map< IonType, bool > hide_type_
 whether ion types are hidden or not

Static Protected Attributes

static std::map< String, Sizeaa_to_index_
 map AA to integers
static std::map< String,
DoubleReal
hydrophobicity_
 hydrophobicity values for each AA
static std::map< String,
DoubleReal
helicity_
 helicity values for each AA
static std::map< String,
DoubleReal
basicity_
 basicity values for each AA
static bool initializedMaps_
 flag to indicate if the hydrophobicity, helicity, and basicity maps were already initialized

Friends

class SvmTheoreticalSpectrumGeneratorTrainer

Detailed Description

Simulates ms2 spectra with support vector machines.

The models are generated with the SvmTheoreticalSpectrumGeneratorTrainer.
Two modes are supported:

Currently, only a test model is shipped with OpenMS.
Please find trained models at: http://sourceforge.net/projects/open-ms/files/Supplementary/Simulation/.

Parameters of this class are:

NameTypeDefaultRestrictionsDescription
svm_mode int1  whether to predict abundant/missing using SVC (0) or predict intensities using SVR (1)
model_file_name stringexamples/simulation/SvmMSim.model  Name of the probabilistic Model file
add_isotopes stringfalse true, falseIf set to 1 isotope peaks of the product ion peaks are added
max_isotope int2  Defines the maximal isotopic peak which is added, add_isotopes must be set to 1
add_metainfo stringfalse true, falseAdds the type of peaks as metainfo to the peaks, like y8+, [M-H2O+2H]++
add_first_prefix_ion stringfalse true, falseIf set to true e.g. b1 ions are added
hide_y_ions stringfalse true, falseAdd peaks of y-ions to the spectrum
hide_y2_ions stringfalse true, falseAdd peaks of y-ions to the spectrum
hide_b_ions stringfalse true, falseAdd peaks of b-ions to the spectrum
hide_b2_ions stringfalse true, falseAdd peaks of b-ions to the spectrum
hide_a_ions stringfalse true, falseAdd peaks of a-ions to the spectrum
hide_c_ions stringfalse true, falseAdd peaks of c-ions to the spectrum
hide_x_ions stringfalse true, falseAdd peaks of x-ions to the spectrum
hide_z_ions stringfalse true, falseAdd peaks of z-ions to the spectrum
hide_losses stringfalse true, falseAdds common losses to those ion expect to have them, only water and ammonia loss is considered
y_intensity float1  Intensity of the y-ions
b_intensity float1  Intensity of the b-ions
a_intensity float1  Intensity of the a-ions
c_intensity float1  Intensity of the c-ions
x_intensity float1  Intensity of the x-ions
z_intensity float1  Intensity of the z-ions
relative_loss_intensity float0.1  Intensity of loss ions, in relation to the intact ion intensity

Note:

Member Typedef Documentation

typedef std::map<IonType, DoubleReal> IntensityMap [protected]

Constructor & Destructor Documentation

Default constructor.

Copy constructor.

virtual ~SvmTheoreticalSpectrumGenerator (  )  [virtual]

Destructor.


Member Function Documentation

Size generateDescriptorSet_ ( AASequence  peptide,
Size  position,
IonType  type,
Size  precursor_charge,
DescriptorSet desc_set 
) [protected]

generate the desciptors for an input peptide and a given fragmentation position

const std::vector<IonType>& getIonTypes (  )  [inline]

return the set of ion types that are modeled by the loaded SVMs

static void initializeMaps_ (  )  [static, protected]

initialized the maps

void load (  ) 

Load a trained Svm and Prob. models.

Assignment operator.

String ResidueTypeToString_ ( Residue::ResidueType  type  )  [protected]

Returns the ResidueType (e.g. AIon, BIon) as string for peak annotation.

void scaleDescriptorSet_ ( DescriptorSet desc,
double  lower,
double  upper 
) [protected]

scale value to the intervall [lower,max] given the maximal and minimal entries for a feature

void scaleSingleFeature_ ( double value,
double  feature_min,
double  feature_max,
double  lower = -1.0,
double  upper = 1.0 
) [inline, protected]

scale value to the intervall [lower,max] given the maximal and minimal entries for a feature

void simulate ( RichPeakSpectrum spectrum,
const AASequence peptide,
const gsl_rng *  rng,
Size  precursor_charge 
)

Generate the MS/MS according to the given probabilistic model.

void updateMembers_ (  )  [protected, virtual]

This method is used to update extra member variables at the end of the setParameters() method.

Also call it at the end of the derived classes' copy constructor and assignment operator.

The default implementation is empty.

Reimplemented from DefaultParamHandler.


Friends And Related Function Documentation


Member Data Documentation

std::map<String, Size> aa_to_index_ [static, protected]

map AA to integers

std::map<String, DoubleReal> basicity_ [static, protected]

basicity values for each AA

std::map<String, DoubleReal> helicity_ [static, protected]

helicity values for each AA

std::map<IonType, bool> hide_type_ [protected]

whether ion types are hidden or not

std::map<String, DoubleReal> hydrophobicity_ [static, protected]

hydrophobicity values for each AA

bool initializedMaps_ [static, protected]

flag to indicate if the hydrophobicity, helicity, and basicity maps were already initialized

set of model parameters read from model file

Size precursor_charge_ [protected]

charge of the precursors used for training


OpenMS / TOPP release 1.10.0 Documentation generated on Thu Mar 7 2013 09:42:50 using doxygen 1.7.1