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
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
47typedef boost::shared_ptr<precursorGroup> precursorGroupPtr;
48
49
50namespace pwiz {
51namespace 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);
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
75 double rTimeTol_;
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;
85};
86
87
88} // namespace analysis
89} // namespace pwiz
90
91
92#endif // _SPECTRUMLIST_SCANSUMMER_HPP_
93
#define PWIZ_API_DECL
Definition Export.hpp:32
boost::shared_ptr< precursorGroup > precursorGroupPtr
Provides a custom-sorted spectrum list.
virtual size_t size() const
returns the number of spectra
std::vector< precursorGroupPtr > precursorMap
std::vector< precursorGroupPtr > ms2RetentionTimes
virtual msdata::SpectrumPtr spectrum(size_t index, bool getBinaryData=false) const
retrieve a spectrum by index
virtual msdata::SpectrumPtr spectrum(size_t index, msdata::DetailLevel) const
retrieve a spectrum by index
SpectrumList_ScanSummer & operator=(SpectrumList_ScanSummer &)
SpectrumList_ScanSummer(SpectrumList_ScanSummer &)
std::map< double, precursorGroupPtr > precursorList
virtual const msdata::SpectrumIdentity & spectrumIdentity(size_t index) const
access to a spectrum index
std::vector< msdata::SpectrumIdentity > spectrumIdentities
SpectrumList_ScanSummer(const msdata::SpectrumListPtr &inner, double precursorTol, double rTimeTol, double mobilityTol=0, pwiz::util::IterationListenerRegistry *ilr=0)
double getPrecursorMz(const msdata::Spectrum &) const
void sumSubScansNaive(pwiz::util::BinaryData< double > &, pwiz::util::BinaryData< double > &, const precursorGroupPtr &, msdata::DetailLevel) const
void pushSpectrum(const msdata::SpectrumIdentity &)
Inheritable pass-through implementation for wrapping a SpectrumList.
A custom vector class that can store its contents in either a std::vector or a cli::array (when compi...
handles registration of IterationListeners and broadcast of update messages
boost::shared_ptr< SpectrumList > SpectrumListPtr
Definition MSData.hpp:711
boost::shared_ptr< Spectrum > SpectrumPtr
Definition MSData.hpp:573
std::vector< int > indexList
std::vector< double > scanTimes
std::vector< double > precursorMZs
std::vector< double > ionMobilities
The structure that captures the generation of a peak list (including the underlying acquisitions)
Definition MSData.hpp:506
Identifying information for a spectrum.
Definition MSData.hpp:471