OpenMS
FeatureFinderAlgorithm.h
Go to the documentation of this file.
1 // Copyright (c) 2002-present, 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 #pragma once
10 
17 
18 
19 namespace OpenMS
20 {
21 
22  // forward declaration
23  class FeatureMap;
24 
26  struct OPENMS_DLLAPI Summary
27  {
28  std::map<String, UInt> exception;
30  std::map<String, UInt> mz_model;
31  std::map<float, UInt> mz_stdev;
32  std::vector<UInt> charge;
33  double corr_mean, corr_max, corr_min; //boxplot for correlation
34 
36  Summary() :
37  no_exceptions(0),
38  corr_mean(0),
39  corr_max(0),
40  corr_min(1)
41  {}
42 
43  };
44 
50  public DefaultParamHandler,
51  public ProgressLogger
52  {
53 public:
55  typedef PeakMap MapType;
60 
63  DefaultParamHandler("FeatureFinderAlgorithm"),
64  map_(nullptr),
65  features_(nullptr)
66  {
67  }
68 
71  {
72  }
73 
75 
76 
78  virtual void run() = 0;
79 
85  virtual Param getDefaultParameters() const
86  {
87  return this->defaults_;
88  }
89 
91  void setData(const MapType& map, FeatureMap& features)
92  {
93  map_ = &map;
94  features_ = &features;
95  }
96 
102  virtual void setSeeds(const FeatureMap& seeds)
103  {
104  if (!seeds.empty())
105  {
106  throw Exception::IllegalArgument(__FILE__, __LINE__, OPENMS_PRETTY_FUNCTION, "The used feature detection algorithm does not support user-specified seed lists!");
107  }
108  }
109 
110 protected:
111 
113  const MapType* map_;
114 
117 
118 private:
119 
122 
125 
126  };
127 }
128 
A base class for all classes handling default parameters.
Definition: DefaultParamHandler.h:66
Param defaults_
Container for default parameters. This member should be filled in the constructor of derived classes!
Definition: DefaultParamHandler.h:146
A method or algorithm argument contains illegal values.
Definition: Exception.h:616
bool empty() const noexcept
Definition: ExposedVector.h:133
Abstract base class for FeatureFinder algorithms.
Definition: FeatureFinderAlgorithm.h:52
virtual void run()=0
register all derived classes here (see FeatureFinderAlgorithm_impl.h)
virtual void setSeeds(const FeatureMap &seeds)
Sets a reference to the calling FeatureFinder.
Definition: FeatureFinderAlgorithm.h:102
void setData(const MapType &map, FeatureMap &features)
Sets a reference to the calling FeatureFinder.
Definition: FeatureFinderAlgorithm.h:91
const MapType * map_
Input data pointer.
Definition: FeatureFinderAlgorithm.h:113
~FeatureFinderAlgorithm() override
destructor
Definition: FeatureFinderAlgorithm.h:70
FeatureFinderAlgorithm(const FeatureFinderAlgorithm &)
Not implemented.
PeakMap MapType
Input map type.
Definition: FeatureFinderAlgorithm.h:55
FeatureFinderAlgorithm()
default constructor
Definition: FeatureFinderAlgorithm.h:62
FeatureFinderAlgorithm & operator=(const FeatureFinderAlgorithm &)
Not implemented.
virtual Param getDefaultParameters() const
Returns the default parameters. Reimplement.
Definition: FeatureFinderAlgorithm.h:85
FeatureMap * features_
Output data pointer.
Definition: FeatureFinderAlgorithm.h:116
MapType::IntensityType IntensityType
Intensity type of peaks.
Definition: FeatureFinderAlgorithm.h:59
MapType::CoordinateType CoordinateType
Coordinate/Position type of peaks.
Definition: FeatureFinderAlgorithm.h:57
A container for features.
Definition: FeatureMap.h:80
In-Memory representation of a mass spectrometry run.
Definition: MSExperiment.h:45
PeakType::CoordinateType CoordinateType
Coordinate type of peak positions.
Definition: MSExperiment.h:58
PeakType::IntensityType IntensityType
Intensity type of peaks.
Definition: MSExperiment.h:60
Management and storage of parameters / INI files.
Definition: Param.h:44
Base class for all classes that want to report their progress.
Definition: ProgressLogger.h:27
unsigned int UInt
Unsigned integer type.
Definition: Types.h:64
Main OpenMS namespace.
Definition: openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19
Summary of fitting results.
Definition: FeatureFinderAlgorithm.h:27
std::map< String, UInt > exception
count exceptions
Definition: FeatureFinderAlgorithm.h:28
std::map< float, UInt > mz_stdev
count used mz standard deviations
Definition: FeatureFinderAlgorithm.h:31
double corr_max
Definition: FeatureFinderAlgorithm.h:33
std::vector< UInt > charge
count used charges
Definition: FeatureFinderAlgorithm.h:32
std::map< String, UInt > mz_model
count used mz models
Definition: FeatureFinderAlgorithm.h:30
UInt no_exceptions
Definition: FeatureFinderAlgorithm.h:29
Summary()
Initial values.
Definition: FeatureFinderAlgorithm.h:36