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-2013.
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: Clemens Groepl $
32 // $Authors: $
33 // --------------------------------------------------------------------------
34 
35 #ifndef OPENMS_TRANSFORMATIONS_FEATUREFINDER_FEATUREFINDERALGORITHM_H
36 #define OPENMS_TRANSFORMATIONS_FEATUREFINDER_FEATUREFINDERALGORITHM_H
37 
42 
43 namespace OpenMS
44 {
45 
46  // forward declaration
47  class FeatureFinder;
48 
50  struct OPENMS_DLLAPI Summary
51  {
52  std::map<String, UInt> exception; //count exceptions
54  std::map<String, UInt> mz_model; //count used mz models
55  std::map<float, UInt> mz_stdev; //count used mz standard deviations
56  std::vector<UInt> charge; //count used charges
57  DoubleReal corr_mean, corr_max, corr_min; //boxplot for correlation
58 
60  Summary() :
61  no_exceptions(0),
62  corr_mean(0),
63  corr_max(0),
64  corr_min(1)
65  {}
66 
67  };
68 
73  template <class PeakType, class FeatureType>
75  public DefaultParamHandler
76  {
77 public:
86 
89  DefaultParamHandler("FeatureFinderAlgorithm"),
90  map_(0),
91  features_(0),
92  ff_(0)
93  {
94  }
95 
98  {
99  }
100 
102  static void registerChildren();
103 
105  virtual void run() = 0;
106 
112  virtual Param getDefaultParameters() const
113  {
114  return this->defaults_;
115  }
116 
118  void setData(const MapType & map, FeatureMapType & features, FeatureFinder & ff)
119  {
120  map_ = &map;
121  features_ = &features;
122  ff_ = &ff;
123  }
124 
130  virtual void setSeeds(const FeatureMapType & seeds)
131  {
132  if (seeds.size() != 0)
133  {
134  throw Exception::IllegalArgument(__FILE__, __LINE__, __PRETTY_FUNCTION__, "The used feature detection algorithm does not support user-specified seed lists!");
135  }
136  }
137 
138 protected:
139 
141  const MapType * map_;
142 
145 
148 
149 private:
150 
153 
156 
157  };
158 }
159 
160 #endif // OPENMS_TRANSFORMATIONS_FEATUREFINDER_FEATUREFINDERALGORITHM_H
UInt no_exceptions
Definition: FeatureFinderAlgorithm.h:53
FeatureMapType * features_
Output data pointer.
Definition: FeatureFinderAlgorithm.h:144
Param defaults_
Container for default parameters. This member should be filled in the constructor of derived classes!...
Definition: DefaultParamHandler.h:155
FeatureFinder * ff_
Pointer to the calling FeatureFinder that is used to access the feature flags.
Definition: FeatureFinderAlgorithm.h:147
MapType::CoordinateType CoordinateType
Coordinate/Position type of peaks.
Definition: FeatureFinderAlgorithm.h:81
const MapType * map_
Input data pointer.
Definition: FeatureFinderAlgorithm.h:141
std::map< String, UInt > mz_model
Definition: FeatureFinderAlgorithm.h:54
A container for features.
Definition: FeatureMap.h:111
FeatureFinderAlgorithm()
default constructor
Definition: FeatureFinderAlgorithm.h:88
Abstract base class for FeatureFinder algorithms.
Definition: FeatureFinderAlgorithm.h:74
MSExperiment< PeakType > MapType
Input map type.
Definition: FeatureFinderAlgorithm.h:79
virtual Param getDefaultParameters() const
Returns the default parameters. Reimplment.
Definition: FeatureFinderAlgorithm.h:112
PeakType::IntensityType IntensityType
Intenstiy type of peaks.
Definition: MSExperiment.h:87
FeatureFinderAlgorithm & operator=(const FeatureFinderAlgorithm &)
Not implemented.
std::map< float, UInt > mz_stdev
Definition: FeatureFinderAlgorithm.h:55
A method or algorithm argument contains illegal values.
Definition: Exception.h:634
FeatureMap< FeatureType > FeatureMapType
Output feature type.
Definition: FeatureFinderAlgorithm.h:85
std::map< String, UInt > exception
Definition: FeatureFinderAlgorithm.h:52
virtual void run()=0
Main method that implements the actual algorithm.
std::vector< UInt > charge
Definition: FeatureFinderAlgorithm.h:56
Summary of fitting results.
Definition: FeatureFinderAlgorithm.h:50
static void registerChildren()
register all derived classes here (see FeatureFinderAlgorithm_impl.h)
Definition: FeatureFinderAlgorithm_impl.h:52
virtual void setSeeds(const FeatureMapType &seeds)
Sets a reference to the calling FeatureFinder.
Definition: FeatureFinderAlgorithm.h:130
Management and storage of parameters / INI files.
Definition: Param.h:69
Representation of a mass spectrometry experiment.
Definition: MSExperiment.h:68
DoubleReal corr_min
Definition: FeatureFinderAlgorithm.h:57
virtual ~FeatureFinderAlgorithm()
destructor
Definition: FeatureFinderAlgorithm.h:97
MapType::IntensityType IntensityType
Intensity type of peaks.
Definition: FeatureFinderAlgorithm.h:83
The main feature finder class.
Definition: FeatureFinder.h:57
Summary()
Initial values.
Definition: FeatureFinderAlgorithm.h:60
A base class for all classes handling default parameters.
Definition: DefaultParamHandler.h:90
void setData(const MapType &map, FeatureMapType &features, FeatureFinder &ff)
Sets a reference to the calling FeatureFinder.
Definition: FeatureFinderAlgorithm.h:118

OpenMS / TOPP release 1.11.1 Documentation generated on Thu Nov 14 2013 11:19:13 using doxygen 1.8.5