ProteoWizard
IO.hpp
Go to the documentation of this file.
1 //
2 // $Id: IO.hpp 6865 2014-10-31 21:47:12Z chambm $
3 //
4 //
5 // Original author: Robert Burke <robert.burke@proteowizard.org>
6 //
7 // Copyright 2009 Spielberg Family Center for Applied Proteomics
8 // University of Southern California, Los Angeles, California 90033
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 #ifndef _IDENTDATA_IO_HPP_
24 #define _IDENTDATA_IO_HPP_
25 
27 #include "IdentData.hpp"
30 
31 
32 namespace pwiz {
33 namespace identdata {
34 
35 enum SchemaVersion { SchemaVersion_1_1 = 0, SchemaVersion_1_0 }; // 0 is the default
36 
37 namespace IO {
38 
39 
40 PWIZ_API_DECL void write(minimxml::XMLWriter& writer, const CV& cv);
41 PWIZ_API_DECL void read(std::istream& is, CV& cv);
42 
43 
44 PWIZ_API_DECL void write(minimxml::XMLWriter& writer, const UserParam& userParam);
45 PWIZ_API_DECL void read(std::istream& is, UserParam& userParam);
46 
47 
48 PWIZ_API_DECL void write(minimxml::XMLWriter& writer, const CVParam& cv);
49 PWIZ_API_DECL void read(std::istream& is, CVParam& cv);
50 
51 
52 // Novel functions
53 
54 // For testing purposes only
55 PWIZ_API_DECL void write(minimxml::XMLWriter& writer, const Identifiable& it);
56 PWIZ_API_DECL void read(std::istream& is, Identifiable& it);
57 
58 
60 PWIZ_API_DECL void read(std::istream& is, IdentifiableParamContainer& it);
61 
62 
63 PWIZ_API_DECL void write(minimxml::XMLWriter& writer, const ContactRole& contactRole);
64 PWIZ_API_DECL void read(std::istream& writer, ContactRole& contactRole);
65 
66 
67 PWIZ_API_DECL void write(minimxml::XMLWriter& writer, const Provider& provider);
68 PWIZ_API_DECL void read(std::istream& writer, Provider& provider);
69 
70 
72 PWIZ_API_DECL void read(std::istream& writer, SpectrumIdentification& si);
73 
74 
75 PWIZ_API_DECL void write(minimxml::XMLWriter& writer, const IonType& ionType);
76 PWIZ_API_DECL void read(std::istream& writer, IonType& ionType);
77 
78 
79 PWIZ_API_DECL void write(minimxml::XMLWriter& writer, const Measure& measure);
80 PWIZ_API_DECL void read(std::istream& writer, Measure& measure);
81 
82 
83 PWIZ_API_DECL void write(minimxml::XMLWriter& writer, const Sample& sample);
84 PWIZ_API_DECL void read(std::istream& writer, Sample& sample);
85 
86 
87 PWIZ_API_DECL void write(minimxml::XMLWriter& writer, const Person& cp);
88 PWIZ_API_DECL void read(std::istream& writer, Person& cp);
89 
90 
91 PWIZ_API_DECL void write(minimxml::XMLWriter& writer, const Organization& cp);
92 PWIZ_API_DECL void read(std::istream& writer, Organization& cp);
93 
94 
96 PWIZ_API_DECL void read(std::istream& is, SearchModification& sm);
97 
98 
100 PWIZ_API_DECL void read(std::istream& is, Filter& filter);
101 
102 
104 PWIZ_API_DECL void read(std::istream& is, TranslationTable& tt);
105 
106 
108 PWIZ_API_DECL void read(std::istream& is, DatabaseTranslation& dt);
109 
110 
112 PWIZ_API_DECL void read(std::istream& is, SpectrumIdentificationProtocol& sip);
113 
114 
116 PWIZ_API_DECL void read(std::istream& is, ProteinDetectionProtocol& pdp);
117 
118 
120 PWIZ_API_DECL void read(std::istream& is, ProteinDetection& pd);
121 
122 
124 PWIZ_API_DECL void read(std::istream& is, AnalysisCollection& ac);
125 
126 
127 PWIZ_API_DECL void write(minimxml::XMLWriter& writer, const Enzyme& ez);
128 PWIZ_API_DECL void read(std::istream& is, Enzyme& ez);
129 
130 
131 PWIZ_API_DECL void write(minimxml::XMLWriter& writer, const Enzymes& ez);
132 PWIZ_API_DECL void read(std::istream& is, Enzymes& ez);
133 
134 
135 PWIZ_API_DECL void write(minimxml::XMLWriter& writer, const Residue& r);
136 PWIZ_API_DECL void read(std::istream& is, Residue& r);
137 
138 
140 PWIZ_API_DECL void read(std::istream& is, AmbiguousResidue& ar);
141 
142 
143 PWIZ_API_DECL void write(minimxml::XMLWriter& writer, const MassTable& mt);
144 PWIZ_API_DECL void read(std::istream& is, MassTable& mt);
145 
146 
148 PWIZ_API_DECL void read(std::istream& is, AnalysisProtocolCollection& apc);
149 
150 
151 PWIZ_API_DECL void write(minimxml::XMLWriter& writer, const SpectraData& sd);
152 PWIZ_API_DECL void read(std::istream& is, SpectraData& sd);
153 
154 
155 PWIZ_API_DECL void write(minimxml::XMLWriter& writer, const SourceFile& sf);
156 PWIZ_API_DECL void read(std::istream& is, SourceFile& sf);
157 
158 
159 PWIZ_API_DECL void write(minimxml::XMLWriter& writer, const SearchDatabase& sd);
160 PWIZ_API_DECL void read(std::istream& is, SearchDatabase& sd);
161 
162 
163 PWIZ_API_DECL void write(minimxml::XMLWriter& writer, const Inputs& inputs);
164 PWIZ_API_DECL void read(std::istream& is, Inputs& inputs);
165 
166 
167 PWIZ_API_DECL void write(minimxml::XMLWriter& writer, const FragmentArray& fa);
168 PWIZ_API_DECL void read(std::istream& is, FragmentArray& fa);
169 
170 
172 PWIZ_API_DECL void read(std::istream& is, SpectrumIdentificationItem& sir);
173 
174 
176 PWIZ_API_DECL void read(std::istream& is, PeptideHypothesis& ph);
177 
178 
180 PWIZ_API_DECL void read(std::istream& is, ProteinDetectionHypothesis& pdh);
181 
182 
184 PWIZ_API_DECL void read(std::istream& is, ProteinAmbiguityGroup& pag);
185 
186 
188  const pwiz::util::IterationListenerRegistry* iterationListenerRegistry = 0);
189 PWIZ_API_DECL void read(std::istream& is, SpectrumIdentificationList& sil,
190  const pwiz::util::IterationListenerRegistry* iterationListenerRegistry = 0);
191 
192 
194 PWIZ_API_DECL void read(std::istream& is, SpectrumIdentificationResult& sir);
195 
196 
198 PWIZ_API_DECL void read(std::istream& is, ProteinDetectionList& pdl);
199 
200 
201 PWIZ_API_DECL void write(minimxml::XMLWriter& writer, const AnalysisData& pdl,
202  const pwiz::util::IterationListenerRegistry* iterationListenerRegistry = 0);
203 PWIZ_API_DECL void read(std::istream& is, AnalysisData& pdl,
204  const pwiz::util::IterationListenerRegistry* iterationListenerRegistry = 0);
205 
206 
207 PWIZ_API_DECL void write(minimxml::XMLWriter& writer, const BibliographicReference& bibliographicReference);
208 PWIZ_API_DECL void read(std::istream& is, BibliographicReference& bibliographicReference);
209 
210 
211 enum PWIZ_API_DECL AnalysisDataFlag {IgnoreAnalysisData, ReadAnalysisData, IgnoreProteinDetectionList};
212 
213 
214 PWIZ_API_DECL void write(minimxml::XMLWriter& writer, const DataCollection& dataCollection,
215  const pwiz::util::IterationListenerRegistry* iterationListenerRegistry = 0);
216 PWIZ_API_DECL void read(std::istream& is, DataCollection& dataCollection,
217  const pwiz::util::IterationListenerRegistry* iterationListenerRegistry = 0,
218  AnalysisDataFlag analysisDataFlag = ReadAnalysisData);
219 
220 
221 PWIZ_API_DECL void write(minimxml::XMLWriter& writer, const AnalysisSoftware& analysisSoftware);
222 PWIZ_API_DECL void read(std::istream& is, AnalysisSoftware& analysisSoftware);
223 
224 
225 PWIZ_API_DECL void write(minimxml::XMLWriter& writer, const DBSequence& dbSequence);
226 PWIZ_API_DECL void read(std::istream& is, DBSequence& dbSequence);
227 
228 
229 PWIZ_API_DECL void write(minimxml::XMLWriter& writer, const Peptide& peptide);
230 PWIZ_API_DECL void read(std::istream& is, Peptide& peptide);
231 
232 
233 PWIZ_API_DECL void write(minimxml::XMLWriter& writer, const PeptideEvidence& pe);
234 PWIZ_API_DECL void read(std::istream& is, PeptideEvidence& pe);
235 
236 
237 PWIZ_API_DECL void write(minimxml::XMLWriter& writer, const Modification& mod);
238 PWIZ_API_DECL void read(std::istream& is, Modification& mod);
239 
240 
241 PWIZ_API_DECL void write(minimxml::XMLWriter& writer, const SubstitutionModification& sm);
242 PWIZ_API_DECL void read(std::istream& is, SubstitutionModification& sm);
243 
244 
245 PWIZ_API_DECL void write(minimxml::XMLWriter& writer, const SequenceCollection& sc,
246  const pwiz::util::IterationListenerRegistry* iterationListenerRegistry = 0);
247 PWIZ_API_DECL void read(std::istream& is, SequenceCollection& sc,
248  const pwiz::util::IterationListenerRegistry* iterationListenerRegistry = 0);
249 
250 
251 PWIZ_API_DECL void write(minimxml::XMLWriter& writer, const AnalysisSampleCollection& asc);
252 PWIZ_API_DECL void read(std::istream& is, AnalysisSampleCollection& asc);
253 
254 
255 enum PWIZ_API_DECL SequenceCollectionFlag {IgnoreSequenceCollection, ReadSequenceCollection};
256 
257 
258 PWIZ_API_DECL void write(minimxml::XMLWriter& writer, const IdentData& identdata,
259  const pwiz::util::IterationListenerRegistry* iterationListenerRegistry = 0);
260 PWIZ_API_DECL void read(std::istream& is, IdentData& identdata,
261  const pwiz::util::IterationListenerRegistry* iterationListenerRegistry = 0,
262  SequenceCollectionFlag sequenceCollectionFlag = ReadSequenceCollection,
263  AnalysisDataFlag analysisDataFlag = ReadAnalysisData);
264 
265 
266 } // namespace IO
267 
268 } // namespace pwiz
269 } // namespace identdata
270 
271 #endif // _IDENTDATA_IO_HPP_
PWIZ_API_DECL const CV & cv(const std::string &prefix)
returns a CV object for the specified namespace (prefix); currently supported namespaces are: MS UO ...
The XMLWriter class provides simple, tag-level XML syntax writing.
Definition: XMLWriter.hpp:47
Implementation of AnalysisCollectionType from the mzIdentML schema.
Definition: IdentData.hpp:895
Implementation of MeasureType from the mzIdentML schema.
Definition: IdentData.hpp:573
Implementation of TranslationTableType from the mzIdentML schema.
Definition: IdentData.hpp:517
Implementation of EnzymeType from the mzIdentML schema.
Definition: IdentData.hpp:408
Implementation of AmbiguousResidueType from the mzIdentML schema.
Definition: IdentData.hpp:463
Implementation of SpectraDataType from the mzIdentML schema.
Definition: IdentData.hpp:697
PWIZ_API_DECL proteome::Peptide peptide(const Peptide &peptide)
creates a proteome::Peptide from an identdata::Peptide
Parent class representing extensions of the IdentifiableType from the mzIdentML schema.
Definition: IdentData.hpp:64
Implementation of DatabaseTranslationType from the mzIdentML schema.
Definition: IdentData.hpp:530
Implementation of PersonType from the mzIdentML schema.
Definition: IdentData.hpp:152
Implementation of the InputsType from the mzIdentML schema.
Definition: IdentData.hpp:943
Implementation of SpectrumIdentificationResultType from the mzIdentML schema.
Definition: IdentData.hpp:722
Implementation of ProteinDetectionHypothesisType from the mzIdentML schema.
Definition: IdentData.hpp:819
Information about an ontology or CV source and a short &#39;lookup&#39; tag to refer to.
Definition: cv.hpp:13353
Implementation of ProteinDetectionProtocolType from the mzIdentML schema.
Definition: IdentData.hpp:786
Implementation of FilterType from the mzIdentML schema.
Definition: IdentData.hpp:501
Implementation of AnalysisDataType from the mzIdentML schema.
Definition: IdentData.hpp:960
Implementation of ProviderType from the mzIdentML schema.
Definition: IdentData.hpp:234
Uncontrolled user parameters (essentially allowing free text). Before using these, one should verify whether there is an appropriate CV term available, and if so, use the CV term instead.
Definition: ParamTypes.hpp:185
Implementation of ProteinAmbiguityGroupType from the mzIdentML schema.
Definition: IdentData.hpp:839
Implementation of MassTableType from the mzIdentML schema.
Definition: IdentData.hpp:480
PWIZ_API_DECL void write(minimxml::XMLWriter &writer, const CV &cv)
ReadAnalysisData
Definition: IO.hpp:211
Implementation of EnzymesType from the mzIdentML schema.
Definition: IdentData.hpp:431
Implementation of ProteinDetectionListType from the mzIdentML schema.
Definition: IdentData.hpp:855
#define PWIZ_API_DECL
Definition: Export.hpp:32
IgnoreSequenceCollection
Definition: IO.hpp:255
IgnoreAnalysisData
Definition: IO.hpp:211
Implementation of IonTypeType from the mzIdentML schema.
Definition: IdentData.hpp:607
Implementation of SearchModificationType from the mzIdentML schema.
Definition: IdentData.hpp:388
Implementation of the SampleType from the mzIdentML schema.
Definition: IdentData.hpp:195
Implementation of PeptideHypothesisType from the mzIdentML schema.
Definition: IdentData.hpp:806
Implementation of AbstractOrganizationType from the mzIdentML schema.
Definition: IdentData.hpp:135
Implementation of SourceFileType from the mzIdentML schema.
Definition: IdentData.hpp:923
PWIZ_API_DECL void read(std::istream &is, CV &cv)
Implementation of SpectrumIdentificationProtocolType from the mzIdentML schema.
Definition: IdentData.hpp:545
handles registration of IterationListeners and broadcast of update messages
Implementation of FragmentArrayType from the mzIdentML schema.
Definition: IdentData.hpp:589
Implementation of SearchDatabaseType from the mzIdentML schema.
Definition: IdentData.hpp:270
Implementation of SpectrumIdentificationType from the mzIdentML schema.
Definition: IdentData.hpp:764
Implementation of ResidueType from the mzIdentML schema.
Definition: IdentData.hpp:445
Implementation of AnalysisProtocolCollectionType from the mzIdentML schema.
Definition: IdentData.hpp:909
Implementation for the BibliographicReferenceType tag in the mzIdentML schema.
Definition: IdentData.hpp:95
Implementation of ContactRoleType from the mzIdentML schema.
Definition: IdentData.hpp:175
Implementation of SpectrumIdentificationItemType from the mzIdentML schema.
Definition: IdentData.hpp:669
Implementation of SpectrumIdentificationListType from the mzIdentML schema.
Definition: IdentData.hpp:743
Parent class of all Identifiable objects that have ParamGroups.
Definition: IdentData.hpp:79
represents a tag-value pair, where the tag comes from the controlled vocabulary
Definition: ParamTypes.hpp:44
void filter(const TContainer &data, const TContainer &filter, TContainer &result, bool circular=false, uint32_t sides=2)
Applies linear convolution (filtering) to a univariate time series.
Definition: filter.hpp:112
Implementation of ProteinDetectionType from the mzIdentML schema.
Definition: IdentData.hpp:872