OpenMS  2.4.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-2018.
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 
134 
136  ResidueModification(const ResidueModification& modification);
137 
139  virtual ~ResidueModification();
141 
145  ResidueModification& operator=(const ResidueModification& modification);
148 
152  void setId(const String& id);
154 
156  const String& getId() const;
157 
165  void setFullId(const String& full_id = "");
166 
168 
177  const String& getFullId() const;
178 
180  void setUniModRecordId(const Int& id);
181 
183  const Int& getUniModRecordId() const;
184 
186  const String getUniModAccession() const;
187 
189  void setPSIMODAccession(const String& id);
190 
192  const String& getPSIMODAccession() const;
193 
195  void setFullName(const String& full_name);
196 
198  const String& getFullName() const;
199 
201  void setName(const String& name);
202 
204  const String& getName() const;
205 
211  void setTermSpecificity(TermSpecificity term_spec);
212 
220  void setTermSpecificity(const String& name);
221 
223  TermSpecificity getTermSpecificity() const;
224 
231  String getTermSpecificityName(TermSpecificity term_spec = NUMBER_OF_TERM_SPECIFICITY) const;
232 
241  void setOrigin(char origin);
242 
244  char getOrigin() const;
245 
247  void setSourceClassification(const String& classification);
248 
250  void setSourceClassification(SourceClassification classification);
251 
253  SourceClassification getSourceClassification() const;
254 
256  String getSourceClassificationName(SourceClassification classification = NUMBER_OF_SOURCE_CLASSIFICATIONS) const;
257 
259  void setAverageMass(double mass);
260 
262  double getAverageMass() const;
263 
265  void setMonoMass(double mass);
266 
268  double getMonoMass() const;
269 
271  void setDiffAverageMass(double mass);
272 
274  double getDiffAverageMass() const;
275 
277  void setDiffMonoMass(double mass);
278 
280  double getDiffMonoMass() const;
281 
283  void setFormula(const String& composition);
284 
286  const String& getFormula() const;
287 
289  void setDiffFormula(const EmpiricalFormula& diff_formula);
290 
292  const EmpiricalFormula& getDiffFormula() const;
293 
295  void setSynonyms(const std::set<String>& synonyms);
296 
298  void addSynonym(const String& synonym);
299 
301  const std::set<String>& getSynonyms() const;
302 
304  void setNeutralLossDiffFormula(const EmpiricalFormula& loss);
305 
307  const EmpiricalFormula& getNeutralLossDiffFormula() const;
308 
310  void setNeutralLossMonoMass(double mono_mass);
311 
313  double getNeutralLossMonoMass() const;
314 
316  void setNeutralLossAverageMass(double average_mass);
317 
319  double getNeutralLossAverageMass() const;
321 
325  bool hasNeutralLoss() const;
327 
329  bool isUserDefined() const;
330 
332  bool operator==(const ResidueModification& modification) const;
333 
335  bool operator!=(const ResidueModification& modification) const;
336 
338  bool operator<(const ResidueModification& modification) const;
340 
341 protected:
342 
344 
346 
348 
349  // The UniMod record id (an integer)
351 
353 
355 
357 
358  char origin_;
359 
361 
363 
364  double mono_mass_;
365 
367 
369 
371 
373 
374  std::set<String> synonyms_;
375 
377 
379 
381  };
382 }
383 
EmpiricalFormula neutral_loss_diff_formula_
Definition: ResidueModification.h:376
String formula_
Definition: ResidueModification.h:370
Definition: ResidueModification.h:121
A more convenient string class.
Definition: String.h:57
double neutral_loss_mono_mass_
Definition: ResidueModification.h:378
Definition: ResidueModification.h:116
Definition: ResidueModification.h:114
Definition: ResidueModification.h:112
Definition: ResidueModification.h:123
Representation of a modification.
Definition: ResidueModification.h:76
bool operator==(_Iterator< _Val, _Ref, _Ptr > const &, _Iterator< _Val, _Ref, _Ptr > const &)
Definition: KDTree.h:806
char origin_
Definition: ResidueModification.h:358
Definition: ResidueModification.h:120
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:46
bool operator<(const MultiplexDeltaMasses &dm1, const MultiplexDeltaMasses &dm2)
Definition: ResidueModification.h:113
std::set< String > synonyms_
Definition: ResidueModification.h:374
Representation of an empirical formula.
Definition: EmpiricalFormula.h:81
String name_
Definition: ResidueModification.h:354
Definition: ResidueModification.h:118
Definition: ResidueModification.h:115
Definition: ResidueModification.h:122
Definition: ResidueModification.h:117
Definition: ResidueModification.h:111
Definition: ResidueModification.h:110
double mono_mass_
Definition: ResidueModification.h:364
TermSpecificity
Position where the modification is allowed to occur.
Definition: ResidueModification.h:95
Int unimod_record_id_
Definition: ResidueModification.h:350
EmpiricalFormula diff_formula_
Definition: ResidueModification.h:372
TermSpecificity term_spec_
Definition: ResidueModification.h:356
Definition: ResidueModification.h:119
bool operator!=(_Iterator< _Val, _Ref, _Ptr > const &, _Iterator< _Val, _Ref, _Ptr > const &)
Definition: KDTree.h:824
SourceClassification classification_
Definition: ResidueModification.h:360
String full_id_
Definition: ResidueModification.h:345
SourceClassification
Classification of the modification.
Definition: ResidueModification.h:107
String psi_mod_accession_
Definition: ResidueModification.h:347
String id_
Definition: ResidueModification.h:343
Definition: ResidueModification.h:124
double average_mass_
Definition: ResidueModification.h:362
int Int
Signed integer type.
Definition: Types.h:102
double diff_mono_mass_
Definition: ResidueModification.h:368
String full_name_
Definition: ResidueModification.h:352
double neutral_loss_average_mass_
Definition: ResidueModification.h:380
double diff_average_mass_
Definition: ResidueModification.h:366