Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
MS2ConsensusSpectrum.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: 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 
50 
51 #ifndef OPENMS_TRANSFORMATIONS_FEATUREFINDER_SUPERHIRN_MS2CONSENSUSSPECTRUM_H
52 #define OPENMS_TRANSFORMATIONS_FEATUREFINDER_SUPERHIRN_MS2CONSENSUSSPECTRUM_H
53 
54 #include <OpenMS/TRANSFORMATIONS/FEATUREFINDER/SUPERHIRN/SuperHirnConfig.h>
55 
56 #include <OpenMS/CONCEPT/Types.h>
58 
59 #include <string>
60 #include <map>
61 
62 namespace OpenMS
63 {
64 
65  class SUPERHIRN_DLLAPI MS2ConsensusSpectrum
66  {
67 
68 
70  // declaration of the private members:
71 
72 private:
73 
74  // stores the MS2 fragments:
75  std::multimap<double, MS2Fragment> MS2FragmentPeaks;
76 
77 
78 protected:
79 
81  // declaration of the public members:
82 
83 
84  double startTR;
85  double endTR;
86  int z;
87  int apexScan;
88  int startScan;
89  int endScan;
90 
91 
92 public:
93 
94  double precursorMZ;
95  double TR;
96 
97 
98  // mass to charge tolerance for MS2 trace level:
99  static double MS2_MZ_TOLERANCE;
100 
101  // class destructor
103 
104  // class constructor
107  MS2ConsensusSpectrum(double iPrecursorMZ, double iTR, int iChrg, int iApexScan);
108 
109  // class copy constructor
111  // class copy constructor
113 
114 
116  // overload operators:
117  MS2ConsensusSpectrum & operator=(const MS2ConsensusSpectrum &);
118  bool operator==(const MS2ConsensusSpectrum &);
119  MS2ConsensusSpectrum & operator<=(const MS2ConsensusSpectrum &);
120  MS2ConsensusSpectrum & operator>=(const MS2ConsensusSpectrum &);
122  MS2ConsensusSpectrum & operator>(const MS2ConsensusSpectrum &);
123 
124 
126  // compute the similarity of the elution shape of the
127  // MS2 fragment to this MS2 consensus spectrum
128  double getLCElutionPeakSimilarity(MS2Fragment *);
129 
130 
131  // add a MS2 fragment:
132  void addMS2Fragment(MS2Fragment *);
133 
134  // compute MS2 parameters
135  void computeMS2SpectrumParameters();
136 
137  //*** PK removed, never used
138 
139  // process the stored fragments:
140 // void processConsenusSpectraFragments();
141 
142  // remove outlier fragments based on their:
143  // MS2Fragment::OutlierAttribute = ...
144  // 1: retention time
145  // 2: precursor mass
146  // etc.
147 // void removeOutlierFragments();
148 
149  // remove H2O loss region of the MS2 spectra
150 // void removeWaterLossRegion( );
151 
152 
153  // show MS2 spectrum info:
154  void show_info();
155 
156 
157  // find a corresponding MS2 fragment
158  MS2Fragment * findMS2Fragment(double);
159 
160 
161 
163  // start here all the get / set
164  // function to access the
165  // variables of the class
166 
167  // precursor mass:
168  double getPrecursorMZ();
169 
170  // TR:
171  double getTR();
172  // start TR
173  double getStartTR();
174  // end TR
175  double getEndTR();
176 
177 
178  // set / get the charge state of the precursor MZ:
179  void setPrecursorChrg(int in);
180  int getPrecursorChrg();
181  // apex scan:
182  int getApexScan();
183  // start scan
184  int getStartScan();
185  // end scan
186  int getEndScan();
187  // get the number of consensus fragments:
188  int getNbMS2Fragments();
189 
190  // get the MS2 fragments list iterator:
191  std::multimap<double, MS2Fragment>::iterator getMS2FragmentPeakStart();
192  std::multimap<double, MS2Fragment>::iterator getMS2FragmentPeakEnd();
193  std::multimap<double, MS2Fragment> * getMS2FragmentMap();
194 
195  };
196 
197 } // ns
198 
199 #endif // OPENMS_TRANSFORMATIONS_FEATUREFINDER_SUPERHIRN_MS2CONSENSUSSPECTRUM_H
std::multimap< double, MS2Fragment > MS2FragmentPeaks
Definition: MS2ConsensusSpectrum.h:75
double endTR
Definition: MS2ConsensusSpectrum.h:85
bool operator==(_Iterator< _Val, _Ref, _Ptr > const &, _Iterator< _Val, _Ref, _Ptr > const &)
Definition: KDTree.h:806
int startScan
Definition: MS2ConsensusSpectrum.h:88
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47
bool operator<(const MultiplexDeltaMasses &dm1, const MultiplexDeltaMasses &dm2)
int endScan
Definition: MS2ConsensusSpectrum.h:89
static double MS2_MZ_TOLERANCE
Definition: MS2ConsensusSpectrum.h:99
double TR
Definition: MS2ConsensusSpectrum.h:95
int z
Definition: MS2ConsensusSpectrum.h:86
double precursorMZ
Definition: MS2ConsensusSpectrum.h:94
Definition: MS2ConsensusSpectrum.h:65
int apexScan
Definition: MS2ConsensusSpectrum.h:87
double startTR
Definition: MS2ConsensusSpectrum.h:84
Definition: MS2Fragment.h:61

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