Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
ProteinIdentification.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: Chris Bielow $
32 // $Authors: Nico Pfeifer, Chris Bielow $
33 // --------------------------------------------------------------------------
34 
35 #ifndef OPENMS_METADATA_PROTEINIDENTIFICATION_H
36 #define OPENMS_METADATA_PROTEINIDENTIFICATION_H
37 
41 
42 #include <set>
43 
44 namespace OpenMS
45 {
46  class PeptideIdentification;
61  class OPENMS_DLLAPI ProteinIdentification :
62  public MetaInfoInterface
63  {
64 public:
67 
71  struct OPENMS_DLLAPI ProteinGroup
72  {
74  double probability;
75 
77  std::vector<String> accessions;
78 
79  ProteinGroup();
80 
82  bool operator==(const ProteinGroup& rhs) const;
83 
84  /*
85  @brief Comparison operator (for sorting)
86 
87  This operator is intended for sorting protein groups in a "best first" manner. That means higher probabilities are "less" than lower probabilities (!); smaller groups are "less" than larger groups; everything else being equal, accessions are compared lexicographically.
88  */
89  bool operator<(const ProteinGroup& rhs) const;
90  };
91 
94  {
97  SIZE_OF_PEAKMASSTYPE
98  };
100  static const std::string NamesOfPeakMassType[SIZE_OF_PEAKMASSTYPE];
101 
102 
104  {
111  SIZE_OF_DIGESTIONENZYME
112  };
114  static const std::string NamesOfDigestionEnzyme[SIZE_OF_DIGESTIONENZYME];
115 
117  struct OPENMS_DLLAPI SearchParameters :
118  public MetaInfoInterface
119  {
125  std::vector<String> fixed_modifications;
126  std::vector<String> variable_modifications;
131 
133 
134  bool operator==(const SearchParameters & rhs) const;
135 
136  bool operator!=(const SearchParameters & rhs) const;
137 
138  };
139 
140 
146  virtual ~ProteinIdentification();
150  ProteinIdentification & operator=(const ProteinIdentification & source);
152  bool operator==(const ProteinIdentification & rhs) const;
154  bool operator!=(const ProteinIdentification & rhs) const;
156 
158 
159  const std::vector<ProteinHit> & getHits() const;
162  std::vector<ProteinHit> & getHits();
164  void insertHit(const ProteinHit & input);
165 
171  void setHits(const std::vector<ProteinHit> & hits);
172 
174  std::vector<ProteinHit>::iterator findHit(const String & accession);
175 
177  const std::vector<ProteinGroup> & getProteinGroups() const;
179  std::vector<ProteinGroup> & getProteinGroups();
181  void insertProteinGroup(const ProteinGroup & group);
182 
184  const std::vector<ProteinGroup> & getIndistinguishableProteins() const;
186  std::vector<ProteinGroup> & getIndistinguishableProteins();
188  void insertIndistinguishableProteins(const ProteinGroup & group);
189 
191  double getSignificanceThreshold() const;
193  void setSignificanceThreshold(double value);
195  const String & getScoreType() const;
197  void setScoreType(const String & type);
199  bool isHigherScoreBetter() const;
201  void setHigherScoreBetter(bool higher_is_better);
203  void sort();
205  void assignRanks();
213  Size computeCoverage(const std::vector<PeptideIdentification> & pep_ids);
215 
217 
218  const DateTime & getDateTime() const;
221  void setDateTime(const DateTime & date);
223  void setSearchEngine(const String & search_engine);
225  const String & getSearchEngine() const;
227  void setSearchEngineVersion(const String & search_engine_version);
229  const String & getSearchEngineVersion() const;
231  void setSearchParameters(const SearchParameters & search_parameters);
233  const SearchParameters & getSearchParameters() const;
235  const String & getIdentifier() const;
237  void setIdentifier(const String & id);
239 
240 protected:
242 
249 
251 
254  std::vector<ProteinHit> protein_hits_;
255  std::vector<ProteinGroup> protein_groups_;
257  std::vector<ProteinGroup> indistinguishable_proteins_;
260  };
261 
262 } //namespace OpenMS
263 #endif // OPENMS_METADATA_PROTEINIDENTIFICATION_H
Representation of a protein identification run.
Definition: ProteinIdentification.h:61
String db
The used database.
Definition: ProteinIdentification.h:120
A more convenient string class.
Definition: String.h:57
std::vector< String > fixed_modifications
Used fixed modifications.
Definition: ProteinIdentification.h:125
String db_version
The database version.
Definition: ProteinIdentification.h:121
double probability
Probability of this group.
Definition: ProteinIdentification.h:74
Definition: ProteinIdentification.h:96
Definition: ProteinIdentification.h:105
String search_engine_version_
Definition: ProteinIdentification.h:245
Definition: ProteinIdentification.h:109
ProteinHit HitType
Hit type definition.
Definition: ProteinIdentification.h:66
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47
Definition: ProteinIdentification.h:106
Definition: ProteinIdentification.h:107
Search parameters of the DB search.
Definition: ProteinIdentification.h:117
String taxonomy
The taxonomy restriction.
Definition: ProteinIdentification.h:122
PeakMassType
Peak mass type.
Definition: ProteinIdentification.h:93
DigestionEnzyme
Definition: ProteinIdentification.h:103
std::vector< ProteinHit > protein_hits_
Definition: ProteinIdentification.h:254
String protein_score_type_
Definition: ProteinIdentification.h:252
double protein_significance_threshold_
Definition: ProteinIdentification.h:258
std::vector< String > accessions
Accessions of (indistinguishable) proteins that belong to the same group.
Definition: ProteinIdentification.h:77
String id_
Definition: ProteinIdentification.h:243
double precursor_tolerance
Mass tolerance of precursor ions (Dalton)
Definition: ProteinIdentification.h:130
UInt missed_cleavages
The number of allowed missed cleavages.
Definition: ProteinIdentification.h:128
Interface for classes that can store arbitrary meta information (Type-Name-Value tuples).
Definition: MetaInfoInterface.h:56
std::vector< ProteinGroup > protein_groups_
Definition: ProteinIdentification.h:255
String search_engine_
Definition: ProteinIdentification.h:244
Definition: ProteinIdentification.h:110
double peak_mass_tolerance
Mass tolerance of fragment ions (Dalton)
Definition: ProteinIdentification.h:129
Representation of a protein hit.
Definition: ProteinHit.h:54
bool higher_score_better_
Definition: ProteinIdentification.h:253
DateTime date_
Definition: ProteinIdentification.h:247
Definition: ProteinIdentification.h:108
Definition: ProteinIdentification.h:95
DateTime Class.
Definition: DateTime.h:55
std::vector< ProteinGroup > indistinguishable_proteins_
Indistinguishable proteins: accessions[0] is "group leader", probability is meaningless.
Definition: ProteinIdentification.h:257
DigestionEnzyme enzyme
The enzyme used for cleavage.
Definition: ProteinIdentification.h:127
PeakMassType mass_type
Mass type of the peaks.
Definition: ProteinIdentification.h:124
SearchParameters search_parameters_
Definition: ProteinIdentification.h:246
String charges
The allowed charges for the search.
Definition: ProteinIdentification.h:123
Bundles multiple (e.g. indistinguishable) proteins in a group.
Definition: ProteinIdentification.h:71
std::vector< String > variable_modifications
Allowed variable modifications.
Definition: ProteinIdentification.h:126

OpenMS / TOPP release 2.0.0 Documentation generated on Tue Nov 1 2016 16:34:46 using doxygen 1.8.11