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-2013.
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>
44 
45 namespace OpenMS
46 {
54  class OPENMS_DLLAPI PeptideHit :
55  public MetaInfoInterface
56  {
57 public:
58 
60 
61  class OPENMS_DLLAPI ScoreMore
63  {
64 public:
65  template <typename Arg>
66  bool operator()(const Arg & a, const Arg & b)
67  {
68  return a.getScore() > b.getScore();
69  }
70 
71  };
72 
74  class OPENMS_DLLAPI ScoreLess
75  {
76 public:
77  template <typename Arg>
78  bool operator()(const Arg & a, const Arg & b)
79  {
80  return a.getScore() < b.getScore();
81  }
82 
83  };
85 
88  PeptideHit();
90 
92  PeptideHit(DoubleReal score,
93  UInt rank,
94  Int charge,
95  const AASequence & sequence);
96 
98  PeptideHit(const PeptideHit & source);
99 
101  virtual ~PeptideHit();
103 
105  PeptideHit & operator=(const PeptideHit & source);
106 
108  bool operator==(const PeptideHit & rhs) const;
109 
111  bool operator!=(const PeptideHit & rhs) const;
112 
116  DoubleReal getScore() const;
118 
120  UInt getRank() const;
121 
123  const AASequence & getSequence() const;
124 
126  Int getCharge() const;
127 
129  const std::vector<String> & getProteinAccessions() const;
130 
132  void setProteinAccessions(const std::vector<String> & accessions);
133 
135  void setScore(DoubleReal score);
136 
138  void setRank(UInt newrank);
139 
141  void setSequence(const AASequence & sequence);
142 
144  void setCharge(Int charge);
145 
147  void addProteinAccession(const String & accession);
148 
150  void setAABefore(char acid);
152  char getAABefore() const;
153 
155  void setAAAfter(char acid);
157  char getAAAfter() const;
158 
159 
161 
162 
163 protected:
168  char aa_before_;
169  char aa_after_;
170  std::vector<String> corresponding_protein_accessions_;
171 
172  };
173 
174 } // namespace OpenMS
175 
176 #endif // OPENMS_METADATA_PEPTIDEHIT_H
A more convenient string class.
Definition: String.h:56
UInt rank_
the position(rank) where the hit appeared in the hit list
Definition: PeptideHit.h:165
Representation of a peptide/protein sequence.
Definition: AASequence.h:84
bool operator()(const Arg &a, const Arg &b)
Definition: PeptideHit.h:66
char aa_before_
Amino acid before the sequence.
Definition: PeptideHit.h:168
std::vector< String > corresponding_protein_accessions_
the accessions of the corresponding proteins
Definition: PeptideHit.h:170
Representation of a peptide hit.
Definition: PeptideHit.h:54
DoubleReal score_
the score of the peptide hit
Definition: PeptideHit.h:164
Interface for classes that can store arbitrary meta information (Type-Name-Value tuples).
Definition: MetaInfoInterface.h:61
Int charge_
the charge of the peptide
Definition: PeptideHit.h:166
Lesser predicate for scores of hits.
Definition: PeptideHit.h:74
int Int
Signed integer type.
Definition: Types.h:100
char aa_after_
Amino acid after the sequence.
Definition: PeptideHit.h:169
bool operator()(const Arg &a, const Arg &b)
Definition: PeptideHit.h:78
AASequence sequence_
the amino acid sequence of the peptide hit
Definition: PeptideHit.h:167

OpenMS / TOPP release 1.11.1 Documentation generated on Thu Nov 14 2013 11:19:19 using doxygen 1.8.5