OpenMS
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-2023.
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 #pragma once
36 
40 
41 #include <map>
42 #include <vector>
43 #include <algorithm>
44 #include <iostream>
45 
46 namespace OpenMS
47 {
69  class OPENMS_DLLAPI MultiplexFilteredPeak
70  {
71  public:
72 
76  MultiplexFilteredPeak(double mz, float rt, size_t mz_idx, size_t rt_idx);
77 
81  double getMZ() const;
82 
86  float getRT() const;
87 
91  size_t getMZidx() const;
92 
96  size_t getRTidx() const;
97 
101  void addSatellite(size_t rt_idx, size_t mz_idx, size_t pattern_idx);
102 
103  void addSatellite(const MultiplexSatelliteCentroided& satellite, size_t pattern_idx);
104 
108  void addSatelliteProfile(float rt, double mz, float intensity, size_t pattern_idx);
109 
110  void addSatelliteProfile(const MultiplexSatelliteProfile& satellite, size_t pattern_idx);
111 
115  bool checkSatellite(size_t rt_idx, size_t mz_idx) const;
116 
122  const std::multimap<size_t, MultiplexSatelliteCentroided >& getSatellites() const;
123 
129  const std::multimap<size_t, MultiplexSatelliteProfile >& getSatellitesProfile() const;
130 
134  size_t size() const;
135 
139  size_t sizeProfile() const;
140 
141  private:
148  double mz_;
149  float rt_;
150 
157  size_t mz_idx_;
158  size_t rt_idx_;
159 
177  std::multimap<size_t, MultiplexSatelliteCentroided > satellites_;
178 
193  std::multimap<size_t, MultiplexSatelliteProfile > satellites_profile_;
194 
195  };
196 
197 }
data structure storing a single peak that passed all filters
Definition: MultiplexFilteredPeak.h:70
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:157
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:149
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:158
std::multimap< size_t, MultiplexSatelliteCentroided > satellites_
set of satellites
Definition: MultiplexFilteredPeak.h:177
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:193
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:148
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:48