Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
PeptideHit.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-2015.
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: Nico Pfeifer $
32 // $Authors: $
33 // --------------------------------------------------------------------------
34 
35 #ifndef OPENMS_METADATA_PEPTIDEHIT_H
36 #define OPENMS_METADATA_PEPTIDEHIT_H
37 
38 #include <vector>
39 
40 #include <OpenMS/CONCEPT/Types.h>
45 
46 namespace OpenMS
47 {
55  class OPENMS_DLLAPI PeptideHit :
56  public MetaInfoInterface
57  {
58 public:
59 
61 
62  class OPENMS_DLLAPI ScoreMore
64  {
65 public:
66  template <typename Arg>
67  bool operator()(const Arg& a, const Arg& b)
68  {
69  return a.getScore() > b.getScore();
70  }
71 
72  };
73 
75  class OPENMS_DLLAPI ScoreLess
76  {
77 public:
78  template <typename Arg>
79  bool operator()(const Arg& a, const Arg& b)
80  {
81  return a.getScore() < b.getScore();
82  }
83 
84  };
86 
89  PeptideHit();
91 
93  PeptideHit(double score,
94  UInt rank,
95  Int charge,
96  const AASequence& sequence);
97 
99  PeptideHit(const PeptideHit& source);
100 
102  virtual ~PeptideHit();
104 
106  PeptideHit& operator=(const PeptideHit& source);
107 
109  bool operator==(const PeptideHit& rhs) const;
110 
112  bool operator!=(const PeptideHit& rhs) const;
113 
117  const AASequence& getSequence() const;
119 
121  void setSequence(const AASequence& sequence);
122 
124  Int getCharge() const;
125 
127  void setCharge(Int charge);
128 
130  const std::vector<PeptideEvidence>& getPeptideEvidences() const;
131 
133  void setPeptideEvidences(const std::vector<PeptideEvidence>& peptide_evidences);
134 
136  void addPeptideEvidence(const PeptideEvidence& peptide_evidence);
137 
139  double getScore() const;
140 
142  void setScore(double score);
143 
145  UInt getRank() const;
146 
148  void setRank(UInt newrank);
150 
152  std::set<String> extractProteinAccessions() const;
153 protected:
155 
157  double score_;
158 
161 
164 
166  std::vector<PeptideEvidence> peptide_evidences_;
167  };
168 
169 } // namespace OpenMS
170 
171 #endif // OPENMS_METADATA_PEPTIDEHIT_H
UInt rank_
the position(rank) where the hit appeared in the hit list
Definition: PeptideHit.h:160
Representation of a peptide/protein sequence.
Definition: AASequence.h:70
bool operator()(const Arg &a, const Arg &b)
Definition: PeptideHit.h:67
Representation of a peptide hit.
Definition: PeptideHit.h:55
Representation of a peptide evidence.
Definition: PeptideEvidence.h:51
Interface for classes that can store arbitrary meta information (Type-Name-Value tuples).
Definition: MetaInfoInterface.h:56
Int charge_
the charge of the peptide
Definition: PeptideHit.h:163
Lesser predicate for scores of hits.
Definition: PeptideHit.h:75
double score_
the score of the peptide hit
Definition: PeptideHit.h:157
int Int
Signed integer type.
Definition: Types.h:96
bool operator()(const Arg &a, const Arg &b)
Definition: PeptideHit.h:79
AASequence sequence_
Definition: PeptideHit.h:154
std::vector< PeptideEvidence > peptide_evidences_
information on the potential peptides observed through this PSM.
Definition: PeptideHit.h:166

OpenMS / TOPP release 2.0.0 Documentation generated on Wed Mar 30 2016 16:18:41 using doxygen 1.8.5