Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
SHFeature.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 // written by Lukas N Mueller, 30.3.05
38 // Lukas.Mueller@imsb.biol.ethz.ch
39 // Group of Prof. Ruedi Aebersold, IMSB, ETH Hoenggerberg, Zurich
40 //
41 // Ported to OpenMS by Florian Zeller, florian.zeller@bsse.ethz.ch
42 // December 2010
43 //
44 
45 #ifndef OPENMS_TRANSFORMATIONS_FEATUREFINDER_SUPERHIRN_SHFEATURE_H
46 #define OPENMS_TRANSFORMATIONS_FEATUREFINDER_SUPERHIRN_SHFEATURE_H
47 
48 #include <OpenMS/TRANSFORMATIONS/FEATUREFINDER/SUPERHIRN/SuperHirnConfig.h>
52 
53 #include <map>
54 #include <vector>
55 #include <string>
56 
57 namespace OpenMS
58 {
59 
60  class SUPERHIRN_DLLAPI SHFeature
61  {
62 
64  // declaration of the private members:
65 
66 private:
67 
69  // IDENTIFICATION PARAMETERS:
70  // name of the spectra:
71  std::map<double, std::vector<MS2Info> > MS2_SCANS;
73 
75  // raw MS peak parameters:
76  int scan_apex;
78  int scan_end;
81  double PEAK_SCORE;
82  double SignalToNoise;
84 
86  // Analysis parameters:
89  double SCORE_HOLDER;
91  double PI;
92 
94  // LC/MS run ID parameters:
96  int MASTER_ID;
97 
99  // string to store ms1 feature extra information:
101 
103  // LC elution profile:
105 
106  // static values:
107  static double _MONO_H;
108  static double _MONO_O;
109 
111  // LC/MS matching things:
112  std::map<int, SHFeature> matched_feature_list;
113 
114  // ranges of m/z and tr:
115  double TR_APEX;
117  double MONO_MZ_END;
119 
121  // associated MS2 feature:
123 
125  // declaration of the public members:
126 
127 public:
128 
129  double TR;
130  double MONO_MZ;
131  double TR_START;
132  double TR_END;
135 
136  // class destructor
137  ~SHFeature();
138 
139  // copy constructor:
140  SHFeature(const SHFeature &);
141 
142  // class constructor
143  SHFeature(const SHFeature *);
144  // constructor for the object SHFeature:
145  SHFeature(double, double, int, int, int, int, float, float, float);
146  // constructor for the object SHFeature:
147  SHFeature(float, int, int);
149  SHFeature();
150  // copy constructor:
151  SHFeature & operator=(const SHFeature &);
152 
153  // show the content of the spectra
154  void show_info();
155  // show MS/MS spectra info:
156  void showMS2consensSpectraInfo();
157 
159  // comparison operators:
160  bool operator==(const SHFeature &);
161 
162  // add MS/MS info to the SHFeature:
163  void add_MS2_info(MS2Info *);
164  void add_MS2_info(std::map<double, std::vector<MS2Info> > *);
165  bool get_MS2_info();
166  bool get_MS2_info(double);
167 
168  bool check_MS2_empty();
169 
170  void removeAllMS2Information();
171 
172  int get_MS2_SCANS_SIZE();
173 
174  std::map<double, std::vector<MS2Info> > * get_MS2_SCAN_MAP();
175 
176  std::map<double, std::vector<MS2Info> >::iterator get_MS2_SCANS_START();
177  std::map<double, std::vector<MS2Info> >::iterator get_MS2_SCANS_END();
178  // get the best ms2 scan == closest to the apex:
179  MS2Info * get_best_MS2_SCAN();
180  MS2Info * get_best_MS2_SCAN(double);
181 
182  void setFeatureExtraInformation(std::string in);
183  std::string getFeatureExtraInformation();
184 
185  // functions to set/access matched features:
186  void add_matched_feature(SHFeature *);
187  std::map<int, SHFeature> * get_match_list_REFERENCE();
188  std::map<int, SHFeature> get_match_list();
189  std::map<int, SHFeature>::iterator get_match_list_start();
190  std::map<int, SHFeature>::iterator get_match_list_end();
191  std::map<int, SHFeature>::iterator find_match_by_id(int ID);
192 
193  // get feature at a certain LC-MS by LC_MS id
194  SHFeature * get_feature(int);
195 
196  // get the total peak are over all matched features:
197  double get_MATCHED_peak_area();
198  bool check_match_by_id(int);
199  void erase_match_list();
200  // get the profile over all matched features:
201  std::map<int, double> get_feature_profile();
202 
203  // return number of times this feature has been seen = nb_replicates in list plus 1!
204  int get_replicate_match_nb();
205  int get_matching_nb();
206  // return the sum of all intensities over replicates:
207  double get_replicate_intensity_sum();
208 
210  // start here all the get / set
211  // function to access the
212  // variables of the class
213 
214  // access the parent mass of feature, calculated from the SQ
215  double get_MZ();
216  void set_MZ(double in);
217  double get_MZ_START();
218  void set_MZ_START(double in);
219  double get_MZ_END();
220  void set_MZ_END(double in);
221 
222  double get_THEO_MZ();
223  double get_THEO_MZ(double T);
224  std::string get_AC();
225  std::string get_AC(double T);
226  bool check_AC(std::string in);
227  bool check_AC(std::string in, double T);
228  std::string get_SQ();
229  std::string get_SQ(double T);
230  std::string get_TOTAL_SQ();
231  std::string get_TOTAL_SQ(double T);
232  std::string get_MOD_SQ();
233  std::string get_MOD_SQ(double T);
234  double get_pep_prob();
235  double get_pep_prob(double T);
236  std::string get_MS2_TYPE_TAG();
237  std::string get_MS2_TYPE_TAG(double T);
238  int get_MS2_scan();
239  int get_MS2_scan(double T);
240  std::map<double, std::vector<MS2Info> > * get_MS2_SCAN_LIST();
241  std::map<double, std::vector<MS2Info> >::iterator get_MS2_SCAN_LIST_START();
242  std::map<double, std::vector<MS2Info> >::iterator get_MS2_SCAN_LIST_END();
243 
244  int get_scan_number();
245  void set_scan_number(int in);
246  int get_scan_start();
247  void set_scan_start(int in);
248  int get_scan_end();
249  void set_scan_end(int in);
250  int get_charge_state();
251  void set_charge_state(int in);
252  void set_peak_area(float in);
253  double get_peak_area();
254  // get peak area at a certain LC/MS:
255  double get_peak_area(int);
256  double get_apex_peak_intensity();
257  void set_apex_peak_intensity(double in);
258  void normalize_peak_area_by_factor(double factor);
259 
260  double get_alignment_error_up();
261  void set_alignment_error_up(double in);
262  double get_alignment_error_down();
263  void set_alignment_error_down(double in);
264 
265  void set_SCORE_HOLDER(double in);
266  double get_SCORE_HOLDER();
267 
268  double get_retention_time();
269  void set_retention_time(double in);
270  double get_retention_time_START();
271  void set_retention_time_START(double in);
272  double get_retention_time_END();
273  void set_retention_time_END(double in);
274 
275  // original mz and Tr coordinates
276  double get_raw_retention_time_apex();
277  void set_raw_retention_time_apex(double in);
278  double get_raw_MZ();
279  void set_raw_MZ(double in);
280 
281  // feature ID:
282  void set_feature_ID(int in);
283  int get_feature_ID();
284 
285  void set_spectrum_ID(int in);
286 
287  int get_spectrum_ID();
288 
289  void set_MASTER_ID(int in);
290  int get_MASTER_ID();
291 
292  // check how many matches
293  int get_nb_common_match();
294 
295  // get/set the peak score
296  double get_peak_score();
297  void set_peak_score(double in);
298 
299  // get the molecular mass of the corresponding peptide!
300  double get_Molecular_Mass();
301 
302  // feature PI:
303  double get_FEATURE_PI();
304  void set_FEATURE_PI(double in);
305 
306  // check charge states, in cases where a feature was
307  // created based on a MS2 trace, charge state is unknown ( = -1 )
308  // -> derive the charge state from the matched feature (if this is
309  // also not -1
310  void deriveChargeStates(SHFeature *);
311 
312  // LC elution profile
313  void setLCelutionProfile(FeatureLCProfile * in);
314  FeatureLCProfile * getLCelutionProfile();
315 
317  // parameters computed over matched features:
318  double get_profile_retention_time();
319  double get_profile_Molecular_Mass();
320 
322  // status if feature has been matched:
323  bool get_feature_match_status();
324  void set_feature_match_status(bool in);
325 
327  // access the MS2 feature
328  void addMS2Feature(MS2Feature * in);
329  void removeMS2Feature();
330  MS2Feature * getMS2Feature();
331 
332  double getSignalToNoise();
333  void setSignalToNoise(double in);
334 
335  double getBackgroundNoiseLevel();
336  void setBackgroundNoiseLevel(double in);
337 
339  // get static members:
340  //static double get_MZ_TOL(){return MZ_TOL;};
341  static double get_MONO_H();
342 
343  // compare to masses at the PPM value and decided
344  // if they fall into the m/z tolerance window
345  static bool compareFeatureMassValuesAtPPMLevel(double, double);
346 
347  // get the masse error at the PPM value
348  static double getFeatureMassErrorAtPPMLevel(double);
349 
350  };
351 
352 } // ns
353 
354 #endif // OPENMS_TRANSFORMATIONS_FEATUREFINDER_SUPERHIRN_SHFEATURE_H
double TR_START
Definition: SHFeature.h:131
double PI
Definition: SHFeature.h:91
double MONO_MZ_ORIGINAL
Definition: SHFeature.h:118
int scan_end
Definition: SHFeature.h:78
static double _MONO_H
Definition: SHFeature.h:107
double alignment_error_down
Definition: SHFeature.h:88
double BackgroundNoise
Definition: SHFeature.h:83
std::map< double, std::vector< MS2Info > > MS2_SCANS
Definition: SHFeature.h:71
double TR_END
Definition: SHFeature.h:132
bool operator==(_Iterator< _Val, _Ref, _Ptr > const &, _Iterator< _Val, _Ref, _Ptr > const &)
Definition: KDTree.h:806
int scan_apex
Definition: SHFeature.h:76
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47
double MONO_MZ_START
Definition: SHFeature.h:116
int feature_ID
Definition: SHFeature.h:134
double apex_peak_intensity
Definition: SHFeature.h:80
int spectrum_ID
Definition: SHFeature.h:95
Definition: MS2Feature.h:56
double PEAK_SCORE
Definition: SHFeature.h:81
double MONO_MZ
Definition: SHFeature.h:130
double SignalToNoise
Definition: SHFeature.h:82
double TR_APEX
Definition: SHFeature.h:115
std::map< int, SHFeature > matched_feature_list
Definition: SHFeature.h:112
std::string featureExtraInformation
Definition: SHFeature.h:100
Definition: FeatureLCProfile.h:67
int scan_start
Definition: SHFeature.h:77
double TR
Definition: SHFeature.h:129
FeatureLCProfile * LCprofile
Definition: SHFeature.h:104
int MASTER_ID
Definition: SHFeature.h:96
MS2Feature * MS2TraceFeature
Definition: SHFeature.h:122
static double _MONO_O
Definition: SHFeature.h:108
double MONO_MZ_END
Definition: SHFeature.h:117
double total_peak_area
Definition: SHFeature.h:79
int charge_state
Definition: SHFeature.h:133
Definition: SHFeature.h:60
double alignment_error_up
Definition: SHFeature.h:87
bool feature_match_status
Definition: SHFeature.h:90
double SCORE_HOLDER
Definition: SHFeature.h:89
Definition: MS2Info.h:59

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