ProteoWizard
IO.hpp
Go to the documentation of this file.
1//
2// $Id$
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
32namespace pwiz {
33namespace identdata {
34
35enum SchemaVersion { SchemaVersion_1_1 = 0, SchemaVersion_1_0 }; // 0 is the default
36
37namespace IO {
38
39
40PWIZ_API_DECL void write(minimxml::XMLWriter& writer, const CV& cv);
41PWIZ_API_DECL void read(std::istream& is, CV& cv);
42
43
44PWIZ_API_DECL void write(minimxml::XMLWriter& writer, const UserParam& userParam);
45PWIZ_API_DECL void read(std::istream& is, UserParam& userParam);
46
47
49PWIZ_API_DECL void read(std::istream& is, CVParam& cv);
50
51
52// Novel functions
53
54// For testing purposes only
56PWIZ_API_DECL void read(std::istream& is, Identifiable& it);
57
58
60PWIZ_API_DECL void read(std::istream& is, IdentifiableParamContainer& it);
61
62
63PWIZ_API_DECL void write(minimxml::XMLWriter& writer, const ContactRole& contactRole);
64PWIZ_API_DECL void read(std::istream& writer, ContactRole& contactRole);
65
66
67PWIZ_API_DECL void write(minimxml::XMLWriter& writer, const Provider& provider);
68PWIZ_API_DECL void read(std::istream& writer, Provider& provider);
69
70
72PWIZ_API_DECL void read(std::istream& writer, SpectrumIdentification& si);
73
74
75PWIZ_API_DECL void write(minimxml::XMLWriter& writer, const IonType& ionType);
76PWIZ_API_DECL void read(std::istream& writer, IonType& ionType);
77
78
79PWIZ_API_DECL void write(minimxml::XMLWriter& writer, const Measure& measure);
80PWIZ_API_DECL void read(std::istream& writer, Measure& measure);
81
82
83PWIZ_API_DECL void write(minimxml::XMLWriter& writer, const Sample& sample);
84PWIZ_API_DECL void read(std::istream& writer, Sample& sample);
85
86
88PWIZ_API_DECL void read(std::istream& writer, Person& cp);
89
90
92PWIZ_API_DECL void read(std::istream& writer, Organization& cp);
93
94
96PWIZ_API_DECL void read(std::istream& is, SearchModification& sm);
97
98
99PWIZ_API_DECL void write(minimxml::XMLWriter& writer, const Filter& filter);
100PWIZ_API_DECL void read(std::istream& is, Filter& filter);
101
102
104PWIZ_API_DECL void read(std::istream& is, TranslationTable& tt);
105
106
108PWIZ_API_DECL void read(std::istream& is, DatabaseTranslation& dt);
109
110
113
114
116PWIZ_API_DECL void read(std::istream& is, ProteinDetectionProtocol& pdp);
117
118
120PWIZ_API_DECL void read(std::istream& is, ProteinDetection& pd);
121
122
124PWIZ_API_DECL void read(std::istream& is, AnalysisCollection& ac);
125
126
128PWIZ_API_DECL void read(std::istream& is, Enzyme& ez);
129
130
132PWIZ_API_DECL void read(std::istream& is, Enzymes& ez);
133
134
136PWIZ_API_DECL void read(std::istream& is, Residue& r);
137
138
140PWIZ_API_DECL void read(std::istream& is, AmbiguousResidue& ar);
141
142
144PWIZ_API_DECL void read(std::istream& is, MassTable& mt);
145
146
148PWIZ_API_DECL void read(std::istream& is, AnalysisProtocolCollection& apc);
149
150
152PWIZ_API_DECL void read(std::istream& is, SpectraData& sd);
153
154
156PWIZ_API_DECL void read(std::istream& is, SourceFile& sf);
157
158
160PWIZ_API_DECL void read(std::istream& is, SearchDatabase& sd);
161
162
163PWIZ_API_DECL void write(minimxml::XMLWriter& writer, const Inputs& inputs);
164PWIZ_API_DECL void read(std::istream& is, Inputs& inputs);
165
166
168PWIZ_API_DECL void read(std::istream& is, FragmentArray& fa);
169
170
172PWIZ_API_DECL void read(std::istream& is, SpectrumIdentificationItem& sir);
173
174
176PWIZ_API_DECL void read(std::istream& is, PeptideHypothesis& ph);
177
178
180PWIZ_API_DECL void read(std::istream& is, ProteinDetectionHypothesis& pdh);
181
182
184PWIZ_API_DECL void read(std::istream& is, ProteinAmbiguityGroup& pag);
185
186
188 const pwiz::util::IterationListenerRegistry* iterationListenerRegistry = 0);
190 const pwiz::util::IterationListenerRegistry* iterationListenerRegistry = 0);
191
192
195
196
198PWIZ_API_DECL void read(std::istream& is, ProteinDetectionList& pdl);
199
200
202 const pwiz::util::IterationListenerRegistry* iterationListenerRegistry = 0);
203PWIZ_API_DECL void read(std::istream& is, AnalysisData& pdl,
204 const pwiz::util::IterationListenerRegistry* iterationListenerRegistry = 0);
205
206
207PWIZ_API_DECL void write(minimxml::XMLWriter& writer, const BibliographicReference& bibliographicReference);
208PWIZ_API_DECL void read(std::istream& is, BibliographicReference& bibliographicReference);
209
210
211enum PWIZ_API_DECL AnalysisDataFlag {IgnoreAnalysisData, ReadAnalysisData, IgnoreProteinDetectionList};
212
213
214PWIZ_API_DECL void write(minimxml::XMLWriter& writer, const DataCollection& dataCollection,
215 const pwiz::util::IterationListenerRegistry* iterationListenerRegistry = 0);
216PWIZ_API_DECL void read(std::istream& is, DataCollection& dataCollection,
217 const pwiz::util::IterationListenerRegistry* iterationListenerRegistry = 0,
218 AnalysisDataFlag analysisDataFlag = ReadAnalysisData);
219
220
221PWIZ_API_DECL void write(minimxml::XMLWriter& writer, const AnalysisSoftware& analysisSoftware);
222PWIZ_API_DECL void read(std::istream& is, AnalysisSoftware& analysisSoftware);
223
224
225PWIZ_API_DECL void write(minimxml::XMLWriter& writer, const DBSequence& dbSequence);
226PWIZ_API_DECL void read(std::istream& is, DBSequence& dbSequence);
227
228
230PWIZ_API_DECL void read(std::istream& is, Peptide& peptide);
231
232
234PWIZ_API_DECL void read(std::istream& is, PeptideEvidence& pe);
235
236
238PWIZ_API_DECL void read(std::istream& is, Modification& mod);
239
240
242PWIZ_API_DECL void read(std::istream& is, SubstitutionModification& sm);
243
244
246 const pwiz::util::IterationListenerRegistry* iterationListenerRegistry = 0);
247PWIZ_API_DECL void read(std::istream& is, SequenceCollection& sc,
248 const pwiz::util::IterationListenerRegistry* iterationListenerRegistry = 0);
249
250
252PWIZ_API_DECL void read(std::istream& is, AnalysisSampleCollection& asc);
253
254
255enum PWIZ_API_DECL SequenceCollectionFlag {IgnoreSequenceCollection, ReadSequenceCollection};
256
257
258PWIZ_API_DECL void write(minimxml::XMLWriter& writer, const IdentData& identdata,
259 const pwiz::util::IterationListenerRegistry* iterationListenerRegistry = 0);
260PWIZ_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_
#define PWIZ_API_DECL
Definition Export.hpp:32
The XMLWriter class provides simple, tag-level XML syntax writing.
Definition XMLWriter.hpp:48
handles registration of IterationListeners and broadcast of update messages
IgnoreSequenceCollection
Definition IO.hpp:255
IgnoreAnalysisData
Definition IO.hpp:211
ReadAnalysisData
Definition IO.hpp:211
PWIZ_API_DECL void write(minimxml::XMLWriter &writer, const CV &cv)
PWIZ_API_DECL void read(std::istream &is, CV &cv)
PWIZ_API_DECL proteome::Peptide peptide(const Peptide &peptide)
creates a proteome::Peptide from an identdata::Peptide
@ SchemaVersion_1_0
Definition IO.hpp:35
@ SchemaVersion_1_1
Definition IO.hpp:35
Information about an ontology or CV source and a short 'lookup' tag to refer to.
Definition cv.hpp:14916
represents a tag-value pair, where the tag comes from the controlled vocabulary
Uncontrolled user parameters (essentially allowing free text). Before using these,...
Implementation of AmbiguousResidueType from the mzIdentML schema.
Implementation of AnalysisCollectionType from the mzIdentML schema.
Implementation of AnalysisDataType from the mzIdentML schema.
Implementation of AnalysisProtocolCollectionType from the mzIdentML schema.
Implementation of AnalysisSampleCollectionType from mzIdentML schema.
Implementation of AnalysisSoftwareType from the mzIdentML schema.
Implementation for the BibliographicReferenceType tag in the mzIdentML schema.
Definition IdentData.hpp:96
Implementation of ContactRoleType from the mzIdentML schema.
Implementation of DBSequenceType from the mzIdentML schema.
Implementation of DataCollectionType from the mzIdentML schema.
Implementation of DatabaseTranslationType from the mzIdentML schema.
Implementation of EnzymeType from the mzIdentML schema.
Implementation of EnzymesType from the mzIdentML schema.
Implementation of FilterType from the mzIdentML schema.
Implementation of FragmentArrayType from the mzIdentML schema.
Implementation of the MzIdentMLType from the mzIdentML schema.
Parent class representing extensions of the IdentifiableType from the mzIdentML schema.
Definition IdentData.hpp:65
Parent class of all Identifiable objects that have ParamGroups.
Definition IdentData.hpp:80
Implementation of the InputsType from the mzIdentML schema.
Implementation of IonTypeType from the mzIdentML schema.
Implementation of MassTableType from the mzIdentML schema.
Implementation of MeasureType from the mzIdentML schema.
Implementation of ModificationType from the mzIdentML schema.
Implementation of AbstractOrganizationType from the mzIdentML schema.
Implementation of PeptideEvidenceType from the mzIdentML schema.
Implementation of PeptideType from the mzIdentML schema.
Implementation of PeptideHypothesisType from the mzIdentML schema.
Implementation of PersonType from the mzIdentML schema.
Implementation of ProteinAmbiguityGroupType from the mzIdentML schema.
Implementation of ProteinDetectionType from the mzIdentML schema.
Implementation of ProteinDetectionHypothesisType from the mzIdentML schema.
Implementation of ProteinDetectionListType from the mzIdentML schema.
Implementation of ProteinDetectionProtocolType from the mzIdentML schema.
Implementation of ProviderType from the mzIdentML schema.
Implementation of ResidueType from the mzIdentML schema.
Implementation of the SampleType from the mzIdentML schema.
Implementation of SearchDatabaseType from the mzIdentML schema.
Implementation of SearchModificationType from the mzIdentML schema.
Implementation of SequenceCollectionType from the mzIdentML schema.
Implementation of SourceFileType from the mzIdentML schema.
Implementation of SpectraDataType from the mzIdentML schema.
Implementation of SpectrumIdentificationType from the mzIdentML schema.
Implementation of SpectrumIdentificationItemType from the mzIdentML schema.
Implementation of SpectrumIdentificationListType from the mzIdentML schema.
Implementation of SpectrumIdentificationProtocolType from the mzIdentML schema.
Implementation of SpectrumIdentificationResultType from the mzIdentML schema.
Implementation of SubstitutionModificationType from the mzIdentML schema.
Implementation of TranslationTableType from the mzIdentML schema.