Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages

SILACFilter.h

Go to the documentation of this file.
00001 // --------------------------------------------------------------------------
00002 //                   OpenMS -- Open-Source Mass Spectrometry
00003 // --------------------------------------------------------------------------
00004 // Copyright The OpenMS Team -- Eberhard Karls University Tuebingen,
00005 // ETH Zurich, and Freie Universitaet Berlin 2002-2012.
00006 //
00007 // This software is released under a three-clause BSD license:
00008 //  * Redistributions of source code must retain the above copyright
00009 //    notice, this list of conditions and the following disclaimer.
00010 //  * Redistributions in binary form must reproduce the above copyright
00011 //    notice, this list of conditions and the following disclaimer in the
00012 //    documentation and/or other materials provided with the distribution.
00013 //  * Neither the name of any author or any participating institution
00014 //    may be used to endorse or promote products derived from this software
00015 //    without specific prior written permission.
00016 // For a full list of authors, refer to the file AUTHORS.
00017 // --------------------------------------------------------------------------
00018 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
00019 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00020 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00021 // ARE DISCLAIMED. IN NO EVENT SHALL ANY OF THE AUTHORS OR THE CONTRIBUTING
00022 // INSTITUTIONS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
00023 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
00024 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
00025 // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
00026 // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
00027 // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
00028 // ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00029 //
00030 // --------------------------------------------------------------------------
00031 // $Maintainer: Lars Nilse $
00032 // $Authors: Steffen Sass, Holger Plattfaut, Bastian Blank $
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 /* SILACFILTER_H_ */

OpenMS / TOPP release 1.10.0 Documentation generated on Thu Mar 7 2013 09:42:44 using doxygen 1.7.1