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
33namespace pwiz {
34namespace 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 {
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
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
#define PWIZ_API_DECL
Definition Export.hpp:32
simple PeakelGrower implementation, based on proximity of Peaks
virtual void sowPeak(PeakelField &, const Peak &peak) const
PeakelGrower_Proximity(const Config &config=Config())
interface for growing Peakels
virtual void sowPeaks(PeakelField &peakelField, const std::vector< std::vector< Peak > > &peaks) const
pwiz::data::peakdata::Peak Peak
virtual void sowPeaks(PeakelField &peakelField, const std::vector< Peak > &peaks) const
virtual void sowPeak(PeakelField &peakelField, const Peak &peak) const =0
MZRTField is a std::set of boost::shared_ptrs, stored as a binary tree ordered by LessThan_MZRT.
Definition MZRTField.hpp:95
Config(double _mzTolerance=.01, double _rtTolerance=10)
struct for expressing m/z tolerance in either amu or ppm