OpenMS  2.4.0
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-2018.
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 #pragma once
46 
47 #include <OpenMS/TRANSFORMATIONS/FEATUREFINDER/SUPERHIRN/SuperHirnConfig.h>
48 
49 #include <OpenMS/CONCEPT/Types.h>
50 
51 #include <string>
52 #include <vector>
53 #include <map>
54 
55 namespace OpenMS
56 {
57 
58  class SUPERHIRN_DLLAPI MS2Info
59  {
60 
62  // declaration of the private members:
63 
64 private:
65 
66  int ID;
67 
68  std::string SQ;
69  std::string FULL_SQ;
70  std::string PREV_AA;
71  std::vector<std::string> AC;
72 // std::string ORIGINAL_INTERACT_FILE;
73  std::string MS2_TYPE_TAG;
74 
75  // peptide prophet analysis:
76  float PEP_PROB;
77 
78  // sorcerer search results:
79  double XCORR;
80  double DELTA_CN;
81 
82  double MONO_MZ;
83  double THEO_MZ;
84  double NEUTRAL_MR;
85 
86  int CHRG;
88  int SCAN_END;
89 
90  double TR;
91 
92  std::map<int, double> MOD_LIST;
93 
94  // static values:
95  static const double _MONO_H;
96  static const double _MONO_O;
97 
99  // declaration of the public members:
100 
101 public:
102  static const double mono_mass[26];
103  static const char AA[20];
104 // static double MS2_TR_TOL;
105 // static bool THEO_MATCH_MODUS;
106 // static double MS2_MZ_PPM_TOLERANCE;
107 
108  // class destructor
109  ~MS2Info();
110 
111  // class constructor
112  MS2Info();
113  MS2Info(int);
114  MS2Info(std::string, std::string, float);
115  MS2Info(std::string, std::string, int, float);
116  MS2Info(std::string, std::string, float, int, int);
117  // class copy constructor
118  MS2Info(const MS2Info &);
119  // class copy constructor
120  MS2Info(const MS2Info *);
121 
123  // overload operators:
124  MS2Info & operator=(const MS2Info &);
125  bool operator==(const MS2Info &);
126  MS2Info & operator<=(const MS2Info &);
127  MS2Info & operator>=(const MS2Info &);
128  MS2Info & operator<(const MS2Info &);
129  MS2Info & operator>(const MS2Info &);
130 
131  // add modification
132  void add_modification(int, double);
133  std::map<int, double>::iterator get_Modification_list_start();
134 
135  std::map<int, double>::iterator get_Modification_list_end();
136 
137  std::map<int, double>::iterator find_Modification(int pos);
138 
139  std::map<int, double> * get_Modification_list();
140 
141  bool check_MODIFICATION();
142 
143  // calculates the theoretical mass from a sequence:
144  void set_THEO_MASS_from_SQ();
145  double get_THEO_MZ();
146 
147  // sets modification SQ:
148  void set_FULL_SQ();
149  void set_SQ(std::string in);
150 
151  // show info:
152  void show_info();
153 
154  // check whether proteotypic peptide:
155  bool get_PROTEO_TYPE();
156  // check the tryptic state:
157  // 2: full tryptic
158  // 1: semi tryptic
159  // 0: non tryptic
160  int get_TRYPTIC_STATE();
161 
162  // AC functions:
163  // check if this AC or not:
164  bool compare_AC(std::string);
165  // search a pattern in the AC list:
166  bool search_AC_pattern(std::string);
167 
169  // start here all the get / set
170  // function to access the
171  // variables of the class
172  std::string get_SQ();
173 
174  std::string get_MOD_SQ();
175 
176  std::string get_TOTAL_SQ();
177 
178  std::string get_AC();
179 
180  std::vector<std::string> get_ALL_AC();
181 
182  std::vector<std::string>::iterator get_ALL_AC_START();
183 
184  std::vector<std::string>::iterator get_ALL_AC_END();
185 
186  bool find_AC(std::string);
187  void set_AC(std::string);
188  float get_PEP_PROB();
189 
190  void set_PEP_PROB(float in);
191 
192  double get_MONO_MZ();
193 
194  void set_MONO_MZ(double);
195 
196  double get_NEUTRAL_MR();
197 
198  void set_NEUTRAL_MR(double);
199 
200  int get_CHRG();
201 
202  void set_CHRG(int in);
203 
204  int get_SCAN();
205 
206  int get_SCAN_START();
207 
208  void set_SCAN_START(int in);
209 
210  int get_SCAN_END();
211 
212  void set_SCAN_END(int in);
213 
214  int get_ID();
215 
216  double get_DELTA_CN();
217 
218  void set_DELTA_CN(double in);
219 
220  double get_XCORR();
221 
222  void set_XCORR(double in);
223 
224  void set_MS2_TYPE_TAG(std::string in);
225 
226  std::string get_MS2_TYPE_TAG();
227 
228  // access the retention parameter:
229  double getRetentionTime();
230 
231  void setRetentionTime(double in);
232 
233  double get_MONO_AA_MASS(int);
234 
235  std::string get_PREV_AA();
236 
237  void set_PREV_AA(std::string in);
238  };
239 
240 } // ns
241 
std::vector< std::string > AC
Definition: MS2Info.h:71
int SCAN_START
Definition: MS2Info.h:87
std::string MS2_TYPE_TAG
Definition: MS2Info.h:73
double THEO_MZ
Definition: MS2Info.h:83
int CHRG
Definition: MS2Info.h:86
double DELTA_CN
Definition: MS2Info.h:80
int SCAN_END
Definition: MS2Info.h:88
bool operator==(_Iterator< _Val, _Ref, _Ptr > const &, _Iterator< _Val, _Ref, _Ptr > const &)
Definition: KDTree.h:806
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:46
bool operator<(const MultiplexDeltaMasses &dm1, const MultiplexDeltaMasses &dm2)
int ID
Definition: MS2Info.h:66
std::string FULL_SQ
Definition: MS2Info.h:69
std::string PREV_AA
Definition: MS2Info.h:70
static const double _MONO_H
Definition: MS2Info.h:95
std::map< int, double > MOD_LIST
Definition: MS2Info.h:92
static const double _MONO_O
Definition: MS2Info.h:96
std::string SQ
Definition: MS2Info.h:68
double TR
Definition: MS2Info.h:90
double NEUTRAL_MR
Definition: MS2Info.h:84
double XCORR
Definition: MS2Info.h:79
double MONO_MZ
Definition: MS2Info.h:82
float PEP_PROB
Definition: MS2Info.h:76
Definition: MS2Info.h:58