ProteoWizard
ThresholdFilter.hpp
Go to the documentation of this file.
1//
2// $Id$
3//
4//
5// Original author: Matt Chambers <matt.chambers <a.t> vanderbilt.edu>
6//
7// Copyright 2008 Vanderbilt University - Nashville, TN 37232
8//
9// Licensed under the Apache License, Version 2.0 (the "License");
10// you may not use this file except in compliance with the License.
11// You may obtain a copy of the License at
12//
13// http://www.apache.org/licenses/LICENSE-2.0
14//
15// Unless required by applicable law or agreed to in writing, software
16// distributed under the License is distributed on an "AS IS" BASIS,
17// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18// See the License for the specific language governing permissions and
19// limitations under the License.
20//
21
22
23#ifndef _THRESHOLDFILTER_HPP_
24#define _THRESHOLDFILTER_HPP_
25
26
30#include <climits>
31
32
33namespace pwiz {
34namespace analysis {
35
36
38{
39 /// determines the method of thresholding and the meaning of the threshold value
41 {
42 /// keep the <threshold> [most|least] intense data points
43 /// - <threshold> is rounded to the nearest integer
44 /// - if the <threshold> falls within equally intense data points, all data points with that intensity are removed
46
47 /// keep the <threshold> [most|least] intense data points
48 /// - <threshold> is rounded to the nearest integer
49 /// - if the <threshold> falls within equally intense data points, all data points with that intensity are kept
51
52 /// keep data points ranked [better|worse] than <threshold>
53 /// - <threshold> is rounded to the nearest integer
54 /// - rank 1 is the most intense
55 // TODO: By_CompetitionRank,
56
57 /// keep data points ranked [better|worse] than <threshold>
58 /// - rank 1 is the most intense
59 // TODO: By_FractionalRank,
60
61 /// keep data points [more|less] absolutely intense than <threshold>
63
64 /// keep data points [more|less] relatively intense than <threshold>
65 /// - <threshold> is each data point's fraction of the base peak intensity (in the range [0,1])
67
68 /// keep data points [more|less] relatively intense than <threshold>
69 /// - <threshold> is each data point's fraction of the total intensity, aka total ion current (in the range [0,1])
71
72 /// keep data points that are part of the <threshold> [most|least] intense fraction
73 /// - <threshold> is the fraction of TIC to keep, i.e. the TIC of the kept data points is <threshold> * original TIC
74 ThresholdingBy_FractionOfTotalIntensityCutoff
75 };
76
77 /// determines the orientation of the thresholding
79 {
80 Orientation_MostIntense, /// thresholder removes the least intense data points
81 Orientation_LeastIntense /// thresholder removes the most intense data points
82 };
83
84 ThresholdFilter(ThresholdingBy_Type byType_ = ThresholdingBy_Count,
85 double threshold_ = 1.0,
86 ThresholdingOrientation orientation_ = Orientation_MostIntense,
87 const pwiz::util::IntegerSet& msLevelsToThreshold = pwiz::util::IntegerSet(1, INT_MAX));
88
89 virtual void operator () (const pwiz::msdata::SpectrumPtr&) const;
91
93 const double threshold;
96
97 private:
98 static const char* byTypeMostIntenseName[];
99 static const char* byTypeLeastIntenseName[];
100};
101
102} // namespace analysis
103} // namespace pwiz
104
105
106#endif // _SPECTRUMLIST_PEAKFILTER_HPP_
#define PWIZ_API_DECL
Definition Export.hpp:32
a virtual container of integers, accessible via an iterator interface, stored as union of intervals
boost::shared_ptr< Spectrum > SpectrumPtr
Definition MSData.hpp:573
const ThresholdingBy_Type byType
virtual void describe(pwiz::msdata::ProcessingMethod &) const
const pwiz::util::IntegerSet msLevelsToThreshold
const ThresholdingOrientation orientation
ThresholdingOrientation
determines the orientation of the thresholding
ThresholdingBy_Type
determines the method of thresholding and the meaning of the threshold value
@ ThresholdingBy_CountAfterTies
keep the <threshold> [most|least] intense data points
@ ThresholdingBy_FractionOfBasePeakIntensity
keep data points [more|less] relatively intense than <threshold>
@ ThresholdingBy_FractionOfTotalIntensity
keep data points [more|less] relatively intense than <threshold>
@ ThresholdingBy_AbsoluteIntensity
keep data points ranked [better|worse] than <threshold>
@ ThresholdingBy_Count
keep the <threshold> [most|least] intense data points
ThresholdFilter(ThresholdingBy_Type byType_=ThresholdingBy_Count, double threshold_=1.0, ThresholdingOrientation orientation_=Orientation_MostIntense, const pwiz::util::IntegerSet &msLevelsToThreshold=pwiz::util::IntegerSet(1, INT_MAX))
Description of the default peak processing method. This element describes the base method used in the...
Definition MSData.hpp:255