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-2017.
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 
42 #include <set>
43 
44 namespace OpenMS
45 {
46  class PeptideIdentification;
47 
62  class OPENMS_DLLAPI ProteinIdentification :
63  public MetaInfoInterface
64  {
65 public:
68 
72  struct OPENMS_DLLAPI ProteinGroup
73  {
75  double probability;
76 
78  std::vector<String> accessions;
79 
80  ProteinGroup();
81 
83  bool operator==(const ProteinGroup& rhs) const;
84 
85  /*
86  @brief Comparison operator (for sorting)
87 
88  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.
89  */
90  bool operator<(const ProteinGroup& rhs) const;
91  };
92 
95  {
98  SIZE_OF_PEAKMASSTYPE
99  };
101  static const std::string NamesOfPeakMassType[SIZE_OF_PEAKMASSTYPE];
102 
104  struct OPENMS_DLLAPI SearchParameters :
105  public MetaInfoInterface
106  {
112  std::vector<String> fixed_modifications;
113  std::vector<String> variable_modifications;
120 
122 
123  bool operator==(const SearchParameters & rhs) const;
124 
125  bool operator!=(const SearchParameters & rhs) const;
126 
127  };
128 
129 
135  virtual ~ProteinIdentification();
139  ProteinIdentification & operator=(const ProteinIdentification & source);
141  bool operator==(const ProteinIdentification & rhs) const;
143  bool operator!=(const ProteinIdentification & rhs) const;
145 
147 
148  const std::vector<ProteinHit> & getHits() const;
151  std::vector<ProteinHit> & getHits();
153  void insertHit(const ProteinHit & input);
154 
160  void setHits(const std::vector<ProteinHit> & hits);
161 
163  std::vector<ProteinHit>::iterator findHit(const String & accession);
164 
166  const std::vector<ProteinGroup> & getProteinGroups() const;
168  std::vector<ProteinGroup> & getProteinGroups();
170  void insertProteinGroup(const ProteinGroup & group);
171 
173  const std::vector<ProteinGroup> & getIndistinguishableProteins() const;
175  std::vector<ProteinGroup> & getIndistinguishableProteins();
177  void insertIndistinguishableProteins(const ProteinGroup & group);
178 
180  double getSignificanceThreshold() const;
182  void setSignificanceThreshold(double value);
184  const String & getScoreType() const;
186  void setScoreType(const String & type);
188  bool isHigherScoreBetter() const;
190  void setHigherScoreBetter(bool higher_is_better);
192  void sort();
194  void assignRanks();
202  void computeCoverage(const std::vector<PeptideIdentification> & pep_ids);
204 
206 
207  const DateTime & getDateTime() const;
210  void setDateTime(const DateTime & date);
212  void setSearchEngine(const String & search_engine);
214  const String & getSearchEngine() const;
216  void setSearchEngineVersion(const String & search_engine_version);
218  const String & getSearchEngineVersion() const;
220  void setSearchParameters(const SearchParameters & search_parameters);
222  const SearchParameters & getSearchParameters() const;
224  const String & getIdentifier() const;
226  void setIdentifier(const String & id);
228  void setPrimaryMSRunPath(const StringList& s);
230  void getPrimaryMSRunPath(StringList& toFill) const;
232 
233 protected:
235 
242 
244 
247  std::vector<ProteinHit> protein_hits_;
248  std::vector<ProteinGroup> protein_groups_;
250  std::vector<ProteinGroup> indistinguishable_proteins_;
253  };
254 
255 } //namespace OpenMS
256 #endif // OPENMS_METADATA_PROTEINIDENTIFICATION_H
Representation of a protein identification run.
Definition: ProteinIdentification.h:62
String db
The used database.
Definition: ProteinIdentification.h:107
A more convenient string class.
Definition: String.h:57
std::vector< String > fixed_modifications
Used fixed modifications.
Definition: ProteinIdentification.h:112
String db_version
The database version.
Definition: ProteinIdentification.h:108
double probability
Probability of this group.
Definition: ProteinIdentification.h:75
Definition: ProteinIdentification.h:97
double fragment_mass_tolerance
Mass tolerance of fragment ions (Dalton or ppm)
Definition: ProteinIdentification.h:115
unsigned int UInt
Unsigned integer type.
Definition: Types.h:95
String search_engine_version_
Definition: ProteinIdentification.h:238
double precursor_mass_tolerance
Mass tolerance of precursor ions (Dalton or ppm)
Definition: ProteinIdentification.h:117
bool operator==(_Iterator< _Val, _Ref, _Ptr > const &, _Iterator< _Val, _Ref, _Ptr > const &)
Definition: KDTree.h:806
ProteinHit HitType
Hit type definition.
Definition: ProteinIdentification.h:67
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47
Search parameters of the DB search.
Definition: ProteinIdentification.h:104
bool operator<(const MultiplexDeltaMasses &dm1, const MultiplexDeltaMasses &dm2)
bool precursor_mass_tolerance_ppm
Mass tolerance unit of precursor ions (true: ppm, false: Dalton)
Definition: ProteinIdentification.h:118
String taxonomy
The taxonomy restriction.
Definition: ProteinIdentification.h:109
PeakMassType
Peak mass type.
Definition: ProteinIdentification.h:94
Enzyme digestion_enzyme
The cleavage site information in details (from EnzymesDB)
Definition: ProteinIdentification.h:119
std::vector< ProteinHit > protein_hits_
Definition: ProteinIdentification.h:247
String protein_score_type_
Definition: ProteinIdentification.h:245
double protein_significance_threshold_
Definition: ProteinIdentification.h:251
std::vector< String > accessions
Accessions of (indistinguishable) proteins that belong to the same group.
Definition: ProteinIdentification.h:78
String id_
Definition: ProteinIdentification.h:236
UInt missed_cleavages
The number of allowed missed cleavages.
Definition: ProteinIdentification.h:114
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:248
String search_engine_
Definition: ProteinIdentification.h:237
std::vector< String > StringList
Vector of String.
Definition: ListUtils.h:74
Representation of a protein hit.
Definition: ProteinHit.h:54
bool higher_score_better_
Definition: ProteinIdentification.h:246
DateTime date_
Definition: ProteinIdentification.h:240
Definition: ProteinIdentification.h:96
bool operator!=(_Iterator< _Val, _Ref, _Ptr > const &, _Iterator< _Val, _Ref, _Ptr > const &)
Definition: KDTree.h:824
DateTime Class.
Definition: DateTime.h:55
bool fragment_mass_tolerance_ppm
Mass tolerance unit of fragment ions (true: ppm, false: Dalton)
Definition: ProteinIdentification.h:116
std::vector< ProteinGroup > indistinguishable_proteins_
Indistinguishable proteins: accessions[0] is "group leader", probability is meaningless.
Definition: ProteinIdentification.h:250
Representation of an enzyme.
Definition: Enzyme.h:56
PeakMassType mass_type
Mass type of the peaks.
Definition: ProteinIdentification.h:111
SearchParameters search_parameters_
Definition: ProteinIdentification.h:239
String charges
The allowed charges for the search.
Definition: ProteinIdentification.h:110
Bundles multiple (e.g. indistinguishable) proteins in a group.
Definition: ProteinIdentification.h:72
std::vector< String > variable_modifications
Allowed variable modifications.
Definition: ProteinIdentification.h:113

OpenMS / TOPP release 2.3.0 Documentation generated on Tue Jan 9 2018 18:22:03 using doxygen 1.8.13