ProteoWizard
Functions | Variables
Pep2MzIdentTest.cpp File Reference
#include "Pep2MzIdent.hpp"
#include "Serializer_mzid.hpp"
#include <iostream>
#include <string>

Go to the source code of this file.

Functions

void test ()
 
int main (int argc, char **argv)
 

Variables

ostream * os_ = NULL
 
const char * samplePepXML
 

Function Documentation

◆ test()

void test ( )

Definition at line 89 of file Pep2MzIdentTest.cpp.

90{
91 istringstream iss(samplePepXML);
93 mspa.read(iss);
94
95 Pep2MzIdent translator(mspa);
96 IdentDataPtr result(translator.translate());
97
98 Serializer_mzIdentML serializer;
99 ostringstream oss;
100 serializer.write(oss, *result);
101
102 if (os_)
103 *os_ << oss.str() << endl;
104
105}
const char * samplePepXML
ostream * os_
Translates data from a MinimumPepXML object into a IdentData object tree when a translation is known.
MZIDData <-> mzIdentML stream serialization.
void write(std::ostream &os, const IdentData &mzid, const pwiz::util::IterationListenerRegistry *=0) const
write MZIDData object to ostream as mzIdentML
boost::shared_ptr< IdentData > IdentDataPtr

References os_, pwiz::data::pepxml::MSMSPipelineAnalysis::read(), samplePepXML, pwiz::identdata::Pep2MzIdent::translate(), and pwiz::identdata::Serializer_mzIdentML::write().

Referenced by main().

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 107 of file Pep2MzIdentTest.cpp.

108{
109 if (argc>1 && !strcmp(argv[1],"-v")) os_ = &cout;
110
111 cout << "\ntesting Pep2MzIdent ... \n" << endl;
112 test();
113 return 0;
114}
void test()

References os_, and test().

Variable Documentation

◆ os_

ostream* os_ = NULL

Definition at line 31 of file Pep2MzIdentTest.cpp.

Referenced by main(), and test().

◆ samplePepXML

const char* samplePepXML

Definition at line 33 of file Pep2MzIdentTest.cpp.

Referenced by test().