Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
FeatureFinderAlgorithmPickedHelperStructs.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: Timo Sachsenberg $
32 // $Authors: Marc Sturm, Stephan Aiche $
33 // --------------------------------------------------------------------------
34 
35 #ifndef OPENMS_TRANSFORMATIONS_FEATUREFINDER_FEATUREFINDERALGORITHMPICKEDHELPERSTRUCTS_H
36 #define OPENMS_TRANSFORMATIONS_FEATUREFINDER_FEATUREFINDERALGORITHMPICKEDHELPERSTRUCTS_H
37 
38 #include <OpenMS/CONCEPT/Types.h>
40 
42 #include <OpenMS/KERNEL/Peak1D.h>
43 
44 #include <vector>
45 #include <list>
46 #include <cmath>
47 
48 namespace OpenMS
49 {
50 
58  {
59 
63  struct OPENMS_DLLAPI Seed
64  {
70  float intensity;
71 
73  bool operator<(const Seed& rhs) const;
74 
75  };
76 
80  struct OPENMS_DLLAPI MassTrace
81  {
83  const Peak1D* max_peak;
85  double max_rt;
86 
89 
91  std::vector<std::pair<double, const Peak1D*> > peaks;
92 
94  ConvexHull2D getConvexhull() const;
95 
97  void updateMaximum();
98 
100  double getAvgMZ() const;
101 
103  bool isValid() const;
104 
105  };
106 
110  struct OPENMS_DLLAPI MassTraces :
111  private std::vector<MassTrace>
112  {
113  typedef std::vector<MassTrace> privvec;
114 
115  // public exports of used methods
116  using privvec::size;
117  using privvec::at;
118  using privvec::reserve;
119  using privvec::push_back;
120  using privvec::operator[];
121  using privvec::back;
122  using privvec::clear;
123  using privvec::begin;
124  using privvec::end;
125  typedef privvec::iterator iterator;
126  typedef privvec::const_iterator const_iterator;
127 
129  MassTraces();
130 
132  Size getPeakCount() const;
133 
135  bool isValid(double seed_mz, double trace_tolerance);
136 
142  Size getTheoreticalmaxPosition() const;
143 
145  void updateBaseline();
146 
152  std::pair<double, double> getRTBounds() const;
153 
163  void computeIntensityProfile(std::list<std::pair<double, double> >& intensity_profile) const;
164 
168  double baseline;
169  };
170 
174  struct OPENMS_DLLAPI TheoreticalIsotopePattern
175  {
177  std::vector<double> intensity;
183  double max;
187  Size size() const;
188 
189  };
190 
194  struct OPENMS_DLLAPI IsotopePattern
195  {
197  std::vector<SignedSize> peak;
199  std::vector<Size> spectrum;
201  std::vector<double> intensity;
203  std::vector<double> mz_score;
205  std::vector<double> theoretical_mz;
208 
210  explicit IsotopePattern(Size size);
211 
212  };
213 
214  };
215 }
216 
217 #endif // #ifndef OPENMS_TRANSFORMATIONS_FEATUREFINDER_FEATUREFINDERALGORITHMPICKEDHELPERSTRUCTS_H
double max_rt
RT of maximum peak.
Definition: FeatureFinderAlgorithmPickedHelperStructs.h:85
Size spectrum
Spectrum index.
Definition: FeatureFinderAlgorithmPickedHelperStructs.h:66
Size max_trace
Maximum intensity trace.
Definition: FeatureFinderAlgorithmPickedHelperStructs.h:166
std::vector< double > intensity
Vector of intensity contributions.
Definition: FeatureFinderAlgorithmPickedHelperStructs.h:177
Helper struct for a collection of mass traces used in FeatureFinderAlgorithmPicked.
Definition: FeatureFinderAlgorithmPickedHelperStructs.h:110
Wrapper struct for all the classes needed by the FeatureFinderAlgorithmPicked and the associated clas...
Definition: FeatureFinderAlgorithmPickedHelperStructs.h:57
Size optional_begin
Number of optional peaks at the beginning of the pattern.
Definition: FeatureFinderAlgorithmPickedHelperStructs.h:179
Helper structure for a theoretical isotope pattern used in FeatureFinderAlgorithmPicked.
Definition: FeatureFinderAlgorithmPickedHelperStructs.h:174
double baseline
Estimated baseline in the region of the feature (used for the fit)
Definition: FeatureFinderAlgorithmPickedHelperStructs.h:168
std::vector< double > intensity
Peak intensity (0 if peak index is -1 or -2)
Definition: FeatureFinderAlgorithmPickedHelperStructs.h:201
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47
A 2-dimensional hull representation in [counter]clockwise direction - depending on axis labelling...
Definition: ConvexHull2D.h:73
bool operator<(const MultiplexDeltaMasses &dm1, const MultiplexDeltaMasses &dm2)
std::vector< std::pair< double, const Peak1D * > > peaks
Contained peaks (pair of RT and pointer to peak)
Definition: FeatureFinderAlgorithmPickedHelperStructs.h:91
TheoreticalIsotopePattern theoretical_pattern
Theoretical isotope pattern.
Definition: FeatureFinderAlgorithmPickedHelperStructs.h:207
privvec::iterator iterator
Definition: FeatureFinderAlgorithmPickedHelperStructs.h:125
std::vector< Size > spectrum
Spectrum index (undefined if peak index is -1 or -2)
Definition: FeatureFinderAlgorithmPickedHelperStructs.h:199
float intensity
Intensity.
Definition: FeatureFinderAlgorithmPickedHelperStructs.h:70
std::vector< double > mz_score
m/z score of peak (0 if peak index is -1 or -2)
Definition: FeatureFinderAlgorithmPickedHelperStructs.h:203
const Peak1D * max_peak
Maximum peak pointer.
Definition: FeatureFinderAlgorithmPickedHelperStructs.h:83
std::vector< MassTrace > privvec
Definition: FeatureFinderAlgorithmPickedHelperStructs.h:113
double theoretical_int
Theoretical intensity value (scaled to [0,1])
Definition: FeatureFinderAlgorithmPickedHelperStructs.h:88
A 1-dimensional raw data point or peak.
Definition: Peak1D.h:55
Helper structure for a found isotope pattern used in FeatureFinderAlgorithmPicked.
Definition: FeatureFinderAlgorithmPickedHelperStructs.h:194
pair< double, vector< double > > IsotopePattern
Definition: MetaProSIP.cpp:81
std::vector< double > theoretical_mz
Theoretical m/z value of the isotope peak.
Definition: FeatureFinderAlgorithmPickedHelperStructs.h:205
privvec::const_iterator const_iterator
Definition: FeatureFinderAlgorithmPickedHelperStructs.h:126
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:128
Size optional_end
Number of optional peaks at the end of the pattern.
Definition: FeatureFinderAlgorithmPickedHelperStructs.h:181
Size trimmed_left
The number of isotopes trimmed on the left side. This is needed to reconstruct the monoisotopic peak...
Definition: FeatureFinderAlgorithmPickedHelperStructs.h:185
double max
The maximum intensity contribution before scaling the pattern to 1.
Definition: FeatureFinderAlgorithmPickedHelperStructs.h:183
Size peak
Peak index.
Definition: FeatureFinderAlgorithmPickedHelperStructs.h:68
std::vector< SignedSize > peak
Peak index (-1 if peak was not found, -2 if it was removed to improve the isotope fit) ...
Definition: FeatureFinderAlgorithmPickedHelperStructs.h:197
Helper struct for mass traces used in FeatureFinderAlgorithmPicked.
Definition: FeatureFinderAlgorithmPickedHelperStructs.h:80
Helper structure for seeds used in FeatureFinderAlgorithmPicked.
Definition: FeatureFinderAlgorithmPickedHelperStructs.h:63

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