Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
openswathalgo/include/OpenMS/ANALYSIS/OPENSWATH/OPENSWATHALGO/DATAACCESS/DataStructures.h
Go to the documentation of this file.
1 // --------------------------------------------------------------------------
2 // OpenMS -- Open-Source Mass Spectrometry
3 // --------------------------------------------------------------------------
4 // Copyright The OpenMS Team -- Eberhard Karls University Tuebingen,
5 // ETH Zurich, and Freie Universitaet Berlin 2002-2017.
6 //
7 // This software is released under a three-clause BSD license:
8 // * Redistributions of source code must retain the above copyright
9 // notice, this list of conditions and the following disclaimer.
10 // * Redistributions in binary form must reproduce the above copyright
11 // notice, this list of conditions and the following disclaimer in the
12 // documentation and/or other materials provided with the distribution.
13 // * Neither the name of any author or any participating institution
14 // may be used to endorse or promote products derived from this software
15 // without specific prior written permission.
16 // For a full list of authors, refer to the file AUTHORS.
17 // --------------------------------------------------------------------------
18 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 // ARE DISCLAIMED. IN NO EVENT SHALL ANY OF THE AUTHORS OR THE CONTRIBUTING
22 // INSTITUTIONS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
23 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
24 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
25 // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
26 // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
27 // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
28 // ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 //
30 // --------------------------------------------------------------------------
31 // $Maintainer: Hannes Roest $
32 // $Authors: Darren Kessner, Hannes Roest, Witold Wolski$
33 // --------------------------------------------------------------------------
34 
35 #ifndef OPENMS_ANALYSIS_OPENSWATH_OPENSWATHALGO_DATAACCESS_DATASTRUCTURES_H
36 #define OPENMS_ANALYSIS_OPENSWATH_OPENSWATHALGO_DATAACCESS_DATASTRUCTURES_H
37 
38 #include <string>
39 #include <vector>
40 #include <boost/shared_ptr.hpp>
41 
42 #include <OpenMS/ANALYSIS/OPENSWATH/OPENSWATHALGO/OpenSwathAlgoConfig.h>
43 
44 namespace OpenSwath
45 {
67  struct OPENSWATHALGO_DLLAPI OSBinaryDataArray
69  {
71  //DataProcessingPtr dataProcessingPtr;
72 
74  std::vector<double> data;
75  };
77  typedef boost::shared_ptr<BinaryDataArray> BinaryDataArrayPtr;
78 
80  struct OPENSWATHALGO_DLLAPI OSChromatogramMeta
81  {
83  std::size_t index;
85  std::string id;
87  index()
88  {
89  }
90 
91  };
93  typedef boost::shared_ptr<ChromatogramMeta> ChromatogramMetaPtr;
94 
96  struct OPENSWATHALGO_DLLAPI OSChromatogram
97  {
98 private:
100  std::size_t defaultArrayLength;
101 
103  //DataProcessingPtr dataProcessingPtr;
105  //Precursor precursor;
107  //Product product;
108 
110  std::vector<BinaryDataArrayPtr> binaryDataArrayPtrs;
111 public:
112 
114  defaultArrayLength(2),
115  binaryDataArrayPtrs(defaultArrayLength)
116  {
117  initvec();
118  }
119 
120 private:
121 
122  void initvec()
123  {
124  for (std::size_t i = 0; i < defaultArrayLength; ++i)
125  {
126  BinaryDataArrayPtr empty(new BinaryDataArray);
127  binaryDataArrayPtrs[i] = empty;
128  }
129  }
130 
131 public:
133  BinaryDataArrayPtr getTimeArray()
134  {
135  return binaryDataArrayPtrs[0];
136  }
137 
138  void setTimeArray(BinaryDataArrayPtr data)
139  {
140  binaryDataArrayPtrs[0] = data;
141  }
142 
144  BinaryDataArrayPtr getIntensityArray()
145  {
146  return binaryDataArrayPtrs[1];
147  }
148 
149  void setIntensityArray(BinaryDataArrayPtr data)
150  {
151  binaryDataArrayPtrs[1] = data;
152  }
153 
154  };
156  typedef boost::shared_ptr<Chromatogram> ChromatogramPtr;
157 
159  struct OPENSWATHALGO_DLLAPI OSSpectrumMeta
160  {
162  size_t index;
163 
165  std::string id;
166 
167  double RT;
168 
169  int ms_level;
170 
172  index(0)
173  {
174  }
175 
177  struct RTLess :
178  public std::binary_function<OSSpectrumMeta, OSSpectrumMeta, bool>
179  {
180  inline bool operator()(const OSSpectrumMeta& a, const OSSpectrumMeta& b) const
181  {
182  return a.RT < b.RT;
183  }
184  };
185 
186  };
188  typedef boost::shared_ptr<SpectrumMeta> SpectrumMetaPtr;
189 
191  struct OPENSWATHALGO_DLLAPI OSSpectrum
192  {
193 private:
195  std::size_t defaultArrayLength;
196 
198  std::vector<BinaryDataArrayPtr> binaryDataArrayPtrs;
199 public:
201  defaultArrayLength(2),
202  binaryDataArrayPtrs(defaultArrayLength)
203  {
204  initvec();
205  }
206 
207 private:
208 
209  void initvec()
210  {
211  for (std::size_t i = 0; i < defaultArrayLength; ++i)
212  {
213  BinaryDataArrayPtr empty(new BinaryDataArray);
214  binaryDataArrayPtrs[i] = empty;
215  }
216  }
217 
218 public:
219 
221  BinaryDataArrayPtr getMZArray() const
222  {
223  return binaryDataArrayPtrs[0];
224  }
225 
226  void setMZArray(BinaryDataArrayPtr data)
227  {
228  binaryDataArrayPtrs[0] = data;
229  }
230 
232  BinaryDataArrayPtr getIntensityArray() const
233  {
234  return binaryDataArrayPtrs[1];
235  }
236 
237  void setIntensityArray(BinaryDataArrayPtr data)
238  {
239  binaryDataArrayPtrs[1] = data;
240  }
241 
242  };
244  typedef boost::shared_ptr<Spectrum> SpectrumPtr;
245 } //end Namespace OpenSwath
246 
247 #endif // OPENMS_ANALYSIS_OPENSWATH_OPENSWATHALGO_DATAACCESS_DATASTRUCTURES_H
void setTimeArray(BinaryDataArrayPtr data)
Definition: openswathalgo/include/OpenMS/ANALYSIS/OPENSWATH/OPENSWATHALGO/DATAACCESS/DataStructures.h:138
std::size_t defaultArrayLength
default length of binary data arrays contained in this element.
Definition: openswathalgo/include/OpenMS/ANALYSIS/OPENSWATH/OPENSWATHALGO/DATAACCESS/DataStructures.h:100
BinaryDataArrayPtr getTimeArray()
get time array (may be null)
Definition: openswathalgo/include/OpenMS/ANALYSIS/OPENSWATH/OPENSWATHALGO/DATAACCESS/DataStructures.h:133
Identifying information for a spectrum.
Definition: openswathalgo/include/OpenMS/ANALYSIS/OPENSWATH/OPENSWATHALGO/DATAACCESS/DataStructures.h:159
OSChromatogramMeta ChromatogramMeta
Definition: openswathalgo/include/OpenMS/ANALYSIS/OPENSWATH/OPENSWATHALGO/DATAACCESS/DataStructures.h:92
void initvec()
Definition: openswathalgo/include/OpenMS/ANALYSIS/OPENSWATH/OPENSWATHALGO/DATAACCESS/DataStructures.h:122
std::string id
a unique identifier for this chromatogram.
Definition: openswathalgo/include/OpenMS/ANALYSIS/OPENSWATH/OPENSWATHALGO/DATAACCESS/DataStructures.h:85
OSBinaryDataArray BinaryDataArray
Definition: openswathalgo/include/OpenMS/ANALYSIS/OPENSWATH/OPENSWATHALGO/DATAACCESS/DataStructures.h:76
boost::shared_ptr< ChromatogramMeta > ChromatogramMetaPtr
Definition: openswathalgo/include/OpenMS/ANALYSIS/OPENSWATH/OPENSWATHALGO/DATAACCESS/DataStructures.h:93
int ms_level
Definition: openswathalgo/include/OpenMS/ANALYSIS/OPENSWATH/OPENSWATHALGO/DATAACCESS/DataStructures.h:169
bool operator()(const OSSpectrumMeta &a, const OSSpectrumMeta &b) const
Definition: openswathalgo/include/OpenMS/ANALYSIS/OPENSWATH/OPENSWATHALGO/DATAACCESS/DataStructures.h:180
std::size_t defaultArrayLength
default length of binary data arrays contained in this element.
Definition: openswathalgo/include/OpenMS/ANALYSIS/OPENSWATH/OPENSWATHALGO/DATAACCESS/DataStructures.h:195
BinaryDataArrayPtr getIntensityArray() const
get intensity array (may be null)
Definition: openswathalgo/include/OpenMS/ANALYSIS/OPENSWATH/OPENSWATHALGO/DATAACCESS/DataStructures.h:232
boost::shared_ptr< Spectrum > SpectrumPtr
Definition: openswathalgo/include/OpenMS/ANALYSIS/OPENSWATH/OPENSWATHALGO/DATAACCESS/DataStructures.h:244
OSChromatogram Chromatogram
Definition: openswathalgo/include/OpenMS/ANALYSIS/OPENSWATH/OPENSWATHALGO/DATAACCESS/DataStructures.h:155
void setMZArray(BinaryDataArrayPtr data)
Definition: openswathalgo/include/OpenMS/ANALYSIS/OPENSWATH/OPENSWATHALGO/DATAACCESS/DataStructures.h:226
std::vector< BinaryDataArrayPtr > binaryDataArrayPtrs
list of binary data arrays.
Definition: openswathalgo/include/OpenMS/ANALYSIS/OPENSWATH/OPENSWATHALGO/DATAACCESS/DataStructures.h:198
The structure that captures the generation of a peak list (including the underlying acquisitions) ...
Definition: openswathalgo/include/OpenMS/ANALYSIS/OPENSWATH/OPENSWATHALGO/DATAACCESS/DataStructures.h:191
boost::shared_ptr< SpectrumMeta > SpectrumMetaPtr
Definition: openswathalgo/include/OpenMS/ANALYSIS/OPENSWATH/OPENSWATHALGO/DATAACCESS/DataStructures.h:188
BinaryDataArrayPtr getMZArray() const
get m/z array (may be null)
Definition: openswathalgo/include/OpenMS/ANALYSIS/OPENSWATH/OPENSWATHALGO/DATAACCESS/DataStructures.h:221
boost::shared_ptr< BinaryDataArray > BinaryDataArrayPtr
Definition: openswathalgo/include/OpenMS/ANALYSIS/OPENSWATH/OPENSWATHALGO/DATAACCESS/DataStructures.h:77
OSChromatogram()
Definition: openswathalgo/include/OpenMS/ANALYSIS/OPENSWATH/OPENSWATHALGO/DATAACCESS/DataStructures.h:113
std::size_t index
the zero-based, consecutive index of the chromatogram in the ChromatogramList.
Definition: openswathalgo/include/OpenMS/ANALYSIS/OPENSWATH/OPENSWATHALGO/DATAACCESS/DataStructures.h:83
std::vector< BinaryDataArrayPtr > binaryDataArrayPtrs
this attribute can optionally reference the &#39;id&#39; of the appropriate dataProcessing.
Definition: openswathalgo/include/OpenMS/ANALYSIS/OPENSWATH/OPENSWATHALGO/DATAACCESS/DataStructures.h:110
Comparator for the retention time.
Definition: openswathalgo/include/OpenMS/ANALYSIS/OPENSWATH/OPENSWATHALGO/DATAACCESS/DataStructures.h:177
void setIntensityArray(BinaryDataArrayPtr data)
Definition: openswathalgo/include/OpenMS/ANALYSIS/OPENSWATH/OPENSWATHALGO/DATAACCESS/DataStructures.h:237
double RT
Definition: openswathalgo/include/OpenMS/ANALYSIS/OPENSWATH/OPENSWATHALGO/DATAACCESS/DataStructures.h:167
BinaryDataArrayPtr getIntensityArray()
get intensity array (may be null)
Definition: openswathalgo/include/OpenMS/ANALYSIS/OPENSWATH/OPENSWATHALGO/DATAACCESS/DataStructures.h:144
Definition: MRMScoring.h:51
void initvec()
Definition: openswathalgo/include/OpenMS/ANALYSIS/OPENSWATH/OPENSWATHALGO/DATAACCESS/DataStructures.h:209
void setIntensityArray(BinaryDataArrayPtr data)
Definition: openswathalgo/include/OpenMS/ANALYSIS/OPENSWATH/OPENSWATHALGO/DATAACCESS/DataStructures.h:149
boost::shared_ptr< Chromatogram > ChromatogramPtr
Definition: openswathalgo/include/OpenMS/ANALYSIS/OPENSWATH/OPENSWATHALGO/DATAACCESS/DataStructures.h:156
OSSpectrumMeta SpectrumMeta
Definition: openswathalgo/include/OpenMS/ANALYSIS/OPENSWATH/OPENSWATHALGO/DATAACCESS/DataStructures.h:187
OSSpectrum Spectrum
Definition: openswathalgo/include/OpenMS/ANALYSIS/OPENSWATH/OPENSWATHALGO/DATAACCESS/DataStructures.h:243
A single chromatogram.
Definition: openswathalgo/include/OpenMS/ANALYSIS/OPENSWATH/OPENSWATHALGO/DATAACCESS/DataStructures.h:96
OSSpectrumMeta()
Definition: openswathalgo/include/OpenMS/ANALYSIS/OPENSWATH/OPENSWATHALGO/DATAACCESS/DataStructures.h:171
Identifying information for a chromatogram.
Definition: openswathalgo/include/OpenMS/ANALYSIS/OPENSWATH/OPENSWATHALGO/DATAACCESS/DataStructures.h:80
std::vector< double > data
this optional attribute may reference the &#39;id&#39; attribute of the appropriate dataProcessing.
Definition: openswathalgo/include/OpenMS/ANALYSIS/OPENSWATH/OPENSWATHALGO/DATAACCESS/DataStructures.h:74
OSSpectrum()
Definition: openswathalgo/include/OpenMS/ANALYSIS/OPENSWATH/OPENSWATHALGO/DATAACCESS/DataStructures.h:200
size_t index
the zero-based, consecutive index of the spectrum in the SpectrumList.
Definition: openswathalgo/include/OpenMS/ANALYSIS/OPENSWATH/OPENSWATHALGO/DATAACCESS/DataStructures.h:162
std::string id
a unique identifier for this spectrum.
Definition: openswathalgo/include/OpenMS/ANALYSIS/OPENSWATH/OPENSWATHALGO/DATAACCESS/DataStructures.h:165
OSChromatogramMeta()
Definition: openswathalgo/include/OpenMS/ANALYSIS/OPENSWATH/OPENSWATHALGO/DATAACCESS/DataStructures.h:86
The datastructures used by the OpenSwath interfaces.
Definition: openswathalgo/include/OpenMS/ANALYSIS/OPENSWATH/OPENSWATHALGO/DATAACCESS/DataStructures.h:68

OpenMS / TOPP release 2.3.0 Documentation generated on Tue Jan 9 2018 18:21:59 using doxygen 1.8.13