ProteoWizard
SpectrumList_Bruker.hpp
Go to the documentation of this file.
1 //
2 // $Id$
3 //
4 //
5 // Original author: Matt Chambers <matt.chambers .@. vanderbilt.edu>
6 //
7 // Copyright 2009 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_BRUKER_HPP_
24 #define _SPECTRUMLIST_BRUKER_HPP_
25 
34 #include "Reader_Bruker_Detail.hpp"
35 #include <boost/container/flat_map.hpp>
36 
37 
38 namespace pwiz {
39 namespace msdata {
40 namespace detail {
41 
42 using boost::shared_ptr;
43 
44 //
45 // SpectrumList_Bruker
46 //
48 {
49  public:
50 
51  virtual size_t size() const;
52  virtual const SpectrumIdentity& spectrumIdentity(size_t index) const;
53  virtual size_t find(const string& id) const;
54  virtual SpectrumPtr spectrum(size_t index, bool getBinaryData) const;
55  virtual SpectrumPtr spectrum(size_t index, DetailLevel detailLevel) const;
56  virtual SpectrumPtr spectrum(size_t index, bool getBinaryData, const pwiz::util::IntegerSet& msLevelsToCentroid) const;
57  virtual SpectrumPtr spectrum(size_t index, DetailLevel detailLevel, const pwiz::util::IntegerSet& msLevelsToCentroid) const;
58  virtual bool hasIonMobility() const;
59  virtual bool hasPASEF() const;
60  virtual bool canConvertIonMobilityAndCCS() const;
61  virtual double ionMobilityToCCS(double inverseK0, double mz, int charge) const;
62  virtual double ccsToIonMobility(double ccs, double mz, int charge) const;
63 
64 #ifdef PWIZ_READER_BRUKER
66  const string& rootpath,
68  CompassDataPtr compassDataPtr,
69  const Reader::Config& config);
70 
71  MSSpectrumPtr getMSSpectrumPtr(size_t index, vendor_api::Bruker::DetailLevel detailLevel) const;
72 
73  private:
74 
75  MSData& msd_;
76  bfs::path rootpath_;
78  mutable CompassDataPtr compassDataPtr_;
79  const Reader::Config config_;
80  size_t size_;
81  vector<bfs::path> sourcePaths_;
82 
83  struct IndexEntry : public SpectrumIdentity
84  {
85  int source;
86  int collection; // -1 for an MS spectrum
87  int scan;
88  };
89 
90  vector<IndexEntry> index_;
91 
92  // idToIndexMap_["scan=<#>" or "file=<sourceFile::id>"] == index
93  boost::container::flat_map<string, size_t> idToIndexMap_;
94 
95  void fillSourceList();
96  void createIndex();
97  //string findPrecursorID(int precursorMsLevel, size_t index) const;
98 #endif // PWIZ_READER_BRUKER
99 };
100 
101 } // detail
102 } // msdata
103 } // pwiz
104 
105 #endif // _SPECTRUMLIST_BRUKER_HPP_
a virtual container of integers, accessible via an iterator interface, stored as union of intervals ...
Definition: IntegerSet.hpp:37
boost::shared_ptr< CompassData > CompassDataPtr
boost::shared_ptr< Spectrum > SpectrumPtr
Definition: MSData.hpp:573
#define PWIZ_API_DECL
Definition: Export.hpp:32
double mz(double neutralMass, int protonDelta, int electronDelta=0, int neutronDelta=0)
Definition: Ion.hpp:78
PWIZ_API_DECL Reader_Bruker_Format format(const std::string &path)
returns Bruker format of &#39;path&#39; if it is a Bruker directory; otherwise returns empty string ...
Identifying information for a spectrum.
Definition: MSData.hpp:470
Reader configuration.
Definition: Reader.hpp:44
This is the root element of ProteoWizard; it represents the mzML element, defined as: intended to cap...
Definition: MSData.hpp:849