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-2017.
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 {
82  class OPENMS_DLLAPI DIAScoring :
83  public DefaultParamHandler
84  {
86 
92 
93 public:
94 
96 
97  DIAScoring();
99 
101  virtual ~DIAScoring() {}
103 
105 
106  void set_dia_parameters(double dia_extract_window, double dia_centroided,
108  double dia_byseries_intensity_min, double dia_byseries_ppm_diff, double dia_nr_isotopes, double dia_nr_charges);
110 
112  // DIA / SWATH scoring
113 
115 
116  void dia_isotope_scores(const std::vector<TransitionType>& transitions,
118  SpectrumPtrType spectrum, OpenSwath::IMRMFeature* mrmfeature, double& isotope_corr,
119  double& isotope_overlap);
120 
122  void dia_massdiff_score(const std::vector<TransitionType>& transitions,
123  SpectrumPtrType spectrum, const std::vector<double>& normalized_library_intensity,
124  double& ppm_score, double& ppm_score_weighted);
125 
134  bool dia_ms1_massdiff_score(double precursor_mz, SpectrumPtrType spectrum,
135  double& ppm_score);
136 
138  void dia_ms1_isotope_scores(double precursor_mz, SpectrumPtrType spectrum, size_t charge_state,
139  double& isotope_corr, double& isotope_overlap, std::string sum_formula = "");
140 
142  void dia_by_ion_score(SpectrumPtrType spectrum, AASequence& sequence,
143  int charge, double& bseries_score, double& yseries_score);
144 
146  void score_with_isotopes(SpectrumPtrType spectrum, const std::vector<TransitionType>& transitions,
147  double& dotprod, double& manhattan);
149 
150 private:
151 
153  DIAScoring(const DIAScoring& rhs);
154 
156  DIAScoring& operator=(const DIAScoring& rhs);
157 
159  void updateMembers_();
160 
162  void diaIsotopeScoresSub_(const std::vector<TransitionType>& transitions,
163  SpectrumPtrType spectrum, std::map<std::string, double>& intensities,
164  double& isotope_corr, double& isotope_overlap);
165 
168  void getFirstIsotopeRelativeIntensities_(const std::vector<TransitionType>& transitions,
169  OpenSwath::IMRMFeature* mrmfeature,
170  std::map<std::string, double>& intensities //experimental intensities of transitions
171  );
172 
173 private:
174 
190  void largePeaksBeforeFirstIsotope_(SpectrumPtrType spectrum, double mono_mz, double mono_int, int& nr_occurences, double& max_ratio);
191 
200  double scoreIsotopePattern_(double product_mz, const std::vector<double>& isotopes_int,
201  int putative_fragment_charge, std::string sum_formula = "");
202 
203  // Parameters
211  };
212 }
213 
214 #endif // OPENMS_ANALYSIS_OPENSWATH_DIASCORING_H
215 
double dia_extract_window_
Definition: DIAScoring.h:204
double peak_before_mono_max_ppm_diff_
Definition: DIAScoring.h:210
double dia_nr_isotopes_
Definition: DIAScoring.h:208
boost::shared_ptr< Spectrum > SpectrumPtr
Definition: openswathalgo/include/OpenMS/ANALYSIS/OPENSWATH/OPENSWATHALGO/DATAACCESS/DataStructures.h:244
Representation of a peptide/protein sequence.
Definition: AASequence.h:108
OpenSwath::SpectrumPtr SpectrumPtrType
Type definitions.
Definition: DIAScoring.h:88
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47
double dia_byseries_ppm_diff_
Definition: DIAScoring.h:207
double dia_byseries_intensity_min_
Definition: DIAScoring.h:206
virtual ~DIAScoring()
Destructor.
Definition: DIAScoring.h:101
Scoring of an spectrum at the peak apex of an chromatographic elution peak.
Definition: DIAScoring.h:82
double dia_centroided_
Definition: DIAScoring.h:205
double dia_nr_charges_
Definition: DIAScoring.h:209
OpenSwath::LightTransition TransitionType
Transition interface (Transition, Peptide, Protein)
Definition: DIAScoring.h:90
Definition: TransitionExperiment.h:47
Definition: ITransition.h:56
A base class for all classes handling default parameters.
Definition: DefaultParamHandler.h:92

OpenMS / TOPP release 2.3.0 Documentation generated on Tue Jan 9 2018 18:21:59 using doxygen 1.8.13