Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
MRMScoring.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$
33 // --------------------------------------------------------------------------
34 
35 #ifndef OPENMS_ANALYSIS_OPENSWATH_OPENSWATHALGO_ALGO_MRMSCORING_H
36 #define OPENMS_ANALYSIS_OPENSWATH_OPENSWATHALGO_ALGO_MRMSCORING_H
37 
38 #include <string>
39 #include <boost/math/special_functions/fpclassify.hpp> // for isnan
40 #include <boost/numeric/conversion/cast.hpp>
41 
42 #include <OpenMS/ANALYSIS/OPENSWATH/OPENSWATHALGO/OpenSwathAlgoConfig.h>
43 
49 //#include "OpenMS/ANALYSIS/OPENSWATH/OPENSWATHALGO/ALGO/DIAHelpers.h"
50 
51 namespace OpenSwath
52 {
53 
75  class OPENSWATHALGO_DLLAPI MRMScoring
76  {
77 
78 public:
79 
81 
82  typedef std::map<int, double> XCorrArrayType;
85  typedef std::vector<std::vector<XCorrArrayType> > XCorrMatrixType;
86 
87  typedef std::string String;
88 
93 
94  typedef boost::shared_ptr<OpenSwath::IFeature> FeatureType;
96 
99  const XCorrMatrixType& getXCorrMatrix() const;
102 
105  void initializeXCorrMatrix(OpenSwath::IMRMFeature* mrmfeature, OpenSwath::ITransitionGroup* transition_group, bool normalize);
107 
109  double calcXcorrCoelutionScore();
110 
112  double calcXcorrShape_score();
113 
115  double calcXcorrShape_score_weighted(const std::vector<double>& normalized_library_intensity);
116 
118  double calcXcorrCoelutionScore_weighted(const std::vector<double>& normalized_library_intensity);
119 
121  static void calcLibraryScore(OpenSwath::IMRMFeature* mrmfeature, const std::vector<TransitionType>& transitions,
122  double& correlation, double& rmsd, double& manhattan, double& dotprod);
123 
125  static double calcRTScore(const PeptideType& peptide, double normalized_experimental_rt);
126 
128  // using a vector of SignalToNoiseEstimatorMedian that were calculated for
129  // each chromatogram of the transition_group.
130  static double calcSNScore(OpenSwath::IMRMFeature* mrmfeature, std::vector<OpenSwath::ISignalToNoisePtr>& signal_noise_estimators);
131 
133 
134 private:
135 
138  XCorrMatrixType xcorr_matrix_;
141 
142  };
143 }
144 
145 #endif // OPENMS_ANALYSIS_OPENSWATH_OPENSWATHALGO_ALGO_MRMSCORING_H
OpenSwath::LightPeptide PeptideType
Definition: MRMScoring.h:91
std::string String
Definition: MRMScoring.h:87
std::map< int, double > XCorrArrayType
Cross Correlation array.
Definition: Scoring.h:57
This class implements different scores for peaks found in SRM/MRM.
Definition: MRMScoring.h:75
std::vector< std::vector< XCorrArrayType > > XCorrMatrixType
Cross Correlation matrix.
Definition: MRMScoring.h:85
OPENSWATHALGO_DLLAPI void normalize(const std::vector< double > &intensities, double normalization_factor, std::vector< double > &normalized_intensities)
Normalize intensities in vector by normalization_factor.
Definition: ITransition.h:65
Definition: TransitionExperiment.h:99
OpenSwath::SpectrumPtr SpectrumType
Definition: MRMScoring.h:89
boost::shared_ptr< OpenSwath::IFeature > FeatureType
Definition: MRMScoring.h:94
OPENSWATHALGO_DLLAPI typedef boost::shared_ptr< Spectrum > SpectrumPtr
Definition: ANALYSIS/OPENSWATH/OPENSWATHALGO/DATAACCESS/DataStructures.h:227
Definition: TransitionExperiment.h:46
Definition: ITransition.h:56
OpenSwath::LightTransition TransitionType
Definition: MRMScoring.h:90
OpenSwath::LightProtein ProteinType
Definition: MRMScoring.h:92
Definition: TransitionExperiment.h:114

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