Matrix Science header

ms_spectral_lib_peak_list.hpp

00001 /*
00002 ##############################################################################
00003 # File: ms_spectral_lib_peak_list.hpp                                        #
00004 # Mascot Parser toolkit                                                      #
00005 # Encapsulates peak lists for spectral library files (e.g. msp, sptext)      #
00006 #                                                                            #
00007 ##############################################################################
00008 # COPYRIGHT NOTICE                                                           #
00009 # Copyright 2015 Matrix Science Limited  All Rights Reserved.                #
00010 #                                                                            #
00011 ##############################################################################
00012 #    $Source: parser/inc/ms_spectral_lib_peak_list.hpp $
00013 #    $Author: villek@matrixscience.com $ 
00014 #      $Date: 2018-07-30 16:23:53 +0100 $ 
00015 #  $Revision: 1b450440f9c97e1e41d0fc6016a27d68951d4532 | MSPARSER_REL_2_8_1-0-gea32989045 $
00016 ##############################################################################
00017 */
00018 
00019 #ifndef MS_SPECTRAL_LIB_PEAK_LIST
00020 #define MS_SPECTRAL_LIB_PEAK_LIST
00021 
00022 
00023 // Includes from the standard template library
00024 
00025 #include <vector>
00026 #include <map>
00027 #include <string>
00028 
00029 
00030 namespace matrix_science {
00031   
00037 
00038     class MS_MASCOTRESFILE_API ms_spectral_lib_peak_list : public ms_errors 
00039     {
00040     public:
00042 
00049         enum PEAK_ANNOTATION_LEVEL {
00050             ANNOT_LVL_NONE,             
00051             ANNOT_LVL_QUESTION_MARKS,   
00052             ANNOT_LVL_SOME_PEAKS,       
00053             ANNOT_LVL_CANNOT_ANNOTATE,  
00054         };
00056         ms_spectral_lib_peak_list();
00057         
00059         ~ms_spectral_lib_peak_list();
00060         
00062         ms_spectral_lib_peak_list(std::vector<std::string> input, ms_spectral_lib::FILE_FORMAT format);
00063 
00065         ms_spectral_lib_peak_list(const ms_spectral_lib_peak_list & src);
00066 
00068         void copyFrom(const ms_spectral_lib_peak_list* right);
00069 
00070 #ifndef SWIG
00071 
00072         ms_spectral_lib_peak_list& operator=(const ms_spectral_lib_peak_list& right);
00073 #endif
00074 
00075         int getNumPeaks() const;
00076 
00078         const ms_spectral_lib_peak * getPeak(const int pkNum) const;
00079         
00081         void addPeaks(const std::vector<double> &vecMz, const std::vector<double> &vecIntensity);
00082 
00084         void annotatePeaks(const ms_fragmentvector *fragments, const double fragmentToleranceValue, const std::string fragmentToleranceUnit, double precursorMz);
00085         
00086 #ifndef SWIG
00087 
00088         void annotatePeaks(const std::vector<ms_fragment> *fragments, const double fragmentToleranceValue, const std::string fragmentToleranceUnit, double precursorMz);
00089 #endif
00090 
00092         void clearAnnotation();
00093 
00095         PEAK_ANNOTATION_LEVEL getPeakAnnotationLevel() const;
00096 
00098         std::vector<std::string> asText(ms_spectral_lib::FILE_FORMAT format) const;
00099 
00101         std::string getChecksum() const;
00102 
00104         void setAnnotationLevel(PEAK_ANNOTATION_LEVEL level);
00105 
00106     private:
00107         void setAnnotationLevel(const ms_spectral_lib_peak & pk);
00108 
00109         std::vector<ms_spectral_lib_peak> peakList_;
00110         bool isConsensusSpectrum_;
00111         PEAK_ANNOTATION_LEVEL annotationLevel_;
00112         std::string checksum_;
00113     };
00114 
00115  // end of tools_group
00117 } // namespace matrix_science
00118 
00119 #endif // MS_SPECTRAL_LIB_PEAK_LIST
00120 
00121 /*------------------------------- End of File -------------------------------*/

Copyright © 2022 Matrix Science Ltd.  All Rights Reserved. Generated on Thu Mar 31 2022 01:12:30