#include "pwiz/utility/misc/Std.hpp"
#include "pwiz/data/identdata/DefaultReaderList.hpp"
#include "pwiz/data/identdata/IdentDataFile.hpp"
#include "pwiz/utility/misc/unit.hpp"
#include "Serializer_protXML.hpp"
#include "Diff.hpp"
#include "References.hpp"
#include "examples.hpp"
#include "pwiz/utility/misc/Filesystem.hpp"
#include "pwiz/data/proteome/Digestion.hpp"
#include "TextWriter.hpp"
#include "boost/range/adaptor/transformed.hpp"
#include "boost/range/algorithm/max_element.hpp"
#include "boost/range/algorithm/min_element.hpp"
#include <cstring>
Go to the source code of this file.
◆ testSerialize()
void testSerialize |
( |
const string & |
example_data_dir | ) |
|
Definition at line 50 of file Serializer_protXML_Test.cpp.
51{
56
57 {
58
59
61 readers.
read(example_data_dir+
"/example.pep.xml", mzid0, readerConfig);
62 readers.
read(example_data_dir+
"/example.prot.xml", mzid1, readerConfig);
64 diff0(mzid0, mzid1);
66 }
67
68 {
69
70
72 readers.
read(example_data_dir+
"/example.pep.xml", mzid0, readerConfig);
73 readers.
read(example_data_dir+
"/example.prot.xml", mzid0, readerConfig);
74 readers.
read(example_data_dir+
"/example.prot.xml", mzid1, readerConfig);
76 diff1(mzid0, mzid1);
77 if (
os_ && diff1) *
os_ << diff1 << endl;
79 }
80
81 {
82
84 readers.
read(example_data_dir+
"/example.prot.xml", mzid0, readerConfig);
85 readers.
read(example_data_dir+
"/example.prot.mzid", mzid1, readerConfig);
87 diff2(mzid0, mzid1);
88 if (
os_ && diff2) *
os_ << diff2 << endl;
89 else if (diff2) cout << diff2 << endl;
91 }
92}
virtual void read(const std::string &filename, IdentData &result, const Config &config=Config()) const
delegates to first child that identifies
Calculate diffs of objects in a ProteoWizard data model hierarchy.
Implementation of the MzIdentMLType from the mzIdentML schema.
HACK: provide an option to read only file-level metadata; once we have an enumerable ResultList imple...
References pwiz::data::BaseDiffConfig::ignoreVersions, os_, pwiz::identdata::ReaderList::read(), and unit_assert.
◆ main()
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 95 of file Serializer_protXML_Test.cpp.
96{
98
99 try
100 {
101 if (argc>1 && !strcmp(argv[1],
"-v"))
os_ = &cout;
102
103 std::string srcparent(__FILE__);
104 size_t pos = srcparent.find((bfs::path("pwiz") / "data").string());
105 srcparent.resize(pos);
106 string example_data_dir = srcparent + "example_data";
108 }
109 catch (exception& e)
110 {
112 }
113 catch (...)
114 {
116 }
117
119}
#define TEST_PROLOG(argc, argv)
References os_, TEST_EPILOG, TEST_FAILED, TEST_PROLOG, and testSerialize().
◆ os_