Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
FeatureFinderAlgorithm.h
Go to the documentation of this file.
1 // --------------------------------------------------------------------------
2 // OpenMS -- Open-Source Mass Spectrometry
3 // --------------------------------------------------------------------------
4 // Copyright The OpenMS Team -- Eberhard Karls University Tuebingen,
5 // ETH Zurich, and Freie Universitaet Berlin 2002-2017.
6 //
7 // This software is released under a three-clause BSD license:
8 // * Redistributions of source code must retain the above copyright
9 // notice, this list of conditions and the following disclaimer.
10 // * Redistributions in binary form must reproduce the above copyright
11 // notice, this list of conditions and the following disclaimer in the
12 // documentation and/or other materials provided with the distribution.
13 // * Neither the name of any author or any participating institution
14 // may be used to endorse or promote products derived from this software
15 // without specific prior written permission.
16 // For a full list of authors, refer to the file AUTHORS.
17 // --------------------------------------------------------------------------
18 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 // ARE DISCLAIMED. IN NO EVENT SHALL ANY OF THE AUTHORS OR THE CONTRIBUTING
22 // INSTITUTIONS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
23 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
24 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
25 // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
26 // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
27 // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
28 // ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 //
30 // --------------------------------------------------------------------------
31 // $Maintainer: Timo Sachsenberg $
32 // $Authors: $
33 // --------------------------------------------------------------------------
34 
35 #ifndef OPENMS_TRANSFORMATIONS_FEATUREFINDER_FEATUREFINDERALGORITHM_H
36 #define OPENMS_TRANSFORMATIONS_FEATUREFINDER_FEATUREFINDERALGORITHM_H
37 
43 
44 namespace OpenMS
45 {
46 
47  // forward declaration
48  class FeatureFinder;
49  class FeatureMap;
50 
52  struct OPENMS_DLLAPI Summary
53  {
54  std::map<String, UInt> exception; //count exceptions
56  std::map<String, UInt> mz_model; //count used mz models
57  std::map<float, UInt> mz_stdev; //count used mz standard deviations
58  std::vector<UInt> charge; //count used charges
59  double corr_mean, corr_max, corr_min; //boxplot for correlation
60 
62  Summary() :
63  no_exceptions(0),
64  corr_mean(0),
65  corr_max(0),
66  corr_min(1)
67  {}
68 
69  };
70 
76  public DefaultParamHandler
77  {
78 public:
80  typedef PeakMap MapType;
85 
88  DefaultParamHandler("FeatureFinderAlgorithm"),
89  map_(0),
90  features_(0),
91  ff_(0)
92  {
93  }
94 
97  {
98  }
99 
101  static void registerChildren();
102 
104  virtual void run() = 0;
105 
111  virtual Param getDefaultParameters() const
112  {
113  return this->defaults_;
114  }
115 
117  void setData(const MapType& map, FeatureMap& features, FeatureFinder& ff)
118  {
119  map_ = &map;
120  features_ = &features;
121  ff_ = &ff;
122  }
123 
129  virtual void setSeeds(const FeatureMap& seeds)
130  {
131  if (seeds.size() != 0)
132  {
133  throw Exception::IllegalArgument(__FILE__, __LINE__, OPENMS_PRETTY_FUNCTION, "The used feature detection algorithm does not support user-specified seed lists!");
134  }
135  }
136 
137 protected:
138 
140  const MapType* map_;
141 
144 
147 
148 private:
149 
152 
155 
156  };
157 }
158 
159 #endif // OPENMS_TRANSFORMATIONS_FEATUREFINDER_FEATUREFINDERALGORITHM_H
UInt no_exceptions
Definition: FeatureFinderAlgorithm.h:55
FeatureFinder * ff_
Pointer to the calling FeatureFinder that is used to access the feature flags.
Definition: FeatureFinderAlgorithm.h:146
PeakMap MapType
Input map type.
Definition: FeatureFinderAlgorithm.h:80
FeatureMap * features_
Output data pointer.
Definition: FeatureFinderAlgorithm.h:143
MapType::CoordinateType CoordinateType
Coordinate/Position type of peaks.
Definition: FeatureFinderAlgorithm.h:82
const MapType * map_
Input data pointer.
Definition: FeatureFinderAlgorithm.h:140
std::map< String, UInt > mz_model
Definition: FeatureFinderAlgorithm.h:56
virtual void setSeeds(const FeatureMap &seeds)
Sets a reference to the calling FeatureFinder.
Definition: FeatureFinderAlgorithm.h:129
A container for features.
Definition: FeatureMap.h:94
unsigned int UInt
Unsigned integer type.
Definition: Types.h:95
FeatureFinderAlgorithm()
default constructor
Definition: FeatureFinderAlgorithm.h:87
Abstract base class for FeatureFinder algorithms.
Definition: FeatureFinderAlgorithm.h:75
std::map< float, UInt > mz_stdev
Definition: FeatureFinderAlgorithm.h:57
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47
virtual Param getDefaultParameters() const
Returns the default parameters. Reimplement.
Definition: FeatureFinderAlgorithm.h:111
A method or algorithm argument contains illegal values.
Definition: Exception.h:649
std::map< String, UInt > exception
Definition: FeatureFinderAlgorithm.h:54
std::vector< UInt > charge
Definition: FeatureFinderAlgorithm.h:58
Summary of fitting results.
Definition: FeatureFinderAlgorithm.h:52
Management and storage of parameters / INI files.
Definition: Param.h:75
In-Memory representation of a mass spectrometry experiment.
Definition: MSExperiment.h:82
double corr_min
Definition: FeatureFinderAlgorithm.h:59
virtual ~FeatureFinderAlgorithm()
destructor
Definition: FeatureFinderAlgorithm.h:96
MapType::IntensityType IntensityType
Intensity type of peaks.
Definition: FeatureFinderAlgorithm.h:84
The main feature finder class.
Definition: FeatureFinder.h:57
Summary()
Initial values.
Definition: FeatureFinderAlgorithm.h:62
A base class for all classes handling default parameters.
Definition: DefaultParamHandler.h:92
void setData(const MapType &map, FeatureMap &features, FeatureFinder &ff)
Sets a reference to the calling FeatureFinder.
Definition: FeatureFinderAlgorithm.h:117

OpenMS / TOPP release 2.3.0 Documentation generated on Tue Jan 9 2018 18:22:00 using doxygen 1.8.13