OpenMS
Loading...
Searching...
No Matches
FeatureFinderAlgorithm.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: Timo Sachsenberg $
6// $Authors: $
7// --------------------------------------------------------------------------
8
9#pragma once
10
16
17
18namespace OpenMS
19{
20
21 // forward declaration
22 class FeatureMap;
23
25 struct OPENMS_DLLAPI Summary
26 {
27 std::map<String, UInt> exception;
29 std::map<String, UInt> mz_model;
30 std::map<float, UInt> mz_stdev;
31 std::vector<UInt> charge;
32 double corr_mean, corr_max, corr_min; //boxplot for correlation
33
36 no_exceptions(0),
37 corr_mean(0),
38 corr_max(0),
39 corr_min(1)
40 {}
41
42 };
43
50 public ProgressLogger
51 {
52public:
59
62 DefaultParamHandler("FeatureFinderAlgorithm"),
63 map_(nullptr),
64 features_(nullptr)
65 {
66 }
67
70 {
71 }
72
74
75
77 virtual void run() = 0;
78
85 {
86 return this->defaults_;
87 }
88
90 void setData(const MapType& map, FeatureMap& features)
91 {
92 map_ = &map;
93 features_ = &features;
94 }
95
101 virtual void setSeeds(const FeatureMap& seeds)
102 {
103 if (!seeds.empty())
104 {
105 throw Exception::IllegalArgument(__FILE__, __LINE__, OPENMS_PRETTY_FUNCTION, "The used feature detection algorithm does not support user-specified seed lists!");
106 }
107 }
108
109protected:
110
112 const MapType* map_;
113
116
117private:
118
121
124
125 };
126}
127
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:630
bool empty() const noexcept
Definition ExposedVector.h:140
Abstract base class for FeatureFinder algorithms.
Definition FeatureFinderAlgorithm.h:51
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:101
void setData(const MapType &map, FeatureMap &features)
Sets a reference to the calling FeatureFinder.
Definition FeatureFinderAlgorithm.h:90
const MapType * map_
Input data pointer.
Definition FeatureFinderAlgorithm.h:112
FeatureFinderAlgorithm & operator=(const FeatureFinderAlgorithm &)
Not implemented.
~FeatureFinderAlgorithm() override
destructor
Definition FeatureFinderAlgorithm.h:69
FeatureFinderAlgorithm(const FeatureFinderAlgorithm &)
Not implemented.
PeakMap MapType
Input map type.
Definition FeatureFinderAlgorithm.h:54
FeatureFinderAlgorithm()
default constructor
Definition FeatureFinderAlgorithm.h:61
virtual Param getDefaultParameters() const
Returns the default parameters. Reimplement.
Definition FeatureFinderAlgorithm.h:84
FeatureMap * features_
Output data pointer.
Definition FeatureFinderAlgorithm.h:115
MapType::IntensityType IntensityType
Intensity type of peaks.
Definition FeatureFinderAlgorithm.h:58
MapType::CoordinateType CoordinateType
Coordinate/Position type of peaks.
Definition FeatureFinderAlgorithm.h:56
A container for features.
Definition FeatureMap.h:82
In-Memory representation of a mass spectrometry run.
Definition MSExperiment.h:49
PeakType::CoordinateType CoordinateType
Coordinate type of peak positions.
Definition MSExperiment.h:62
PeakType::IntensityType IntensityType
Intensity type of peaks.
Definition MSExperiment.h:64
Management and storage of parameters / INI files.
Definition Param.h:46
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:26
std::map< String, UInt > exception
count exceptions
Definition FeatureFinderAlgorithm.h:27
std::map< float, UInt > mz_stdev
count used mz standard deviations
Definition FeatureFinderAlgorithm.h:30
double corr_max
Definition FeatureFinderAlgorithm.h:32
std::vector< UInt > charge
count used charges
Definition FeatureFinderAlgorithm.h:31
std::map< String, UInt > mz_model
count used mz models
Definition FeatureFinderAlgorithm.h:29
UInt no_exceptions
Definition FeatureFinderAlgorithm.h:28
Summary()
Initial values.
Definition FeatureFinderAlgorithm.h:35