Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages

MS2Info.h

Go to the documentation of this file.
00001 // --------------------------------------------------------------------------
00002 //                   OpenMS -- Open-Source Mass Spectrometry
00003 // --------------------------------------------------------------------------
00004 // Copyright The OpenMS Team -- Eberhard Karls University Tuebingen,
00005 // ETH Zurich, and Freie Universitaet Berlin 2002-2012.
00006 //
00007 // This software is released under a three-clause BSD license:
00008 //  * Redistributions of source code must retain the above copyright
00009 //    notice, this list of conditions and the following disclaimer.
00010 //  * Redistributions in binary form must reproduce the above copyright
00011 //    notice, this list of conditions and the following disclaimer in the
00012 //    documentation and/or other materials provided with the distribution.
00013 //  * Neither the name of any author or any participating institution
00014 //    may be used to endorse or promote products derived from this software
00015 //    without specific prior written permission.
00016 // For a full list of authors, refer to the file AUTHORS.
00017 // --------------------------------------------------------------------------
00018 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
00019 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00020 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00021 // ARE DISCLAIMED. IN NO EVENT SHALL ANY OF THE AUTHORS OR THE CONTRIBUTING
00022 // INSTITUTIONS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
00023 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
00024 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
00025 // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
00026 // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
00027 // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
00028 // ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00029 //
00030 // --------------------------------------------------------------------------
00031 // $Maintainer: Florian Zeller $
00032 // $Authors: Lukas Mueller, Markus Mueller $
00033 // --------------------------------------------------------------------------
00034 //
00036 //
00037 //  written by Lukas N Mueller, 30.3.05
00038 //  Lukas.Mueller@imsb.biol.ethz.ch
00039 //  Group of Prof. Ruedi Aebersold, IMSB, ETH Hoenggerberg, Zurich
00040 //
00041 //  Ported to OpenMS by Florian Zeller, florian.zeller@bsse.ethz.ch
00042 //  December 2010
00043 //
00044 
00045 #ifndef OPENMS_TRANSFORMATIONS_FEATUREFINDER_SUPERHIRN_MS2INFO_H
00046 #define OPENMS_TRANSFORMATIONS_FEATUREFINDER_SUPERHIRN_MS2INFO_H
00047 
00048 #include <OpenMS/CONCEPT/Types.h>
00049 
00050 #include <string>
00051 #include <vector>
00052 #include <map>
00053 
00054 namespace OpenMS
00055 {
00056 
00057   class OPENMS_DLLAPI MS2Info
00058   {
00059 
00061     // declaration of the private members:
00062 
00063 private:
00064 
00065     int ID;
00066 
00067     std::string SQ;
00068     std::string FULL_SQ;
00069     std::string PREV_AA;
00070     std::vector<std::string> AC;
00071 //  std::string ORIGINAL_INTERACT_FILE;
00072     std::string MS2_TYPE_TAG;
00073 
00074     // peptide prophet analysis:
00075     float PEP_PROB;
00076 
00077     // sorcerer search results:
00078     double XCORR;
00079     double DELTA_CN;
00080 
00081     double MONO_MZ;
00082     double THEO_MZ;
00083     double NEUTRAL_MR;
00084 
00085     int CHRG;
00086     int SCAN_START;
00087     int SCAN_END;
00088 
00089     double TR;
00090 
00091     std::map<int, double> MOD_LIST;
00092 
00093     // static values:
00094     static const double _MONO_H;
00095     static const double _MONO_O;
00096 
00098     // declaration of the public members:
00099 
00100 public:
00101     static const double mono_mass[26];
00102     static const char AA[20];
00103 // static double MS2_TR_TOL;
00104 // static bool THEO_MATCH_MODUS;
00105 // static double MS2_MZ_PPM_TOLERANCE;
00106 
00107     // class destructor
00108     ~MS2Info();
00109 
00110     // class constructor
00111     MS2Info();
00112     MS2Info(int);
00113     MS2Info(std::string, std::string, float);
00114     MS2Info(std::string, std::string, int, float);
00115     MS2Info(std::string, std::string, float, int, int);
00116     // class copy constructor
00117     MS2Info(const MS2Info &);
00118     // class copy constructor
00119     MS2Info(const MS2Info *);
00120 
00122     // overload operators:
00123     MS2Info & operator=(const MS2Info &);
00124     bool operator==(const MS2Info &);
00125     MS2Info & operator<=(const MS2Info &);
00126     MS2Info & operator>=(const MS2Info &);
00127     MS2Info & operator<(const MS2Info &);
00128     MS2Info & operator>(const MS2Info &);
00129 
00130     // add modification
00131     void add_modification(int, double);
00132     std::map<int, double>::iterator get_Modification_list_start()
00133     {
00134       return MOD_LIST.begin();
00135     }
00136 
00137     std::map<int, double>::iterator get_Modification_list_end()
00138     {
00139       return MOD_LIST.end();
00140     }
00141 
00142     std::map<int, double>::iterator find_Modification(int pos)
00143     {
00144       return MOD_LIST.find(pos);
00145     }
00146 
00147     std::map<int, double> * get_Modification_list()
00148     {
00149       return &(MOD_LIST);
00150     }
00151 
00152     bool check_MODIFICATION()
00153     {
00154       return !MOD_LIST.empty();
00155     }
00156 
00157     // calculates the theoretical mass from a sequence:
00158     void set_THEO_MASS_from_SQ();
00159     double get_THEO_MZ()
00160     {
00161       return THEO_MZ;
00162     }
00163 
00164     // sets modificatied SQ:
00165     void set_FULL_SQ();
00166     void set_SQ(std::string IN)
00167     {
00168       SQ = IN;
00169       set_THEO_MASS_from_SQ();
00170       set_FULL_SQ();
00171     }
00172 
00173     // show info:
00174     void show_info();
00175 
00176     // check whethere proteotypic peptide:
00177     bool get_PROTEO_TYPE();
00178     // check the tryptic state:
00179     // 2: full tryptic
00180     // 1: semi tryptic
00181     // 0: non tryptic
00182     int get_TRYPTIC_STATE();
00183 
00184     // AC functions:
00185     // check if this AC or not:
00186     bool compare_AC(std::string);
00187     // search a pattern in the  AC list:
00188     bool search_AC_pattern(std::string);
00189 
00191     // start here all the get / set
00192     // function to access the
00193     // variables of the class
00194     std::string get_SQ()
00195     {
00196       return SQ;
00197     }
00198 
00199     std::string get_MOD_SQ()
00200     {
00201       return FULL_SQ;
00202     }
00203 
00204     std::string get_TOTAL_SQ()
00205     {
00206       return get_PREV_AA() + "." + get_MOD_SQ();
00207     }
00208 
00209     std::string get_AC()
00210     {
00211       return *(AC.begin());
00212     }
00213 
00214     std::vector<std::string> get_ALL_AC()
00215     {
00216       return AC;
00217     }
00218 
00219     std::vector<std::string>::iterator get_ALL_AC_START()
00220     {
00221       return AC.begin();
00222     }
00223 
00224     std::vector<std::string>::iterator get_ALL_AC_END()
00225     {
00226       return AC.end();
00227     }
00228 
00229     bool find_AC(std::string);
00230     void set_AC(std::string);
00231     float get_PEP_PROB()
00232     {
00233       return PEP_PROB;
00234     }
00235 
00236     void set_PEP_PROB(float IN)
00237     {
00238       PEP_PROB = IN;
00239     }
00240 
00241     double get_MONO_MZ()
00242     {
00243       return MONO_MZ;
00244     }
00245 
00246     void set_MONO_MZ(double);
00247 
00248     double get_NEUTRAL_MR()
00249     {
00250       return NEUTRAL_MR;
00251     }
00252 
00253     void set_NEUTRAL_MR(double);
00254 
00255     int get_CHRG()
00256     {
00257       return CHRG;
00258     }
00259 
00260     void set_CHRG(int IN)
00261     {
00262       CHRG = IN;
00263     }
00264 
00265     int get_SCAN()
00266     {
00267       return SCAN_START;
00268     }
00269 
00270     int get_SCAN_START()
00271     {
00272       return SCAN_START;
00273     }
00274 
00275     void set_SCAN_START(int IN)
00276     {
00277       SCAN_START = IN;
00278     }
00279 
00280     int get_SCAN_END()
00281     {
00282       return SCAN_END;
00283     }
00284 
00285     void set_SCAN_END(int IN)
00286     {
00287       SCAN_END = IN;
00288     }
00289 
00290     int get_ID()
00291     {
00292       return ID;
00293     }
00294 
00295     double get_DELTA_CN()
00296     {
00297       return DELTA_CN;
00298     }
00299 
00300     void set_DELTA_CN(double IN)
00301     {
00302       DELTA_CN = IN;
00303     }
00304 
00305     double get_XCORR()
00306     {
00307       return XCORR;
00308     }
00309 
00310     void set_XCORR(double IN)
00311     {
00312       XCORR = IN;
00313     }
00314 
00315     void set_MS2_TYPE_TAG(std::string IN)
00316     {
00317       MS2_TYPE_TAG = IN;
00318     }
00319 
00320     std::string get_MS2_TYPE_TAG()
00321     {
00322       return MS2_TYPE_TAG;
00323     }
00324 
00325 /*
00326         std::string get_ORIGINAL_INTERACT_FILE()
00327         {
00328             return ORIGINAL_INTERACT_FILE;
00329         }
00330 
00331         void set_ORIGINAL_INTERACT_FILE(std::string IN)
00332         {
00333             ORIGINAL_INTERACT_FILE = IN;
00334         }
00335 */
00336 
00337     // access the retentino parameter:
00338     double getRetentionTime()
00339     {
00340       return TR;
00341     }
00342 
00343     void setRetentionTime(double IN)
00344     {
00345       TR = IN;
00346     }
00347 
00348     double get_MONO_AA_MASS(int);
00349 
00350     std::string get_PREV_AA()
00351     {
00352       return PREV_AA;
00353     }
00354 
00355     void set_PREV_AA(std::string IN)
00356     {
00357       PREV_AA = IN;
00358     }
00359 
00360   };
00361 
00362 } // ns
00363 
00364 #endif // OPENMS_TRANSFORMATIONS_FEATUREFINDER_SUPERHIRN_MS2INFO_H

OpenMS / TOPP release 1.10.0 Documentation generated on Thu Mar 7 2013 09:42:42 using doxygen 1.7.1