Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
MS2Info.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 // 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_MS2INFO_H
46 #define OPENMS_TRANSFORMATIONS_FEATUREFINDER_SUPERHIRN_MS2INFO_H
47 
48 #include <OpenMS/CONCEPT/Types.h>
49 
50 #include <string>
51 #include <vector>
52 #include <map>
53 
54 namespace OpenMS
55 {
56 
57  class OPENMS_DLLAPI MS2Info
58  {
59 
61  // declaration of the private members:
62 
63 private:
64 
65  int ID;
66 
67  std::string SQ;
68  std::string FULL_SQ;
69  std::string PREV_AA;
70  std::vector<std::string> AC;
71 // std::string ORIGINAL_INTERACT_FILE;
72  std::string MS2_TYPE_TAG;
73 
74  // peptide prophet analysis:
75  float PEP_PROB;
76 
77  // sorcerer search results:
78  double XCORR;
79  double DELTA_CN;
80 
81  double MONO_MZ;
82  double THEO_MZ;
83  double NEUTRAL_MR;
84 
85  int CHRG;
87  int SCAN_END;
88 
89  double TR;
90 
91  std::map<int, double> MOD_LIST;
92 
93  // static values:
94  static const double _MONO_H;
95  static const double _MONO_O;
96 
98  // declaration of the public members:
99 
100 public:
101  static const double mono_mass[26];
102  static const char AA[20];
103 // static double MS2_TR_TOL;
104 // static bool THEO_MATCH_MODUS;
105 // static double MS2_MZ_PPM_TOLERANCE;
106 
107  // class destructor
108  ~MS2Info();
109 
110  // class constructor
111  MS2Info();
112  MS2Info(int);
113  MS2Info(std::string, std::string, float);
114  MS2Info(std::string, std::string, int, float);
115  MS2Info(std::string, std::string, float, int, int);
116  // class copy constructor
117  MS2Info(const MS2Info &);
118  // class copy constructor
119  MS2Info(const MS2Info *);
120 
122  // overload operators:
123  MS2Info & operator=(const MS2Info &);
124  bool operator==(const MS2Info &);
125  MS2Info & operator<=(const MS2Info &);
126  MS2Info & operator>=(const MS2Info &);
127  MS2Info & operator<(const MS2Info &);
128  MS2Info & operator>(const MS2Info &);
129 
130  // add modification
131  void add_modification(int, double);
132  std::map<int, double>::iterator get_Modification_list_start()
133  {
134  return MOD_LIST.begin();
135  }
136 
137  std::map<int, double>::iterator get_Modification_list_end()
138  {
139  return MOD_LIST.end();
140  }
141 
142  std::map<int, double>::iterator find_Modification(int pos)
143  {
144  return MOD_LIST.find(pos);
145  }
146 
147  std::map<int, double> * get_Modification_list()
148  {
149  return &(MOD_LIST);
150  }
151 
153  {
154  return !MOD_LIST.empty();
155  }
156 
157  // calculates the theoretical mass from a sequence:
158  void set_THEO_MASS_from_SQ();
159  double get_THEO_MZ()
160  {
161  return THEO_MZ;
162  }
163 
164  // sets modificatied SQ:
165  void set_FULL_SQ();
166  void set_SQ(std::string IN)
167  {
168  SQ = IN;
169  set_THEO_MASS_from_SQ();
170  set_FULL_SQ();
171  }
172 
173  // show info:
174  void show_info();
175 
176  // check whethere proteotypic peptide:
177  bool get_PROTEO_TYPE();
178  // check the tryptic state:
179  // 2: full tryptic
180  // 1: semi tryptic
181  // 0: non tryptic
182  int get_TRYPTIC_STATE();
183 
184  // AC functions:
185  // check if this AC or not:
186  bool compare_AC(std::string);
187  // search a pattern in the AC list:
188  bool search_AC_pattern(std::string);
189 
191  // start here all the get / set
192  // function to access the
193  // variables of the class
194  std::string get_SQ()
195  {
196  return SQ;
197  }
198 
199  std::string get_MOD_SQ()
200  {
201  return FULL_SQ;
202  }
203 
204  std::string get_TOTAL_SQ()
205  {
206  return get_PREV_AA() + "." + get_MOD_SQ();
207  }
208 
209  std::string get_AC()
210  {
211  return *(AC.begin());
212  }
213 
214  std::vector<std::string> get_ALL_AC()
215  {
216  return AC;
217  }
218 
219  std::vector<std::string>::iterator get_ALL_AC_START()
220  {
221  return AC.begin();
222  }
223 
224  std::vector<std::string>::iterator get_ALL_AC_END()
225  {
226  return AC.end();
227  }
228 
229  bool find_AC(std::string);
230  void set_AC(std::string);
231  float get_PEP_PROB()
232  {
233  return PEP_PROB;
234  }
235 
236  void set_PEP_PROB(float IN)
237  {
238  PEP_PROB = IN;
239  }
240 
241  double get_MONO_MZ()
242  {
243  return MONO_MZ;
244  }
245 
246  void set_MONO_MZ(double);
247 
248  double get_NEUTRAL_MR()
249  {
250  return NEUTRAL_MR;
251  }
252 
253  void set_NEUTRAL_MR(double);
254 
255  int get_CHRG()
256  {
257  return CHRG;
258  }
259 
260  void set_CHRG(int IN)
261  {
262  CHRG = IN;
263  }
264 
265  int get_SCAN()
266  {
267  return SCAN_START;
268  }
269 
271  {
272  return SCAN_START;
273  }
274 
275  void set_SCAN_START(int IN)
276  {
277  SCAN_START = IN;
278  }
279 
281  {
282  return SCAN_END;
283  }
284 
285  void set_SCAN_END(int IN)
286  {
287  SCAN_END = IN;
288  }
289 
290  int get_ID()
291  {
292  return ID;
293  }
294 
295  double get_DELTA_CN()
296  {
297  return DELTA_CN;
298  }
299 
300  void set_DELTA_CN(double IN)
301  {
302  DELTA_CN = IN;
303  }
304 
305  double get_XCORR()
306  {
307  return XCORR;
308  }
309 
310  void set_XCORR(double IN)
311  {
312  XCORR = IN;
313  }
314 
315  void set_MS2_TYPE_TAG(std::string IN)
316  {
317  MS2_TYPE_TAG = IN;
318  }
319 
320  std::string get_MS2_TYPE_TAG()
321  {
322  return MS2_TYPE_TAG;
323  }
324 
325 /*
326  std::string get_ORIGINAL_INTERACT_FILE()
327  {
328  return ORIGINAL_INTERACT_FILE;
329  }
330 
331  void set_ORIGINAL_INTERACT_FILE(std::string IN)
332  {
333  ORIGINAL_INTERACT_FILE = IN;
334  }
335 */
336 
337  // access the retentino parameter:
339  {
340  return TR;
341  }
342 
343  void setRetentionTime(double IN)
344  {
345  TR = IN;
346  }
347 
348  double get_MONO_AA_MASS(int);
349 
350  std::string get_PREV_AA()
351  {
352  return PREV_AA;
353  }
354 
355  void set_PREV_AA(std::string IN)
356  {
357  PREV_AA = IN;
358  }
359 
360  };
361 
362 } // ns
363 
364 #endif // OPENMS_TRANSFORMATIONS_FEATUREFINDER_SUPERHIRN_MS2INFO_H
double get_DELTA_CN()
Definition: MS2Info.h:295
void setRetentionTime(double IN)
Definition: MS2Info.h:343
std::vector< std::string > AC
Definition: MS2Info.h:70
int SCAN_START
Definition: MS2Info.h:86
float get_PEP_PROB()
Definition: MS2Info.h:231
std::string MS2_TYPE_TAG
Definition: MS2Info.h:72
double THEO_MZ
Definition: MS2Info.h:82
void set_XCORR(double IN)
Definition: MS2Info.h:310
std::map< int, double >::iterator find_Modification(int pos)
Definition: MS2Info.h:142
int CHRG
Definition: MS2Info.h:85
int get_SCAN_START()
Definition: MS2Info.h:270
double DELTA_CN
Definition: MS2Info.h:79
int SCAN_END
Definition: MS2Info.h:87
std::map< int, double >::iterator get_Modification_list_start()
Definition: MS2Info.h:132
std::string get_AC()
Definition: MS2Info.h:209
std::vector< std::string >::iterator get_ALL_AC_START()
Definition: MS2Info.h:219
int get_CHRG()
Definition: MS2Info.h:255
int get_SCAN()
Definition: MS2Info.h:265
int ID
Definition: MS2Info.h:65
int get_ID()
Definition: MS2Info.h:290
std::string get_SQ()
Definition: MS2Info.h:194
void set_SQ(std::string IN)
Definition: MS2Info.h:166
std::string get_MS2_TYPE_TAG()
Definition: MS2Info.h:320
void set_SCAN_END(int IN)
Definition: MS2Info.h:285
std::string FULL_SQ
Definition: MS2Info.h:68
void set_SCAN_START(int IN)
Definition: MS2Info.h:275
std::string get_PREV_AA()
Definition: MS2Info.h:350
void set_DELTA_CN(double IN)
Definition: MS2Info.h:300
double get_NEUTRAL_MR()
Definition: MS2Info.h:248
void set_PREV_AA(std::string IN)
Definition: MS2Info.h:355
void set_MS2_TYPE_TAG(std::string IN)
Definition: MS2Info.h:315
int get_SCAN_END()
Definition: MS2Info.h:280
bool check_MODIFICATION()
Definition: MS2Info.h:152
std::string PREV_AA
Definition: MS2Info.h:69
std::map< int, double >::iterator get_Modification_list_end()
Definition: MS2Info.h:137
static const double _MONO_H
Definition: MS2Info.h:94
std::vector< std::string > get_ALL_AC()
Definition: MS2Info.h:214
void set_PEP_PROB(float IN)
Definition: MS2Info.h:236
std::map< int, double > MOD_LIST
Definition: MS2Info.h:91
std::map< int, double > * get_Modification_list()
Definition: MS2Info.h:147
static const double _MONO_O
Definition: MS2Info.h:95
void set_CHRG(int IN)
Definition: MS2Info.h:260
std::string SQ
Definition: MS2Info.h:67
double TR
Definition: MS2Info.h:89
std::string get_TOTAL_SQ()
Definition: MS2Info.h:204
double get_THEO_MZ()
Definition: MS2Info.h:159
double getRetentionTime()
Definition: MS2Info.h:338
double NEUTRAL_MR
Definition: MS2Info.h:83
double XCORR
Definition: MS2Info.h:78
double get_XCORR()
Definition: MS2Info.h:305
double MONO_MZ
Definition: MS2Info.h:81
std::string get_MOD_SQ()
Definition: MS2Info.h:199
float PEP_PROB
Definition: MS2Info.h:75
std::vector< std::string >::iterator get_ALL_AC_END()
Definition: MS2Info.h:224
Definition: MS2Info.h:57
double get_MONO_MZ()
Definition: MS2Info.h:241

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