Matrix Science header

ms_fragment.hpp

00001 /*
00002 ##############################################################################
00003 # File: ms_fragment.hpp                                                      #
00004 # Mascot Parser toolkit                                                      #
00005 # Encapsulates a single fragment ion                                         #
00006 ##############################################################################
00007 # COPYRIGHT NOTICE                                                           #
00008 # Copyright 1998-2012 Matrix Science Limited  All Rights Reserved.           #
00009 #                                                                            #
00010 ##############################################################################
00011 #    $Source: /vol/cvsroot/parser/inc/ms_fragment.hpp,v $
00012 #    $Author: francoisr $ 
00013 #      $Date: 2017/04/18 16:13:05 $ 
00014 #  $Revision: 1.10 $
00015 ##############################################################################
00016 */
00017 
00018 
00019 #if !defined(ms_fragment_INCLUDED_)
00020 #define ms_fragment_INCLUDED_
00021 
00022 #ifdef _WIN32
00023 #pragma warning(disable:4251)   // Don't want all classes to be exported
00024 #pragma warning(disable:4786)   // Debug symbols too long
00025 #   ifndef _MATRIX_USE_STATIC_LIB
00026 #       ifdef MS_MASCOTRESFILE_EXPORTS
00027 #           define MS_MASCOTRESFILE_API __declspec(dllexport)
00028 #       else
00029 #           define MS_MASCOTRESFILE_API __declspec(dllimport)
00030 #       endif
00031 #   else
00032 #       define MS_MASCOTRESFILE_API
00033 #   endif
00034 #else
00035 #   define MS_MASCOTRESFILE_API
00036 #endif
00037 
00038 // for the sake of #include <string>
00039 #ifdef __ALPHA_UNIX__
00040 #include <ctype.h>
00041 #endif
00042 
00043 // Includes from the standard template library
00044 #include <string>
00045 #include <set>
00046 #include <vector>
00047 #include <map>
00048 
00049 
00050 namespace matrix_science {
00056 
00057     class MS_MASCOTRESFILE_API ms_fragment
00058     {
00059     public:
00060 
00062         ms_fragment();
00063 
00065         ms_fragment(const ms_fragment &src);
00066 
00067 #ifndef SWIG
00068 
00069         ms_fragment& operator=(const ms_fragment& right);
00070 #endif
00071 
00072         void copyFrom(const ms_fragment* src);
00073 
00075         ms_fragment(const int    seriesID, 
00076                     const double massValue, 
00077                     const double nlValue, 
00078                     const int    col, 
00079                     const int    chargeState = 1, 
00080                     const double matchedExptMass = 0,
00081                     const double matchedExptIntensity = 0);
00082 
00084         ms_fragment(const char * seriesName, 
00085                     const double massValue, 
00086                     const double nlValue, 
00087                     const int    col, 
00088                     const int    chargeState = 1, 
00089                     const double matchedExptMass = 0,
00090                     const double matchedExptIntensity = 0);
00091 
00093         ms_fragment(const int    seriesID, 
00094                     const double massValue,
00095                     const double nlValue,
00096                     const char * peptideStr,
00097                     const int    startPos, 
00098                     const int    endPos, 
00099                     const int    chargeState = 1, 
00100                     const double matchedExptMass = 0,
00101                     const double matchedExptIntensity = 0);
00102 
00104         ms_fragment(const char   residueName, 
00105                     const double massValue, 
00106                     const double nlValue, 
00107                     const int    col = -1, 
00108                     const int    chargeState = 1, 
00109                     const double matchedExptMass = 0,
00110                     const double matchedExptIntensity = 0);
00111 
00113         bool isRegular() const;
00114 
00116         bool isNTerminal() const;
00117 
00119         bool isCTerminal() const;
00120 
00122         bool isInternal() const;
00123 
00125         bool isImmonium() const;
00126 
00128         double getMass() const;
00129 
00131         double getNeutralLoss() const;
00132 
00134         std::string getLabel() const;
00135 
00137         std::string getPeptideSubstring() const;
00138 
00140         std::string getSeriesName() const;
00141 
00143         int getColumn() const;
00144 
00146         int getStart() const;
00147 
00149         int getEnd() const;
00150 
00152         int getCharge() const;
00153 
00155         void clearMatchedIon();
00156 
00158         void setMatchedIon(const double mass, const double intensity);
00159 
00161         double getMatchedIonMass() const;
00162 
00164         double getMatchedIonIntensity() const;
00165 
00167         int getAllMatchedIons(std::vector<double> & masses, std::vector<double> & intensities) const;
00168 
00169     protected:
00170         enum ION_TYPE {ION_TYPE_UNKNOWN,
00171                        ION_TYPE_REGULAR,
00172                        ION_TYPE_INTERNAL,
00173                        ION_TYPE_IMMONIUM};
00174         enum ION_TERMINUS {ION_TERM_AMBIGUOUS,
00175                            ION_TERM_N,
00176                            ION_TERM_C};
00177         double      mass_;
00178         double      nl_;
00179         std::string label_;
00180         std::string peptideSubstring_;
00181         std::string series_;
00182         int         start_;
00183         int         end_;
00184         int         charge_;
00185         ION_TYPE    type_;
00186         ION_TERMINUS terminus_;
00187         bool        matchedValueSet_;
00188         double      matchedExptMass_;
00189         double      matchedExptIntensity_;
00190         std::vector<double> matchedExptMasses_;
00191         std::vector<double> matchedExptIntensities_;
00192     }; //class ms_fragment // end of mass_calculation_group
00194 } // matrix_science
00195 
00196 #endif // !defined(ms_fragment_INCLUDED_)
Copyright © 2016 Matrix Science Ltd.  All Rights Reserved. Generated on Fri Jun 2 2017 01:44:51