00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef MS_SPECTRAL_LIB_PEAK_LIST
00020 #define MS_SPECTRAL_LIB_PEAK_LIST
00021
00022
00023
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
00117 }
00118
00119 #endif // MS_SPECTRAL_LIB_PEAK_LIST
00120
00121