This class implements the simulation of the spectra from PILIS. More...
#include <OpenMS/ANALYSIS/ID/PILISModel.h>
Public Member Functions | |
PILISModel & | operator= (const PILISModel &mode) |
assignment operator More... | |
Constructors and destructors | |
PILISModel () | |
default constructor More... | |
PILISModel (const PILISModel &model) | |
copy constructor More... | |
virtual | ~PILISModel () |
destructor More... | |
Accessors | |
void | train (const RichPeakSpectrum &, const AASequence &peptide, UInt charge) |
performs a training step; needs as parameters a spectrum with annotated sequence and charge More... | |
void | readFromFile (const String &filename) |
void | writeGraphMLFile (const String &filename) |
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 | writeToFile (const String &filename) |
void | init (bool generate_models=true) |
void | getSpectrum (RichPeakSpectrum &spec, const AASequence &peptide, UInt charge) |
simulates a spectrum with the model of the given peptide and charge and writes it to the given PeakSpectrum More... | |
void | evaluate () |
this method evaluates the model after training; it should be called after all training steps with train More... | |
![]() | |
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 DefaultParamHandler & | operator= (const DefaultParamHandler &rhs) |
Assignment operator. More... | |
virtual bool | operator== (const DefaultParamHandler &rhs) const |
Equality operator. More... | |
void | setParameters (const Param ¶m) |
Sets the parameters. More... | |
const Param & | getParameters () const |
Non-mutable access to the parameters. More... | |
const Param & | getDefaults () const |
Non-mutable access to the default parameters. More... | |
const String & | getName () 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 | |
bool | getInitialTransitionProbabilities_ (std::vector< double > &bb_init, std::vector< double > &cr_init, std::vector< double > &sc_init, double &precursor_init, const std::vector< double > &bb_charges, const std::vector< double > &sc_charges, const AASequence &peptide) |
get the initial transition probabilities from the proton dist, returns true if charge remote is enabled More... | |
double | getAvailableBackboneCharge_ (const AASequence &ion, Residue::ResidueType res_type, int charge) |
void | addPeaks_ (double mz, int charge, double mz_offset, double intensity, RichPeakSpectrum &spectrum, const IsotopeDistribution &id, const String &name) |
add peaks to spectrum More... | |
void | parseHMMModel_ (const TextFile::ConstIterator &begin, const TextFile::ConstIterator &end, HiddenMarkovModel &hmm, Param ¶m) |
parse the base model More... | |
void | writeParameters_ (std::ostream &os, const Param ¶m) |
write parameters of the model More... | |
void | updateMembers_ () |
This method is used to update extra member variables at the end of the setParameters() method. More... | |
![]() | |
void | defaultsToParam_ () |
Updates the parameters after the defaults have been set in the constructor. More... | |
Protected Attributes | |
HiddenMarkovModel | hmm_ |
base model used More... | |
ProtonDistributionModel | prot_dist_ |
proton distribution model More... | |
TheoreticalSpectrumGenerator | tsg_ |
theoretical spectrum generator (needed for training/aligning and spectrum intensity extraction) More... | |
bool | valid_ |
true if the instance is valid More... | |
Map< double, std::vector< RichPeak1D > > | peaks_ |
stores the peaks of a spectrum More... | |
SpectrumAlignment | spectra_aligner_ |
the alignment algorithm used More... | |
PILISNeutralLossModel | precursor_model_cr_ |
precursor model used More... | |
PILISNeutralLossModel | precursor_model_cd_ |
PILISNeutralLossModel | a_ion_losses_cr_ |
PILISNeutralLossModel | a_ion_losses_cd_ |
PILISNeutralLossModel | b_ion_losses_cr_ |
PILISNeutralLossModel | b_ion_losses_cd_ |
PILISNeutralLossModel | b2_ion_losses_cr_ |
PILISNeutralLossModel | b2_ion_losses_cd_ |
PILISNeutralLossModel | y_ion_losses_cr_ |
PILISNeutralLossModel | y_ion_losses_cd_ |
![]() | |
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< String > | subsections_ |
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... | |
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.
PILISModel | ( | ) |
default constructor
PILISModel | ( | const PILISModel & | model | ) |
copy constructor
|
virtual |
destructor
|
protected |
add peaks to spectrum
void evaluate | ( | ) |
this method evaluates the model after training; it should be called after all training steps with train
|
protected |
|
protected |
get the initial transition probabilities from the proton dist, returns true if charge remote is enabled
void getSpectrum | ( | RichPeakSpectrum & | spec, |
const AASequence & | peptide, | ||
UInt | charge | ||
) |
simulates a spectrum with the model of the given peptide and charge and writes it to the given PeakSpectrum
void init | ( | bool | generate_models = true | ) |
PILISModel& operator= | ( | const PILISModel & | mode | ) |
assignment operator
|
protected |
parse the base model
void readFromFile | ( | const String & | filename | ) |
reads the model parameters from the given files
filename | filename of the model |
void train | ( | const RichPeakSpectrum & | , |
const AASequence & | peptide, | ||
UInt | charge | ||
) |
performs a training step; needs as parameters a spectrum with annotated sequence and charge
|
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.
void writeGraphMLFile | ( | const String & | filename | ) |
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/
|
protected |
write parameters of the model
void writeToFile | ( | const String & | filename | ) |
writes the model parameters into the given files
filename | filename of the base model |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
base model used
|
protected |
stores the peaks of a spectrum
|
protected |
|
protected |
precursor model used
|
protected |
proton distribution model
|
protected |
the alignment algorithm used
|
protected |
theoretical spectrum generator (needed for training/aligning and spectrum intensity extraction)
|
protected |
true if the instance is valid
|
protected |
|
protected |
OpenMS / TOPP release 2.0.0 | Documentation generated on Tue Nov 1 2016 16:34:46 using doxygen 1.8.11 |