Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
LCElutionPeak.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 #ifndef OPENMS_TRANSFORMATIONS_FEATUREFINDER_SUPERHIRN_LCELUTIONPEAK_H
51 #define OPENMS_TRANSFORMATIONS_FEATUREFINDER_SUPERHIRN_LCELUTIONPEAK_H
52 
53 #include <OpenMS/TRANSFORMATIONS/FEATUREFINDER/SUPERHIRN/SuperHirnConfig.h>
54 
55 #include <vector>
56 #include <map>
59 
60 namespace OpenMS
61 {
62 
63  typedef std::multimap<int, MSPeak> elution_peak;
64  typedef std::vector<elution_peak> MZ_series;
65  typedef std::vector<elution_peak>::iterator MZ_series_ITERATOR;
66  typedef std::multimap<int, MSPeak>::iterator SIGNAL_iterator;
67 
68  class SUPERHIRN_DLLAPI LCElutionPeak
69  {
70 
72  // declaration of the private members:
73 
74 private:
75 
76  // isotopic pattern:
80  double fIsotopMass;
81 
82 protected:
83 
84  double fMonoMass;
85  double fVolume;
86  int fCharge;
91  double fRT;
92  double fStartTR;
93  double fEndTR;
94  double fpeak_area;
98 
99  std::string elutionPeakExtraInfo;
100 
101  // the raw signals assigned to this peak
102  std::multimap<int, MSPeak> intens_signals;
103  //multimap<int, MSPeak> raw_intens_signals;
104  std::multimap<int, int> CHRG_MAP;
105 
107  // declaration of the public members:
108 
109 public:
110 
111  // parameters to debug a certain mass range
112  static double DEBUG_MASS_START;
113  static double DEBUG_MASS_END;
114 
115  // cut off, where everything small than this percentile of the
116  // apex is discarded
117  // static float intensity_apex_percentil_cutoff;
118 
119  // resolution of the retention time, for peak area computing:
120  // static float TR_RESOLUTION;
121 
122  // class destructor
123  ~LCElutionPeak();
124 
125  // class constructor
126  LCElutionPeak();
127  // class constructor
128  LCElutionPeak(MZ_series_ITERATOR, double);
129  // class copy constructor
130  LCElutionPeak(const LCElutionPeak &);
131  // constructor for the object feature:
132  LCElutionPeak(const LCElutionPeak *);
133 
135  // Analyze the LC elution peak
136  void analyzeLCElutionPeak();
137 
139  // determine the intensity background baseline based on S/N
140  // value:
141  void setSNIntensityThreshold();
142 
144  // Compute a variety of parameters for the LC elution peak
145  void computeLCElutionPeakParameters();
146 
147  // removes background peaks and computes the total peak area:
148  // void compute_LC_peak_area();
149  // computes the area of between 2 peaks:
150  double compute_delta_area(double, double, double, double);
151  // define the apex into the elution profile::
152  // void define_apex();
153  // removes peaks which have lower intensity than x percentile
154  // of the apex:
155  void remove_background_peak();
156  // compute the charge state of the LC peak
157  void compute_CHRG();
158  // compute the score of the LC peak:
159  //void compute_SCORE_and_SN();
160  // define all required peak parameters from a single MS peak:
161  void defineLCElutionPeakParametersFromMSPeak();
163 
165  // print all monoisotopic peak cluster along the LC profile:
166  void createConsensIsotopPattern();
167 
168  // print the elution profile from a peak:
169  void print_profile(std::ofstream *);
170  // find the closest existing mz peak in the elution profile:
171  MSPeak * find_true_peak(float);
172  // print the elution profile from a peak:
173  void show_info();
174 
176  // overload operators:
177  LCElutionPeak & operator=(const LCElutionPeak &);
178  LCElutionPeak & operator<=(const LCElutionPeak &);
179  LCElutionPeak & operator>=(const LCElutionPeak &);
181  LCElutionPeak & operator>(const LCElutionPeak &);
182 
184  // print all monoisotopic peak cluster along the LC profile:
185  //void printIsotopClusters();
186  // print the consensus isotope pattern:
187  //void printConsensIsotopPattern();
188 
189  void setElutionPeakExtraInfo(std::string in);
190 
191  std::string getElutionPeakExtraInfo();
192 
194  // start here all the get / set
195  // function to access the
196  // variables of the class
197 
199  // access signal_intens map:
200  SIGNAL_iterator get_signal_list_start();
201 
202  SIGNAL_iterator get_signal_list_end();
203 
205  // access the raw signal intens map:
206  //SIGNAL_iterator get_raw_signal_list_start(){return raw_intens_signals.begin();};
207  //SIGNAL_iterator get_raw_signal_list_end(){return raw_intens_signals.end();};
208 
209  // update the retention time by the current tmp_scan_apex:
210  void set_apex_retention_time(double in);
211 
212  // to update the list of score and charge state:
213  void update_CHRGMAP(MSPeak * in);
214 
216  // get scan apex:
217  int get_scan_apex();
218 
219  double get_apex_intensity();
220 
221  double get_apex_retention_time();
222 
223  double get_apex_MZ();
224 
226  // get an intensity of a ms_peak
227  float get_intensity(int in);
228 
229  // get the original M/Z of a ms_peak
230  double get_MZ(int);
231 
233  // get the total peak area:
234  double get_total_peak_area();
235 
237  // get start / end scan:
238  int get_start_scan();
239 
240  int get_end_scan();
241 
242  void set_start_retention_time(double in);
243 
244  double get_start_retention_time();
245 
246  void set_end_retention_time(double in);
247 
248  double get_end_retention_time();
249 
251  // get number of peaks in the elution profile:
252  int get_nb_ms_peaks();
253 
255  // access the charge state of the LC elution peak:
256  int get_charge_state();
257 
259  // get signal to noise ratio:
260  double getSignalToNoise();
261 
262  double getSignalToNoiseBackground();
263 
264  };
265 
266 } // ns
267 
268 #endif // OPENMS_TRANSFORMATIONS_FEATUREFINDER_SUPERHIRN_LCELUTIONPEAK_H
static double DEBUG_MASS_END
Definition: LCElutionPeak.h:113
int fScanNumberApex
Definition: LCElutionPeak.h:88
double fpeak_area
Definition: LCElutionPeak.h:94
int fCharge
Definition: LCElutionPeak.h:86
int fScanNumberStart
Definition: LCElutionPeak.h:87
double fapex_intensity
Definition: LCElutionPeak.h:90
Definition: ConsensusIsotopePattern.h:57
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47
double fSNIntensityThreshold
Definition: LCElutionPeak.h:96
bool operator<(const MultiplexDeltaMasses &dm1, const MultiplexDeltaMasses &dm2)
std::multimap< int, int > CHRG_MAP
Definition: LCElutionPeak.h:104
std::string elutionPeakExtraInfo
Definition: LCElutionPeak.h:99
double fRT
Definition: LCElutionPeak.h:91
std::multimap< int, MSPeak > intens_signals
Definition: LCElutionPeak.h:102
double fEndTR
Definition: LCElutionPeak.h:93
Definition: MSPeak.h:66
static double DEBUG_MASS_START
Definition: LCElutionPeak.h:112
std::vector< elution_peak > MZ_series
Definition: LCElutionPeak.h:64
double f_observed_Mass
Definition: LCElutionPeak.h:79
double fMonoMass
Definition: LCElutionPeak.h:84
MSPeak * APEX
Definition: LCElutionPeak.h:97
double fSignalToNoise
Definition: LCElutionPeak.h:95
ConsensusIsotopePattern * isotopePattern
Definition: LCElutionPeak.h:77
int fNrIsotopes
Definition: LCElutionPeak.h:78
int fScanNumberEnd
Definition: LCElutionPeak.h:89
double fVolume
Definition: LCElutionPeak.h:85
Definition: LCElutionPeak.h:68
double fIsotopMass
Definition: LCElutionPeak.h:80
double fStartTR
Definition: LCElutionPeak.h:92
std::vector< elution_peak >::iterator MZ_series_ITERATOR
Definition: LCElutionPeak.h:65
std::multimap< int, MSPeak >::iterator SIGNAL_iterator
Definition: LCElutionPeak.h:66
std::multimap< int, MSPeak > elution_peak
Definition: LCElutionPeak.h:63

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