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
32namespace pwiz {
33namespace 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:
58 double fraction_;
61};
62
63
64} // namespace analysis
65} // namespace pwiz
66
67
68#endif // _SPECTRUMLIST_CHARGESTATECALCULATOR_HPP_
#define PWIZ_API_DECL
Definition Export.hpp:32
SpectrumList implementation that assigns (probable) charge states to tandem mass spectra.
static bool accept(const msdata::SpectrumListPtr &inner)
accepts any tandem mass spectrum
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)
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...
Inheritable pass-through implementation for wrapping a SpectrumList.
boost::shared_ptr< SpectrumList > SpectrumListPtr
Definition MSData.hpp:711
boost::shared_ptr< Spectrum > SpectrumPtr
Definition MSData.hpp:573