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 #ifndef OPENMS_FILTERING_DATAREDUCTION_SILACFILTER_H
00036 #define OPENMS_FILTERING_DATAREDUCTION_SILACFILTER_H
00037
00038 #include <OpenMS/KERNEL/StandardTypes.h>
00039 #include <OpenMS/FILTERING/DATAREDUCTION/SILACFiltering.h>
00040 #include <OpenMS/FILTERING/DATAREDUCTION/SILACPattern.h>
00041 #include <OpenMS/FILTERING/DATAREDUCTION/IsotopeDistributionCache.h>
00042 #include <gsl/gsl_interp.h>
00043 #include <gsl/gsl_spline.h>
00044 #include <queue>
00045 #include <list>
00046
00047 namespace OpenMS
00048 {
00058 class OPENMS_DLLAPI SILACFilter
00059 {
00060 private:
00061 friend class SILACFiltering;
00062
00063 typedef IsotopeDistributionCache::TheoreticalIsotopePattern TheoreticalIsotopePattern;
00064
00068 std::vector<DoubleReal> mass_separations_;
00069
00073 Int charge_;
00074
00078 DoubleReal model_deviation_;
00079
00083 Size isotopes_per_peptide_;
00084
00088 DoubleReal intensity_cutoff_;
00089
00093 DoubleReal intensity_correlation_;
00094
00098 bool allow_missing_peaks_;
00099
00103 static IsotopeDistributionCache * isotope_distribution_;
00104
00108 Size number_of_peptides_;
00109
00113 std::vector<DoubleReal> peak_positions_;
00114
00118 std::vector<DoubleReal> mz_peptide_separations_;
00119
00123 std::vector<DoubleReal> expected_mz_shifts_;
00124
00128 DoubleReal isotope_distance_;
00129
00133 std::vector<SILACPattern> elements_;
00134
00138 DoubleReal current_mz_;
00139
00143 std::vector<std::vector<DoubleReal> > exact_shifts_;
00144
00148 std::vector<std::vector<DoubleReal> > exact_mz_positions_;
00149
00153 std::vector<std::vector<DoubleReal> > exact_intensities_;
00154
00158 std::vector<std::vector<DoubleReal> > expected_shifts_;
00159
00165 bool isSILACPattern_(const MSSpectrum<Peak1D> &, const SILACFiltering::SpectrumInterpolation &, DoubleReal mz, DoubleReal picked_mz, const SILACFiltering &, MSSpectrum<Peak1D> & debug, SILACPattern & pattern);
00166
00170 bool isSILACPatternPicked_(const MSSpectrum<Peak1D> &, DoubleReal mz, const SILACFiltering &, MSSpectrum<Peak1D> & debug);
00171
00175 bool extractMzShiftsAndIntensities_(const MSSpectrum<Peak1D> &, const SILACFiltering::SpectrumInterpolation &, DoubleReal mz, DoubleReal picked_mz, const SILACFiltering &);
00176
00180 bool extractMzShiftsAndIntensitiesPicked_(const MSSpectrum<Peak1D> &, DoubleReal mz, const SILACFiltering &);
00181
00185 bool extractMzShiftsAndIntensitiesPickedToPattern_(const MSSpectrum<Peak1D> &, DoubleReal mz, const SILACFiltering &, SILACPattern & pattern);
00186
00190 bool intensityFilter_();
00191
00195 bool correlationFilter1_(const SILACFiltering::SpectrumInterpolation &, DoubleReal mz, const SILACFiltering &);
00196
00200 bool correlationFilter2_(const SILACFiltering::SpectrumInterpolation &, DoubleReal mz, const SILACFiltering &);
00201
00205 bool averageneFilter_(DoubleReal mz);
00206
00207 public:
00218 SILACFilter(std::vector<DoubleReal> mass_separations, Int charge, DoubleReal model_deviation, Int isotopes_per_peptide,
00219 DoubleReal intensity_cutoff, DoubleReal intensity_correlation, bool allow_missing_peaks);
00220
00224 std::vector<DoubleReal> getPeakPositions();
00225
00229 const std::vector<DoubleReal> & getExpectedMzShifts();
00230
00234 std::vector<SILACPattern> & getElements();
00235
00239 Int getCharge();
00240
00244 std::vector<DoubleReal> & getMassSeparations();
00245 };
00246 }
00247
00248 #endif