OpenMS
StablePairFinder.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: Timo Sachsenberg $
6 // $Authors: $
7 // --------------------------------------------------------------------------
8 
9 #ifndef OPENMS_ANALYSIS_MAPMATCHING_STABLEPAIRFINDER_H
10 #define OPENMS_ANALYSIS_MAPMATCHING_STABLEPAIRFINDER_H
11 
13 
14 namespace OpenMS
15 {
16  class AASequence;
17 
83  class OPENMS_DLLAPI StablePairFinder :
84  public BaseGroupFinder
85  {
86 public:
87 
90 
93 
95  ~StablePairFinder() override
96  {
97  }
98 
101  {
102  return new StablePairFinder();
103  }
104 
106  static const String getProductName()
107  {
108  return "stable";
109  }
110 
118  void run(const std::vector<ConsensusMap>& input_maps,
119  ConsensusMap& result_map) override;
120 
121 protected:
122 
124 
125  enum
126  {
128  MZ = Peak2D::MZ
129  };
131 
132  //docu in base class
133  void updateMembers_() override;
134 
142  bool compatibleIDs_(const ConsensusFeature& feat1,
143  const ConsensusFeature& feat2) const;
144 
147 
149  bool use_IDs_;
150 
156  const AASequence& getBestHitSequence_(const PeptideIdentification& peptideIdentification) const;
157  };
158 
159 } // namespace OpenMS
160 
161 #endif // OPENMS_ANALYSIS_MAPMATCHING_STABLEPAIRFINDER_H
162 
163 /*
164 
165  gnuplot history - how the plot was created - please do not delete this receipt
166 
167  f(x,intercept,exponent)=1/(1+(abs(x)*intercept)**exponent)
168  set terminal postscript enhanced color
169  set output "choosingstablepairfinderparams.ps"
170  set size ratio .3
171  plot [-3:3] [0:1] f(x,1,1), f(x,2,1), f(x,1,2), f(x,2,2)
172 
173  */
Representation of a peptide/protein sequence.
Definition: AASequence.h:86
The base class of all element group finding algorithms.
Definition: BaseGroupFinder.h:38
A consensus feature spanning multiple LC-MS/MS experiments.
Definition: ConsensusFeature.h:45
A container for consensus elements.
Definition: ConsensusMap.h:66
@ MZ
Mass-to-charge dimension id (1 if used as a const int)
Definition: Peak2D.h:50
@ RT
Retention time dimension id (0 if used as a const int)
Definition: Peak2D.h:49
Represents the peptide hits for a spectrum.
Definition: PeptideIdentification.h:39
This class implements a pair finding algorithm for consensus features.
Definition: StablePairFinder.h:85
double second_nearest_gap_
The distance to the second nearest neighbors must be by this factor larger than the distance to the m...
Definition: StablePairFinder.h:146
~StablePairFinder() override
Destructor.
Definition: StablePairFinder.h:95
bool use_IDs_
Only match if peptide IDs are compatible?
Definition: StablePairFinder.h:149
StablePairFinder()
Constructor.
bool compatibleIDs_(const ConsensusFeature &feat1, const ConsensusFeature &feat2) const
Checks if the peptide IDs of two features are compatible.
void run(const std::vector< ConsensusMap > &input_maps, ConsensusMap &result_map) override
Run the algorithm.
void updateMembers_() override
This method is used to update extra member variables at the end of the setParameters() method.
const AASequence & getBestHitSequence_(const PeptideIdentification &peptideIdentification) const
Returns the highest scoring peptide hit in the the given peptide identification.
BaseGroupFinder Base
Base class.
Definition: StablePairFinder.h:89
static BaseGroupFinder * create()
Returns an instance of this class.
Definition: StablePairFinder.h:100
static const String getProductName()
Returns the name of this module.
Definition: StablePairFinder.h:106
A more convenient string class.
Definition: String.h:34
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:22
@ RT
RT in seconds.