OpenMS
DigestionEnzymeProtein.h
Go to the documentation of this file.
1 // Copyright (c) 2002-2023, The OpenMS Team -- EKU Tuebingen, ETH Zurich, and FU Berlin
2 // SPDX-License-Identifier: BSD-3-Clause
3 //
4 // --------------------------------------------------------------------------
5 // $Maintainer: Xiao Liang $
6 // $Authors: Xiao Liang $
7 // --------------------------------------------------------------------------
8 //
9 
10 #pragma once
11 
13 
14 namespace OpenMS
15 {
16 
22  class OPENMS_DLLAPI DigestionEnzymeProtein :
23  public DigestionEnzyme
24  {
25  public:
26 
30 
33 
36 
39 
42 
44  explicit DigestionEnzymeProtein(const String& name,
45  const String& cleavage_regex,
46  const std::set<String>& synonyms = std::set<String>(),
47  String regex_description = "",
48  EmpiricalFormula n_term_gain = EmpiricalFormula("H"),
49  EmpiricalFormula c_term_gain = EmpiricalFormula("OH"),
50  String psi_id = "",
51  String xtandem_id = "",
52  Int comet_id = -1,
53  Int msgf_id = -1,
54  Int omssa_id = -1);
55 
59 
65 
69 
74  void setNTermGain(const EmpiricalFormula& value);
75 
78 
80  void setCTermGain(const EmpiricalFormula& value);
81 
84 
86  void setPSIID(const String& value);
87 
89  String getPSIID() const;
90 
92  void setXTandemID(const String& value);
93 
96 
98  void setCometID(Int value);
99 
101  Int getCometID() const;
102 
104  void setMSGFID(Int value);
105 
107  Int getMSGFID() const;
108 
110  void setOMSSAID(Int value);
111 
113  Int getOMSSAID() const;
114 
116 
121  bool operator==(const DigestionEnzymeProtein& enzyme) const;
122 
124  bool operator!=(const DigestionEnzymeProtein& enzyme) const;
125 
126  // Note: comparison operator is not inherited. TODO rename and make virtual
128  bool operator==(const String& cleavage_regex) const;
129 
131  bool operator!=(const String& cleavage_regex) const;
132 
134  bool operator<(const DigestionEnzymeProtein& enzyme) const;
136 
142  bool setValueFromFile(const String& key, const String& value) override;
143 
145  friend OPENMS_DLLAPI std::ostream& operator<<(std::ostream& os, const DigestionEnzymeProtein& enzyme);
146 
147  protected:
149 
151 
153 
155 
157 
159 
161 
162  };
163 
164  OPENMS_DLLAPI std::ostream& operator<<(std::ostream& os, const DigestionEnzymeProtein& enzyme);
165 
167 }
168 
Representation of a digestion enzyme for proteins (protease)
Definition: DigestionEnzymeProtein.h:24
Int comet_id_
Definition: DigestionEnzymeProtein.h:156
bool operator!=(const DigestionEnzymeProtein &enzyme) const
inequality operator
bool operator<(const DigestionEnzymeProtein &enzyme) const
order operator
String getXTandemID() const
returns the X! Tandem enzyme ID
String getPSIID() const
returns the PSI ID
bool operator==(const String &cleavage_regex) const
equality operator for regex
Int msgf_id_
Definition: DigestionEnzymeProtein.h:158
EmpiricalFormula c_term_gain_
Definition: DigestionEnzymeProtein.h:150
void setCometID(Int value)
sets the Comet enzyme ID
friend std::ostream & operator<<(std::ostream &os, const DigestionEnzymeProtein &enzyme)
ostream iterator to write the enzyme to a stream
void setNTermGain(const EmpiricalFormula &value)
sets the N-terminal gain
bool setValueFromFile(const String &key, const String &value) override
Set the value of a member variable based on an entry from an input file.
void setCTermGain(const EmpiricalFormula &value)
sets the C-terminal gain
EmpiricalFormula getNTermGain() const
returns N-terminal gain
DigestionEnzymeProtein(DigestionEnzymeProtein &&)=default
Move constructor.
DigestionEnzymeProtein(const DigestionEnzyme &d)
Constructor from base class (adding defaults for the missing stuff)
String psi_id_
Definition: DigestionEnzymeProtein.h:152
DigestionEnzymeProtein & operator=(DigestionEnzymeProtein &&) &=default
Move assignment operator.
void setOMSSAID(Int value)
sets the OMSSA enzyme ID
DigestionEnzymeProtein(const String &name, const String &cleavage_regex, const std::set< String > &synonyms=std::set< String >(), String regex_description="", EmpiricalFormula n_term_gain=EmpiricalFormula("H"), EmpiricalFormula c_term_gain=EmpiricalFormula("OH"), String psi_id="", String xtandem_id="", Int comet_id=-1, Int msgf_id=-1, Int omssa_id=-1)
Detailed constructor.
DigestionEnzymeProtein(const DigestionEnzymeProtein &)=default
Copy constructor.
Int getOMSSAID() const
returns the OMSSA enzyme ID
Int getCometID() const
returns the Comet enzyme ID
~DigestionEnzymeProtein() override
Destructor.
EmpiricalFormula getCTermGain() const
returns C-terminal gain
EmpiricalFormula n_term_gain_
Definition: DigestionEnzymeProtein.h:148
Int omssa_id_
Definition: DigestionEnzymeProtein.h:160
bool operator!=(const String &cleavage_regex) const
equality operator for regex
void setPSIID(const String &value)
sets the PSI ID
bool operator==(const DigestionEnzymeProtein &enzyme) const
equality operator
Int getMSGFID() const
returns the MSGFPlus enzyme id
void setXTandemID(const String &value)
sets the X! Tandem enzyme ID
DigestionEnzymeProtein()
Default constructor.
DigestionEnzymeProtein & operator=(const DigestionEnzymeProtein &)=default
Assignment operator.
String xtandem_id_
Definition: DigestionEnzymeProtein.h:154
void setMSGFID(Int value)
sets the MSGFPlus enzyme id
Base class for digestion enzymes.
Definition: DigestionEnzyme.h:27
Representation of an empirical formula.
Definition: EmpiricalFormula.h:59
A more convenient string class.
Definition: String.h:34
int Int
Signed integer type.
Definition: Types.h:76
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:22
std::ostream & operator<<(std::ostream &os, const AccurateMassSearchResult &amsr)
DigestionEnzymeProtein Protease
Definition: DigestionEnzymeProtein.h:166