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

OpenMS / TOPP release 1.11.1 Documentation generated on Thu Nov 14 2013 11:19:17 using doxygen 1.8.5