OpenMS
MRMRTNormalizer.h
Go to the documentation of this file.
1 // Copyright (c) 2002-present, OpenMS Inc. -- EKU Tuebingen, ETH Zurich, and FU Berlin
2 // SPDX-License-Identifier: BSD-3-Clause
3 //
4 // --------------------------------------------------------------------------
5 // $Maintainer: George Rosenberger $
6 // $Authors: George Rosenberger, Hannes Roest $
7 // --------------------------------------------------------------------------
8 
9 #pragma once
10 
11 #include <OpenMS/config.h>
12 
13 #include <cstddef> // for size_t & ptrdiff_t
14 #include <vector>
15 #include <string>
16 
17 namespace OpenMS
18 {
19 
31  class OPENMS_DLLAPI MRMRTNormalizer
32  {
33 
34 protected:
35 
47  static int jackknifeOutlierCandidate_(const std::vector<double>& x, const std::vector<double>& y);
48 
60  static int residualOutlierCandidate_(const std::vector<double>& x, const std::vector<double>& y);
61 
62 public:
63 
89  static std::vector<std::pair<double, double> > removeOutliersRANSAC(const std::vector<std::pair<double, double> >& pairs,
90  double rsq_limit,
91  double coverage_limit,
92  size_t max_iterations,
93  double max_rt_threshold,
94  size_t sampling_size);
95 
122  static std::vector<std::pair<double, double> > removeOutliersIterative(const std::vector<std::pair<double, double> >& pairs,
123  double rsq_limit,
124  double coverage_limit,
125  bool use_chauvenet,
126  const std::string& method);
127 
134  static double chauvenet_probability(const std::vector<double>& residuals, int pos);
135 
142  static bool chauvenet(const std::vector<double>& residuals, int pos);
143 
156  static bool computeBinnedCoverage(const std::pair<double,double> & rtRange,
157  const std::vector<std::pair<double, double> > & pairs,
158  int nrBins,
159  int minPeptidesPerBin,
160  int minBinsFilled);
161 
162  };
163 
164 }
165 
The MRMRTNormalizer will find retention time peptides in data.
Definition: MRMRTNormalizer.h:32
static std::vector< std::pair< double, double > > removeOutliersIterative(const std::vector< std::pair< double, double > > &pairs, double rsq_limit, double coverage_limit, bool use_chauvenet, const std::string &method)
This function removes potential outliers in a linear regression dataset.
static bool chauvenet(const std::vector< double > &residuals, int pos)
This function computes Chauvenet's criterion for a vector and a value whose position is submitted.
static int residualOutlierCandidate_(const std::vector< double > &x, const std::vector< double > &y)
This function computes a candidate outlier peptide by computing the residuals of all points to the li...
static int jackknifeOutlierCandidate_(const std::vector< double > &x, const std::vector< double > &y)
This function computes a candidate outlier peptide by iteratively leaving one peptide out to find the...
static std::vector< std::pair< double, double > > removeOutliersRANSAC(const std::vector< std::pair< double, double > > &pairs, double rsq_limit, double coverage_limit, size_t max_iterations, double max_rt_threshold, size_t sampling_size)
This function removes potential outliers in a linear regression dataset.
static bool computeBinnedCoverage(const std::pair< double, double > &rtRange, const std::vector< std::pair< double, double > > &pairs, int nrBins, int minPeptidesPerBin, int minBinsFilled)
Computes coverage of the RT normalization peptides over the whole RT range, ensuring that each bin ha...
static double chauvenet_probability(const std::vector< double > &residuals, int pos)
This function computes Chauvenet's criterion probability for a vector and a value whose position is s...
Main OpenMS namespace.
Definition: openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19