OpenMS
PeptideEvidence.h
Go to the documentation of this file.
1 // Copyright (c) 2002-present, OpenMS Inc. -- EKU Tuebingen, ETH Zurich, and FU Berlin
2 // SPDX-License-Identifier: BSD-3-Clause
3 //
4 // --------------------------------------------------------------------------
5 // $Maintainer: Timo Sachsenberg $
6 // $Authors: Timo Sachsenberg $
7 // --------------------------------------------------------------------------
8 
9 #pragma once
10 
11 #include <OpenMS/CONCEPT/Types.h>
13 
14 namespace OpenMS
15 {
16 
24  class OPENMS_DLLAPI PeptideEvidence
25  {
26 public:
27  static const int UNKNOWN_POSITION; // == -1
28 
29  // Note: we use 0 as position of the N-terminus while e.g. mzTab or other formats start counting at 1.
30  static const int N_TERMINAL_POSITION;
31  static const char UNKNOWN_AA; // PeptideEvidence::UNKNOWN_AA = 'X';
32 
33  // Note: we use '[' and ']' instead of e.g. '-' as in mzTab specification
34  static const char N_TERMINAL_AA;
35  static const char C_TERMINAL_AA;
36 
39 
41  explicit PeptideEvidence(const String& accession, Int start=UNKNOWN_POSITION, Int end=UNKNOWN_POSITION, char aa_before=UNKNOWN_AA, char aa_after=UNKNOWN_AA);
42 
44  PeptideEvidence(const PeptideEvidence&) = default;
45 
47  PeptideEvidence(PeptideEvidence&&) noexcept = default;
48 
50  ~PeptideEvidence() = default;
52 
54  PeptideEvidence& operator=(const PeptideEvidence&) = default;
56  PeptideEvidence& operator=(PeptideEvidence&&) = default; // TODO: add noexcept (gcc 4.8 bug)
57 
59  bool operator==(const PeptideEvidence& rhs) const;
60 
62  bool operator<(const PeptideEvidence& rhs) const;
63 
65  bool operator!=(const PeptideEvidence& rhs) const;
66 
68  bool hasValidLimits() const;
69 
71  const String& getProteinAccession() const;
72 
74  void setProteinAccession(const String& s);
75 
77  void setStart(const Int a);
78 
80  Int getStart() const;
81 
83  void setEnd(const Int a);
84 
86  Int getEnd() const;
87 
89  void setAABefore(const char acid);
90 
92  char getAABefore() const;
93 
95  void setAAAfter(const char acid);
96 
98  char getAAAfter() const;
99 
100 protected:
101  String accession_;
102 
103  Int start_;
104 
105  Int end_;
106 
107  char aa_before_;
108 
109  char aa_after_;
110  };
111 
112 }
113 
Representation of a peptide evidence.
Definition: PeptideEvidence.h:25
static const char C_TERMINAL_AA
Definition: PeptideEvidence.h:35
static const char N_TERMINAL_AA
Definition: PeptideEvidence.h:34
static const int UNKNOWN_POSITION
Definition: PeptideEvidence.h:27
static const int N_TERMINAL_POSITION
Definition: PeptideEvidence.h:30
PeptideEvidence(const String &accession, Int start=UNKNOWN_POSITION, Int end=UNKNOWN_POSITION, char aa_before=UNKNOWN_AA, char aa_after=UNKNOWN_AA)
Constructor.
PeptideEvidence(PeptideEvidence &&) noexcept=default
Move constructor.
PeptideEvidence()
Constructor.
PeptideEvidence(const PeptideEvidence &)=default
Copy constructor.
static const char UNKNOWN_AA
Definition: PeptideEvidence.h:31
A more convenient string class.
Definition: String.h:34
int Int
Signed integer type.
Definition: Types.h:72
Main OpenMS namespace.
Definition: openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19