Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036 #ifndef OPENMS_ANALYSIS_ID_PILISNEUTRALLOSSMODEL_H
00037 #define OPENMS_ANALYSIS_ID_PILISNEUTRALLOSSMODEL_H
00038
00039 #include <vector>
00040 #include <OpenMS/KERNEL/StandardTypes.h>
00041 #include <OpenMS/DATASTRUCTURES/Map.h>
00042 #include <OpenMS/DATASTRUCTURES/String.h>
00043 #include <OpenMS/CONCEPT/Types.h>
00044 #include <OpenMS/ANALYSIS/ID/HiddenMarkovModel.h>
00045 #include <OpenMS/DATASTRUCTURES/DefaultParamHandler.h>
00046
00047 namespace OpenMS
00048 {
00049 class AASequence;
00050
00062 class OPENMS_DLLAPI PILISNeutralLossModel :
00063 public DefaultParamHandler
00064 {
00065 friend class PILISNeutralLossModelGenerator;
00066
00067 public:
00068
00072
00073 PILISNeutralLossModel();
00074
00076 PILISNeutralLossModel(const PILISNeutralLossModel & model);
00077
00079 virtual ~PILISNeutralLossModel();
00081
00083 PILISNeutralLossModel & operator=(const PILISNeutralLossModel & mode);
00084
00088
00089 DoubleReal train(const RichPeakSpectrum & spec, const AASequence & peptide, DoubleReal ion_weight, UInt charge, DoubleReal peptide_weight);
00090
00092 void getIons(std::vector<RichPeak1D> & peaks, const AASequence & peptide, DoubleReal initial_prob);
00093
00095 void setHMM(const HiddenMarkovModel & model);
00096
00098 const HiddenMarkovModel & getHMM() const;
00099
00101 void generateModel();
00102
00104 void evaluate();
00106
00107 protected:
00108
00110 DoubleReal getIntensitiesFromSpectrum_(const RichPeakSpectrum & train_spec, Map<String, DoubleReal> & pre_ints, DoubleReal ion_weight, const AASequence & peptide, UInt charge);
00111
00113 void trainIons_(DoubleReal initial_probability, const Map<String, DoubleReal> & intensities, const AASequence & peptide);
00114
00116 void getIons_(Map<String, DoubleReal> & intensities, DoubleReal initial_probability, const AASequence & precursor);
00117
00119 void enableIonStates_(const AASequence & peptide);
00120
00122 HiddenMarkovModel hmm_precursor_;
00123
00125 UInt num_explicit_;
00126
00127 void updateMembers_();
00128 };
00129 }
00130 #endif