OpenMS  2.7.0
MultiplexFilteredPeak.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-2021.
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: Lars Nilse $
32 // $Authors: Lars Nilse $
33 // --------------------------------------------------------------------------
34 
35 #ifndef OPENMS_TRANSFORMATIONS_FEATUREFINDER_MULTIPLEXFILTEREDPEAK_H
36 #define OPENMS_TRANSFORMATIONS_FEATUREFINDER_MULTIPLEXFILTEREDPEAK_H
37 
41 
42 #include <map>
43 #include <vector>
44 #include <algorithm>
45 #include <iostream>
46 
47 namespace OpenMS
48 {
70  class OPENMS_DLLAPI MultiplexFilteredPeak
71  {
72  public:
73 
77  MultiplexFilteredPeak(double mz, float rt, size_t mz_idx, size_t rt_idx);
78 
82  double getMZ() const;
83 
87  float getRT() const;
88 
92  size_t getMZidx() const;
93 
97  size_t getRTidx() const;
98 
102  void addSatellite(size_t rt_idx, size_t mz_idx, size_t pattern_idx);
103 
104  void addSatellite(const MultiplexSatelliteCentroided& satellite, size_t pattern_idx);
105 
109  void addSatelliteProfile(float rt, double mz, float intensity, size_t pattern_idx);
110 
111  void addSatelliteProfile(const MultiplexSatelliteProfile& satellite, size_t pattern_idx);
112 
116  bool checkSatellite(size_t rt_idx, size_t mz_idx) const;
117 
123  const std::multimap<size_t, MultiplexSatelliteCentroided >& getSatellites() const;
124 
130  const std::multimap<size_t, MultiplexSatelliteProfile >& getSatellitesProfile() const;
131 
135  size_t size() const;
136 
140  size_t sizeProfile() const;
141 
142  private:
149  double mz_;
150  float rt_;
151 
158  size_t mz_idx_;
159  size_t rt_idx_;
160 
178  std::multimap<size_t, MultiplexSatelliteCentroided > satellites_;
179 
194  std::multimap<size_t, MultiplexSatelliteProfile > satellites_profile_;
195 
196  };
197 
198 }
199 
200 #endif /* MULTIPLEXFILTEREDPEAK_H */
data structure storing a single peak that passed all filters
Definition: MultiplexFilteredPeak.h:71
void addSatellite(size_t rt_idx, size_t mz_idx, size_t pattern_idx)
add a satellite peak
void addSatellite(const MultiplexSatelliteCentroided &satellite, size_t pattern_idx)
size_t size() const
return number of satellite peaks
size_t mz_idx_
indices of the primary peak position in the centroided experiment
Definition: MultiplexFilteredPeak.h:158
bool checkSatellite(size_t rt_idx, size_t mz_idx) const
check if the peak (rt_idx, mz_idx) is already in the set of satellite peaks
size_t getMZidx() const
returns the index of the peak in the spectrum
MultiplexFilteredPeak(double mz, float rt, size_t mz_idx, size_t rt_idx)
constructor
float rt_
Definition: MultiplexFilteredPeak.h:150
size_t getRTidx() const
returns the index of the corresponding spectrum in the MS experiment
void addSatelliteProfile(float rt, double mz, float intensity, size_t pattern_idx)
add a satellite data point
size_t rt_idx_
Definition: MultiplexFilteredPeak.h:159
std::multimap< size_t, MultiplexSatelliteCentroided > satellites_
set of satellites
Definition: MultiplexFilteredPeak.h:178
const std::multimap< size_t, MultiplexSatelliteProfile > & getSatellitesProfile() const
return all satellite data points
const std::multimap< size_t, MultiplexSatelliteCentroided > & getSatellites() const
return all satellite peaks
size_t sizeProfile() const
return number of satellite data points
std::multimap< size_t, MultiplexSatelliteProfile > satellites_profile_
set of profile satellites (used on profile data only)
Definition: MultiplexFilteredPeak.h:194
void addSatelliteProfile(const MultiplexSatelliteProfile &satellite, size_t pattern_idx)
float getRT() const
returns RT of the peak
double mz_
position of the primary peak
Definition: MultiplexFilteredPeak.h:149
double getMZ() const
returns m/z of the peak
data structure storing a single satellite peak
Definition: MultiplexSatelliteCentroided.h:55
data structure storing a single satellite data point
Definition: MultiplexSatelliteProfile.h:48
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47