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_DENOVO_COMPNOVOIONSCORINGBASE_H
00037 #define OPENMS_ANALYSIS_DENOVO_COMPNOVOIONSCORINGBASE_H
00038
00039
00040 #include <OpenMS/KERNEL/StandardTypes.h>
00041 #include <OpenMS/DATASTRUCTURES/DefaultParamHandler.h>
00042
00043
00044 #include <vector>
00045
00046 namespace OpenMS
00047 {
00053 class OPENMS_DLLAPI CompNovoIonScoringBase :
00054 public DefaultParamHandler
00055 {
00056
00057 public:
00058
00059 enum IsotopeType
00060 {
00061 PARENT = 0,
00062 CHILD = 1,
00063 LONE = 2
00064 };
00065
00066 struct OPENMS_DLLAPI IonScore
00067 {
00068 IonScore();
00069
00070 IonScore(const IonScore & rhs);
00071
00072 virtual ~IonScore();
00073
00074 IonScore & operator=(const IonScore & rhs);
00075
00076
00077 DoubleReal score;
00078 DoubleReal s_bion;
00079 DoubleReal s_yion;
00080 DoubleReal s_witness;
00081 DoubleReal position;
00082 DoubleReal s_isotope_pattern_1;
00083 Int is_isotope_1_mono;
00084 DoubleReal s_isotope_pattern_2;
00085 };
00086
00087
00091
00092 CompNovoIonScoringBase();
00093
00095 CompNovoIonScoringBase(const CompNovoIonScoringBase & source);
00096
00098 virtual ~CompNovoIonScoringBase();
00100
00102 CompNovoIonScoringBase & operator=(const CompNovoIonScoringBase & source);
00103
00107 DoubleReal scoreIsotopes(const PeakSpectrum & CID_spec, PeakSpectrum::ConstIterator it, Size charge);
00109
00110 protected:
00111
00113 void updateMembers_();
00114
00115
00116 IsotopeType classifyIsotopes_(const PeakSpectrum & spec, PeakSpectrum::ConstIterator it);
00117
00118 DoubleReal scoreIsotopes_(const PeakSpectrum & spec, PeakSpectrum::ConstIterator it, Map<DoubleReal, IonScore> & CID_nodes, Size charge = 1);
00119
00120 virtual void scoreWitnessSet_(Size charge, DoubleReal precursor_weight, Map<DoubleReal, IonScore> & CID_nodes, const PeakSpectrum & CID_orig_spec) = 0;
00121
00122 void addSingleChargedIons_(Map<DoubleReal, IonScore> & ion_scores, PeakSpectrum & CID_spec);
00123
00124 void initIsotopeDistributions_();
00125
00127 Map<Size, std::vector<DoubleReal> > isotope_distributions_;
00128
00129 DoubleReal fragment_mass_tolerance_;
00130
00131 public:
00132
00133 };
00134
00135 }
00136
00137 #endif