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 
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 
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 
49 PWIZ_API_DECL void read(std::istream& is, CVParam& cv);
50 
51 
52 // Novel functions
53 
54 // For testing purposes only
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 
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 
128 PWIZ_API_DECL void read(std::istream& is, Enzyme& ez);
129 
130 
132 PWIZ_API_DECL void read(std::istream& is, Enzymes& ez);
133 
134 
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 
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 
152 PWIZ_API_DECL void read(std::istream& is, SpectraData& sd);
153 
154 
156 PWIZ_API_DECL void read(std::istream& is, SourceFile& sf);
157 
158 
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 
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 
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 
230 PWIZ_API_DECL void read(std::istream& is, Peptide& peptide);
231 
232 
234 PWIZ_API_DECL void read(std::istream& is, PeptideEvidence& pe);
235 
236 
238 PWIZ_API_DECL void read(std::istream& is, Modification& mod);
239 
240 
242 PWIZ_API_DECL void read(std::istream& is, SubstitutionModification& sm);
243 
244 
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 
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::data::UserParam
Uncontrolled user parameters (essentially allowing free text). Before using these,...
Definition: ParamTypes.hpp:186
pwiz::identdata::SpectrumIdentificationItem
Implementation of SpectrumIdentificationItemType from the mzIdentML schema.
Definition: IdentData.hpp:670
pwiz::identdata::Person
Implementation of PersonType from the mzIdentML schema.
Definition: IdentData.hpp:153
pwiz::minimxml::XMLWriter
The XMLWriter class provides simple, tag-level XML syntax writing.
Definition: XMLWriter.hpp:48
IterationListener.hpp
IgnoreAnalysisData
IgnoreAnalysisData
Definition: IO.hpp:211
pwiz::identdata::PeptideEvidence
Implementation of PeptideEvidenceType from the mzIdentML schema.
Definition: IdentData.hpp:627
pwiz::identdata::Residue
Implementation of ResidueType from the mzIdentML schema.
Definition: IdentData.hpp:446
pwiz
Definition: ChromatogramList_Filter.hpp:36
pwiz::identdata::SchemaVersion_1_0
@ SchemaVersion_1_0
Definition: IO.hpp:35
ralab::base::filter::filter
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
pwiz::identdata::AmbiguousResidue
Implementation of AmbiguousResidueType from the mzIdentML schema.
Definition: IdentData.hpp:464
pwiz::cv::CV
Information about an ontology or CV source and a short 'lookup' tag to refer to.
Definition: cv.hpp:14916
pwiz::identdata::SpectrumIdentificationResult
Implementation of SpectrumIdentificationResultType from the mzIdentML schema.
Definition: IdentData.hpp:723
pwiz::identdata::ProteinDetectionHypothesis
Implementation of ProteinDetectionHypothesisType from the mzIdentML schema.
Definition: IdentData.hpp:820
pwiz::identdata::SpectraData
Implementation of SpectraDataType from the mzIdentML schema.
Definition: IdentData.hpp:698
pwiz::identdata::SchemaVersion
SchemaVersion
Definition: IO.hpp:35
pwiz::identdata::Provider
Implementation of ProviderType from the mzIdentML schema.
Definition: IdentData.hpp:235
pwiz::identdata::SubstitutionModification
Implementation of SubstitutionModificationType from the mzIdentML schema.
Definition: IdentData.hpp:350
pwiz::identdata::TranslationTable
Implementation of TranslationTableType from the mzIdentML schema.
Definition: IdentData.hpp:518
pwiz::identdata::SourceFile
Implementation of SourceFileType from the mzIdentML schema.
Definition: IdentData.hpp:924
PWIZ_API_DECL
#define PWIZ_API_DECL
Definition: Export.hpp:32
pwiz::identdata::Organization
Implementation of AbstractOrganizationType from the mzIdentML schema.
Definition: IdentData.hpp:136
pwiz::identdata::IonType
Implementation of IonTypeType from the mzIdentML schema.
Definition: IdentData.hpp:608
pwiz::identdata::ProteinDetection
Implementation of ProteinDetectionType from the mzIdentML schema.
Definition: IdentData.hpp:873
pwiz::identdata::Enzyme
Implementation of EnzymeType from the mzIdentML schema.
Definition: IdentData.hpp:409
pwiz::identdata::IO::write
PWIZ_API_DECL void write(minimxml::XMLWriter &writer, const CV &cv)
pwiz::identdata::SchemaVersion_1_1
@ SchemaVersion_1_1
Definition: IO.hpp:35
Export.hpp
pwiz::identdata::Identifiable
Parent class representing extensions of the IdentifiableType from the mzIdentML schema.
Definition: IdentData.hpp:65
pwiz::identdata::BibliographicReference
Implementation for the BibliographicReferenceType tag in the mzIdentML schema.
Definition: IdentData.hpp:96
pwiz::identdata::PeptideHypothesis
Implementation of PeptideHypothesisType from the mzIdentML schema.
Definition: IdentData.hpp:807
pwiz::identdata::Modification
Implementation of ModificationType from the mzIdentML schema.
Definition: IdentData.hpp:330
pwiz::identdata::peptide
PWIZ_API_DECL proteome::Peptide peptide(const Peptide &peptide)
creates a proteome::Peptide from an identdata::Peptide
pwiz::identdata::DatabaseTranslation
Implementation of DatabaseTranslationType from the mzIdentML schema.
Definition: IdentData.hpp:531
pwiz::identdata::ProteinDetectionList
Implementation of ProteinDetectionListType from the mzIdentML schema.
Definition: IdentData.hpp:856
pwiz::identdata::Inputs
Implementation of the InputsType from the mzIdentML schema.
Definition: IdentData.hpp:944
pwiz::identdata::FragmentArray
Implementation of FragmentArrayType from the mzIdentML schema.
Definition: IdentData.hpp:590
pwiz::identdata::AnalysisProtocolCollection
Implementation of AnalysisProtocolCollectionType from the mzIdentML schema.
Definition: IdentData.hpp:910
pwiz::identdata::ProteinDetectionProtocol
Implementation of ProteinDetectionProtocolType from the mzIdentML schema.
Definition: IdentData.hpp:787
pwiz::identdata::AnalysisCollection
Implementation of AnalysisCollectionType from the mzIdentML schema.
Definition: IdentData.hpp:896
pwiz::identdata::Peptide
Implementation of PeptideType from the mzIdentML schema.
Definition: IdentData.hpp:369
pwiz::identdata::SpectrumIdentificationProtocol
Implementation of SpectrumIdentificationProtocolType from the mzIdentML schema.
Definition: IdentData.hpp:546
IdentData.hpp
XMLWriter.hpp
pwiz::identdata::SearchModification
Implementation of SearchModificationType from the mzIdentML schema.
Definition: IdentData.hpp:389
pwiz::identdata::SequenceCollection
Implementation of SequenceCollectionType from the mzIdentML schema.
Definition: IdentData.hpp:653
pwiz::identdata::ContactRole
Implementation of ContactRoleType from the mzIdentML schema.
Definition: IdentData.hpp:176
pwiz::identdata::MassTable
Implementation of MassTableType from the mzIdentML schema.
Definition: IdentData.hpp:481
pwiz::identdata::DataCollection
Implementation of DataCollectionType from the mzIdentML schema.
Definition: IdentData.hpp:975
pwiz::util::IterationListenerRegistry
handles registration of IterationListeners and broadcast of update messages
Definition: IterationListener.hpp:66
pwiz::identdata::SearchDatabase
Implementation of SearchDatabaseType from the mzIdentML schema.
Definition: IdentData.hpp:271
pwiz::identdata::IdentData
Implementation of the MzIdentMLType from the mzIdentML schema.
Definition: IdentData.hpp:994
pwiz::cv::cv
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
pwiz::identdata::Sample
Implementation of the SampleType from the mzIdentML schema.
Definition: IdentData.hpp:196
pwiz::identdata::AnalysisData
Implementation of AnalysisDataType from the mzIdentML schema.
Definition: IdentData.hpp:961
pwiz::identdata::Measure
Implementation of MeasureType from the mzIdentML schema.
Definition: IdentData.hpp:574
pwiz::identdata::DBSequence
Implementation of DBSequenceType from the mzIdentML schema.
Definition: IdentData.hpp:297
IgnoreSequenceCollection
IgnoreSequenceCollection
Definition: IO.hpp:255
pwiz::identdata::AnalysisSoftware
Implementation of AnalysisSoftwareType from the mzIdentML schema.
Definition: IdentData.hpp:212
pwiz::identdata::Filter
Implementation of FilterType from the mzIdentML schema.
Definition: IdentData.hpp:502
pwiz::identdata::AnalysisSampleCollection
Implementation of AnalysisSampleCollectionType from mzIdentML schema.
Definition: IdentData.hpp:259
ReadAnalysisData
ReadAnalysisData
Definition: IO.hpp:211
pwiz::identdata::Enzymes
Implementation of EnzymesType from the mzIdentML schema.
Definition: IdentData.hpp:432
pwiz::identdata::SpectrumIdentificationList
Implementation of SpectrumIdentificationListType from the mzIdentML schema.
Definition: IdentData.hpp:744
pwiz::identdata::IdentifiableParamContainer
Parent class of all Identifiable objects that have ParamGroups.
Definition: IdentData.hpp:80
pwiz::data::CVParam
represents a tag-value pair, where the tag comes from the controlled vocabulary
Definition: ParamTypes.hpp:45
pwiz::identdata::SpectrumIdentification
Implementation of SpectrumIdentificationType from the mzIdentML schema.
Definition: IdentData.hpp:765
pwiz::identdata::IO::read
PWIZ_API_DECL void read(std::istream &is, CV &cv)
pwiz::identdata::ProteinAmbiguityGroup
Implementation of ProteinAmbiguityGroupType from the mzIdentML schema.
Definition: IdentData.hpp:840