OpenMS  2.4.0
MSPeak.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-2018.
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: Lukas Mueller, Markus Mueller $
33 // --------------------------------------------------------------------------
34 //
36 //
37 // PEAK DETECTION OF FOURIER TRANSFORME MS INSTRUMENT DATA
38 //
39 // written by Markus Mueller, markus.mueller@imsb.biol.ethz.ch
40 // and Lukas Mueller, Lukas.Mueller@imsb.biol.ethz.ch
41 // October 2005
42 //
43 // Ported to OpenMS by Florian Zeller, florian.zeller@bsse.ethz.ch
44 // December 2010
45 //
46 // Group of Prof. Ruedi Aebersold, IMSB, ETH Hoenggerberg, Zurich
47 //
48 
49 #pragma once
50 
51 #include <OpenMS/TRANSFORMATIONS/FEATUREFINDER/SUPERHIRN/SuperHirnConfig.h>
52 
53 #include <string>
54 #include <vector>
55 #include <map>
56 
57 #include <OpenMS/CONCEPT/Types.h>
59 
60 namespace OpenMS
61 {
62 
63 //class CentroidPeak; // changed to include
64 
65  class SUPERHIRN_DLLAPI MSPeak
66  {
67 
69  // declaration of the private members:
70 
71  double precursorMZ;
72  double MZ;
73  float INTENSITY;
74  int SCAN;
75  double TR;
76  unsigned int CHRG;
77  unsigned int NRISOTOPES;
78  float SCORE;
79 
80  std::string extraMSPeakInfo;
81 
82  // child scan options:
84  int childScan;
85 
86  double SignalToNoise;
87  std::vector<CentroidPeak> ISOPEAKS;
88 
89 private:
90 
92  // declaration of the public members:
93 
94 public:
95 
96  // class destructor
97  ~MSPeak();
98 
99  // class constructor
100  MSPeak(int, double, float);
101  MSPeak();
102  MSPeak(int, double, float, unsigned int, unsigned int, float, std::vector<CentroidPeak>);
103  MSPeak(const MSPeak &);
104  MSPeak(const MSPeak *);
105 
107  // overload operators:
108  MSPeak & operator=(const MSPeak &);
109  MSPeak & operator<=(const MSPeak &);
110  MSPeak & operator>=(const MSPeak &);
111  MSPeak & operator<(const MSPeak &);
112  MSPeak & operator>(const MSPeak &);
113 
114  // show content of peak:
115  void show_info();
116 
117  // store the MS/MS scan number and activate this peak as precursor peak:
118  void activateAsPrecursorPeak(int);
119 
121  // check if the input mass matches one of the isotopic masses
122  bool checkIsotopeBelongingAndAdjustMass(double, double);
123 
125  // start here all the get / set
126  // function to access the
127  // variables of the class
128 
129  std::vector<CentroidPeak> & get_isotopic_peaks();
130 
131  std::vector<CentroidPeak>::iterator get_isotopic_peaks_start();
132 
133  std::vector<CentroidPeak>::iterator get_isotopic_peaks_end();
134 
135  void setExtraPeakInfo(std::string in);
136 
137  std::string getExtraPeakInfo();
138 
139  // precursor mass of the MS2 scan:
140  void setPrecursorMZ(double in);
141 
142  double getPrecursorMZ();
143 
144  // precursor mass charge state:
145  void setPrecursorCHRG(int in);
146 
147  int getPrecursorCHRG();
148 
149  // check if this peak has been determined as precursor:
150  bool getPrecursorActivation();
151 
152  int get_Chrg();
153 
154  void set_Chrg(int z);
155 
156  int get_Scan();
157 
158  float get_intensity();
159 
160  double get_MZ();
161 
162  int get_scan_number();
163 
164  void set_retention_time(double in);
165 
166  double get_retention_time();
167 
168  unsigned int get_charge_state();
169 
170  unsigned int get_nr_isotopes();
171 
172  float get_score();
173 
174  double getSignalToNoise();
175 
176  void setSignalToNoise(double in);
177 
178  };
179 
180 } // ns
181 
double precursorMZ
Definition: MSPeak.h:71
double MZ
Definition: MSPeak.h:72
int SCAN
Definition: MSPeak.h:74
int childScan
Definition: MSPeak.h:84
double SignalToNoise
Definition: MSPeak.h:86
float INTENSITY
Definition: MSPeak.h:73
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:46
float SCORE
Definition: MSPeak.h:78
bool operator<(const MultiplexDeltaMasses &dm1, const MultiplexDeltaMasses &dm2)
unsigned int NRISOTOPES
Definition: MSPeak.h:77
bool precursorMass
Definition: MSPeak.h:83
unsigned int CHRG
Definition: MSPeak.h:76
Definition: MSPeak.h:65
std::string extraMSPeakInfo
Definition: MSPeak.h:80
std::vector< CentroidPeak > ISOPEAKS
Definition: MSPeak.h:87
double TR
Definition: MSPeak.h:75