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-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: 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 ProteinGroup
72  {
77 
79  probability(0.0), accessions()
80  {}
81 
82  bool operator==(const ProteinGroup rhs) const
83  {
84  return probability == rhs.probability &&
85  accessions == rhs.accessions;
86  }
87 
88  };
89 
92  {
95  SIZE_OF_PEAKMASSTYPE
96  };
98  static const std::string NamesOfPeakMassType[SIZE_OF_PEAKMASSTYPE];
99 
100 
102  {
109  SIZE_OF_DIGESTIONENZYME
110  };
112  static const std::string NamesOfDigestionEnzyme[SIZE_OF_DIGESTIONENZYME];
113 
116  public MetaInfoInterface
117  {
123  std::vector<String> fixed_modifications;
124  std::vector<String> variable_modifications;
129 
131  db(),
132  db_version(),
133  taxonomy(),
134  charges(),
135  mass_type(MONOISOTOPIC),
136  fixed_modifications(),
137  variable_modifications(),
138  enzyme(UNKNOWN_ENZYME),
139  missed_cleavages(0),
140  peak_mass_tolerance(0.0),
141  precursor_tolerance(0.0)
142  {
143  }
144 
145  bool operator==(const SearchParameters & rhs) const
146  {
147  return db == rhs.db &&
148  db_version == rhs.db_version &&
149  taxonomy == rhs.taxonomy &&
150  charges == rhs.charges &&
151  mass_type == rhs.mass_type &&
152  fixed_modifications == rhs.fixed_modifications &&
153  variable_modifications == rhs.variable_modifications &&
154  enzyme == rhs.enzyme &&
155  missed_cleavages == rhs.missed_cleavages &&
156  peak_mass_tolerance == rhs.peak_mass_tolerance &&
157  precursor_tolerance == rhs.precursor_tolerance;
158  }
159 
160  bool operator!=(const SearchParameters & rhs) const
161  {
162  return !(*this == rhs);
163  }
164 
165  };
166 
167 
173  virtual ~ProteinIdentification();
177  ProteinIdentification & operator=(const ProteinIdentification & source);
179  bool operator==(const ProteinIdentification & rhs) const;
181  bool operator!=(const ProteinIdentification & rhs) const;
183 
185 
186  const std::vector<ProteinHit> & getHits() const;
189  std::vector<ProteinHit> & getHits();
191  void insertHit(const ProteinHit & input);
193  void setHits(const std::vector<ProteinHit> & hits);
195  std::vector<ProteinHit>::iterator findHit(const String & accession);
196 
198  const std::vector<ProteinGroup> & getProteinGroups() const;
200  std::vector<ProteinGroup> & getProteinGroups();
202  void insertProteinGroup(const ProteinGroup & group);
203 
205  const std::vector<ProteinGroup> & getIndistinguishableProteins() const;
207  std::vector<ProteinGroup> & getIndistinguishableProteins();
209  void insertIndistinguishableProteins(const ProteinGroup & group);
210 
212  DoubleReal getSignificanceThreshold() const;
214  void setSignificanceThreshold(DoubleReal value);
216  const String & getScoreType() const;
218  void setScoreType(const String & type);
220  bool isHigherScoreBetter() const;
222  void setHigherScoreBetter(bool higher_is_better);
224  void sort();
226  void assignRanks();
234  Size computeCoverage(const std::vector<PeptideIdentification> & pep_ids);
236 
238 
239  const DateTime & getDateTime() const;
242  void setDateTime(const DateTime & date);
244  void setSearchEngine(const String & search_engine);
246  const String & getSearchEngine() const;
248  void setSearchEngineVersion(const String & search_engine_version);
250  const String & getSearchEngineVersion() const;
252  void setSearchParameters(const SearchParameters & search_parameters);
254  const SearchParameters & getSearchParameters() const;
256  const String & getIdentifier() const;
258  void setIdentifier(const String & id);
260 
261 protected:
263 
270 
272 
275  std::vector<ProteinHit> protein_hits_;
276  std::vector<ProteinGroup> protein_groups_;
278  std::vector<ProteinGroup> indistinguishable_proteins_;
281  };
282 
283 } //namespace OpenMS
284 #endif // OPENMS_METADATA_PROTEINIDENTIFICATION_H
Representation of a protein identification run.
Definition: ProteinIdentification.h:61
bool operator!=(const SearchParameters &rhs) const
Definition: ProteinIdentification.h:160
String db
The used database.
Definition: ProteinIdentification.h:118
A more convenient string class.
Definition: String.h:56
bool operator==(const SearchParameters &rhs) const
Definition: ProteinIdentification.h:145
std::vector< String > fixed_modifications
Used fixed modifications.
Definition: ProteinIdentification.h:123
String db_version
The database version.
Definition: ProteinIdentification.h:119
bool operator==(const ProteinGroup rhs) const
Definition: ProteinIdentification.h:82
DoubleReal probability
Probability of this group.
Definition: ProteinIdentification.h:74
Definition: ProteinIdentification.h:94
Definition: ProteinIdentification.h:103
ProteinGroup()
Definition: ProteinIdentification.h:78
String search_engine_version_
Definition: ProteinIdentification.h:266
Definition: ProteinIdentification.h:107
ProteinHit HitType
Hit type definition.
Definition: ProteinIdentification.h:66
Definition: ProteinIdentification.h:104
Definition: ProteinIdentification.h:105
Search parameters of the DB search.
Definition: ProteinIdentification.h:115
DoubleReal peak_mass_tolerance
Mass tolerance of fragment ions (Dalton)
Definition: ProteinIdentification.h:127
String taxonomy
The taxonomy restriction.
Definition: ProteinIdentification.h:120
PeakMassType
Peak mass type.
Definition: ProteinIdentification.h:91
StringList accessions
Accessions of (indistinguishable) proteins that belong to the same group.
Definition: ProteinIdentification.h:76
DigestionEnzyme
Definition: ProteinIdentification.h:101
std::vector< ProteinHit > protein_hits_
Definition: ProteinIdentification.h:275
DoubleReal protein_significance_threshold_
Definition: ProteinIdentification.h:279
String protein_score_type_
Definition: ProteinIdentification.h:273
DoubleReal precursor_tolerance
Mass tolerance of precursor ions (Dalton)
Definition: ProteinIdentification.h:128
String id_
Definition: ProteinIdentification.h:264
UInt missed_cleavages
The number of allowed missed cleavages.
Definition: ProteinIdentification.h:126
Interface for classes that can store arbitrary meta information (Type-Name-Value tuples).
Definition: MetaInfoInterface.h:61
std::vector< ProteinGroup > protein_groups_
Definition: ProteinIdentification.h:276
String search_engine_
Definition: ProteinIdentification.h:265
Definition: ProteinIdentification.h:108
Representation of a protein hit.
Definition: ProteinHit.h:54
bool higher_score_better_
Definition: ProteinIdentification.h:274
DateTime date_
Definition: ProteinIdentification.h:268
Definition: ProteinIdentification.h:106
Definition: ProteinIdentification.h:93
String list.
Definition: StringList.h:56
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:144
DateTime Class.
Definition: DateTime.h:55
std::vector< ProteinGroup > indistinguishable_proteins_
Indistinguishable proteins: accessions[0] is &quot;group leader&quot;, probability is meaningless.
Definition: ProteinIdentification.h:278
SearchParameters()
Definition: ProteinIdentification.h:130
DigestionEnzyme enzyme
The enzyme used for cleavage.
Definition: ProteinIdentification.h:125
PeakMassType mass_type
Mass type of the peaks.
Definition: ProteinIdentification.h:122
SearchParameters search_parameters_
Definition: ProteinIdentification.h:267
String charges
The allowed charges for the search.
Definition: ProteinIdentification.h:121
Bundles multiple (e.g. indistinguishable) proteins in a group.
Definition: ProteinIdentification.h:71
std::vector< String > variable_modifications
Allowed variable modifications.
Definition: ProteinIdentification.h:124

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