Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
DIAScoring.h
Go to the documentation of this file.
1 // --------------------------------------------------------------------------
2 // OpenMS -- Open-Source Mass Spectrometry
3 // --------------------------------------------------------------------------
4 // Copyright The OpenMS Team -- Eberhard Karls University Tuebingen,
5 // ETH Zurich, and Freie Universitaet Berlin 2002-2013.
6 //
7 // This software is released under a three-clause BSD license:
8 // * Redistributions of source code must retain the above copyright
9 // notice, this list of conditions and the following disclaimer.
10 // * Redistributions in binary form must reproduce the above copyright
11 // notice, this list of conditions and the following disclaimer in the
12 // documentation and/or other materials provided with the distribution.
13 // * Neither the name of any author or any participating institution
14 // may be used to endorse or promote products derived from this software
15 // without specific prior written permission.
16 // For a full list of authors, refer to the file AUTHORS.
17 // --------------------------------------------------------------------------
18 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 // ARE DISCLAIMED. IN NO EVENT SHALL ANY OF THE AUTHORS OR THE CONTRIBUTING
22 // INSTITUTIONS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
23 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
24 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
25 // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
26 // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
27 // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
28 // ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 //
30 // --------------------------------------------------------------------------
31 // $Maintainer: Hannes Roest $
32 // $Authors: Hannes Roest, Witold Wolski $
33 // --------------------------------------------------------------------------
34 
35 #ifndef OPENMS_ANALYSIS_OPENSWATH_DIASCORING_H
36 #define OPENMS_ANALYSIS_OPENSWATH_DIASCORING_H
37 
38 #include <boost/math/special_functions/fpclassify.hpp> // for isnan
41 
46 
47 namespace OpenMS
48 {
76  class OPENMS_DLLAPI DIAScoring :
77  public DefaultParamHandler
78  {
80 
88 
89 public:
90 
92 
93  DIAScoring();
95 
97  virtual ~DIAScoring() {}
99 
101 
102  void set_dia_parameters(double dia_extract_window, double dia_centroided,
104  double dia_byseries_intensity_min, double dia_byseries_ppm_diff, double dia_nr_isotopes, double dia_nr_charges);
106 
108  // DIA / SWATH scoring
109 
111 
112  void dia_isotope_scores(const std::vector<TransitionType>& transitions,
114  SpectrumType spectrum, OpenSwath::IMRMFeature* mrmfeature, double& isotope_corr,
115  double& isotope_overlap);
116 
118  void dia_massdiff_score(const std::vector<TransitionType>& transitions,
119  SpectrumType spectrum, const std::vector<double>& normalized_library_intensity,
120  double& ppm_score, double& ppm_score_weighted);
121 
123  void dia_by_ion_score(SpectrumType spectrum, AASequence& sequence,
124  int charge, double& bseries_score, double& yseries_score);
125 
127  void score_with_isotopes(SpectrumType spectrum, const std::vector<TransitionType>& transitions,
128  double& dotprod, double& manhattan);
130 
131 private:
132 
134  DIAScoring(const DIAScoring& rhs);
135 
137  DIAScoring& operator=(const DIAScoring& rhs);
138 
140  void updateMembers_();
141 
143  void diaIsotopeScoresSub_(const std::vector<TransitionType>& transitions,
144  SpectrumType spectrum, std::map<std::string, double>& intensities,
145  double& isotope_corr, double& isotope_overlap);
146 
149  void getFirstIsotopeRelativeIntensities_(const std::vector<TransitionType>& transitions,
150  OpenSwath::IMRMFeature* mrmfeature,
151  std::map<std::string, double>& intensities //experimental intensities of transitions
152  );
153 
154 private:
155 
163  DoubleReal largePeaksBeforeFirstIsotope_(double product_mz,
164  SpectrumType& spectrum, double max_ppm_diff, double main_peak);
165 
172  DoubleReal scoreIsotopePattern_(double product_mz,
173  const std::vector<double>& isotopes_int, int putative_fragment_charge);
174 
175  // Parameters
182 
183  };
184 }
185 
186 #endif
double dia_extract_window_
Definition: DIAScoring.h:176
OpenSwath::LightProtein ProteinType
Definition: DIAScoring.h:86
double dia_nr_isotopes_
Definition: DIAScoring.h:180
OpenSwath::LightPeptide PeptideType
Definition: DIAScoring.h:85
Representation of a peptide/protein sequence.
Definition: AASequence.h:84
Definition: TransitionExperiment.h:99
OPENSWATHALGO_DLLAPI typedef boost::shared_ptr< Spectrum > SpectrumPtr
Definition: ANALYSIS/OPENSWATH/OPENSWATHALGO/DATAACCESS/DataStructures.h:227
double dia_byseries_ppm_diff_
Definition: DIAScoring.h:179
double dia_byseries_intensity_min_
Definition: DIAScoring.h:178
virtual ~DIAScoring()
Destructor.
Definition: DIAScoring.h:97
Scoring of an spectrum at the peak apex of an chromatographic elution peak.
Definition: DIAScoring.h:76
double dia_centroided_
Definition: DIAScoring.h:177
double dia_nr_charges_
Definition: DIAScoring.h:181
OpenSwath::LightTransition TransitionType
Transition interface (Transition, Peptide, Protein)
Definition: DIAScoring.h:84
Definition: TransitionExperiment.h:46
Definition: ITransition.h:56
A base class for all classes handling default parameters.
Definition: DefaultParamHandler.h:90
Definition: TransitionExperiment.h:114
OpenSwath::SpectrumPtr SpectrumType
Type definitions.
Definition: DIAScoring.h:82

OpenMS / TOPP release 1.11.1 Documentation generated on Thu Nov 14 2013 11:19:12 using doxygen 1.8.5