ProteoWizard
PepXMLCat.hpp
Go to the documentation of this file.
1 //
2 // $Id: PepXMLCat.hpp 2503 2011-02-07 18:13:48Z chambm $
3 //
4 //
5 // Original author: Darren Kessner <darren@proteowizard.org>
6 //
7 // Copyright 2007 Spielberg Family Center for Applied Proteomics
8 // Cedars-Sinai Medical Center, Los Angeles, California 90048
9 //
10 // Licensed under the Apache License, Version 2.0 (the "License");
11 // you may not use this file except in compliance with the License.
12 // You may obtain a copy of the License at
13 //
14 // http://www.apache.org/licenses/LICENSE-2.0
15 //
16 // Unless required by applicable law or agreed to in writing, software
17 // distributed under the License is distributed on an "AS IS" BASIS,
18 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19 // See the License for the specific language governing permissions and
20 // limitations under the License.
21 //
22 
23 
24 #ifndef _PEPXMLCAT_HPP_
25 #define _PEPXMLCAT_HPP_
26 
28 #include <string>
29 #include <ostream>
30 #include <vector>
31 #include <utility>
32 
33 namespace pwiz {
34 namespace analysis {
35 
36 
38 {
39 public:
40 
42  {
43  std::string pepxmlfile;
44  char delim;
45  char record;
46  char quote;
47  bool headers;
48 
49  Config();
50  };
51 
53  {
54  int index;
55  int hit_rank;
56  std::string spectrum;
57  double mz;
58 
59  // Tandem
60  double hyperscore;
61  double nextscore;
62  double expect;
63 
64 
65  // SEQUEST
66  double xcorr;
67  double deltacn;
68  double deltacnstar;
69  double spscore;
70  int sprank;
71 
72  // PHENYX
73  double zscore;
74  double origScore;
75 
76  // MASCOT
77  double ionscore;
78  double id_score;
80 
81  // COMET
82  double dot_product;
83  double delta;
84  //double zscore; covered above
85 
86  std::vector<std::pair< std::string, std::string> > search_scores;
87 
88  // PROBID
89  double bays_score;
90  // double zscore; covered above
91 
92  std::string m_ions;
93  std::string peptide;
94  std::string protein;
95  int ntt;
96 
97  record();
98  };
99 
100  typedef std::vector<record> set;
101  typedef std::vector<record>::iterator iterator;
102  typedef std::vector<record>::const_iterator const_iterator;
103 
104  PepxmlRecordReader(const Config& _config);
105  virtual ~PepxmlRecordReader();
106 
107  bool open(const std::string& file);
108  void close();
109 
110  void print_headers(std::ostream& os) const;
111 
112  const_iterator begin() const;
113  const_iterator end() const;
114 
115  iterator begin();
116  iterator end();
117 
118  friend PWIZ_API_DECL std::ostream& operator<<(std::ostream& os, PepxmlRecordReader& prr);
119 private:
122  std::string search_engine;
123 };
124 
125 PWIZ_API_DECL std::ostream& operator<<(std::ostream& os, PepxmlRecordReader& prr);
126 
127 
128 } // namespace analysis
129 } // namespace pwiz
130 
131 #endif // _PEPXMLCAT_HPP_
132 
133