ProteoWizard
PeakelGrower.hpp
Go to the documentation of this file.
1 //
2 // $Id$
3 //
4 //
5 // Original author: Darren Kessner <darren@proteowizard.org>
6 //
7 // Copyright 2009 Center for Applied Molecular Medicine
8 // University of Southern California, Los Angeles, CA
9 //
10 // Licensed under the Apache License, Version 2.0 (the "License");
11 // you may not use this file except in compliance with the License.
12 // You may obtain a copy of the License at
13 //
14 // http://www.apache.org/licenses/LICENSE-2.0
15 //
16 // Unless required by applicable law or agreed to in writing, software
17 // distributed under the License is distributed on an "AS IS" BASIS,
18 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19 // See the License for the specific language governing permissions and
20 // limitations under the License.
21 //
22 
23 #ifndef _PEAKELGROWER_HPP_
24 #define _PEAKELGROWER_HPP_
25 
26 
27 #include "MZRTField.hpp"
30 #include <set>
31 
32 
33 namespace pwiz {
34 namespace analysis {
35 
36 
37 ///
38 /// interface for growing Peakels
39 ///
41 {
42  public:
43 
45 
46  virtual void sowPeak(PeakelField& peakelField, const Peak& peak) const = 0;
47  virtual void sowPeaks(PeakelField& peakelField, const std::vector<Peak>& peaks) const;
48  virtual void sowPeaks(PeakelField& peakelField, const std::vector< std::vector<Peak> >& peaks) const;
49 
50  virtual ~PeakelGrower(){}
51 };
52 
53 
54 ///
55 /// simple PeakelGrower implementation, based on proximity of Peaks
56 ///
58 {
59  public:
60 
61  struct Config
62  {
63  MZTolerance mzTolerance; // m/z units
64  double rtTolerance; // seconds
65  std::ostream* log;
66 
67  Config(double _mzTolerance = .01, double _rtTolerance = 10)
68  : mzTolerance(_mzTolerance), rtTolerance(_rtTolerance), log(0)
69  {}
70  };
71 
72  PeakelGrower_Proximity(const Config& config = Config());
73  virtual void sowPeak(PeakelField&, const Peak& peak) const;
74 
75  private:
77 };
78 
79 
80 } // namespace analysis
81 } // namespace pwiz
82 
83 
84 #endif // _PEAKELGROWER_HPP_
85 
pwiz::data::peakdata::Peak
Definition: PeakData.hpp:53
pwiz::analysis::PeakelGrower::sowPeaks
virtual void sowPeaks(PeakelField &peakelField, const std::vector< std::vector< Peak > > &peaks) const
pwiz
Definition: ChromatogramList_Filter.hpp:36
pwiz::analysis::PeakelGrower::~PeakelGrower
virtual ~PeakelGrower()
Definition: PeakelGrower.hpp:50
pwiz::analysis::PeakelGrower::sowPeaks
virtual void sowPeaks(PeakelField &peakelField, const std::vector< Peak > &peaks) const
pwiz::chemistry::MZTolerance
struct for expressing m/z tolerance in either amu or ppm
Definition: MZTolerance.hpp:39
pwiz::analysis::PeakelGrower_Proximity::sowPeak
virtual void sowPeak(PeakelField &, const Peak &peak) const
pwiz::analysis::MZRTField
MZRTField is a std::set of boost::shared_ptrs, stored as a binary tree ordered by LessThan_MZRT.
Definition: MZRTField.hpp:95
PWIZ_API_DECL
#define PWIZ_API_DECL
Definition: Export.hpp:32
pwiz::analysis::PeakelGrower_Proximity::Config::mzTolerance
MZTolerance mzTolerance
Definition: PeakelGrower.hpp:63
Export.hpp
pwiz::analysis::PeakelGrower::Peak
pwiz::data::peakdata::Peak Peak
Definition: PeakelGrower.hpp:44
pwiz::analysis::PeakelGrower::sowPeak
virtual void sowPeak(PeakelField &peakelField, const Peak &peak) const =0
MZRTField.hpp
pwiz::analysis::PeakelGrower_Proximity::PeakelGrower_Proximity
PeakelGrower_Proximity(const Config &config=Config())
PeakData.hpp
pwiz::analysis::PeakelGrower_Proximity::Config::rtTolerance
double rtTolerance
Definition: PeakelGrower.hpp:64
pwiz::analysis::PeakelGrower_Proximity::config_
Config config_
Definition: PeakelGrower.hpp:76
pwiz::analysis::PeakelGrower_Proximity
simple PeakelGrower implementation, based on proximity of Peaks
Definition: PeakelGrower.hpp:58
pwiz::analysis::PeakelGrower
interface for growing Peakels
Definition: PeakelGrower.hpp:41
pwiz::analysis::PeakelGrower_Proximity::Config
Definition: PeakelGrower.hpp:62
pwiz::analysis::PeakelGrower_Proximity::Config::log
std::ostream * log
Definition: PeakelGrower.hpp:65
pwiz::analysis::PeakelGrower_Proximity::Config::Config
Config(double _mzTolerance=.01, double _rtTolerance=10)
Definition: PeakelGrower.hpp:67