ProteoWizard
SpectrumList_ChargeStateCalculator.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 _SPECTRUMLIST_CHARGESTATECALCULATOR_HPP_
24 #define _SPECTRUMLIST_CHARGESTATECALCULATOR_HPP_
25 
26 
30 
31 
32 namespace pwiz {
33 namespace analysis {
34 
35 
36 /// SpectrumList implementation that assigns (probable) charge states to tandem mass spectra
38 {
39  public:
41  bool overrideExistingChargeState = true,
42  int maxMultipleCharge = 3,
43  int minMultipleCharge = 2,
44  double intensityFractionBelowPrecursorForSinglyCharged = 0.9,
45  int maxKnownCharge = 0,
46  bool makeMS2 = false);
47 
48  /// accepts any tandem mass spectrum
49  static bool accept(const msdata::SpectrumListPtr& inner) {return true;}
50 
51  /// charge calculation requires binary data to function, so returned spectra will always provide the binary data
52  virtual msdata::SpectrumPtr spectrum(size_t index, bool getBinaryData = true) const;
53 
54  private:
55  bool override_;
58  double fraction_;
60  bool makeMS2_;
61 };
62 
63 
64 } // namespace analysis
65 } // namespace pwiz
66 
67 
68 #endif // _SPECTRUMLIST_CHARGESTATECALCULATOR_HPP_
pwiz::analysis::SpectrumList_ChargeStateCalculator::SpectrumList_ChargeStateCalculator
SpectrumList_ChargeStateCalculator(const msdata::SpectrumListPtr &inner, bool overrideExistingChargeState=true, int maxMultipleCharge=3, int minMultipleCharge=2, double intensityFractionBelowPrecursorForSinglyCharged=0.9, int maxKnownCharge=0, bool makeMS2=false)
pwiz::msdata::SpectrumListPtr
boost::shared_ptr< SpectrumList > SpectrumListPtr
Definition: MSData.hpp:711
pwiz::analysis::SpectrumList_ChargeStateCalculator::minCharge_
int minCharge_
Definition: SpectrumList_ChargeStateCalculator.hpp:57
pwiz
Definition: ChromatogramList_Filter.hpp:36
pwiz::analysis::SpectrumList_ChargeStateCalculator
SpectrumList implementation that assigns (probable) charge states to tandem mass spectra.
Definition: SpectrumList_ChargeStateCalculator.hpp:38
pwiz::msdata::SpectrumListWrapper
Inheritable pass-through implementation for wrapping a SpectrumList.
Definition: SpectrumListWrapper.hpp:38
pwiz::analysis::SpectrumList_ChargeStateCalculator::spectrum
virtual msdata::SpectrumPtr spectrum(size_t index, bool getBinaryData=true) const
charge calculation requires binary data to function, so returned spectra will always provide the bina...
PWIZ_API_DECL
#define PWIZ_API_DECL
Definition: Export.hpp:32
pwiz::analysis::SpectrumList_ChargeStateCalculator::maxKnownCharge_
int maxKnownCharge_
Definition: SpectrumList_ChargeStateCalculator.hpp:59
pwiz::analysis::SpectrumList_ChargeStateCalculator::maxCharge_
int maxCharge_
Definition: SpectrumList_ChargeStateCalculator.hpp:56
Export.hpp
pwiz::analysis::SpectrumList_ChargeStateCalculator::accept
static bool accept(const msdata::SpectrumListPtr &inner)
accepts any tandem mass spectrum
Definition: SpectrumList_ChargeStateCalculator.hpp:49
pwiz::msdata::SpectrumPtr
boost::shared_ptr< Spectrum > SpectrumPtr
Definition: MSData.hpp:573
pwiz::analysis::SpectrumList_ChargeStateCalculator::fraction_
double fraction_
Definition: SpectrumList_ChargeStateCalculator.hpp:58
pwiz::analysis::SpectrumList_ChargeStateCalculator::makeMS2_
bool makeMS2_
Definition: SpectrumList_ChargeStateCalculator.hpp:60
IntegerSet.hpp
pwiz::analysis::SpectrumList_ChargeStateCalculator::override_
bool override_
Definition: SpectrumList_ChargeStateCalculator.hpp:55
SpectrumListWrapper.hpp