00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef OPENMS_METADATA_PROTEINIDENTIFICATION_H
00028 #define OPENMS_METADATA_PROTEINIDENTIFICATION_H
00029
00030 #include <OpenMS/METADATA/ProteinHit.h>
00031 #include <OpenMS/METADATA/MetaInfoInterface.h>
00032 #include <OpenMS/DATASTRUCTURES/DateTime.h>
00033
00034 namespace OpenMS
00035 {
00053 class ProteinIdentification
00054 : public MetaInfoInterface
00055 {
00056 public:
00058 typedef ProteinHit HitType;
00059
00061 enum PeakMassType
00062 {
00063 MONOISOTOPIC,
00064 AVERAGE,
00065 SIZE_OF_PEAKMASSTYPE
00066 };
00068 static const std::string NamesOfPeakMassType[SIZE_OF_PEAKMASSTYPE];
00069
00070
00071 enum DigestionEnzyme
00072 {
00073 TRYPSIN,
00074 PEPSIN_A,
00075 PROTEASE_K,
00076 CHYMOTRYPSIN,
00077 NO_ENZYME,
00078 UNKNOWN_ENZYME,
00079 SIZE_OF_DIGESTIONENZYME
00080 };
00082 static const std::string NamesOfDigestionEnzyme[SIZE_OF_DIGESTIONENZYME];
00083
00085 struct SearchParameters
00086 : public MetaInfoInterface
00087 {
00088 String db;
00089 String db_version;
00090 String taxonomy;
00091 String charges;
00092 PeakMassType mass_type;
00093 std::vector<String> fixed_modifications;
00094 std::vector<String> variable_modifications;
00095 DigestionEnzyme enzyme;
00096 UInt missed_cleavages;
00097 DoubleReal peak_mass_tolerance;
00098 DoubleReal precursor_tolerance;
00099
00100 SearchParameters()
00101 : db(),
00102 db_version(),
00103 taxonomy(),
00104 charges(),
00105 mass_type(MONOISOTOPIC),
00106 fixed_modifications(),
00107 variable_modifications(),
00108 enzyme(UNKNOWN_ENZYME),
00109 missed_cleavages(0),
00110 peak_mass_tolerance(0.0),
00111 precursor_tolerance(0.0)
00112 {
00113 };
00114
00115 bool operator == (const SearchParameters& rhs) const
00116 {
00117 return db == rhs.db &&
00118 db_version == rhs.db_version &&
00119 taxonomy == taxonomy &&
00120 charges == charges &&
00121 mass_type == mass_type &&
00122 fixed_modifications == fixed_modifications &&
00123 variable_modifications == variable_modifications &&
00124 enzyme == enzyme &&
00125 missed_cleavages == missed_cleavages &&
00126 peak_mass_tolerance == peak_mass_tolerance &&
00127 precursor_tolerance == precursor_tolerance;
00128
00129 }
00130
00131 bool operator != (const SearchParameters& rhs) const
00132 {
00133 return !(*this == rhs);
00134 }
00135 };
00136
00137
00140
00141 ProteinIdentification();
00143 virtual ~ProteinIdentification();
00145 ProteinIdentification(const ProteinIdentification& source);
00147 ProteinIdentification& operator=(const ProteinIdentification& source);
00149 bool operator == (const ProteinIdentification& rhs) const;
00151 bool operator != (const ProteinIdentification& rhs) const;
00153
00155
00156
00157 const std::vector<ProteinHit>& getHits() const;
00159 void insertHit(const ProteinHit& input);
00161 void setHits(const std::vector<ProteinHit>& hits);
00163 Real getSignificanceThreshold() const;
00165 void setSignificanceThreshold(Real value);
00167 const String& getScoreType() const;
00169 void setScoreType(const String& type);
00171 bool isHigherScoreBetter() const;
00173 void setHigherScoreBetter(bool higher_is_better);
00175 void sort();
00177 void assignRanks();
00179
00181
00182
00183 const DateTime& getDateTime() const;
00185 void setDateTime(const DateTime& date);
00187 void setSearchEngine(const String& search_engine);
00189 const String& getSearchEngine() const;
00191 void setSearchEngineVersion(const String& search_engine_version);
00193 const String& getSearchEngineVersion() const;
00195 void setSearchParameters(const SearchParameters& search_parameters);
00197 const SearchParameters& getSearchParameters() const;
00199 const String& getIdentifier() const;
00201 void setIdentifier(const String& id);
00203
00204 protected:
00205
00207
00208 String id_;
00209 String search_engine_;
00210 String search_engine_version_;
00211 SearchParameters search_parameters_;
00212 DateTime date_;
00214
00216
00217 String protein_score_type_;
00218 bool higher_score_better_;
00219 std::vector<ProteinHit> protein_hits_;
00220 Real protein_significance_threshold_;
00222 };
00223
00224 }
00225 #endif // OPENMS_METADATA_PROTEINIDENTIFICATION_H