Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
PILISNeutralLossModel Class Reference

This class implements the simulation of the spectra from PILIS. More...

#include <OpenMS/ANALYSIS/ID/PILISNeutralLossModel.h>

Inheritance diagram for PILISNeutralLossModel:
DefaultParamHandler

Public Member Functions

PILISNeutralLossModeloperator= (const PILISNeutralLossModel &mode)
 assignment operator More...
 
Constructors and destructors
 PILISNeutralLossModel ()
 default constructor More...
 
 PILISNeutralLossModel (const PILISNeutralLossModel &model)
 copy constructor More...
 
virtual ~PILISNeutralLossModel ()
 destructor More...
 
Accessors
double train (const RichPeakSpectrum &spec, const AASequence &peptide, double ion_weight, UInt charge, double peptide_weight)
 performs a training step; needs as parameters a spectrum with annotated sequence and charge; returns the intensity sum of the matched peaks More...
 
void getIons (std::vector< RichPeak1D > &peaks, const AASequence &peptide, double initial_prob)
 given a peptide (a ion) the model returns the peaks with intensities relative to initial_prob More...
 
void setHMM (const HiddenMarkovModel &model)
 sets the hidden markov model More...
 
const HiddenMarkovModelgetHMM () const
 writes the HMM to the given file in the GraphML format. A detailed description of the GraphML format can be found under http://graphml.graphdrawing.org/ More...
 
void generateModel ()
 generates the models More...
 
void evaluate ()
 this method evaluates the model after training; it should be called after all training steps with train 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...
 

Protected Member Functions

double getIntensitiesFromSpectrum_ (const RichPeakSpectrum &train_spec, Map< String, double > &pre_ints, double ion_weight, const AASequence &peptide, UInt charge)
 extracts the precursor and related intensities of a training spectrum More...
 
void trainIons_ (double initial_probability, const Map< String, double > &intensities, const AASequence &peptide)
 trains precursor and related peaks More...
 
void getIons_ (Map< String, double > &intensities, double initial_probability, const AASequence &precursor)
 estimates the precursor intensities More...
 
void enableIonStates_ (const AASequence &peptide)
 enables the states needed for precursor training/simulation More...
 
void updateMembers_ ()
 This method is used to update extra member variables at the end of the setParameters() method. More...
 
- Protected Member Functions inherited from DefaultParamHandler
void defaultsToParam_ ()
 Updates the parameters after the defaults have been set in the constructor. More...
 

Protected Attributes

HiddenMarkovModel hmm_precursor_
 precursor model used More...
 
UInt num_explicit_
 
- 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...
 

Friends

class PILISNeutralLossModelGenerator
 

Detailed Description

This class implements the simulation of the spectra from PILIS.

PILIS uses a HMM based structure to model the population of fragment ions from a peptide. The spectrum generator can be accessed via the getSpectrum method.

Parameters of this class are:

NameTypeDefaultRestrictionsDescription
fragment_mass_tolerance float0.4  Peak mass tolerance of the product ions, used to identify the ions for training
fixed_modifications string list[]  Fixed modifications
variable_modifications string list[]  Variable modifications
pseudo_counts float1e-15  Value which is added for every transition trained of the underlying hidden Markov model
num_explicit int2  Number of explicitly modeled losses from the same kind of amino acid or combinations thereof
min_int_to_train float0.1  Minimal intensity a ion and its losses must have to be considered for training.
C_term_H2O_loss stringtrue true, falseenable water loss of the C-terminus
ion_name stringp p, a, b, b2, yIon base names used to set in meta values
enable_double_losses stringtrue true, falseif true, two different losses can occur at the same time, e.g. -H2O and -NH3 forming loss of -35Da

Note:

Constructor & Destructor Documentation

default constructor

copy constructor

virtual ~PILISNeutralLossModel ( )
virtual

destructor

Member Function Documentation

void enableIonStates_ ( const AASequence peptide)
protected

enables the states needed for precursor training/simulation

void evaluate ( )

this method evaluates the model after training; it should be called after all training steps with train

void generateModel ( )

generates the models

const HiddenMarkovModel& getHMM ( ) const

writes the HMM to the given file in the GraphML format. A detailed description of the GraphML format can be found under http://graphml.graphdrawing.org/

double getIntensitiesFromSpectrum_ ( const RichPeakSpectrum train_spec,
Map< String, double > &  pre_ints,
double  ion_weight,
const AASequence peptide,
UInt  charge 
)
protected

extracts the precursor and related intensities of a training spectrum

void getIons ( std::vector< RichPeak1D > &  peaks,
const AASequence peptide,
double  initial_prob 
)

given a peptide (a ion) the model returns the peaks with intensities relative to initial_prob

void getIons_ ( Map< String, double > &  intensities,
double  initial_probability,
const AASequence precursor 
)
protected

estimates the precursor intensities

PILISNeutralLossModel& operator= ( const PILISNeutralLossModel mode)

assignment operator

void setHMM ( const HiddenMarkovModel model)

sets the hidden markov model

double train ( const RichPeakSpectrum spec,
const AASequence peptide,
double  ion_weight,
UInt  charge,
double  peptide_weight 
)

performs a training step; needs as parameters a spectrum with annotated sequence and charge; returns the intensity sum of the matched peaks

void trainIons_ ( double  initial_probability,
const Map< String, double > &  intensities,
const AASequence peptide 
)
protected

trains precursor and related peaks

void updateMembers_ ( )
protectedvirtual

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

friend class PILISNeutralLossModelGenerator
friend

Member Data Documentation

HiddenMarkovModel hmm_precursor_
protected

precursor model used

UInt num_explicit_
protected

OpenMS / TOPP release 2.0.0 Documentation generated on Thu Aug 20 2015 01:44:39 using doxygen 1.8.9.1