ProteoWizard
SpectrumList_ScanSummer.hpp
Go to the documentation of this file.
1 //
2 // $Id$
3 //
4 //
5 // Original author: William French <william.r.french .@. vanderbilt.edu>
6 //
7 // Copyright 2008 Spielberg Family Center for Applied Proteomics
8 // Cedars-Sinai Medical Center, Los Angeles, California 90048
9 // Copyright 2008 Vanderbilt University - Nashville, TN 37232
10 //
11 // Licensed under the Apache License, Version 2.0 (the "License");
12 // you may not use this file except in compliance with the License.
13 // You may obtain a copy of the License at
14 //
15 // http://www.apache.org/licenses/LICENSE-2.0
16 //
17 // Unless required by applicable law or agreed to in writing, software
18 // distributed under the License is distributed on an "AS IS" BASIS,
19 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20 // See the License for the specific language governing permissions and
21 // limitations under the License.
22 //
23 
24 
25 #ifndef _SPECTRUMLIST_SCANSUMMER_HPP_
26 #define _SPECTRUMLIST_SCANSUMMER_HPP_
27 
28 
32 
33 struct parentIon
34 {
35  double mz;
36  double intensity;
37 };
38 
40 {
41  std::vector<double> precursorMZs;
42  std::vector<double> scanTimes;
43  std::vector<double> ionMobilities;
44  std::vector<int> indexList;
45 };
46 
47 typedef boost::shared_ptr<precursorGroup> precursorGroupPtr;
48 
49 
50 namespace pwiz {
51 namespace analysis {
52 
53 
54 /// Provides a custom-sorted spectrum list
56 {
57  public:
58 
59  SpectrumList_ScanSummer(const msdata::SpectrumListPtr& inner, double precursorTol, double rTimeTol, double mobilityTol = 0, pwiz::util::IterationListenerRegistry* ilr = 0);
60  void pushSpectrum(const msdata::SpectrumIdentity&);
61  double getPrecursorMz(const msdata::Spectrum&) const;
62  //void sumSubScansResample( std::vector<double> &, std::vector<double> &, size_t, msdata::DetailLevel) const;
64  virtual size_t size() const;
65  virtual const msdata::SpectrumIdentity& spectrumIdentity(size_t index) const;
66  virtual msdata::SpectrumPtr spectrum(size_t index, bool getBinaryData = false) const;
67  virtual msdata::SpectrumPtr spectrum(size_t index, msdata::DetailLevel) const;
68 
69  private:
70 
71  double lowerMZlimit;
72  double upperMZlimit;
73  double TotalDaltons;
74  double precursorTol_;
75  double rTimeTol_;
76  double mobilityTol_;
77 
78  std::vector<msdata::SpectrumIdentity> spectrumIdentities; // local cache, with fixed up index fields
79  std::vector<size_t> indexMap; // maps index -> original index
80  std::vector<precursorGroupPtr> precursorMap; // maps new index -> precursor group
81  std::map<double, precursorGroupPtr> precursorList;
82  std::vector<precursorGroupPtr> ms2RetentionTimes;
84  SpectrumList_ScanSummer& operator=(SpectrumList_ScanSummer&); //assignment operator
85 };
86 
87 
88 } // namespace analysis
89 } // namespace pwiz
90 
91 
92 #endif // _SPECTRUMLIST_SCANSUMMER_HPP_
93 
std::vector< precursorGroupPtr > ms2RetentionTimes
std::vector< precursorGroupPtr > precursorMap
std::vector< double > precursorMZs
std::map< double, precursorGroupPtr > precursorList
std::vector< msdata::SpectrumIdentity > spectrumIdentities
boost::shared_ptr< Spectrum > SpectrumPtr
Definition: MSData.hpp:573
std::vector< int > indexList
Provides a custom-sorted spectrum list.
std::vector< double > ionMobilities
Inheritable pass-through implementation for wrapping a SpectrumList.
boost::shared_ptr< SpectrumList > SpectrumListPtr
Definition: MSData.hpp:711
boost::shared_ptr< precursorGroup > precursorGroupPtr
#define PWIZ_API_DECL
Definition: Export.hpp:32
std::vector< double > scanTimes
Identifying information for a spectrum.
Definition: MSData.hpp:470
handles registration of IterationListeners and broadcast of update messages
The structure that captures the generation of a peak list (including the underlying acquisitions) ...
Definition: MSData.hpp:505