ProteoWizard
Functions | Variables
IOTest.cpp File Reference
#include "IO.hpp"
#include "Diff.hpp"
#include "TextWriter.hpp"
#include "examples.hpp"
#include "pwiz/utility/misc/unit.hpp"
#include "pwiz/utility/misc/Std.hpp"

Go to the source code of this file.

Functions

template<typename object_type >
void testObject (const object_type &a)
 
void testIdentifiable ()
 
void testIdentifiableParamContainer ()
 
void testCV ()
 
void testBibliographicReference ()
 
void testPerson ()
 
void testOrganization ()
 
void testContactRole ()
 
void testProvider ()
 
void testSample ()
 
void testAnalysisSoftware ()
 
void testAnalysisSampleCollection ()
 
void testDBSequence ()
 
void testModification ()
 
void testSubstitutionModification ()
 
void testPeptide ()
 
void testSequenceCollection ()
 
void testSpectrumIdentification ()
 
void testProteinDetection ()
 
void testAnalysisCollection ()
 
void testSearchModification ()
 
void testEnzyme ()
 
void testEnzymes ()
 
void testResidue ()
 
void testAmbiguousResidue ()
 
void testMassTable ()
 
void testFilter ()
 
void testSpectrumIdentificationProtocol ()
 
void testProteinDetectionProtocol ()
 
void testAnalysisProtocolCollection ()
 
void testSpectraData ()
 
void testSearchDatabase ()
 
void testSourceFile ()
 
void testInputs ()
 
void testMeasure ()
 
void testFragmentArray ()
 
void testIonType ()
 
void testPeptideEvidence ()
 
void testSpectrumIdentificationItem ()
 
void testSpectrumIdentificationResult ()
 
PeptideHypothesis testPeptideHypothesis ()
 
void testProteinDetectionHypothesis ()
 
void testProteinAmbiguityGroup ()
 
void testSpectrumIdentificationList ()
 
void testProteinDetectionList ()
 
void testAnalysisData ()
 
void testDataCollection ()
 
void testIdentData ()
 
void test ()
 
int main (int argc, char *argv[])
 

Variables

ostream * os_ = 0
 

Function Documentation

§ testObject()

template<typename object_type >
void testObject ( const object_type &  a)

Definition at line 41 of file IOTest.cpp.

References diff(), os_, pwiz::identdata::IO::read(), unit_assert, and pwiz::identdata::IO::write().

Referenced by testAmbiguousResidue(), testAnalysisCollection(), testAnalysisData(), testAnalysisProtocolCollection(), testAnalysisSampleCollection(), testAnalysisSoftware(), testBibliographicReference(), testComponent(), testComponentList(), testContactRole(), testCV(), testCVParam(), testDataCollection(), testDataProcessing(), testDBSequence(), testEnzyme(), testEnzymes(), testFileDescription(), testFilter(), testFragmentArray(), testIdentData(), testIdentifiable(), testIdentifiableParamContainer(), testInputs(), testInstrumentConfiguration(), testIonType(), testMassTable(), testMeasure(), testModification(), testNamedParamContainer(), testOrganization(), testParamGroup(), testPeptide(), testPeptideEvidence(), testPeptideHypothesis(), testPerson(), testPrecursor(), testProcessingMethod(), testProduct(), testProteinAmbiguityGroup(), testProteinDetection(), testProteinDetectionHypothesis(), testProteinDetectionList(), testProteinDetectionProtocol(), testProvider(), testResidue(), testSample(), testScanSettings(), testSearchDatabase(), testSearchModification(), testSequenceCollection(), testSoftware(), testSourceFile(), testSpectraData(), testSpectrumIdentification(), testSpectrumIdentificationItem(), testSpectrumIdentificationList(), testSpectrumIdentificationProtocol(), testSpectrumIdentificationResult(), testSubstitutionModification(), and testUserParam().

42 {
43  if (os_) *os_ << "testObject(): " << typeid(a).name() << endl;
44 
45  // write 'a' out to a stream
46 
47  ostringstream oss;
48  XMLWriter writer(oss);
49  IO::write(writer, a);
50  if (os_) *os_ << oss.str() << endl;
51 
52  // read 'b' in from stream
53 
54  object_type b;
55  istringstream iss(oss.str());
56  IO::read(iss, b);
57 
58  // compare 'a' and 'b'
59 
61  if (diff && os_) *os_ << "diff:\n" << diff_string<TextWriter>(diff) << endl;
62  unit_assert(!diff);
63 }
The XMLWriter class provides simple, tag-level XML syntax writing.
Definition: XMLWriter.hpp:47
Calculate diffs of objects in a ProteoWizard data model hierarchy.
Definition: diff_std.hpp:142
void diff(const string &filename1, const string &filename2)
PWIZ_API_DECL void write(minimxml::XMLWriter &writer, const CV &cv)
PWIZ_API_DECL void read(std::istream &is, CV &cv)
ostream * os_
Definition: IOTest.cpp:38
#define unit_assert(x)
Definition: unit.hpp:85

§ testIdentifiable()

void testIdentifiable ( )

Definition at line 66 of file IOTest.cpp.

References pwiz::identdata::Identifiable::id, pwiz::identdata::Identifiable::name, os_, and testObject().

Referenced by test().

67 {
68  if (os_) *os_ << "testIdentifiable\n" ;
69 
70  Identifiable a;
71  a.id = "id";
72  a.name = "name";
73 
74  testObject(a);
75 }
void testObject(const object_type &a)
Definition: IOTest.cpp:41
Parent class representing extensions of the IdentifiableType from the mzIdentML schema.
Definition: IdentData.hpp:64
ostream * os_
Definition: IOTest.cpp:38

§ testIdentifiableParamContainer()

void testIdentifiableParamContainer ( )

Definition at line 78 of file IOTest.cpp.

References pwiz::identdata::IdentifiableParamContainer::id, MS_TIC, pwiz::identdata::IdentifiableParamContainer::name, os_, pwiz::data::ParamContainer::set(), testObject(), and pwiz::data::ParamContainer::userParams.

Referenced by test().

79 {
80  if (os_) *os_ << "testIdentifiableParamContainer\n" ;
81 
83  a.id = "id";
84  a.name = "name";
85 
86  a.set(MS_TIC, 123);
87  a.userParams.push_back(UserParam("abc", "123", "!@#"));
88 
89  testObject(a);
90 }
void testObject(const object_type &a)
Definition: IOTest.cpp:41
MS_TIC
TIC (total ion current): The sum of all the separate ion currents carried by the ions of different m/...
Definition: cv.hpp:1258
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
std::vector< UserParam > userParams
a collection of uncontrolled user terms
Definition: ParamTypes.hpp:253
ostream * os_
Definition: IOTest.cpp:38
void set(CVID cvid, const std::string &value="", CVID units=CVID_Unknown)
set/add a CVParam (not recursive)
Parent class of all Identifiable objects that have ParamGroups.
Definition: IdentData.hpp:79

§ testCV()

void testCV ( )

Definition at line 93 of file IOTest.cpp.

References pwiz::cv::CV::fullName, pwiz::cv::CV::id, os_, testObject(), pwiz::cv::CV::URI, and pwiz::cv::CV::version.

Referenced by test().

94 {
95  if (os_) *os_ << "testCV\n" ;
96 
97  CV a;
98  a.URI = "abcd";
99  a.id = "efgh";
100  a.fullName = "ijkl";
101  a.version = "mnop";
102 
103  testObject(a);
104 }
std::string id
the short label to be used as a reference tag with which to refer to this particular Controlled Vocab...
Definition: cv.hpp:13356
void testObject(const object_type &a)
Definition: IOTest.cpp:41
Information about an ontology or CV source and a short &#39;lookup&#39; tag to refer to.
Definition: cv.hpp:13353
std::string fullName
the usual name for the resource (e.g. The PSI-MS Controlled Vocabulary).
Definition: cv.hpp:13362
std::string URI
the URI for the resource.
Definition: cv.hpp:13359
ostream * os_
Definition: IOTest.cpp:38
std::string version
the version of the CV from which the referred-to terms are drawn.
Definition: cv.hpp:13365

§ testBibliographicReference()

void testBibliographicReference ( )

Definition at line 107 of file IOTest.cpp.

References pwiz::identdata::BibliographicReference::authors, pwiz::identdata::BibliographicReference::editor, pwiz::identdata::Identifiable::id, pwiz::identdata::BibliographicReference::issue, os_, pwiz::identdata::BibliographicReference::pages, pwiz::identdata::BibliographicReference::publication, pwiz::identdata::BibliographicReference::publisher, testObject(), pwiz::identdata::BibliographicReference::title, pwiz::identdata::BibliographicReference::volume, and pwiz::identdata::BibliographicReference::year.

Referenced by test().

108 {
109  if (os_) *os_ << "testBibliographicReference\n" ;
110 
112 
113  br.id = "id";
114  br.authors = "abcd";
115  br.publication = "efg";
116  br.publisher = "hijk";
117  br.editor = "lmnop";
118  br.year = 1984;
119  br.volume = "qrs";
120  br.issue = "tuv";
121  br.pages = "wx";
122  br.title = "yz";
123 
124  testObject(br);
125 }
void testObject(const object_type &a)
Definition: IOTest.cpp:41
ostream * os_
Definition: IOTest.cpp:38
Implementation for the BibliographicReferenceType tag in the mzIdentML schema.
Definition: IdentData.hpp:95

§ testPerson()

void testPerson ( )

Definition at line 128 of file IOTest.cpp.

References pwiz::identdata::Person::affiliations, pwiz::identdata::Person::firstName, pwiz::identdata::Person::lastName, pwiz::identdata::Person::midInitials, MS_contact_address, MS_contact_email, MS_contact_fax_number, MS_contact_phone_number, MS_contact_toll_free_phone_number, os_, pwiz::data::ParamContainer::set(), and testObject().

Referenced by test().

129 {
130  if (os_) *os_ << "testPerson\n" ;
131 
132  Person a;
133 
134  a.set(MS_contact_address, "123 abc");
135  a.set(MS_contact_phone_number, "456");
136  a.set(MS_contact_email, "efg@hijk.op");
137  a.set(MS_contact_fax_number, "789");
138  a.set(MS_contact_toll_free_phone_number, "012-345-678");
139 
140  a.lastName = "tuv";
141  a.firstName = "wx";
142  a.midInitials = "yz";
143 
144  a.affiliations.push_back(OrganizationPtr(new Organization("ref")));
145 
146  testObject(a);
147 }
MS_contact_address
contact address: Postal address of the contact person or organization.
Definition: cv.hpp:2260
void testObject(const object_type &a)
Definition: IOTest.cpp:41
std::vector< OrganizationPtr > affiliations
Definition: IdentData.hpp:161
MS_contact_phone_number
contact phone number: Phone number of the contact person or organization.
Definition: cv.hpp:5521
Implementation of PersonType from the mzIdentML schema.
Definition: IdentData.hpp:152
MS_contact_fax_number
contact fax number: Fax number for the contact person or organization.
Definition: cv.hpp:5524
MS_contact_toll_free_phone_number
contact toll-free phone number: Toll-free phone number of the contact person or organization.
Definition: cv.hpp:5527
MS_contact_email
contact email: Email address of the contact person or organization.
Definition: cv.hpp:2266
Implementation of AbstractOrganizationType from the mzIdentML schema.
Definition: IdentData.hpp:135
ostream * os_
Definition: IOTest.cpp:38
void set(CVID cvid, const std::string &value="", CVID units=CVID_Unknown)
set/add a CVParam (not recursive)

§ testOrganization()

void testOrganization ( )

Definition at line 150 of file IOTest.cpp.

References MS_contact_address, MS_contact_email, MS_contact_fax_number, MS_contact_phone_number, MS_contact_toll_free_phone_number, os_, pwiz::identdata::Organization::parent, pwiz::data::ParamContainer::set(), and testObject().

Referenced by test().

151 {
152  if (os_) *os_ << "testOrganization\n" ;
153 
154  Organization a;
155 
156  a.set(MS_contact_address, "123 abc");
157  a.set(MS_contact_phone_number, "456");
158  a.set(MS_contact_email, "efg@hijk.op");
159  a.set(MS_contact_fax_number, "789");
160  a.set(MS_contact_toll_free_phone_number, "012-345-678");
161 
162  a.parent = OrganizationPtr(new Organization("ref"));
163 
164  testObject(a);
165 }
MS_contact_address
contact address: Postal address of the contact person or organization.
Definition: cv.hpp:2260
void testObject(const object_type &a)
Definition: IOTest.cpp:41
MS_contact_phone_number
contact phone number: Phone number of the contact person or organization.
Definition: cv.hpp:5521
MS_contact_fax_number
contact fax number: Fax number for the contact person or organization.
Definition: cv.hpp:5524
MS_contact_toll_free_phone_number
contact toll-free phone number: Toll-free phone number of the contact person or organization.
Definition: cv.hpp:5527
MS_contact_email
contact email: Email address of the contact person or organization.
Definition: cv.hpp:2266
boost::shared_ptr< Organization > parent
Definition: IdentData.hpp:140
Implementation of AbstractOrganizationType from the mzIdentML schema.
Definition: IdentData.hpp:135
ostream * os_
Definition: IOTest.cpp:38
void set(CVID cvid, const std::string &value="", CVID units=CVID_Unknown)
set/add a CVParam (not recursive)

§ testContactRole()

void testContactRole ( )

Definition at line 168 of file IOTest.cpp.

References pwiz::identdata::ContactRole::contactPtr, pwiz::data::CVParam::cvid, MS_software_vendor, os_, and testObject().

Referenced by test().

169 {
170  if (os_) *os_ << "testContactRole\n" ;
171 
172  ContactRole a;
173  a.contactPtr = ContactPtr(new Contact("ref"));
175 
176  testObject(a);
177 }
void testObject(const object_type &a)
Definition: IOTest.cpp:41
Implementation of ContactType from mzIdentML.
Definition: IdentData.hpp:117
MS_software_vendor
software vendor: Software vendor role.
Definition: cv.hpp:4069
boost::shared_ptr< Contact > ContactPtr
Definition: TraData.hpp:57
ostream * os_
Definition: IOTest.cpp:38
Implementation of ContactRoleType from the mzIdentML schema.
Definition: IdentData.hpp:175

§ testProvider()

void testProvider ( )

Definition at line 180 of file IOTest.cpp.

References pwiz::identdata::Provider::contactRolePtr, MS_role_type, os_, and testObject().

Referenced by test().

181 {
182  if (os_) *os_ << "testProvider\n" ;
183 
184  Provider a;
185 
186  // Reduced to a previously tested object.
187  a.contactRolePtr.reset(new ContactRole(MS_role_type, ContactPtr(new Contact("abc"))));
188 
189  testObject(a);
190 }
void testObject(const object_type &a)
Definition: IOTest.cpp:41
Implementation of ContactType from mzIdentML.
Definition: IdentData.hpp:117
Implementation of ProviderType from the mzIdentML schema.
Definition: IdentData.hpp:234
boost::shared_ptr< Contact > ContactPtr
Definition: TraData.hpp:57
ostream * os_
Definition: IOTest.cpp:38
MS_role_type
role type: Role of a Person or Organization.
Definition: cv.hpp:4066
ContactRolePtr contactRolePtr
Definition: IdentData.hpp:239
Implementation of ContactRoleType from the mzIdentML schema.
Definition: IdentData.hpp:175

§ testSample()

void testSample ( )

Definition at line 193 of file IOTest.cpp.

References pwiz::identdata::Sample::contactRole, MS_programmer, MS_septum, MS_software_vendor, os_, pwiz::data::ParamContainer::set(), pwiz::identdata::Sample::subSamples, and testObject().

Referenced by test().

194 {
195  if (os_) *os_ << "testSample\n" ;
196 
197  Sample a;
198 
199  // Reduced to a previously tested object.
200  a.contactRole.push_back(ContactRolePtr(new ContactRole(MS_software_vendor, ContactPtr(new Contact("abc")))));
201  a.contactRole.push_back(ContactRolePtr(new ContactRole(MS_programmer, ContactPtr(new Contact("def")))));
202  a.set(MS_septum);
203 
204  a.subSamples.push_back(SamplePtr(new Sample("subSample_ref")));
205 
206  testObject(a);
207 }
void testObject(const object_type &a)
Definition: IOTest.cpp:41
Implementation of ContactType from mzIdentML.
Definition: IdentData.hpp:117
MS_software_vendor
software vendor: Software vendor role.
Definition: cv.hpp:4069
std::vector< boost::shared_ptr< Sample > > subSamples
Definition: IdentData.hpp:201
boost::shared_ptr< Contact > ContactPtr
Definition: TraData.hpp:57
Implementation of the SampleType from the mzIdentML schema.
Definition: IdentData.hpp:195
MS_septum
septum: A disc composed of a flexible material that seals the entrance to the reservoir. Can also be entrance to the vacuum chamber.
Definition: cv.hpp:322
MS_programmer
programmer: Programmer role.
Definition: cv.hpp:4072
ostream * os_
Definition: IOTest.cpp:38
void set(CVID cvid, const std::string &value="", CVID units=CVID_Unknown)
set/add a CVParam (not recursive)
boost::shared_ptr< Sample > SamplePtr
Definition: MSData.hpp:117
Implementation of ContactRoleType from the mzIdentML schema.
Definition: IdentData.hpp:175
std::vector< ContactRolePtr > contactRole
Definition: IdentData.hpp:200

§ testAnalysisSoftware()

void testAnalysisSoftware ( )

Definition at line 210 of file IOTest.cpp.

References pwiz::identdata::AnalysisSoftware::contactRolePtr, pwiz::identdata::AnalysisSoftware::customizations, MS_Mascot, MS_software_vendor, os_, pwiz::data::ParamContainer::set(), pwiz::identdata::AnalysisSoftware::softwareName, testObject(), pwiz::identdata::AnalysisSoftware::URI, and pwiz::identdata::AnalysisSoftware::version.

Referenced by test().

211 {
212  if (os_) *os_ << "testAnalysisSoftware\n" ;
213 
215  a.version = "abcd";
216  a.URI = "efg";
217  a.customizations = "hijk";
218  ContactRolePtr cont = ContactRolePtr(new ContactRole());
219  cont->contactPtr = ContactPtr(new Contact("ref"));
220  cont->cvid = MS_software_vendor;
221  a.contactRolePtr = cont;
223 
224  testObject(a);
225 }
void testObject(const object_type &a)
Definition: IOTest.cpp:41
Implementation of ContactType from mzIdentML.
Definition: IdentData.hpp:117
MS_software_vendor
software vendor: Software vendor role.
Definition: cv.hpp:4069
boost::shared_ptr< Contact > ContactPtr
Definition: TraData.hpp:57
MS_Mascot
Mascot: The name of the Mascot search engine.
Definition: cv.hpp:3898
ostream * os_
Definition: IOTest.cpp:38
void set(CVID cvid, const std::string &value="", CVID units=CVID_Unknown)
set/add a CVParam (not recursive)
Implementation of AnalysisSoftwareType from the mzIdentML schema.
Definition: IdentData.hpp:211
Implementation of ContactRoleType from the mzIdentML schema.
Definition: IdentData.hpp:175

§ testAnalysisSampleCollection()

void testAnalysisSampleCollection ( )

Definition at line 228 of file IOTest.cpp.

References os_, and testObject().

229 {
230  if (os_) *os_ << "testAnalysisSampleCollection\n" ;
231 
233  SamplePtr b(new Sample());
234  b->subSamples.push_back(SamplePtr(new Sample("ref")));
235 
236  testObject(a);
237 }
void testObject(const object_type &a)
Definition: IOTest.cpp:41
Implementation of AnalysisSampleCollectionType from mzIdentML schema.
Definition: IdentData.hpp:258
Implementation of the SampleType from the mzIdentML schema.
Definition: IdentData.hpp:195
ostream * os_
Definition: IOTest.cpp:38
boost::shared_ptr< Sample > SamplePtr
Definition: MSData.hpp:117

§ testDBSequence()

void testDBSequence ( )

Definition at line 240 of file IOTest.cpp.

References pwiz::identdata::DBSequence::accession, pwiz::identdata::IdentifiableParamContainer::id, pwiz::identdata::DBSequence::length, MS_protein_description, pwiz::identdata::IdentifiableParamContainer::name, pwiz::identdata::DBSequence::searchDatabasePtr, pwiz::identdata::DBSequence::seq, pwiz::data::ParamContainer::set(), and testObject().

Referenced by test().

241 {
242  DBSequence a;
243 
244  a.id = "id";
245  a.name = "name";
246  a.length = 3;
247  a.accession = "abc";
248  a.searchDatabasePtr = SearchDatabasePtr(new SearchDatabase("def"));
249  a.seq = "ghi";
250  a.set(MS_protein_description, "blahbitty blah blah");
251 
252  testObject(a);
253 }
void testObject(const object_type &a)
Definition: IOTest.cpp:41
SearchDatabasePtr searchDatabasePtr
Definition: IdentData.hpp:303
MS_protein_description
protein description: The protein description line from the sequence entry in the source database FAST...
Definition: cv.hpp:3571
void set(CVID cvid, const std::string &value="", CVID units=CVID_Unknown)
set/add a CVParam (not recursive)
Implementation of SearchDatabaseType from the mzIdentML schema.
Definition: IdentData.hpp:270
Implementation of DBSequenceType from the mzIdentML schema.
Definition: IdentData.hpp:296

§ testModification()

void testModification ( )

Definition at line 256 of file IOTest.cpp.

References pwiz::identdata::Modification::avgMassDelta, pwiz::identdata::Modification::location, pwiz::identdata::Modification::monoisotopicMassDelta, pwiz::identdata::Modification::residues, pwiz::data::ParamContainer::set(), testObject(), and UNIMOD_Gln__pyro_Glu.

Referenced by test().

257 {
258  Modification a;
259 
260  a.location = 1;
261  a.avgMassDelta = 1.001001;
262  a.residues.push_back('A');
263  a.residues.push_back('C');
264  a.monoisotopicMassDelta = 100.1001;
265 
267 
268  testObject(a);
269 }
void testObject(const object_type &a)
Definition: IOTest.cpp:41
std::vector< char > residues
Definition: IdentData.hpp:334
Implementation of ModificationType from the mzIdentML schema.
Definition: IdentData.hpp:329
void set(CVID cvid, const std::string &value="", CVID units=CVID_Unknown)
set/add a CVParam (not recursive)
UNIMOD_Gln__pyro_Glu
Gln->pyro-Glu: Pyro-glu from Q.
Definition: cv.hpp:8485

§ testSubstitutionModification()

void testSubstitutionModification ( )

§ testPeptide()

void testPeptide ( )

Definition at line 286 of file IOTest.cpp.

References pwiz::identdata::IdentifiableParamContainer::id, pwiz::identdata::Peptide::modification, MS_peptide, pwiz::identdata::IdentifiableParamContainer::name, pwiz::identdata::Peptide::peptideSequence, pwiz::data::ParamContainer::set(), pwiz::identdata::Peptide::substitutionModification, and testObject().

Referenced by test().

287 {
288  Peptide a;
289 
290  a.id = "id";
291  a.name = "name";
292  a.peptideSequence = "abc";
293 
294  ModificationPtr mod(new Modification);
295  mod->location = 1;
296  a.modification.push_back(mod);
297 
298  SubstitutionModificationPtr sub(new SubstitutionModification);
299  sub->location = 2;
300  a.substitutionModification.push_back(sub);
301 
302  a.set(MS_peptide);
303 
304  testObject(a);
305 }
void testObject(const object_type &a)
Definition: IOTest.cpp:41
MS_peptide
peptide: A compound of low molecular weight that is composed of two or more amino acids...
Definition: cv.hpp:3124
std::string peptideSequence
Definition: IdentData.hpp:373
Implementation of PeptideType from the mzIdentML schema.
Definition: IdentData.hpp:368
std::vector< SubstitutionModificationPtr > substitutionModification
Definition: IdentData.hpp:375
Implementation of SubstitutionModificationType from the mzIdentML schema.
Definition: IdentData.hpp:349
std::vector< ModificationPtr > modification
Definition: IdentData.hpp:374
Implementation of ModificationType from the mzIdentML schema.
Definition: IdentData.hpp:329
void set(CVID cvid, const std::string &value="", CVID units=CVID_Unknown)
set/add a CVParam (not recursive)

§ testSequenceCollection()

void testSequenceCollection ( )

Definition at line 308 of file IOTest.cpp.

References pwiz::identdata::SequenceCollection::dbSequences, pwiz::identdata::SequenceCollection::peptideEvidence, pwiz::identdata::SequenceCollection::peptides, and testObject().

Referenced by test().

309 {
311 
312  a.dbSequences.push_back(DBSequencePtr(new DBSequence("db_id")));
313  a.peptides.push_back(PeptidePtr(new Peptide("pep_id")));
314  a.peptideEvidence.push_back(PeptideEvidencePtr(new PeptideEvidence("pe1")));
315 
316  testObject(a);
317 }
void testObject(const object_type &a)
Definition: IOTest.cpp:41
std::vector< PeptideEvidencePtr > peptideEvidence
Definition: IdentData.hpp:656
Implementation of PeptideEvidenceType from the mzIdentML schema.
Definition: IdentData.hpp:626
Implementation of PeptideType from the mzIdentML schema.
Definition: IdentData.hpp:368
std::vector< PeptidePtr > peptides
Definition: IdentData.hpp:655
Implementation of SequenceCollectionType from the mzIdentML schema.
Definition: IdentData.hpp:652
boost::shared_ptr< Peptide > PeptidePtr
Definition: TraData.hpp:236
std::vector< DBSequencePtr > dbSequences
Definition: IdentData.hpp:654
Implementation of DBSequenceType from the mzIdentML schema.
Definition: IdentData.hpp:296

§ testSpectrumIdentification()

void testSpectrumIdentification ( )

Definition at line 320 of file IOTest.cpp.

References pwiz::identdata::SpectrumIdentification::activityDate, pwiz::identdata::SpectrumIdentification::inputSpectra, os_, pwiz::identdata::SpectrumIdentification::searchDatabase, pwiz::identdata::SpectrumIdentification::spectrumIdentificationListPtr, pwiz::identdata::SpectrumIdentification::spectrumIdentificationProtocolPtr, and testObject().

Referenced by test().

321 {
322  if (os_) *os_ << "testSpectrumIdentification\n" ;
323 
326  SpectrumIdentificationProtocolPtr( new SpectrumIdentificationProtocol("sip"));
328  SpectrumIdentificationListPtr(new SpectrumIdentificationList("sil"));
329  a.activityDate = "123";
330  a.inputSpectra.push_back(SpectraDataPtr(new SpectraData("is_sd")));
331  a.searchDatabase.push_back(SearchDatabasePtr(new SearchDatabase("sd_sd")));
332 
333  testObject(a);
334 }
SpectrumIdentificationProtocolPtr spectrumIdentificationProtocolPtr
Definition: IdentData.hpp:769
void testObject(const object_type &a)
Definition: IOTest.cpp:41
Implementation of SpectraDataType from the mzIdentML schema.
Definition: IdentData.hpp:697
std::vector< SpectraDataPtr > inputSpectra
Definition: IdentData.hpp:773
std::vector< SearchDatabasePtr > searchDatabase
Definition: IdentData.hpp:774
Implementation of SpectrumIdentificationProtocolType from the mzIdentML schema.
Definition: IdentData.hpp:545
ostream * os_
Definition: IOTest.cpp:38
Implementation of SearchDatabaseType from the mzIdentML schema.
Definition: IdentData.hpp:270
Implementation of SpectrumIdentificationType from the mzIdentML schema.
Definition: IdentData.hpp:764
SpectrumIdentificationListPtr spectrumIdentificationListPtr
Definition: IdentData.hpp:770
Implementation of SpectrumIdentificationListType from the mzIdentML schema.
Definition: IdentData.hpp:743

§ testProteinDetection()

void testProteinDetection ( )

Definition at line 337 of file IOTest.cpp.

References pwiz::identdata::ProteinDetection::activityDate, pwiz::identdata::Identifiable::id, pwiz::identdata::Identifiable::name, os_, pwiz::identdata::ProteinDetection::proteinDetectionListPtr, pwiz::identdata::ProteinDetection::proteinDetectionProtocolPtr, and testObject().

Referenced by test().

338 {
339  if (os_) *os_ << "testProteinDetection\n" ;
340 
342 
343  a.id = "id";
344  a.name = "name";
345  a.proteinDetectionProtocolPtr = ProteinDetectionProtocolPtr(new ProteinDetectionProtocol("abc"));
346  a.proteinDetectionListPtr = ProteinDetectionListPtr(new ProteinDetectionList("def"));
347  a.activityDate = "ghi";
348 
349  testObject(a);
350 }
void testObject(const object_type &a)
Definition: IOTest.cpp:41
Implementation of ProteinDetectionProtocolType from the mzIdentML schema.
Definition: IdentData.hpp:786
Implementation of ProteinDetectionListType from the mzIdentML schema.
Definition: IdentData.hpp:855
ostream * os_
Definition: IOTest.cpp:38
ProteinDetectionProtocolPtr proteinDetectionProtocolPtr
Definition: IdentData.hpp:877
ProteinDetectionListPtr proteinDetectionListPtr
Definition: IdentData.hpp:878
Implementation of ProteinDetectionType from the mzIdentML schema.
Definition: IdentData.hpp:872

§ testAnalysisCollection()

void testAnalysisCollection ( )

Definition at line 353 of file IOTest.cpp.

References pwiz::identdata::ProteinDetection::activityDate, os_, pwiz::identdata::AnalysisCollection::proteinDetection, pwiz::identdata::AnalysisCollection::spectrumIdentification, and testObject().

Referenced by test().

354 {
355  if (os_) *os_ << "testAnalysisCollection\n" ;
356 
358 
359  SpectrumIdentificationPtr b(new SpectrumIdentification());
360  b->activityDate = "abc";
361  a.spectrumIdentification.push_back(b);
362  a.proteinDetection.activityDate = "def";
363 
364  testObject(a);
365 }
void testObject(const object_type &a)
Definition: IOTest.cpp:41
Implementation of AnalysisCollectionType from the mzIdentML schema.
Definition: IdentData.hpp:895
std::vector< SpectrumIdentificationPtr > spectrumIdentification
Definition: IdentData.hpp:897
ostream * os_
Definition: IOTest.cpp:38
Implementation of SpectrumIdentificationType from the mzIdentML schema.
Definition: IdentData.hpp:764

§ testSearchModification()

void testSearchModification ( )

Definition at line 368 of file IOTest.cpp.

References pwiz::data::CVParam::cvid, pwiz::identdata::SearchModification::fixedMod, pwiz::identdata::SearchModification::massDelta, MS_modification_specificity_peptide_N_term, os_, pwiz::identdata::SearchModification::residues, pwiz::data::ParamContainer::set(), pwiz::identdata::SearchModification::specificityRules, testObject(), and UNIMOD_Gln__pyro_Glu.

Referenced by test().

369 {
370  if (os_) *os_ << "testSearchModification\n" ;
371 
373 
374  a.fixedMod = true;
375  a.massDelta = 3.14;
376  a.residues.push_back('Q');
377  a.residues.push_back('E');
380 
381  testObject(a);
382 }
void testObject(const object_type &a)
Definition: IOTest.cpp:41
Implementation of SearchModificationType from the mzIdentML schema.
Definition: IdentData.hpp:388
MS_modification_specificity_peptide_N_term
modification specificity peptide N-term: As parameter for search engine: apply the modification only ...
Definition: cv.hpp:3850
ostream * os_
Definition: IOTest.cpp:38
void set(CVID cvid, const std::string &value="", CVID units=CVID_Unknown)
set/add a CVParam (not recursive)
UNIMOD_Gln__pyro_Glu
Gln->pyro-Glu: Pyro-glu from Q.
Definition: cv.hpp:8485

§ testEnzyme()

void testEnzyme ( )

Definition at line 385 of file IOTest.cpp.

References pwiz::identdata::Enzyme::cTermGain, pwiz::identdata::Enzyme::enzymeName, pwiz::identdata::Identifiable::id, pwiz::identdata::Enzyme::minDistance, pwiz::identdata::Enzyme::missedCleavages, MS_Trypsin, pwiz::identdata::Enzyme::nTermGain, os_, SemiSpecific, pwiz::data::ParamContainer::set(), pwiz::identdata::Enzyme::siteRegexp, pwiz::identdata::Enzyme::terminalSpecificity, and testObject().

Referenced by test().

386 {
387  if (os_) *os_ << "testEnzyme\n" ;
388 
389  Enzyme a;
390 
391  a.id = "id";
392  a.nTermGain = "n";
393  a.cTermGain = "c";
395  a.missedCleavages = 1;
396  a.minDistance = 2;
397 
398  a.siteRegexp = "tyrannosaurus regex";
400 
401  testObject(a);
402 }
void testObject(const object_type &a)
Definition: IOTest.cpp:41
Implementation of EnzymeType from the mzIdentML schema.
Definition: IdentData.hpp:408
MS_Trypsin
Trypsin: Enzyme trypsin.
Definition: cv.hpp:4027
SemiSpecific
neither termini must match digestion motif(s)
Definition: Digestion.hpp:120
ParamContainer enzymeName
Definition: IdentData.hpp:420
proteome::Digestion::Specificity terminalSpecificity
Definition: IdentData.hpp:415
ostream * os_
Definition: IOTest.cpp:38
void set(CVID cvid, const std::string &value="", CVID units=CVID_Unknown)
set/add a CVParam (not recursive)

§ testEnzymes()

void testEnzymes ( )

Definition at line 405 of file IOTest.cpp.

References pwiz::identdata::Enzymes::enzymes, pwiz::identdata::Enzymes::independent, os_, and testObject().

Referenced by test().

406 {
407  if (os_) *os_ << "testEnzymes\n" ;
408 
409  Enzymes a;
410 
411  a.independent = "yes";
412  a.enzymes.push_back(EnzymePtr(new Enzyme()));
413  a.enzymes.back()->siteRegexp = "pxegeRetiS";
414 
415  testObject(a);
416 }
void testObject(const object_type &a)
Definition: IOTest.cpp:41
boost::logic::tribool independent
Definition: IdentData.hpp:433
Implementation of EnzymeType from the mzIdentML schema.
Definition: IdentData.hpp:408
std::vector< EnzymePtr > enzymes
Definition: IdentData.hpp:435
Implementation of EnzymesType from the mzIdentML schema.
Definition: IdentData.hpp:431
ostream * os_
Definition: IOTest.cpp:38

§ testResidue()

void testResidue ( )

Definition at line 419 of file IOTest.cpp.

References pwiz::identdata::Residue::code, pwiz::identdata::Residue::mass, os_, and testObject().

Referenced by test().

420 {
421  if (os_) *os_ << "testResidue\n" ;
422 
423  Residue a;
424 
425  a.code = 'A';
426  a.mass = 2;
427 
428  testObject(a);
429 }
void testObject(const object_type &a)
Definition: IOTest.cpp:41
ostream * os_
Definition: IOTest.cpp:38
Implementation of ResidueType from the mzIdentML schema.
Definition: IdentData.hpp:445

§ testAmbiguousResidue()

void testAmbiguousResidue ( )

Definition at line 432 of file IOTest.cpp.

References pwiz::identdata::AmbiguousResidue::code, MS_alternate_single_letter_codes, os_, pwiz::data::ParamContainer::set(), and testObject().

Referenced by test().

433 {
434  if (os_) *os_ << "testAmbiguousResidue\n" ;
435 
437 
438  a.code = 'B';
440 
441  testObject(a);
442 }
void testObject(const object_type &a)
Definition: IOTest.cpp:41
MS_alternate_single_letter_codes
alternate single letter codes: List of standard residue one letter codes which are used to replace a ...
Definition: cv.hpp:4330
Implementation of AmbiguousResidueType from the mzIdentML schema.
Definition: IdentData.hpp:463
ostream * os_
Definition: IOTest.cpp:38
void set(CVID cvid, const std::string &value="", CVID units=CVID_Unknown)
set/add a CVParam (not recursive)

§ testMassTable()

void testMassTable ( )

Definition at line 445 of file IOTest.cpp.

References pwiz::identdata::MassTable::ambiguousResidue, pwiz::identdata::MassTable::id, pwiz::identdata::MassTable::msLevel, pwiz::identdata::MassTable::residues, and testObject().

Referenced by test().

446 {
447  MassTable a;
448 
449  a.id = "id";
450  a.msLevel.push_back(1);
451 
452  ResiduePtr b(new Residue());
453  b->code = 'B';
454  a.residues.push_back(b);
455 
456  AmbiguousResiduePtr c(new AmbiguousResidue());
457  c->code = 'C';
458  a.ambiguousResidue.push_back(c);
459 
460  testObject(a);
461 }
void testObject(const object_type &a)
Definition: IOTest.cpp:41
Implementation of AmbiguousResidueType from the mzIdentML schema.
Definition: IdentData.hpp:463
std::vector< ResiduePtr > residues
Definition: IdentData.hpp:487
Implementation of MassTableType from the mzIdentML schema.
Definition: IdentData.hpp:480
std::vector< int > msLevel
Definition: IdentData.hpp:485
Implementation of ResidueType from the mzIdentML schema.
Definition: IdentData.hpp:445
std::vector< AmbiguousResiduePtr > ambiguousResidue
Definition: IdentData.hpp:488

§ testFilter()

void testFilter ( )

Definition at line 464 of file IOTest.cpp.

References pwiz::identdata::Filter::exclude, pwiz::identdata::Filter::filterType, pwiz::identdata::Filter::include, MS_DB_filter_on_accession_numbers, MS_DB_filter_taxonomy, MS_DB_MW_filter, pwiz::data::ParamContainer::set(), and testObject().

Referenced by test().

465 {
466  Filter a;
467 
471 
472  testObject(a);
473 }
void testObject(const object_type &a)
Definition: IOTest.cpp:41
MS_DB_MW_filter
DB MW filter: Filtering applied specifically by protein molecular weight, specified as either a range...
Definition: cv.hpp:3412
ParamContainer exclude
Definition: IdentData.hpp:505
ParamContainer filterType
Definition: IdentData.hpp:503
Implementation of FilterType from the mzIdentML schema.
Definition: IdentData.hpp:501
ParamContainer include
Definition: IdentData.hpp:504
MS_DB_filter_taxonomy
DB filter taxonomy: A taxonomy filter was to the database search.
Definition: cv.hpp:3406
void set(CVID cvid, const std::string &value="", CVID units=CVID_Unknown)
set/add a CVParam (not recursive)
MS_DB_filter_on_accession_numbers
DB filter on accession numbers: Filtering applied specifically by accession number pattern...
Definition: cv.hpp:3409

§ testSpectrumIdentificationProtocol()

void testSpectrumIdentificationProtocol ( )

Definition at line 476 of file IOTest.cpp.

References pwiz::identdata::SpectrumIdentificationProtocol::additionalSearchParams, pwiz::identdata::SpectrumIdentificationProtocol::analysisSoftwarePtr, pwiz::data::CVParam::cvid, pwiz::identdata::SpectrumIdentificationProtocol::databaseFilters, pwiz::identdata::SpectrumIdentificationProtocol::enzymes, pwiz::identdata::SpectrumIdentificationProtocol::fragmentTolerance, pwiz::identdata::Identifiable::id, pwiz::identdata::Enzymes::independent, pwiz::identdata::SpectrumIdentificationProtocol::massTable, pwiz::identdata::SpectrumIdentificationProtocol::modificationParams, MS_DB_filter_taxonomy, MS_Mascot_SigThreshold, MS_ms_ms_search, MS_parent_mass_type_mono, MS_search_tolerance_plus_value, pwiz::identdata::SpectrumIdentificationProtocol::parentTolerance, pwiz::identdata::SpectrumIdentificationProtocol::searchType, pwiz::data::ParamContainer::set(), testObject(), pwiz::identdata::SpectrumIdentificationProtocol::threshold, and UO_dalton.

Referenced by test().

477 {
479 
480  a.id = "id";
481 
482  a.analysisSoftwarePtr = AnalysisSoftwarePtr(new AnalysisSoftware("ref"));
483 
486  a.modificationParams.push_back(SearchModificationPtr(new SearchModification()));
487  a.enzymes.independent = "no";
488  a.massTable.push_back(MassTablePtr(new MassTable("MT_1")));
489  a.massTable.back()->msLevel.push_back(1);
490  a.massTable.back()->msLevel.push_back(2);
494 
495  FilterPtr b(new Filter());
496  b->filterType.set(MS_DB_filter_taxonomy);
497  a.databaseFilters.push_back(b);
498 
499  testObject(a);
500 }
void testObject(const object_type &a)
Definition: IOTest.cpp:41
boost::logic::tribool independent
Definition: IdentData.hpp:433
MS_parent_mass_type_mono
parent mass type mono: Mass type setting for parent mass was monoisotopic.
Definition: cv.hpp:3910
Implementation of FilterType from the mzIdentML schema.
Definition: IdentData.hpp:501
Implementation of MassTableType from the mzIdentML schema.
Definition: IdentData.hpp:480
std::vector< SearchModificationPtr > modificationParams
Definition: IdentData.hpp:554
UO_dalton
dalton: An independently to the base SI units defined mass unit which is equal to one twelfth of the ...
Definition: cv.hpp:13153
MS_search_tolerance_plus_value
search tolerance plus value:
Definition: cv.hpp:4477
Implementation of SearchModificationType from the mzIdentML schema.
Definition: IdentData.hpp:388
MS_DB_filter_taxonomy
DB filter taxonomy: A taxonomy filter was to the database search.
Definition: cv.hpp:3406
Implementation of SpectrumIdentificationProtocolType from the mzIdentML schema.
Definition: IdentData.hpp:545
MS_ms_ms_search
ms-ms search: An MS2 search (with fragment ions).
Definition: cv.hpp:3556
void set(CVID cvid, const std::string &value="", CVID units=CVID_Unknown)
set/add a CVParam (not recursive)
Implementation of AnalysisSoftwareType from the mzIdentML schema.
Definition: IdentData.hpp:211
MS_Mascot_SigThreshold
Mascot:SigThreshold: Significance threshold below which the p-value of a peptide match must lie to be...
Definition: cv.hpp:4201

§ testProteinDetectionProtocol()

void testProteinDetectionProtocol ( )

Definition at line 503 of file IOTest.cpp.

References pwiz::identdata::ProteinDetectionProtocol::analysisParams, pwiz::identdata::ProteinDetectionProtocol::analysisSoftwarePtr, CVID_Unknown, pwiz::identdata::Identifiable::id, MS_Mascot_SigThreshold, pwiz::data::ParamContainer::set(), testObject(), and pwiz::identdata::ProteinDetectionProtocol::threshold.

Referenced by test().

504 {
506 
507  a.id = "id";
508  a.id="PDP_MascotParser_1";
509  a.analysisSoftwarePtr = AnalysisSoftwarePtr(new AnalysisSoftware("ref"));
512 
513  testObject(a);
514 }
void testObject(const object_type &a)
Definition: IOTest.cpp:41
Implementation of ProteinDetectionProtocolType from the mzIdentML schema.
Definition: IdentData.hpp:786
CVID_Unknown
Definition: cv.hpp:97
void set(CVID cvid, const std::string &value="", CVID units=CVID_Unknown)
set/add a CVParam (not recursive)
Implementation of AnalysisSoftwareType from the mzIdentML schema.
Definition: IdentData.hpp:211
MS_Mascot_SigThreshold
Mascot:SigThreshold: Significance threshold below which the p-value of a peptide match must lie to be...
Definition: cv.hpp:4201

§ testAnalysisProtocolCollection()

void testAnalysisProtocolCollection ( )

Definition at line 517 of file IOTest.cpp.

References pwiz::identdata::AnalysisProtocolCollection::proteinDetectionProtocol, pwiz::identdata::AnalysisProtocolCollection::spectrumIdentificationProtocol, and testObject().

Referenced by test().

518 {
520 
521  SpectrumIdentificationProtocolPtr b(new SpectrumIdentificationProtocol());
522  b->analysisSoftwarePtr = AnalysisSoftwarePtr(new AnalysisSoftware("ref"));
523  a.spectrumIdentificationProtocol.push_back(b);
524 
525  ProteinDetectionProtocolPtr c(new ProteinDetectionProtocol());
526  c->analysisSoftwarePtr = AnalysisSoftwarePtr(new AnalysisSoftware("ref"));
527  a.proteinDetectionProtocol.push_back(c);
528 
529  testObject(a);
530 }
void testObject(const object_type &a)
Definition: IOTest.cpp:41
std::vector< SpectrumIdentificationProtocolPtr > spectrumIdentificationProtocol
Definition: IdentData.hpp:911
std::vector< ProteinDetectionProtocolPtr > proteinDetectionProtocol
Definition: IdentData.hpp:912
Implementation of ProteinDetectionProtocolType from the mzIdentML schema.
Definition: IdentData.hpp:786
Implementation of SpectrumIdentificationProtocolType from the mzIdentML schema.
Definition: IdentData.hpp:545
Implementation of AnalysisSoftwareType from the mzIdentML schema.
Definition: IdentData.hpp:211
Implementation of AnalysisProtocolCollectionType from the mzIdentML schema.
Definition: IdentData.hpp:909

§ testSpectraData()

void testSpectraData ( )

Definition at line 533 of file IOTest.cpp.

References pwiz::data::CVParam::cvid, pwiz::identdata::SpectraData::externalFormatDocumentation, pwiz::identdata::SpectraData::fileFormat, pwiz::identdata::Identifiable::id, pwiz::identdata::SpectraData::location, MS_mzML_format, and testObject().

Referenced by test().

534 {
535  SpectraData a;
536 
537  a.id = "id";
538 
539  a.location = "here";
540  a.externalFormatDocumentation.push_back("there");
542 
543  testObject(a);
544 }
void testObject(const object_type &a)
Definition: IOTest.cpp:41
Implementation of SpectraDataType from the mzIdentML schema.
Definition: IdentData.hpp:697
MS_mzML_format
mzML format: Proteomics Standards Inititative mzML file format.
Definition: cv.hpp:2251
std::vector< std::string > externalFormatDocumentation
Definition: IdentData.hpp:704

§ testSearchDatabase()

void testSearchDatabase ( )

Definition at line 547 of file IOTest.cpp.

References pwiz::data::CVParam::cvid, pwiz::identdata::SearchDatabase::databaseName, pwiz::identdata::SearchDatabase::fileFormat, pwiz::identdata::IdentifiableParamContainer::id, pwiz::identdata::SearchDatabase::location, MS_FASTA_format, pwiz::identdata::SearchDatabase::numDatabaseSequences, pwiz::identdata::SearchDatabase::numResidues, pwiz::identdata::SearchDatabase::releaseDate, testObject(), pwiz::data::ParamContainer::userParams, and pwiz::identdata::SearchDatabase::version.

Referenced by test().

548 {
549  SearchDatabase a;
550 
551  a.id = "id";
552  a.location = "here";
553 
554  a.version = "1.01a";
555  a.releaseDate="now";
556  a.numDatabaseSequences = 1;
557  a.numResidues = 2;
558 
560  a.databaseName.userParams.push_back(UserParam("5peptideMix_20090515.fasta"));
561 
562  testObject(a);
563 }
void testObject(const object_type &a)
Definition: IOTest.cpp:41
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
std::vector< UserParam > userParams
a collection of uncontrolled user terms
Definition: ParamTypes.hpp:253
MS_FASTA_format
FASTA format: The sequence database was stored in the FASTA format.
Definition: cv.hpp:4294
Implementation of SearchDatabaseType from the mzIdentML schema.
Definition: IdentData.hpp:270

§ testSourceFile()

void testSourceFile ( )

Definition at line 566 of file IOTest.cpp.

References pwiz::data::CVParam::cvid, pwiz::identdata::SourceFile::externalFormatDocumentation, pwiz::identdata::SourceFile::fileFormat, pwiz::identdata::IdentifiableParamContainer::id, pwiz::identdata::SourceFile::location, MS_Mascot_DAT_format, MS_mzML_format, pwiz::data::ParamContainer::set(), and testObject().

Referenced by test().

567 {
568  SourceFile a;
569 
570  a.id = "id";
571 
572  a.location = "there";
574  a.externalFormatDocumentation.push_back("somewhere else");
576 
577  testObject(a);
578 }
void testObject(const object_type &a)
Definition: IOTest.cpp:41
MS_mzML_format
mzML format: Proteomics Standards Inititative mzML file format.
Definition: cv.hpp:2251
std::vector< std::string > externalFormatDocumentation
Definition: IdentData.hpp:928
MS_Mascot_DAT_format
Mascot DAT format: Source file for this mzIdentML was in Mascot DAT file format.
Definition: cv.hpp:3880
Implementation of SourceFileType from the mzIdentML schema.
Definition: IdentData.hpp:923
void set(CVID cvid, const std::string &value="", CVID units=CVID_Unknown)
set/add a CVParam (not recursive)

§ testInputs()

void testInputs ( )

Definition at line 581 of file IOTest.cpp.

References pwiz::identdata::Inputs::searchDatabase, pwiz::identdata::Inputs::sourceFile, pwiz::identdata::Inputs::spectraData, and testObject().

Referenced by test().

582 {
583  Inputs a;
584 
585  SourceFilePtr b(new SourceFile());
586  b->location = "blah";
587  a.sourceFile.push_back(b);
588 
589  SearchDatabasePtr c(new SearchDatabase());
590  c->version = "1.0b";
591  a.searchDatabase.push_back(c);
592 
593  SpectraDataPtr d(new SpectraData());
594  d->location = "bleh";
595  a.spectraData.push_back(d);
596 
597  testObject(a);
598 }
void testObject(const object_type &a)
Definition: IOTest.cpp:41
Implementation of SpectraDataType from the mzIdentML schema.
Definition: IdentData.hpp:697
Implementation of the InputsType from the mzIdentML schema.
Definition: IdentData.hpp:943
std::vector< SourceFilePtr > sourceFile
Definition: IdentData.hpp:946
Implementation of SourceFileType from the mzIdentML schema.
Definition: IdentData.hpp:923
Implementation of SearchDatabaseType from the mzIdentML schema.
Definition: IdentData.hpp:270
std::vector< SpectraDataPtr > spectraData
Definition: IdentData.hpp:948
std::vector< SearchDatabasePtr > searchDatabase
Definition: IdentData.hpp:947
boost::shared_ptr< SourceFile > SourceFilePtr
Description of the source file, including location and type.
Definition: MSData.hpp:75

§ testMeasure()

void testMeasure ( )

Definition at line 601 of file IOTest.cpp.

References pwiz::identdata::IdentifiableParamContainer::id, MS_product_ion_m_z, pwiz::data::ParamContainer::set(), and testObject().

Referenced by test().

602 {
603  Measure a;
604 
605  a.id = "id";
607 
608  testObject(a);
609 }
void testObject(const object_type &a)
Definition: IOTest.cpp:41
Implementation of MeasureType from the mzIdentML schema.
Definition: IdentData.hpp:573
void set(CVID cvid, const std::string &value="", CVID units=CVID_Unknown)
set/add a CVParam (not recursive)
MS_product_ion_m_z
product ion m/z: The m/z of the product ion.
Definition: cv.hpp:3949

§ testFragmentArray()

void testFragmentArray ( )

Definition at line 612 of file IOTest.cpp.

References pwiz::identdata::FragmentArray::measurePtr, testObject(), and pwiz::identdata::FragmentArray::values.

Referenced by test().

613 {
614  FragmentArray a;
615 
616  a.values.push_back(1.);
617  a.values.push_back(2.);
618  a.values.push_back(3.);
619  a.values.push_back(4.);
620  a.measurePtr = MeasurePtr(new Measure("ref"));
621 
622  testObject(a);
623 }
void testObject(const object_type &a)
Definition: IOTest.cpp:41
Implementation of MeasureType from the mzIdentML schema.
Definition: IdentData.hpp:573
std::vector< double > values
Definition: IdentData.hpp:591
Implementation of FragmentArrayType from the mzIdentML schema.
Definition: IdentData.hpp:589

§ testIonType()

void testIonType ( )

Definition at line 626 of file IOTest.cpp.

References pwiz::identdata::IonType::charge, pwiz::data::CVParam::cvid, pwiz::identdata::IonType::fragmentArray, pwiz::identdata::IonType::index, MS_frag__a_ion, and testObject().

Referenced by test().

627 {
628  IonType a;
629 
630  a.index.push_back(0);
631  a.index.push_back(1);
632  a.index.push_back(2);
633  a.index.push_back(3);
634  a.charge = 2;
635 
636  a.cvid = MS_frag__a_ion;
637  FragmentArrayPtr b(new FragmentArray());
638  a.fragmentArray.push_back(b);
639 
640  testObject(a);
641 }
void testObject(const object_type &a)
Definition: IOTest.cpp:41
MS_frag__a_ion
frag: a ion: Fragmentation information, type of product: a ion.
Definition: cv.hpp:3967
Implementation of IonTypeType from the mzIdentML schema.
Definition: IdentData.hpp:607
std::vector< int > index
Definition: IdentData.hpp:611
Implementation of FragmentArrayType from the mzIdentML schema.
Definition: IdentData.hpp:589
std::vector< FragmentArrayPtr > fragmentArray
Definition: IdentData.hpp:613

§ testPeptideEvidence()

void testPeptideEvidence ( )

Definition at line 644 of file IOTest.cpp.

References pwiz::identdata::PeptideEvidence::dbSequencePtr, pwiz::identdata::PeptideEvidence::end, pwiz::identdata::PeptideEvidence::frame, pwiz::identdata::IdentifiableParamContainer::id, pwiz::identdata::PeptideEvidence::isDecoy, MS_Mascot_score, pwiz::identdata::PeptideEvidence::post, pwiz::identdata::PeptideEvidence::pre, pwiz::data::ParamContainer::set(), pwiz::identdata::PeptideEvidence::start, testObject(), and pwiz::identdata::PeptideEvidence::translationTablePtr.

Referenced by test().

645 {
646  PeptideEvidence a;
647 
648  a.id = "id";
649  a.dbSequencePtr = DBSequencePtr(new DBSequence("dbs_ref"));
650  a.start = 1;
651  a.end = 2;
652  a.pre = 'A';
653  a.post = 'C';
654  a.translationTablePtr = TranslationTablePtr(new TranslationTable("tranny_ref"));
655  a.frame = 3;
656  a.isDecoy = true;
657 
658  a.set(MS_Mascot_score, "15.71");
659 
660  testObject(a);
661 }
void testObject(const object_type &a)
Definition: IOTest.cpp:41
Implementation of PeptideEvidenceType from the mzIdentML schema.
Definition: IdentData.hpp:626
Implementation of TranslationTableType from the mzIdentML schema.
Definition: IdentData.hpp:517
MS_Mascot_score
Mascot:score: The Mascot result &#39;Score&#39;.
Definition: cv.hpp:3820
TranslationTablePtr translationTablePtr
Definition: IdentData.hpp:637
void set(CVID cvid, const std::string &value="", CVID units=CVID_Unknown)
set/add a CVParam (not recursive)
Implementation of DBSequenceType from the mzIdentML schema.
Definition: IdentData.hpp:296

§ testSpectrumIdentificationItem()

void testSpectrumIdentificationItem ( )

Definition at line 664 of file IOTest.cpp.

References pwiz::identdata::SpectrumIdentificationItem::calculatedMassToCharge, pwiz::identdata::SpectrumIdentificationItem::calculatedPI, pwiz::identdata::SpectrumIdentificationItem::chargeState, pwiz::identdata::SpectrumIdentificationItem::experimentalMassToCharge, pwiz::identdata::SpectrumIdentificationItem::fragmentation, pwiz::identdata::IdentifiableParamContainer::id, pwiz::identdata::SpectrumIdentificationItem::massTablePtr, MS_Mascot_score, pwiz::identdata::SpectrumIdentificationItem::passThreshold, pwiz::identdata::SpectrumIdentificationItem::peptideEvidencePtr, pwiz::identdata::SpectrumIdentificationItem::peptidePtr, pwiz::identdata::SpectrumIdentificationItem::rank, pwiz::identdata::SpectrumIdentificationItem::samplePtr, pwiz::data::ParamContainer::set(), and testObject().

Referenced by test().

665 {
667 
668  a.id = "id";
669 
670  a.chargeState = 1;
671  a.experimentalMassToCharge = 1.1;
672  a.calculatedMassToCharge = 2.2;
673  a.calculatedPI = 3.3;
674  a.peptidePtr = PeptidePtr(new Peptide("pep_ref"));
675  a.rank = 4;
676  a.passThreshold = true;
677  a.massTablePtr = MassTablePtr(new MassTable("mt_ref"));
678  a.samplePtr = SamplePtr(new Sample("s_ref"));
679  a.peptideEvidencePtr.push_back(PeptideEvidencePtr(new PeptideEvidence("pe_ref")));
680 
681  IonTypePtr c(new IonType());
682  c->charge = 5;
683  a.fragmentation.push_back(c);
684 
685  a.set(MS_Mascot_score, "15.71");
686 
687  testObject(a);
688 }
void testObject(const object_type &a)
Definition: IOTest.cpp:41
Implementation of PeptideEvidenceType from the mzIdentML schema.
Definition: IdentData.hpp:626
std::vector< PeptideEvidencePtr > peptideEvidencePtr
Definition: IdentData.hpp:684
MS_Mascot_score
Mascot:score: The Mascot result &#39;Score&#39;.
Definition: cv.hpp:3820
std::vector< IonTypePtr > fragmentation
Definition: IdentData.hpp:685
Implementation of PeptideType from the mzIdentML schema.
Definition: IdentData.hpp:368
Implementation of MassTableType from the mzIdentML schema.
Definition: IdentData.hpp:480
boost::shared_ptr< Peptide > PeptidePtr
Definition: TraData.hpp:236
Implementation of IonTypeType from the mzIdentML schema.
Definition: IdentData.hpp:607
Implementation of the SampleType from the mzIdentML schema.
Definition: IdentData.hpp:195
void set(CVID cvid, const std::string &value="", CVID units=CVID_Unknown)
set/add a CVParam (not recursive)
boost::shared_ptr< Sample > SamplePtr
Definition: MSData.hpp:117
Implementation of SpectrumIdentificationItemType from the mzIdentML schema.
Definition: IdentData.hpp:669

§ testSpectrumIdentificationResult()

void testSpectrumIdentificationResult ( )

Definition at line 691 of file IOTest.cpp.

References pwiz::identdata::IdentifiableParamContainer::id, MS_Mascot_score, pwiz::data::ParamContainer::set(), pwiz::identdata::SpectrumIdentificationResult::spectraDataPtr, pwiz::identdata::SpectrumIdentificationResult::spectrumID, pwiz::identdata::SpectrumIdentificationResult::spectrumIdentificationItem, and testObject().

Referenced by test().

692 {
694 
695  a.id = "id";
696 
697  a.spectrumID = "sid";
698  a.spectraDataPtr = SpectraDataPtr(new SpectraData("sd_ref"));
699 
700  SpectrumIdentificationItemPtr b(new SpectrumIdentificationItem());
701  b->chargeState = 1;
702  a.spectrumIdentificationItem.push_back(b);
703 
704  a.set(MS_Mascot_score, "15.71");
705 
706  testObject(a);
707 }
void testObject(const object_type &a)
Definition: IOTest.cpp:41
Implementation of SpectraDataType from the mzIdentML schema.
Definition: IdentData.hpp:697
MS_Mascot_score
Mascot:score: The Mascot result &#39;Score&#39;.
Definition: cv.hpp:3820
Implementation of SpectrumIdentificationResultType from the mzIdentML schema.
Definition: IdentData.hpp:722
void set(CVID cvid, const std::string &value="", CVID units=CVID_Unknown)
set/add a CVParam (not recursive)
Implementation of SpectrumIdentificationItemType from the mzIdentML schema.
Definition: IdentData.hpp:669
std::vector< SpectrumIdentificationItemPtr > spectrumIdentificationItem
Definition: IdentData.hpp:730

§ testPeptideHypothesis()

PeptideHypothesis testPeptideHypothesis ( )

Definition at line 710 of file IOTest.cpp.

References pwiz::identdata::PeptideHypothesis::peptideEvidencePtr, pwiz::identdata::PeptideHypothesis::spectrumIdentificationItemPtr, and testObject().

Referenced by testProteinDetectionHypothesis().

711 {
713 
714  a.peptideEvidencePtr.reset(new PeptideEvidence("pe1"));
715  a.spectrumIdentificationItemPtr.push_back(SpectrumIdentificationItemPtr(new SpectrumIdentificationItem("sii1")));
716 
717  testObject(a);
718  return a;
719 }
void testObject(const object_type &a)
Definition: IOTest.cpp:41
std::vector< SpectrumIdentificationItemPtr > spectrumIdentificationItemPtr
Definition: IdentData.hpp:809
Implementation of PeptideEvidenceType from the mzIdentML schema.
Definition: IdentData.hpp:626
Implementation of PeptideHypothesisType from the mzIdentML schema.
Definition: IdentData.hpp:806
PeptideEvidencePtr peptideEvidencePtr
Definition: IdentData.hpp:808
Implementation of SpectrumIdentificationItemType from the mzIdentML schema.
Definition: IdentData.hpp:669

§ testProteinDetectionHypothesis()

void testProteinDetectionHypothesis ( )

Definition at line 722 of file IOTest.cpp.

References pwiz::identdata::ProteinDetectionHypothesis::dbSequencePtr, pwiz::identdata::IdentifiableParamContainer::id, MS_Mascot_score, pwiz::identdata::ProteinDetectionHypothesis::passThreshold, pwiz::identdata::ProteinDetectionHypothesis::peptideHypothesis, pwiz::data::ParamContainer::set(), testObject(), and testPeptideHypothesis().

Referenced by test().

723 {
725 
726  a.id = "id";
727  a.dbSequencePtr = DBSequencePtr(new DBSequence("dbs_ref"));
728  a.passThreshold = "pt";
730  a.set(MS_Mascot_score, "164.4");
731 
732  testObject(a);
733 }
void testObject(const object_type &a)
Definition: IOTest.cpp:41
MS_Mascot_score
Mascot:score: The Mascot result &#39;Score&#39;.
Definition: cv.hpp:3820
Implementation of ProteinDetectionHypothesisType from the mzIdentML schema.
Definition: IdentData.hpp:819
std::vector< PeptideHypothesis > peptideHypothesis
Definition: IdentData.hpp:826
void set(CVID cvid, const std::string &value="", CVID units=CVID_Unknown)
set/add a CVParam (not recursive)
Implementation of DBSequenceType from the mzIdentML schema.
Definition: IdentData.hpp:296
PeptideHypothesis testPeptideHypothesis()
Definition: IOTest.cpp:710

§ testProteinAmbiguityGroup()

void testProteinAmbiguityGroup ( )

Definition at line 736 of file IOTest.cpp.

References pwiz::identdata::IdentifiableParamContainer::id, MS_Mascot_score, pwiz::identdata::ProteinAmbiguityGroup::proteinDetectionHypothesis, pwiz::data::ParamContainer::set(), and testObject().

Referenced by test().

737 {
739 
740  a.id = "id";
741  ProteinDetectionHypothesisPtr b(new ProteinDetectionHypothesis());
742  b->dbSequencePtr = DBSequencePtr(new DBSequence("dbs_ref"));
743  a.proteinDetectionHypothesis.push_back(b);
744  a.set(MS_Mascot_score, "164.4");
745 
746  testObject(a);
747 }
void testObject(const object_type &a)
Definition: IOTest.cpp:41
MS_Mascot_score
Mascot:score: The Mascot result &#39;Score&#39;.
Definition: cv.hpp:3820
Implementation of ProteinDetectionHypothesisType from the mzIdentML schema.
Definition: IdentData.hpp:819
Implementation of ProteinAmbiguityGroupType from the mzIdentML schema.
Definition: IdentData.hpp:839
void set(CVID cvid, const std::string &value="", CVID units=CVID_Unknown)
set/add a CVParam (not recursive)
std::vector< ProteinDetectionHypothesisPtr > proteinDetectionHypothesis
Definition: IdentData.hpp:844
Implementation of DBSequenceType from the mzIdentML schema.
Definition: IdentData.hpp:296

§ testSpectrumIdentificationList()

void testSpectrumIdentificationList ( )

Definition at line 750 of file IOTest.cpp.

References pwiz::identdata::SpectrumIdentificationList::fragmentationTable, pwiz::identdata::IdentifiableParamContainer::id, MS_Mascot_score, pwiz::identdata::SpectrumIdentificationList::numSequencesSearched, pwiz::identdata::SpectrumIdentificationList::spectrumIdentificationResult, and testObject().

Referenced by test().

751 {
753 
754  a.id = "id";
755  a.numSequencesSearched = 1;
756 
757  MeasurePtr b(new Measure());
758  b->set(MS_Mascot_score, "164.4");
759  a.fragmentationTable.push_back(b);
760 
761  SpectrumIdentificationResultPtr c(new SpectrumIdentificationResult());
762  c->id = "sid";
763  c->spectrumID = "sID";
764  a.spectrumIdentificationResult.push_back(c);
765 
766  testObject(a);
767 }
void testObject(const object_type &a)
Definition: IOTest.cpp:41
Implementation of MeasureType from the mzIdentML schema.
Definition: IdentData.hpp:573
std::vector< SpectrumIdentificationResultPtr > spectrumIdentificationResult
Definition: IdentData.hpp:751
MS_Mascot_score
Mascot:score: The Mascot result &#39;Score&#39;.
Definition: cv.hpp:3820
Implementation of SpectrumIdentificationResultType from the mzIdentML schema.
Definition: IdentData.hpp:722
std::vector< MeasurePtr > fragmentationTable
Definition: IdentData.hpp:750
Implementation of SpectrumIdentificationListType from the mzIdentML schema.
Definition: IdentData.hpp:743

§ testProteinDetectionList()

void testProteinDetectionList ( )

Definition at line 770 of file IOTest.cpp.

References pwiz::identdata::IdentifiableParamContainer::id, MS_Mascot_score, pwiz::identdata::ProteinDetectionList::proteinAmbiguityGroup, pwiz::data::ParamContainer::set(), and testObject().

Referenced by test().

771 {
773 
774  a.id = "id";
775  ProteinAmbiguityGroupPtr b(new ProteinAmbiguityGroup());
776  a.proteinAmbiguityGroup.push_back(b);
777 
778  a.set(MS_Mascot_score, "164.4");
779 
780  testObject(a);
781 }
void testObject(const object_type &a)
Definition: IOTest.cpp:41
MS_Mascot_score
Mascot:score: The Mascot result &#39;Score&#39;.
Definition: cv.hpp:3820
Implementation of ProteinAmbiguityGroupType from the mzIdentML schema.
Definition: IdentData.hpp:839
Implementation of ProteinDetectionListType from the mzIdentML schema.
Definition: IdentData.hpp:855
void set(CVID cvid, const std::string &value="", CVID units=CVID_Unknown)
set/add a CVParam (not recursive)
std::vector< ProteinAmbiguityGroupPtr > proteinAmbiguityGroup
Definition: IdentData.hpp:860

§ testAnalysisData()

void testAnalysisData ( )

Definition at line 784 of file IOTest.cpp.

References MS_Mascot_score, pwiz::identdata::AnalysisData::proteinDetectionListPtr, pwiz::identdata::AnalysisData::spectrumIdentificationList, and testObject().

Referenced by test().

785 {
786  AnalysisData a;
787 
788  SpectrumIdentificationListPtr b(new SpectrumIdentificationList());
789  b->id = "id";
790  b->numSequencesSearched = 5;
791  a.spectrumIdentificationList.push_back(b);
792 
793  a.proteinDetectionListPtr = ProteinDetectionListPtr(new ProteinDetectionList("id2"));
794  a.proteinDetectionListPtr->set(MS_Mascot_score, "164.4");
795 
796  testObject(a);
797 }
void testObject(const object_type &a)
Definition: IOTest.cpp:41
std::vector< SpectrumIdentificationListPtr > spectrumIdentificationList
Definition: IdentData.hpp:962
MS_Mascot_score
Mascot:score: The Mascot result &#39;Score&#39;.
Definition: cv.hpp:3820
Implementation of AnalysisDataType from the mzIdentML schema.
Definition: IdentData.hpp:960
Implementation of ProteinDetectionListType from the mzIdentML schema.
Definition: IdentData.hpp:855
ProteinDetectionListPtr proteinDetectionListPtr
Definition: IdentData.hpp:963
Implementation of SpectrumIdentificationListType from the mzIdentML schema.
Definition: IdentData.hpp:743

§ testDataCollection()

void testDataCollection ( )

Definition at line 800 of file IOTest.cpp.

References pwiz::identdata::DataCollection::analysisData, pwiz::identdata::DataCollection::inputs, pwiz::identdata::Inputs::sourceFile, pwiz::identdata::AnalysisData::spectrumIdentificationList, and testObject().

Referenced by test().

801 {
802  DataCollection a;
803 
804  SourceFilePtr b(new SourceFile());
805  a.inputs.sourceFile.push_back(b);
806 
807  SpectrumIdentificationListPtr c(new SpectrumIdentificationList());
808  c->id = "SIL_1";
809  c->numSequencesSearched = 5;
811 
812  testObject(a);
813 }
void testObject(const object_type &a)
Definition: IOTest.cpp:41
std::vector< SpectrumIdentificationListPtr > spectrumIdentificationList
Definition: IdentData.hpp:962
std::vector< SourceFilePtr > sourceFile
Definition: IdentData.hpp:946
Implementation of DataCollectionType from the mzIdentML schema.
Definition: IdentData.hpp:974
Implementation of SourceFileType from the mzIdentML schema.
Definition: IdentData.hpp:923
Implementation of SpectrumIdentificationListType from the mzIdentML schema.
Definition: IdentData.hpp:743
boost::shared_ptr< SourceFile > SourceFilePtr
Description of the source file, including location and type.
Definition: MSData.hpp:75

§ testIdentData()

void testIdentData ( )

Definition at line 816 of file IOTest.cpp.

References pwiz::identdata::IdentData::analysisCollection, pwiz::identdata::DataCollection::analysisData, pwiz::identdata::IdentData::dataCollection, pwiz::identdata::SequenceCollection::dbSequences, diff(), IgnoreAnalysisData, IgnoreSequenceCollection, pwiz::identdata::examples::initializeTiny(), os_, pwiz::identdata::SequenceCollection::peptideEvidence, pwiz::identdata::SequenceCollection::peptides, pwiz::identdata::AnalysisCollection::proteinDetection, pwiz::identdata::AnalysisData::proteinDetectionListPtr, pwiz::identdata::IO::read(), pwiz::identdata::IdentData::sequenceCollection, pwiz::identdata::AnalysisCollection::spectrumIdentification, pwiz::identdata::AnalysisData::spectrumIdentificationList, testObject(), unit_assert, and pwiz::identdata::IO::write().

Referenced by test().

817 {
818  IdentData a;
819 
821 
822  testObject(a);
823 
824  // test ignoring sequence collection and analysis data
825  {
826  // write 'a' out to a stream
827 
828  ostringstream oss;
829  XMLWriter writer(oss);
830  IO::write(writer, a);
831  if (os_) *os_ << oss.str() << endl;
832 
833  // read 'b' in from stream
834 
835  IdentData b;
836  istringstream iss(oss.str());
838 
839  // clear the original SequenceCollection
841  a.sequenceCollection.peptides.clear();
843 
844  // clear the original analysis data
845  BOOST_FOREACH(SpectrumIdentificationPtr& si, a.analysisCollection.spectrumIdentification)
846  si->spectrumIdentificationListPtr.reset();
847  a.analysisCollection.proteinDetection = b.analysisCollection.proteinDetection = ProteinDetection();
848  a.dataCollection.analysisData.spectrumIdentificationList.clear();
849  a.dataCollection.analysisData.proteinDetectionListPtr.reset();
850 
851  // compare 'a' and 'b'
852 
853  Diff<IdentData, DiffConfig> diff(a,b);
854  if (diff && os_) *os_ << "diff:\n" << diff << endl;
855  unit_assert(!diff);
856  }
857 }
void testObject(const object_type &a)
Definition: IOTest.cpp:41
The XMLWriter class provides simple, tag-level XML syntax writing.
Definition: XMLWriter.hpp:47
std::vector< PeptideEvidencePtr > peptideEvidence
Definition: IdentData.hpp:656
AnalysisCollection analysisCollection
Definition: IdentData.hpp:1016
Calculate diffs of objects in a ProteoWizard data model hierarchy.
Definition: diff_std.hpp:142
void diff(const string &filename1, const string &filename2)
std::vector< PeptidePtr > peptides
Definition: IdentData.hpp:655
PWIZ_API_DECL void write(minimxml::XMLWriter &writer, const CV &cv)
Implementation of the MzIdentMLType from the mzIdentML schema.
Definition: IdentData.hpp:993
IgnoreSequenceCollection
Definition: IO.hpp:255
IgnoreAnalysisData
Definition: IO.hpp:211
std::vector< SpectrumIdentificationPtr > spectrumIdentification
Definition: IdentData.hpp:897
PWIZ_API_DECL void read(std::istream &is, CV &cv)
std::vector< DBSequencePtr > dbSequences
Definition: IdentData.hpp:654
PWIZ_API_DECL void initializeTiny(IdentData &mzid)
SequenceCollection sequenceCollection
Definition: IdentData.hpp:1014
ostream * os_
Definition: IOTest.cpp:38
#define unit_assert(x)
Definition: unit.hpp:85
Implementation of ProteinDetectionType from the mzIdentML schema.
Definition: IdentData.hpp:872

§ test()

void test ( )

Definition at line 860 of file IOTest.cpp.

References testAmbiguousResidue(), testAnalysisCollection(), testAnalysisData(), testAnalysisProtocolCollection(), testAnalysisSoftware(), testBibliographicReference(), testContactRole(), testCV(), testDataCollection(), testDBSequence(), testEnzyme(), testEnzymes(), testFilter(), testFragmentArray(), testIdentData(), testIdentifiable(), testIdentifiableParamContainer(), testInputs(), testIonType(), testMassTable(), testMeasure(), testModification(), testOrganization(), testPeptide(), testPeptideEvidence(), testPerson(), testProteinAmbiguityGroup(), testProteinDetection(), testProteinDetectionHypothesis(), testProteinDetectionList(), testProteinDetectionProtocol(), testProvider(), testResidue(), testSample(), testSearchDatabase(), testSearchModification(), testSequenceCollection(), testSourceFile(), testSpectraData(), testSpectrumIdentification(), testSpectrumIdentificationItem(), testSpectrumIdentificationList(), testSpectrumIdentificationProtocol(), testSpectrumIdentificationResult(), and testSubstitutionModification().

Referenced by main().

861 {
862  testCV();
866  testPerson();
868  testContactRole();
869  testProvider();
870  testSample();
872  testDBSequence();
875  testPeptide();
881  testEnzyme();
882  testEnzymes();
883  testResidue();
885  testMassTable();
886  testFilter();
890  testSpectraData();
892  testSourceFile();
893  testInputs();
894  testMeasure();
896  testIonType();
906  testIdentData();
907 }
void testAmbiguousResidue()
Definition: IOTest.cpp:432
void testContactRole()
Definition: IOTest.cpp:168
void testPeptide()
Definition: IOTest.cpp:286
void testSample()
Definition: IOTest.cpp:193
void testSpectraData()
Definition: IOTest.cpp:533
void testIonType()
Definition: IOTest.cpp:626
void testProteinDetectionHypothesis()
Definition: IOTest.cpp:722
void testMeasure()
Definition: IOTest.cpp:601
void testAnalysisCollection()
Definition: IOTest.cpp:353
void testSpectrumIdentification()
Definition: IOTest.cpp:320
void testFilter()
Definition: IOTest.cpp:464
void testSubstitutionModification()
Definition: IOTest.cpp:272
void testResidue()
Definition: IOTest.cpp:419
void testAnalysisData()
Definition: IOTest.cpp:784
void testSpectrumIdentificationItem()
Definition: IOTest.cpp:664
void testIdentifiableParamContainer()
Definition: IOTest.cpp:78
void testPeptideEvidence()
Definition: IOTest.cpp:644
void testCV()
Definition: IOTest.cpp:93
void testDBSequence()
Definition: IOTest.cpp:240
void testBibliographicReference()
Definition: IOTest.cpp:107
void testEnzyme()
Definition: IOTest.cpp:385
void testIdentifiable()
Definition: IOTest.cpp:66
void testAnalysisProtocolCollection()
Definition: IOTest.cpp:517
void testSearchDatabase()
Definition: IOTest.cpp:547
void testSpectrumIdentificationList()
Definition: IOTest.cpp:750
void testIdentData()
Definition: IOTest.cpp:816
void testInputs()
Definition: IOTest.cpp:581
void testProteinDetectionList()
Definition: IOTest.cpp:770
void testProvider()
Definition: IOTest.cpp:180
void testProteinAmbiguityGroup()
Definition: IOTest.cpp:736
void testPerson()
Definition: IOTest.cpp:128
void testFragmentArray()
Definition: IOTest.cpp:612
void testProteinDetection()
Definition: IOTest.cpp:337
void testSourceFile()
Definition: IOTest.cpp:566
void testSpectrumIdentificationResult()
Definition: IOTest.cpp:691
void testProteinDetectionProtocol()
Definition: IOTest.cpp:503
void testModification()
Definition: IOTest.cpp:256
void testSequenceCollection()
Definition: IOTest.cpp:308
void testSearchModification()
Definition: IOTest.cpp:368
void testEnzymes()
Definition: IOTest.cpp:405
void testMassTable()
Definition: IOTest.cpp:445
void testAnalysisSoftware()
Definition: IOTest.cpp:210
void testDataCollection()
Definition: IOTest.cpp:800
void testOrganization()
Definition: IOTest.cpp:150
void testSpectrumIdentificationProtocol()
Definition: IOTest.cpp:476

§ main()

int main ( int  argc,
char *  argv[] 
)

Definition at line 910 of file IOTest.cpp.

References os_, test(), TEST_EPILOG, TEST_FAILED, and TEST_PROLOG_EX.

911 {
912  TEST_PROLOG_EX(argc, argv, "_IdentData")
913 
914  try
915  {
916  if (argc>1 && !strcmp(argv[1],"-v")) os_ = &cout;
917  test();
918  if (os_) *os_ << "ok\n";
919  }
920  catch (exception& e)
921  {
922  TEST_FAILED(e.what())
923  }
924  catch (...)
925  {
926  TEST_FAILED("Caught unknown exception.")
927  }
928 
930 }
#define TEST_EPILOG
Definition: unit.hpp:182
#define TEST_PROLOG_EX(argc, argv, suffix)
Definition: unit.hpp:157
#define TEST_FAILED(x)
Definition: unit.hpp:176
ostream * os_
Definition: IOTest.cpp:38
void test()
Definition: IOTest.cpp:860

Variable Documentation

§ os_

ostream* os_ = 0