OpenMS
PeakAlignment.h
Go to the documentation of this file.
1 // Copyright (c) 2002-2023, The OpenMS Team -- EKU Tuebingen, ETH Zurich, and FU Berlin
2 // SPDX-License-Identifier: BSD-3-Clause
3 //
4 // --------------------------------------------------------------------------
5 // $Maintainer: Mathias Walzer $
6 // $Authors: $
7 // --------------------------------------------------------------------------
8 //
9 #pragma once
10 
12 #include <vector>
13 
14 namespace OpenMS
15 {
16 
27  class OPENMS_DLLAPI PeakAlignment :
29  {
30 public:
31 
34 
36  PeakAlignment(const PeakAlignment & source);
37 
39  ~PeakAlignment() override;
40 
43 
49  double operator()(const PeakSpectrum & spec1, const PeakSpectrum & spec2) const override;
50 
52  double operator()(const PeakSpectrum & spec) const override;
53 
55  static PeakSpectrumCompareFunctor * create() { return new PeakAlignment(); }
56 
58  static const String getProductName()
59  {
60  return "PeakAlignment";
61  }
62 
64  std::vector<std::pair<Size, Size> > getAlignmentTraceback(const PeakSpectrum & spec1, const PeakSpectrum & spec2) const;
65 
66 private:
67 
69  double peakPairScore_(double & pos1, double & intens1, double & pos2, double & intens2, const double & sigma) const;
70 
71 
72  };
73 
74 }
The representation of a 1D spectrum.
Definition: MSSpectrum.h:44
make a PeakAlignment of two PeakSpectra
Definition: PeakAlignment.h:29
double peakPairScore_(double &pos1, double &intens1, double &pos2, double &intens2, const double &sigma) const
calculates the score for aligning two peaks
PeakAlignment(const PeakAlignment &source)
copy constructor
double operator()(const PeakSpectrum &spec1, const PeakSpectrum &spec2) const override
double operator()(const PeakSpectrum &spec) const override
function call operator, calculates self similarity
std::vector< std::pair< Size, Size > > getAlignmentTraceback(const PeakSpectrum &spec1, const PeakSpectrum &spec2) const
make alignment and get the traceback
PeakAlignment()
default constructor
~PeakAlignment() override
destructor
static PeakSpectrumCompareFunctor * create()
Definition: PeakAlignment.h:55
PeakAlignment & operator=(const PeakAlignment &source)
assignment operator
static const String getProductName()
get the identifier for this DefaultParamHandler
Definition: PeakAlignment.h:58
Base class for compare functors of spectra, that return a similarity value for two spectra.
Definition: PeakSpectrumCompareFunctor.h:28
A more convenient string class.
Definition: String.h:34
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:22