OpenMS  2.5.0
ResidueModification.h
Go to the documentation of this file.
1 // --------------------------------------------------------------------------
2 // OpenMS -- Open-Source Mass Spectrometry
3 // --------------------------------------------------------------------------
4 // Copyright The OpenMS Team -- Eberhard Karls University Tuebingen,
5 // ETH Zurich, and Freie Universitaet Berlin 2002-2020.
6 //
7 // This software is released under a three-clause BSD license:
8 // * Redistributions of source code must retain the above copyright
9 // notice, this list of conditions and the following disclaimer.
10 // * Redistributions in binary form must reproduce the above copyright
11 // notice, this list of conditions and the following disclaimer in the
12 // documentation and/or other materials provided with the distribution.
13 // * Neither the name of any author or any participating institution
14 // may be used to endorse or promote products derived from this software
15 // without specific prior written permission.
16 // For a full list of authors, refer to the file AUTHORS.
17 // --------------------------------------------------------------------------
18 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 // ARE DISCLAIMED. IN NO EVENT SHALL ANY OF THE AUTHORS OR THE CONTRIBUTING
22 // INSTITUTIONS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
23 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
24 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
25 // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
26 // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
27 // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
28 // ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 //
30 // --------------------------------------------------------------------------
31 // $Maintainer: Timo Sachsenberg $
32 // $Authors: Andreas Bertsch $
33 // --------------------------------------------------------------------------
34 //
35 
36 #pragma once
37 
40 
41 #include <set>
42 
43 namespace OpenMS
44 {
45  // forward declaration
46  class Residue;
47 
76  class OPENMS_DLLAPI ResidueModification
77  {
78 public:
79 
96  {
97  ANYWHERE = 0,
98  C_TERM = 1,
99  N_TERM = 2,
100  PROTEIN_C_TERM = 3,
101  PROTEIN_N_TERM = 4,
102  NUMBER_OF_TERM_SPECIFICITY
103  };
104 
108  {
109  ARTIFACT = 0,
125  NUMBER_OF_SOURCE_CLASSIFICATIONS
126  };
128 
132 
135 
137  ResidueModification(const ResidueModification&) = default;
138 
141 
143  virtual ~ResidueModification();
145 
149 
151  ResidueModification& operator=(const ResidueModification&) = default;
152 
154  ResidueModification& operator=(ResidueModification&&) & = default;
156 
160  void setId(const String& id);
162 
164  const String& getId() const;
165 
173  void setFullId(const String& full_id = "");
174 
176 
185  const String& getFullId() const;
186 
188  void setUniModRecordId(const Int& id);
189 
191  const Int& getUniModRecordId() const;
192 
194  const String getUniModAccession() const;
195 
197  void setPSIMODAccession(const String& id);
198 
200  const String& getPSIMODAccession() const;
201 
203  void setFullName(const String& full_name);
204 
206  const String& getFullName() const;
207 
209  void setName(const String& name);
210 
212  const String& getName() const;
213 
219  void setTermSpecificity(TermSpecificity term_spec);
220 
228  void setTermSpecificity(const String& name);
229 
231  TermSpecificity getTermSpecificity() const;
232 
239  String getTermSpecificityName(TermSpecificity term_spec = NUMBER_OF_TERM_SPECIFICITY) const;
240 
249  void setOrigin(char origin);
250 
252  char getOrigin() const;
253 
255  void setSourceClassification(const String& classification);
256 
258  void setSourceClassification(SourceClassification classification);
259 
261  SourceClassification getSourceClassification() const;
262 
264  String getSourceClassificationName(SourceClassification classification = NUMBER_OF_SOURCE_CLASSIFICATIONS) const;
265 
267  void setAverageMass(double mass);
268 
270  double getAverageMass() const;
271 
273  void setMonoMass(double mass);
274 
276  double getMonoMass() const;
277 
279  void setDiffAverageMass(double mass);
280 
282  double getDiffAverageMass() const;
283 
285  void setDiffMonoMass(double mass);
286 
288  double getDiffMonoMass() const;
289 
291  void setFormula(const String& composition);
292 
294  const String& getFormula() const;
295 
297  void setDiffFormula(const EmpiricalFormula& diff_formula);
298 
300  const EmpiricalFormula& getDiffFormula() const;
301 
303  void setSynonyms(const std::set<String>& synonyms);
304 
306  void addSynonym(const String& synonym);
307 
309  const std::set<String>& getSynonyms() const;
310 
312  void setNeutralLossDiffFormula(const EmpiricalFormula& loss);
313 
315  const EmpiricalFormula& getNeutralLossDiffFormula() const;
316 
318  void setNeutralLossMonoMass(double mono_mass);
319 
321  double getNeutralLossMonoMass() const;
322 
324  void setNeutralLossAverageMass(double average_mass);
325 
327  double getNeutralLossAverageMass() const;
329 
333  bool hasNeutralLoss() const;
335 
337  bool isUserDefined() const;
338 
340  bool operator==(const ResidueModification& modification) const;
341 
343  bool operator!=(const ResidueModification& modification) const;
344 
346  bool operator<(const ResidueModification& modification) const;
348 
349 protected:
350 
352 
354 
356 
357  // The UniMod record id (an integer)
359 
361 
363 
365 
366  char origin_;
367 
369 
371 
372  double mono_mass_;
373 
375 
377 
379 
381 
382  std::set<String> synonyms_;
383 
385 
387 
389  };
390 }
391 
OpenMS::ResidueModification::classification_
SourceClassification classification_
Definition: ResidueModification.h:368
OpenMS::ResidueModification::full_id_
String full_id_
Definition: ResidueModification.h:353
OpenMS::ResidueModification::OTHER_GLYCOSYLATION
Definition: ResidueModification.h:117
OpenMS::ResidueModification
Representation of a modification.
Definition: ResidueModification.h:76
OpenMS::ResidueModification::HYPOTHETICAL
Definition: ResidueModification.h:110
OpenMS::ResidueModification::ISOTOPIC_LABEL
Definition: ResidueModification.h:115
OpenMS::ResidueModification::neutral_loss_diff_formula_
EmpiricalFormula neutral_loss_diff_formula_
Definition: ResidueModification.h:384
OpenMS::String
A more convenient string class.
Definition: String.h:58
OpenMS::ResidueModification::full_name_
String full_name_
Definition: ResidueModification.h:360
KDTree::operator!=
bool operator!=(_Iterator< _Val, _Ref, _Ptr > const &, _Iterator< _Val, _Ref, _Ptr > const &)
Definition: KDTree.h:824
OpenMS::ResidueModification::MULTIPLE
Definition: ResidueModification.h:113
OpenMS::ResidueModification::NATURAL
Definition: ResidueModification.h:111
OpenMS::ResidueModification::NONSTANDARD_RESIDUE
Definition: ResidueModification.h:121
OpenMS::ResidueModification::name_
String name_
Definition: ResidueModification.h:362
OpenMS::ResidueModification::UNKNOWN
Definition: ResidueModification.h:124
OpenMS::operator<
bool operator<(const MultiplexDeltaMasses &dm1, const MultiplexDeltaMasses &dm2)
OpenMS::ResidueModification::COTRANSLATIONAL
Definition: ResidueModification.h:122
OpenMS::ResidueModification::PRETRANSLATIONAL
Definition: ResidueModification.h:116
OpenMS
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:46
OpenMS::ResidueModification::origin_
char origin_
Definition: ResidueModification.h:366
OpenMS::ResidueModification::CHEMICAL_DERIVATIVE
Definition: ResidueModification.h:114
OpenMS::ResidueModification::TermSpecificity
TermSpecificity
Position where the modification is allowed to occur.
Definition: ResidueModification.h:95
int
OpenMS::ResidueModification::OTHER
Definition: ResidueModification.h:120
OpenMS::ResidueModification::AA_SUBSTITUTION
Definition: ResidueModification.h:119
OpenMS::ResidueModification::SourceClassification
SourceClassification
Classification of the modification.
Definition: ResidueModification.h:107
OpenMS::ResidueModification::synonyms_
std::set< String > synonyms_
Definition: ResidueModification.h:382
OpenMS::ResidueModification::average_mass_
double average_mass_
Definition: ResidueModification.h:370
OpenMS::ResidueModification::psi_mod_accession_
String psi_mod_accession_
Definition: ResidueModification.h:355
KDTree::operator==
bool operator==(_Iterator< _Val, _Ref, _Ptr > const &, _Iterator< _Val, _Ref, _Ptr > const &)
Definition: KDTree.h:806
EmpiricalFormula.h
OpenMS::ResidueModification::id_
String id_
Definition: ResidueModification.h:351
OpenMS::ResidueModification::NLINKED_GLYCOSYLATION
Definition: ResidueModification.h:118
OpenMS::EmpiricalFormula
Representation of an empirical formula.
Definition: EmpiricalFormula.h:82
OpenMS::ResidueModification::formula_
String formula_
Definition: ResidueModification.h:378
OpenMS::ResidueModification::diff_mono_mass_
double diff_mono_mass_
Definition: ResidueModification.h:376
OpenMS::ResidueModification::mono_mass_
double mono_mass_
Definition: ResidueModification.h:372
String.h
OpenMS::ResidueModification::neutral_loss_average_mass_
double neutral_loss_average_mass_
Definition: ResidueModification.h:388
OpenMS::ResidueModification::diff_average_mass_
double diff_average_mass_
Definition: ResidueModification.h:374
OpenMS::ResidueModification::OLINKED_GLYCOSYLATION
Definition: ResidueModification.h:123
OpenMS::ResidueModification::unimod_record_id_
Int unimod_record_id_
Definition: ResidueModification.h:358
OpenMS::ResidueModification::diff_formula_
EmpiricalFormula diff_formula_
Definition: ResidueModification.h:380
OpenMS::ResidueModification::POSTTRANSLATIONAL
Definition: ResidueModification.h:112
OpenMS::ResidueModification::neutral_loss_mono_mass_
double neutral_loss_mono_mass_
Definition: ResidueModification.h:386
OpenMS::ResidueModification::term_spec_
TermSpecificity term_spec_
Definition: ResidueModification.h:364