ProteoWizard
PeakelPicker.hpp
Go to the documentation of this file.
1 //
2 // $Id: PeakelPicker.hpp 1191 2009-08-14 19:33:05Z chambm $
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 _PEAKELPICKER_HPP_
24 #define _PEAKELPICKER_HPP_
25 
26 
27 #include "PeakelPicker.hpp"
28 #include "MZRTField.hpp"
30 
31 
32 namespace pwiz {
33 namespace analysis {
34 
35 
36 ///
37 /// interface for picking Peakels and arranging into Features;
38 /// note: Peakels are actually removed from the PeakelField
39 ///
41 {
42  public:
43 
44  virtual void pick(PeakelField& peakels, FeatureField& features) const = 0;
45 
46  virtual ~PeakelPicker(){}
47 };
48 
49 
50 ///
51 /// basic implementation
52 ///
54 {
55  public:
56 
57  struct Config
58  {
59  std::ostream* log;
60  size_t minCharge;
61  size_t maxCharge;
63  MZTolerance mzTolerance;
64  double rtTolerance;
66 
67  //double intensityThreshold; // ? // some kind of tolerance to match isotope envelope
68  //double relativeIntensityTolerance;
69 
71  : log(0),
72  minCharge(2),
73  maxCharge(5),
74  minMonoisotopicPeakelSize(3),
75  mzTolerance(10, MZTolerance::PPM),
76  rtTolerance(5), // seconds
77  minPeakelCount(3)
78  {}
79  };
80 
81  PeakelPicker_Basic(const Config& config = Config()) : config_(config) {}
82 
83  virtual void pick(PeakelField& peakels, FeatureField& features) const;
84 
85  private:
87 };
88 
89 
90 } // namespace analysis
91 } // namespace pwiz
92 
93 
94 #endif // _PEAKELPICKER_HPP_
95