ProteoWizard
Functions | Variables
DiffTest.cpp File Reference
#include "Diff.hpp"
#include "TextWriter.hpp"
#include "examples.hpp"
#include "pwiz/utility/misc/unit.hpp"
#include "pwiz/utility/misc/Std.hpp"
#include <cstring>

Go to the source code of this file.

Functions

void testIdentifiable ()
 
void testFragmentArray ()
 
void testIonType ()
 
void testMeasure ()
 
void testSearchModification ()
 
void testPeptideEvidence ()
 
void testProteinAmbiguityGroup ()
 
void testPeptideHypothesis ()
 
void testProteinDetectionHypothesis ()
 
void testSpectrumIdentificationList ()
 
void testProteinDetectionList ()
 
void testAnalysisData ()
 
void testSearchDatabase ()
 
void testSpectraData ()
 
void testSourceFile ()
 
void testInputs ()
 
void testEnzyme ()
 
void testEnzymes ()
 
void testMassTable ()
 
void testResidue ()
 
void testAmbiguousResidue ()
 
void testFilter ()
 
void testDatabaseTranslation ()
 
void testSpectrumIdentificationProtocol ()
 
void testProteinDetectionProtocol ()
 
void testAnalysisProtocolCollection ()
 
void testContact ()
 
void testPerson ()
 
void testOrganization ()
 
void testBibliographicReference ()
 
void testProteinDetection ()
 
void testSpectrumIdentification ()
 
void testAnalysisCollection ()
 
void testDBSequence ()
 
void testModification ()
 
void testSubstitutionModification ()
 
void testPeptide ()
 
void testSequenceCollection ()
 
void testSampleComponent ()
 
void testSample ()
 
void testSpectrumIdentificationItem ()
 
void testSpectrumIdentificationResult ()
 
void testAnalysisSampleCollection ()
 
void testProvider ()
 
void testContactRole ()
 
void testAnalysisSoftware ()
 
void testDataCollection ()
 
void testIdentData ()
 
void test ()
 
int main (int argc, char *argv[])
 

Variables

ostream * os_ = 0
 
const double epsilon = numeric_limits<double>::epsilon()
 

Function Documentation

◆ testIdentifiable()

void testIdentifiable ( )

Definition at line 43 of file DiffTest.cpp.

44 {
45  if (os_) *os_ << "testIdentifiable()\n";
46 
47  Identifiable a, b;
48  a.id="id1";
49  a.name="a_name";
50  b = a;
51 
53  if (diff && os_) *os_ << diff_string<TextWriter>(diff) << endl;
54  unit_assert(!diff);
55 
56  b.id="id2";
57  b.name="b_name";
58 
59  diff(a, b);
60  if (os_) *os_ << diff_string<TextWriter>(diff) << endl;
62 
63  //
64  // test handling for ids which often differ only
65  // by a trailing version number
66  //
67  b=a;
68  a.id += "_1.2.3";
69  b.id += "_1.2.4";
70  DiffConfig config;
71  Diff<Identifiable, DiffConfig> diff0(config);
72  diff0(a, b);
73  if (os_) *os_ << diff_string<TextWriter>(diff0) << endl;
74  unit_assert(diff0);
75 
76  config.ignoreVersions = true;
77  Diff<Identifiable, DiffConfig> diff1(config);
78  diff1(a, b);
79  if (os_) *os_ << diff_string<TextWriter>(diff1) << endl;
80  unit_assert(!diff1);
81 
82  a.id += "x"; // no longer looks like one of our version strings
83  Diff<Identifiable, DiffConfig> diff2(config);
84  diff2(a, b);
85  if (os_) *os_ << diff_string<TextWriter>(diff2) << endl;
86  unit_assert(diff2);
87 
88 }

References diff(), pwiz::identdata::Identifiable::id, pwiz::data::BaseDiffConfig::ignoreVersions, pwiz::identdata::Identifiable::name, os_, and unit_assert.

Referenced by test().

◆ testFragmentArray()

void testFragmentArray ( )

Definition at line 90 of file DiffTest.cpp.

91 {
92  if (os_) *os_ << "testFragmentArray()\n";
93 
94  FragmentArray a, b;
95 
96  a.values.push_back(1.0);
97  a.measurePtr = MeasurePtr(new Measure("Measure_ref"));
98  b = a;
99 
101  unit_assert(!diff);
102  if (os_) *os_ << diff_string<TextWriter>(diff) << endl;
103 
104  a.values.push_back(2.1);
105  b.values.push_back(2.0);
106  b.measurePtr = MeasurePtr(new Measure("fer_erusaeM"));
107  diff(a, b);
108 
109  // a diff was found
110  unit_assert(diff);
111 
112  // the values of the diff are correct
113  unit_assert(diff.a_b.values.size() == 2);
114  unit_assert_equal(0.0, diff.a_b.values[0], 1e-6);
115  unit_assert_equal(0.1, diff.a_b.values[1], 1e-6);
116  unit_assert(diff.b_a.values.size() == 2);
117  unit_assert_equal(0.0, diff.b_a.values[0], 1e-6);
118  unit_assert_equal(-0.1, diff.b_a.values[1], 1e-6);
119 
120  unit_assert(diff.a_b.measurePtr.get());
121  unit_assert(diff.a_b.measurePtr->id == "Measure_ref");
122  unit_assert(diff.b_a.measurePtr.get());
123  unit_assert(diff.b_a.measurePtr->id == "fer_erusaeM");
124 
125  if (os_) *os_ << diff_string<TextWriter>(diff) << endl;
126 }

References diff(), pwiz::identdata::FragmentArray::measurePtr, os_, unit_assert, unit_assert_equal, and pwiz::identdata::FragmentArray::values.

Referenced by test().

◆ testIonType()

void testIonType ( )

Definition at line 128 of file DiffTest.cpp.

129 {
130  if (os_) *os_ << "testIonType()\n";
131 
132  IonType a, b;
133  a.index.push_back(1);
134  a.charge = 1;
135  a.cvid = MS_frag__a_ion;
136  a.fragmentArray.push_back(FragmentArrayPtr(new FragmentArray));
137 
138  b = a;
139 
141  unit_assert(!diff);
142  if (os_ && diff) *os_ << diff_string<TextWriter>(diff) << endl;
143 
144  b.index.back() = 2;
145  b.charge = 2;
146  b.cvid = MS_frag__z_ion;
147  b.fragmentArray.push_back(FragmentArrayPtr(new FragmentArray));
148  b.fragmentArray.back()->measurePtr = MeasurePtr(new Measure("Graduated_cylinder"));
149  diff(a, b);
150 
151  // a diff was found
152  unit_assert(diff);
153  if (os_) *os_ << diff_string<TextWriter>(diff) << endl;
154 
155  // and correctly
156  unit_assert(diff.a_b.index.size() == 1);
157  unit_assert(diff.b_a.index.size() == 1);
158  unit_assert_equal(*diff.a_b.index.begin(), 1.0, epsilon);
159  unit_assert_equal(*diff.b_a.index.begin(), 2.0, epsilon);
160  unit_assert_equal(diff.a_b.charge, 1.0, epsilon);
161  unit_assert_equal(diff.b_a.charge, 2.0, epsilon);
162  unit_assert(diff.a_b.cvid == MS_frag__a_ion);
163  unit_assert(diff.b_a.cvid == MS_frag__z_ion);
164  unit_assert(diff.b_a.fragmentArray.size() == 1);
165  unit_assert(diff.b_a.fragmentArray.back()->measurePtr.get());
166  unit_assert(diff.b_a.fragmentArray.back()->measurePtr->id == "Graduated_cylinder");
167 }

References pwiz::identdata::IonType::charge, pwiz::data::CVParam::cvid, diff(), epsilon, pwiz::identdata::IonType::fragmentArray, pwiz::identdata::IonType::index, MS_frag__a_ion, MS_frag__z_ion, os_, unit_assert, and unit_assert_equal.

Referenced by test().

◆ testMeasure()

void testMeasure ( )

Definition at line 170 of file DiffTest.cpp.

171 {
172  if (os_) *os_ << "testMeasure()\n";
173 
174  Measure a, b;
175  a.set(MS_product_ion_m_z, 200);
176  b = a;
177 
179  unit_assert(!diff);
180 
182 
183  diff(a, b);
184  if (os_) *os_ << diff_string<TextWriter>(diff) << endl;
185 
186  // diff was found
187  unit_assert(diff);
188 
189  // and correctly
190  unit_assert(diff.a_b.cvParams.size() == 0);
191  unit_assert(diff.b_a.cvParams.size() == 1);
192  unit_assert(diff.b_a.hasCVParam(MS_product_ion_intensity));
193 }

References diff(), MS_product_ion_intensity, MS_product_ion_m_z, os_, pwiz::data::ParamContainer::set(), and unit_assert.

Referenced by test(), and testSpectrumIdentificationList().

◆ testSearchModification()

void testSearchModification ( )

Definition at line 195 of file DiffTest.cpp.

196 {
197  if (os_) *os_ << "testSearchModification()\n";
198 
199  SearchModification a, b;
200 
201  a.massDelta = 1;
202  a.residues.push_back('A');
203  a.residues.push_back('B');
205  b = a;
206 
208  unit_assert(!diff);
209 
210  b.massDelta = 10;
211  b.residues.push_back('C');
212  b.cvParams.clear();
214 
215  diff(a, b);
216  if (os_) *os_ << diff_string<TextWriter>(diff) << endl;
217 
218  // diff was found
219  unit_assert(diff);
220 
221  // and correctly
222  unit_assert_equal(diff.a_b.massDelta, 9, epsilon);
223  unit_assert_equal(diff.b_a.massDelta, 9, epsilon);
224  unit_assert(diff.a_b.residues.empty());
225  unit_assert(diff.b_a.residues.size() == 1 && diff.b_a.residues[0] == 'C');
226  unit_assert(!diff.a_b.cvParams.empty());
227  unit_assert(diff.a_b.cvParams[0].cvid == UNIMOD_Gln__pyro_Glu);
228  unit_assert(!diff.b_a.cvParams.empty());
229  unit_assert(diff.b_a.cvParams[0].cvid == UNIMOD_Oxidation);
230 }

References pwiz::data::ParamContainer::cvParams, diff(), epsilon, pwiz::identdata::SearchModification::massDelta, os_, pwiz::identdata::SearchModification::residues, pwiz::data::ParamContainer::set(), UNIMOD_Gln__pyro_Glu, UNIMOD_Oxidation, unit_assert, and unit_assert_equal.

Referenced by test().

◆ testPeptideEvidence()

void testPeptideEvidence ( )

Definition at line 233 of file DiffTest.cpp.

234 {
235  if (os_) *os_ << "testPeptideEvidence()\n";
236 
237  PeptideEvidence a, b;
238 
240  if (os_) *os_ << diff_string<TextWriter>(diff) << endl;
241  unit_assert(!diff);
242 
243  a.dbSequencePtr = DBSequencePtr(new DBSequence("DBSequence_ref"));
244  a.start = 1;
245  a.end = 6;
246  a.pre = '-';
247  a.post = '-';
248  a.translationTablePtr = TranslationTablePtr(new TranslationTable("TranslationTable_ref"));
249  a.frame = 0;
250  a.isDecoy = true;
251  a.set(MS_Mascot_score, 15.71);
252  b = a;
253 
254  diff(a,b);
255  unit_assert(!diff);
256 
257  b.dbSequencePtr = DBSequencePtr(new DBSequence("fer_ecneuqeSBD"));
258  b.start = 2;
259  b.end = 7;
260  b.pre = 'A';
261  b.post = 'A';
262  b.translationTablePtr = TranslationTablePtr(new TranslationTable("fer_elbaTnoitalsnarT"));
263  b.frame = 1;
264  b.isDecoy = false;
265  b.set(MS_Mascot_expectation_value, 0.0268534444565851);
266 
267  diff(a, b);
268  if (os_) *os_ << diff_string<TextWriter>(diff) << endl;
269 
270  // a diff was found
271  unit_assert(diff);
272 
273  // and correctly
274  unit_assert(diff.a_b.dbSequencePtr.get());
275  unit_assert(diff.a_b.dbSequencePtr->id == "DBSequence_ref");
276  unit_assert(diff.b_a.dbSequencePtr.get());
277  unit_assert(diff.b_a.dbSequencePtr->id == "fer_ecneuqeSBD");
278  unit_assert(diff.a_b.translationTablePtr.get());
279  unit_assert(diff.a_b.translationTablePtr->id == "TranslationTable_ref");
280  unit_assert(diff.b_a.translationTablePtr.get());
281  unit_assert(diff.b_a.translationTablePtr->id == "fer_elbaTnoitalsnarT");
282  unit_assert_equal(diff.a_b.start, 1.0, epsilon);
283  unit_assert_equal(diff.b_a.start, 2.0, epsilon);
284  unit_assert_equal(diff.a_b.end, 6.0, epsilon);
285  unit_assert_equal(diff.b_a.end, 7.0, epsilon);
286  unit_assert(diff.a_b.pre == '-');
287  unit_assert(diff.b_a.pre == 'A');
288  unit_assert(diff.a_b.post == '-');
289  unit_assert(diff.b_a.post == 'A');
290  unit_assert_equal(diff.a_b.frame, 0.0, epsilon);
291  unit_assert_equal(diff.b_a.frame, 1.0, epsilon);
292  unit_assert(diff.a_b.isDecoy == true);
293  unit_assert(diff.b_a.isDecoy == false);
294  unit_assert(diff.a_b.cvParams.size() == 0);
295  unit_assert(diff.b_a.cvParams.size() == 1);
297 
298 }

References pwiz::identdata::PeptideEvidence::dbSequencePtr, diff(), pwiz::identdata::PeptideEvidence::end, epsilon, pwiz::identdata::PeptideEvidence::frame, pwiz::identdata::PeptideEvidence::isDecoy, MS_Mascot_expectation_value, MS_Mascot_score, os_, pwiz::identdata::PeptideEvidence::post, pwiz::identdata::PeptideEvidence::pre, pwiz::data::ParamContainer::set(), pwiz::identdata::PeptideEvidence::start, pwiz::identdata::PeptideEvidence::translationTablePtr, unit_assert, and unit_assert_equal.

Referenced by test().

◆ testProteinAmbiguityGroup()

void testProteinAmbiguityGroup ( )

Definition at line 301 of file DiffTest.cpp.

302 {
303  if (os_) *os_ << "testProteinAmbiguityGroup()\n";
304 
306 
307  a.proteinDetectionHypothesis.push_back(ProteinDetectionHypothesisPtr(new ProteinDetectionHypothesis));
308  a.proteinDetectionHypothesis.back()->dbSequencePtr = DBSequencePtr(new DBSequence("DBSequence_ref"));
309  a.set(MS_Mascot_score, 164.4);
310  b = a;
311 
313  unit_assert(!diff);
314 
315  b.proteinDetectionHypothesis.clear();
316  b.set(MS_Mascot_expectation_value, 0.0268534444565851);
317 
318  diff(a, b);
319  if (os_) *os_ << diff_string<TextWriter>(diff) << endl;
320 
321  // a diff was found
322  unit_assert(diff);
323 
324  // and correctly
325  unit_assert(diff.a_b.proteinDetectionHypothesis.size() == 1);
326  unit_assert(diff.b_a.proteinDetectionHypothesis.size() == 0);
327  unit_assert(diff.a_b.proteinDetectionHypothesis.back()->dbSequencePtr->id == "DBSequence_ref");
328  unit_assert(diff.a_b.cvParams.size() == 0);
329  unit_assert(diff.b_a.cvParams.size() == 1);
330  unit_assert(diff.b_a.hasCVParam(MS_Mascot_expectation_value)); // TODO check vals also?
331 
332 }

References diff(), MS_Mascot_expectation_value, MS_Mascot_score, os_, pwiz::identdata::ProteinAmbiguityGroup::proteinDetectionHypothesis, pwiz::data::ParamContainer::set(), and unit_assert.

Referenced by test().

◆ testPeptideHypothesis()

void testPeptideHypothesis ( )

Definition at line 335 of file DiffTest.cpp.

336 {
337  if (os_) *os_ << "testPeptideHypothesis()\n";
338 
339  PeptideHypothesis a, b;
341  unit_assert(!diff);
342 
343  a.peptideEvidencePtr = PeptideEvidencePtr(new PeptideEvidence("pe_a"));
344  a.spectrumIdentificationItemPtr.push_back(SpectrumIdentificationItemPtr(new SpectrumIdentificationItem("sii_a")));
345  b.peptideEvidencePtr = PeptideEvidencePtr(new PeptideEvidence("pe_b"));
346  b.spectrumIdentificationItemPtr.push_back(SpectrumIdentificationItemPtr(new SpectrumIdentificationItem("sii_b")));
347 
348  diff(a,b);
349  if (os_) *os_ << diff_string<TextWriter>(diff) << endl;
350 
351  // a diff was found
352  unit_assert(diff);
353 
354  // and correctly
355  unit_assert(diff.a_b.peptideEvidencePtr.get());
356  unit_assert(diff.a_b.peptideEvidencePtr->id =="pe_a");
357  unit_assert(diff.b_a.peptideEvidencePtr.get());
358  unit_assert(diff.b_a.peptideEvidencePtr->id == "pe_b");
359  unit_assert(diff.a_b.spectrumIdentificationItemPtr.size() == 1);
360  unit_assert(diff.a_b.spectrumIdentificationItemPtr.back()->id =="sii_a");
361  unit_assert(diff.b_a.spectrumIdentificationItemPtr.size() == 1);
362  unit_assert(diff.b_a.spectrumIdentificationItemPtr.back()->id == "sii_b");
363 }

References diff(), os_, pwiz::identdata::PeptideHypothesis::peptideEvidencePtr, pwiz::identdata::PeptideHypothesis::spectrumIdentificationItemPtr, and unit_assert.

◆ testProteinDetectionHypothesis()

void testProteinDetectionHypothesis ( )

Definition at line 366 of file DiffTest.cpp.

367 {
368  if (os_) *os_ << "testProteinDetectionHypothesis()\n";
369 
372  unit_assert(!diff);
373 
374  a.dbSequencePtr = DBSequencePtr(new DBSequence("DBSequence_ref"));
375  b.dbSequencePtr = DBSequencePtr(new DBSequence("fer_ecneuqeSBD"));
376  a.passThreshold = true;
377  b.passThreshold = false;
378  a.peptideHypothesis.push_back(PeptideHypothesis());
379  b.peptideHypothesis.push_back(PeptideHypothesis());
380 
381  a.peptideHypothesis.back().peptideEvidencePtr = PeptideEvidencePtr(new PeptideEvidence("pe_a"));
382  a.peptideHypothesis.back().spectrumIdentificationItemPtr.push_back(SpectrumIdentificationItemPtr(new SpectrumIdentificationItem("sii_a")));
383  b.peptideHypothesis.back().peptideEvidencePtr = PeptideEvidencePtr(new PeptideEvidence("pe_b"));
384  b.peptideHypothesis.back().spectrumIdentificationItemPtr.push_back(SpectrumIdentificationItemPtr(new SpectrumIdentificationItem("sii_b")));
385 
387 
388  diff(a,b);
389  if (os_) *os_ << diff_string<TextWriter>(diff) << endl;
390 
391  // a diff was found
392  unit_assert(diff);
393 
394  // and correctly
395  unit_assert(diff.a_b.dbSequencePtr.get());
396  unit_assert(diff.a_b.dbSequencePtr->id =="DBSequence_ref");
397  unit_assert(diff.b_a.dbSequencePtr.get());
398  unit_assert(diff.b_a.dbSequencePtr->id == "fer_ecneuqeSBD");
399  unit_assert(diff.a_b.passThreshold == true);
400  unit_assert(diff.b_a.passThreshold == false);
401  unit_assert(diff.a_b.peptideHypothesis.size() == 1);
402  unit_assert(diff.b_a.peptideHypothesis.size() == 1);
403  unit_assert(diff.a_b.peptideHypothesis.back().peptideEvidencePtr->id == "pe_a");
404  unit_assert(diff.b_a.peptideHypothesis.back().peptideEvidencePtr->id == "pe_b");
405  unit_assert(diff.a_b.peptideHypothesis.back().spectrumIdentificationItemPtr.size() == 1);
406  unit_assert(diff.a_b.peptideHypothesis.back().spectrumIdentificationItemPtr.back()->id =="sii_a");
407  unit_assert(diff.b_a.peptideHypothesis.back().spectrumIdentificationItemPtr.size() == 1);
408  unit_assert(diff.b_a.peptideHypothesis.back().spectrumIdentificationItemPtr.back()->id == "sii_b");
409  unit_assert(diff.a_b.cvParams.size() == 1);
410  unit_assert(diff.b_a.cvParams.size() == 0);
412 
413 }

References pwiz::identdata::ProteinDetectionHypothesis::dbSequencePtr, diff(), MS_Mascot_expectation_value, os_, pwiz::identdata::ProteinDetectionHypothesis::passThreshold, pwiz::identdata::ProteinDetectionHypothesis::peptideHypothesis, pwiz::data::ParamContainer::set(), and unit_assert.

Referenced by test().

◆ testSpectrumIdentificationList()

void testSpectrumIdentificationList ( )

Definition at line 415 of file DiffTest.cpp.

416 {
417  if (os_) *os_ << "testSpectrumIdentificationList()\n";
418 
421  unit_assert(!diff);
422 
423  a.numSequencesSearched = 9;
424  b.numSequencesSearched = 5;
425 
426  MeasurePtr testMeasure(new Measure());
428  a.fragmentationTable.push_back(testMeasure);
429 
430  SpectrumIdentificationResultPtr testSIRPtr(new SpectrumIdentificationResult());
431  testSIRPtr->set(MS_Mascot_expectation_value);
432  a.spectrumIdentificationResult.push_back(testSIRPtr);
433 
434  diff(a,b);
435  if (os_) *os_ << diff_string<TextWriter>(diff) << endl;
436 
437  // a diff was found
438  unit_assert(diff);
439 
440  // and correctly
441  unit_assert_equal(diff.a_b.numSequencesSearched,9.0,epsilon);
442  unit_assert_equal(diff.b_a.numSequencesSearched,5.0,epsilon);
443  unit_assert(diff.a_b.fragmentationTable.size() == 1);
444  unit_assert(diff.b_a.fragmentationTable.size() == 0);
445  unit_assert(diff.a_b.fragmentationTable.back()->hasCVParam(MS_Mascot_expectation_value));
446  unit_assert(diff.a_b.spectrumIdentificationResult.size() == 1);
447  unit_assert(diff.b_a.spectrumIdentificationResult.size() == 0);
448  unit_assert(diff.a_b.spectrumIdentificationResult.back()->hasCVParam(MS_Mascot_expectation_value));
449 
450 }

References diff(), epsilon, pwiz::identdata::SpectrumIdentificationList::fragmentationTable, MS_Mascot_expectation_value, pwiz::identdata::SpectrumIdentificationList::numSequencesSearched, os_, pwiz::identdata::SpectrumIdentificationList::spectrumIdentificationResult, testMeasure(), unit_assert, and unit_assert_equal.

Referenced by test().

◆ testProteinDetectionList()

void testProteinDetectionList ( )

Definition at line 453 of file DiffTest.cpp.

454 {
455  if (os_) *os_ << "testProteinDetectionList()\n";
456 
459  unit_assert(!diff);
460 
461  a.proteinAmbiguityGroup.push_back(ProteinAmbiguityGroupPtr(new ProteinAmbiguityGroup()));
462  a.proteinAmbiguityGroup.back()->set(MS_Mascot_expectation_value, 0.0268534444565851);
463  a.set(MS_frag__z_ion);
464  b.set(MS_frag__b_ion);
465 
466  diff(a,b);
467  if (os_) *os_ << diff_string<TextWriter>(diff) << endl;
468 
469  // a diff was found
470  unit_assert(diff);
471 
472  // and correctly
473  unit_assert(diff.a_b.proteinAmbiguityGroup.size() == 1);
474  unit_assert(diff.b_a.proteinAmbiguityGroup.size() == 0);
475  unit_assert(diff.a_b.proteinAmbiguityGroup.back()->hasCVParam(MS_Mascot_expectation_value));
476  unit_assert(diff.a_b.cvParams.size() == 1);
477  unit_assert(diff.b_a.cvParams.size() == 1);
478  unit_assert(diff.a_b.hasCVParam(MS_frag__z_ion));
479  unit_assert(diff.b_a.hasCVParam(MS_frag__b_ion));
480 
481 }

References diff(), MS_frag__b_ion, MS_frag__z_ion, MS_Mascot_expectation_value, os_, pwiz::identdata::ProteinDetectionList::proteinAmbiguityGroup, pwiz::data::ParamContainer::set(), and unit_assert.

Referenced by test().

◆ testAnalysisData()

void testAnalysisData ( )

Definition at line 484 of file DiffTest.cpp.

485 {
486  if (os_) *os_ << "testAnalysisData()\n";
487 
488  AnalysisData a, b;
490  unit_assert(!diff);
491 
492  a.spectrumIdentificationList.push_back(boost::shared_ptr<SpectrumIdentificationList>(new SpectrumIdentificationList()));
493  a.spectrumIdentificationList.back()->numSequencesSearched = 5;
494  b.spectrumIdentificationList.push_back(boost::shared_ptr<SpectrumIdentificationList>(new SpectrumIdentificationList()));
495  b.spectrumIdentificationList.back()->numSequencesSearched = 15;
496 
497  a.proteinDetectionListPtr = ProteinDetectionListPtr(new ProteinDetectionList("rosemary"));
498  b.proteinDetectionListPtr = ProteinDetectionListPtr(new ProteinDetectionList("sage"));
499 
500  diff(a,b);
501  if (os_) *os_ << diff_string<TextWriter>(diff) << endl;
502 
503  // a diff was found
504  unit_assert(diff);
505 
506  // and correctly
507  unit_assert(diff.a_b.spectrumIdentificationList.size() == 1);
508  unit_assert(diff.b_a.spectrumIdentificationList.size() == 1);
509  unit_assert_equal(diff.a_b.spectrumIdentificationList.back()->numSequencesSearched, 5.0, epsilon);
510  unit_assert_equal(diff.b_a.spectrumIdentificationList.back()->numSequencesSearched, 15.0, epsilon);
511  unit_assert(diff.a_b.proteinDetectionListPtr.get());
512  unit_assert(diff.b_a.proteinDetectionListPtr.get());
513  unit_assert(diff.a_b.proteinDetectionListPtr->id == "rosemary");
514  unit_assert(diff.b_a.proteinDetectionListPtr->id == "sage");
515 
516 }

References diff(), epsilon, os_, pwiz::identdata::AnalysisData::proteinDetectionListPtr, pwiz::identdata::AnalysisData::spectrumIdentificationList, unit_assert, and unit_assert_equal.

Referenced by test().

◆ testSearchDatabase()

void testSearchDatabase ( )

Definition at line 519 of file DiffTest.cpp.

520 {
521  if (os_) *os_ << "testSearchDatabase()" << endl;
522 
523  SearchDatabase a, b;
525  unit_assert(!diff);
526 
527  a.version = "1.0";
528  b.version = "1.1";
529 
530  a.releaseDate = "20090726";
531  b.releaseDate = "20090727";
532 
533  a.numDatabaseSequences = 5;
534  b.numDatabaseSequences = 15;
535 
536  a.numResidues = 3;
537  b.numResidues = 13;
538 
541 
542  diff(a,b);
543  if (os_) *os_ << diff_string<TextWriter>(diff) << endl;
544 
545  // a diff was found
546  unit_assert(diff);
547 
548  // and correctly
549  unit_assert(diff.a_b.version == "1.0");
550  unit_assert(diff.b_a.version == "1.1");
551  unit_assert(diff.a_b.releaseDate == "20090726");
552  unit_assert(diff.b_a.releaseDate == "20090727");
553  unit_assert_equal(diff.a_b.numDatabaseSequences, 5.0, epsilon);
554  unit_assert_equal(diff.b_a.numDatabaseSequences, 15.0, epsilon);
555  unit_assert_equal(diff.a_b.numResidues, 3.0, epsilon);
556  unit_assert_equal(diff.b_a.numResidues, 13.0, epsilon);
557  unit_assert(!diff.a_b.fileFormat.empty());
558  unit_assert(diff.b_a.fileFormat.empty());
559  unit_assert(diff.a_b.fileFormat.cvid == MS_frag__z_ion);
560  unit_assert(diff.a_b.databaseName.cvParams.size() == 1);
561  unit_assert(diff.b_a.databaseName.cvParams.size() == 0);
562  unit_assert(diff.a_b.databaseName.hasCVParam(MS_frag__z_ion));
563 
564 }

References pwiz::data::CVParam::cvid, pwiz::identdata::SearchDatabase::databaseName, diff(), epsilon, pwiz::identdata::SearchDatabase::fileFormat, MS_frag__z_ion, pwiz::identdata::SearchDatabase::numDatabaseSequences, pwiz::identdata::SearchDatabase::numResidues, os_, pwiz::identdata::SearchDatabase::releaseDate, pwiz::data::ParamContainer::set(), unit_assert, unit_assert_equal, and pwiz::identdata::SearchDatabase::version.

Referenced by test().

◆ testSpectraData()

void testSpectraData ( )

Definition at line 567 of file DiffTest.cpp.

568 {
569  if (os_) *os_ << "testSpectraData()\n" << endl;
570 
571  SpectraData a, b;
573  unit_assert(!diff);
574 
575  a.location = "mahtomedi";
576  b.location = "white_bear_lake";
577  a.externalFormatDocumentation.push_back("wikipedia");
578  b.externalFormatDocumentation.push_back("ehow");
580 
581  diff(a,b);
582  if (os_) *os_ << diff_string<TextWriter>(diff) << endl;
583 
584  // a diff was found
585  unit_assert(diff);
586 
587  // and correctly
588  unit_assert(diff.a_b.location == "mahtomedi");
589  unit_assert(diff.b_a.location == "white_bear_lake");
590  unit_assert(diff.a_b.externalFormatDocumentation.size() == 1);
591  unit_assert(diff.b_a.externalFormatDocumentation.size() == 1);
592  unit_assert(diff.a_b.externalFormatDocumentation.back() == "wikipedia");
593  unit_assert(diff.b_a.externalFormatDocumentation.back() == "ehow");
594  unit_assert(!diff.a_b.fileFormat.empty());
595  unit_assert(diff.b_a.fileFormat.empty());
596  unit_assert(diff.a_b.fileFormat.cvid == MS_frag__b_ion);
597 
598 }

References pwiz::data::CVParam::cvid, diff(), pwiz::identdata::SpectraData::externalFormatDocumentation, pwiz::identdata::SpectraData::fileFormat, pwiz::identdata::SpectraData::location, MS_frag__b_ion, os_, and unit_assert.

Referenced by test().

◆ testSourceFile()

void testSourceFile ( )

Definition at line 601 of file DiffTest.cpp.

602 {
603  if (os_) *os_ << "testSourceFile()\n" << endl;
604 
605  SourceFile a,b;
607  unit_assert(!diff);
608 
609  a.location = "madison";
610  b.location = "middleton";
611  a.fileFormat.cvid = MS_wolf;
612  a.externalFormatDocumentation.push_back("The Idiot's Guide to External Formats");
613  b.externalFormatDocumentation.push_back("External Formats for Dummies");
615  b.set(MS_sample_name);
616 
617  diff(a,b);
618  if (os_) *os_ << diff_string<TextWriter>(diff) << endl;
619 
620  // a diff was found
621  unit_assert(diff);
622 
623  // and correctly
624  unit_assert(diff.a_b.location == "madison");
625  unit_assert(diff.b_a.location == "middleton");
626  unit_assert(!diff.a_b.fileFormat.empty());
627  unit_assert(diff.b_a.fileFormat.empty());
628  unit_assert(diff.a_b.fileFormat.cvid == MS_wolf);
629  unit_assert(diff.a_b.externalFormatDocumentation.size() == 1);
630  unit_assert(diff.b_a.externalFormatDocumentation.size() == 1);
631  unit_assert(diff.a_b.externalFormatDocumentation.back() == "The Idiot's Guide to External Formats");
632  unit_assert(diff.b_a.externalFormatDocumentation.back() == "External Formats for Dummies");
633  unit_assert(diff.a_b.cvParams.size() == 1);
634  unit_assert(diff.b_a.cvParams.size() == 1);
635  unit_assert(diff.a_b.hasCVParam(MS_sample_number));
636  unit_assert(diff.b_a.hasCVParam(MS_sample_name));
637 
638 }

References pwiz::data::CVParam::cvid, diff(), pwiz::identdata::SourceFile::externalFormatDocumentation, pwiz::identdata::SourceFile::fileFormat, pwiz::identdata::SourceFile::location, MS_sample_name, MS_sample_number, MS_wolf, os_, pwiz::data::ParamContainer::set(), and unit_assert.

Referenced by test().

◆ testInputs()

void testInputs ( )

Definition at line 641 of file DiffTest.cpp.

642 {
643 
644  if (os_) *os_ << "testInputs()\n";
645 
646  Inputs a, b;
648  unit_assert(!diff);
649 
650  a.sourceFile.push_back(SourceFilePtr(new SourceFile()));
651  a.sourceFile.back()->location = "Sector 9";
652 
653  a.searchDatabase.push_back(SearchDatabasePtr(new SearchDatabase()));
654  a.searchDatabase.back()->numDatabaseSequences = 100;
655 
656  a.spectraData.push_back(SpectraDataPtr(new SpectraData()));
657  a.spectraData.back()->location = "Cloud 9";
658 
659  diff(a,b);
660  if (os_) *os_ << diff_string<TextWriter>(diff) << endl;
661 
662  // a diff was found
663  unit_assert(diff);
664 
665  // and correctly
666  unit_assert(diff.a_b.sourceFile.size() == 1);
667  unit_assert(diff.b_a.sourceFile.size() == 0);
668  unit_assert(diff.a_b.sourceFile.back()->location == "Sector 9");
669  unit_assert(diff.a_b.searchDatabase.size() == 1);
670  unit_assert(diff.b_a.searchDatabase.size() == 0);
671  unit_assert_equal(diff.a_b.searchDatabase.back()->numDatabaseSequences, 100.0, epsilon);
672  unit_assert(diff.a_b.spectraData.size() == 1);
673  unit_assert(diff.b_a.spectraData.size() == 0);
674  unit_assert(diff.a_b.spectraData.back()->location == "Cloud 9");
675 
676 }

References diff(), epsilon, os_, pwiz::identdata::Inputs::searchDatabase, pwiz::identdata::Inputs::sourceFile, pwiz::identdata::Inputs::spectraData, unit_assert, and unit_assert_equal.

Referenced by test().

◆ testEnzyme()

void testEnzyme ( )

Definition at line 679 of file DiffTest.cpp.

680 {
681  if (os_) *os_ << "testEnzyme()\n";
682 
683  Enzyme a,b;
685  if (diff && os_) *os_ << diff_string<TextWriter>(diff) << endl;
686  unit_assert(!diff);
687 
688  a.id = "Donald Trump";
689  b.id = "Donald Duck";
690  a.nTermGain = "y";
691  b.nTermGain = "n";
692  a.cTermGain = "y";
693  b.cTermGain = "n";
695  b.terminalSpecificity = proteome::Digestion::FullySpecific;
696  a.missedCleavages = 1;
697  b.missedCleavages = 5;
698  a.minDistance = 2;
699  b.minDistance = 4;
700  a.siteRegexp = "^";
701  b.siteRegexp = "$";
703 
704  diff(a,b);
705  if (os_) *os_ << diff_string<TextWriter>(diff) << endl;
706 
707  // a diff was found
708  unit_assert(diff);
709 
710  // and correctly
711  unit_assert(diff.a_b.id == "Donald Trump");
712  unit_assert(diff.b_a.id == "Donald Duck");
713  unit_assert(diff.a_b.nTermGain == "y");
714  unit_assert(diff.b_a.nTermGain == "n");
715  unit_assert(diff.a_b.cTermGain == "y");
716  unit_assert(diff.a_b.terminalSpecificity == proteome::Digestion::SemiSpecific);
717  unit_assert(diff.b_a.terminalSpecificity == proteome::Digestion::FullySpecific);
718  unit_assert(diff.b_a.cTermGain == "n");
719  unit_assert(diff.a_b.missedCleavages == 1);
720  unit_assert(diff.b_a.missedCleavages == 5);
721  unit_assert(diff.a_b.minDistance == 2);
722  unit_assert(diff.b_a.minDistance == 4);
723  unit_assert(diff.a_b.siteRegexp == "^");
724  unit_assert(diff.b_a.siteRegexp == "$");
725  unit_assert(diff.a_b.enzymeName.cvParams.size() == 1);
726  unit_assert(diff.b_a.enzymeName.cvParams.size() == 0);
727  unit_assert(diff.a_b.enzymeName.hasCVParam(MS_Trypsin));
728 
729 }

References pwiz::identdata::Enzyme::cTermGain, diff(), 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 unit_assert.

Referenced by test().

◆ testEnzymes()

void testEnzymes ( )

Definition at line 732 of file DiffTest.cpp.

733 {
734  if (os_) *os_ << "testEnzymes()\n";
735 
736  Enzymes a, b;
738  if (diff && os_) *os_ << diff_string<TextWriter>(diff) << endl;
739 
740  a.independent = "indep";
741  b.enzymes.push_back(EnzymePtr(new Enzyme()));
742 }

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

Referenced by test().

◆ testMassTable()

void testMassTable ( )

Definition at line 745 of file DiffTest.cpp.

746 {
747  if (os_) *os_ << "testMassTable()\n";
748 
749  MassTable a, b;
750 
751  a.id = "id";
752  a.msLevel.push_back(1);
753 
754  ResiduePtr c(new Residue());
755  a.residues.push_back(c);
756 
757  AmbiguousResiduePtr d(new AmbiguousResidue());
758  a.ambiguousResidue.push_back(d);
759 
760  b = a;
762  unit_assert(!diff);
763 
764  b.id = "b_id";
765  diff(a, b);
766  unit_assert(diff);
767 
768  a.id = "b_id";
769  b.msLevel.push_back(2);
770  diff(a, b);
771  unit_assert(diff);
772 
773  b.msLevel.push_back(2);
774  b.residues.clear();
775  diff(a, b);
776  unit_assert(diff);
777 
778  a.residues.clear();
779  b.ambiguousResidue.clear();
780  diff(a, b);
781  unit_assert(diff);
782 }

References pwiz::identdata::MassTable::ambiguousResidue, diff(), pwiz::identdata::MassTable::id, pwiz::identdata::MassTable::msLevel, os_, pwiz::identdata::MassTable::residues, and unit_assert.

Referenced by test().

◆ testResidue()

void testResidue ( )

Definition at line 785 of file DiffTest.cpp.

786 {
787  if (os_) *os_ << "testResidue()\n";
788 
789  Residue a, b;
790 
791  a.code = 'A';
792  a.mass = 1.0;
793  b = a;
794 
796  unit_assert(!diff);
797 
798  b.code = 'C';
799  b.mass = 2.0;
800 
801  diff(a, b);
802  if (os_) *os_ << diff_string<TextWriter>(diff) << endl;
803 
804  unit_assert(diff);
805 
806  unit_assert(diff.a_b.code == 'A');
807  unit_assert(diff.b_a.code == 'C');
808  unit_assert_equal(diff.a_b.mass, 1.0, epsilon);
809  unit_assert_equal(diff.b_a.mass, 1.0, epsilon);
810 }

References pwiz::identdata::Residue::code, diff(), epsilon, pwiz::identdata::Residue::mass, os_, unit_assert, and unit_assert_equal.

Referenced by test().

◆ testAmbiguousResidue()

void testAmbiguousResidue ( )

Definition at line 813 of file DiffTest.cpp.

814 {
815  if (os_) *os_ << "testAmbiguousResidue()\n";
816 
817  AmbiguousResidue a, b;
818 
819  a.code = 'Z';
821  b = a;
822 
824  unit_assert(!diff);
825 
826  b.code = 'B';
828 
829  diff(a, b);
830  if (os_) *os_ << diff_string<TextWriter>(diff) << endl;
831 
832  unit_assert(diff);
833 
834  unit_assert(diff.a_b.code == 'Z');
835  unit_assert(diff.b_a.code == 'B');
836  unit_assert(diff.a_b.cvParam(MS_alternate_single_letter_codes).value == "E Q");
837  unit_assert(diff.b_a.cvParam(MS_alternate_single_letter_codes).value == "D N");
838 }

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

Referenced by test().

◆ testFilter()

void testFilter ( )

Definition at line 841 of file DiffTest.cpp.

842 {
843  if (os_) *os_ << "testFilter()\n";
844 
845  Filter a, b;
846 
850  b = a;
851 
853  unit_assert(!diff);
854 
855  b.filterType.clear();
857  b.include.clear();
859  b.exclude.clear();
861 
862  diff(a, b);
863  if (os_) *os_ << diff_string<TextWriter>(diff) << endl;
864 
865  unit_assert(diff);
866 
867  unit_assert(diff.a_b.filterType.hasCVParam(MS_DB_filter_taxonomy));
868  unit_assert(diff.b_a.filterType.hasCVParam(MS_database_filtering));
869  unit_assert(diff.a_b.include.hasCVParam(MS_DB_PI_filter));
870  unit_assert(diff.b_a.include.hasCVParam(MS_DB_filter_on_accession_numbers));
871  unit_assert(diff.a_b.exclude.hasCVParam(MS_translation_table));
872  unit_assert(diff.b_a.exclude.hasCVParam(MS_DB_MW_filter));
873 }

References pwiz::data::ParamContainer::clear(), diff(), pwiz::identdata::Filter::exclude, pwiz::identdata::Filter::filterType, pwiz::identdata::Filter::include, MS_database_filtering, MS_DB_filter_on_accession_numbers, MS_DB_filter_taxonomy, MS_DB_MW_filter, MS_DB_PI_filter, MS_translation_table, os_, pwiz::data::ParamContainer::set(), and unit_assert.

Referenced by test().

◆ testDatabaseTranslation()

void testDatabaseTranslation ( )

Definition at line 876 of file DiffTest.cpp.

877 {
878  if (os_) *os_ << "testDatabaseTranslation()\n";
879 
880  DatabaseTranslation a, b;
881 
882  a.frames.push_back(1);
883  a.frames.push_back(2);
884 
885  TranslationTablePtr tt(new TranslationTable("TT_1", "TT_1"));
886  tt->set(MS_translation_table, "GATTACA");
887  tt->set(MS_translation_table_description, "http://somewhere.com");
888  a.translationTable.push_back(tt);
889  b = a;
890 
892  unit_assert(!diff);
893 
894  b.translationTable.clear();
895 
896  diff(a, b);
897  if (os_) *os_ << diff_string<TextWriter>(diff) << endl;
898 
899  unit_assert(diff);
900 
901  unit_assert_operator_equal(0, diff.a_b.frames.size());
902  unit_assert_operator_equal(0, diff.b_a.frames.size());
903  unit_assert_operator_equal(1, diff.a_b.translationTable.size());
904  unit_assert_operator_equal(0, diff.b_a.translationTable.size());
905 
906  b = a;
907  b.frames.push_back(3);
908 
909  diff(a, b);
910  if (os_) *os_ << diff_string<TextWriter>(diff) << endl;
911 
912  unit_assert(diff);
913 
914  unit_assert_operator_equal(0, diff.a_b.frames.size());
915  unit_assert_operator_equal(1, diff.b_a.frames.size());
916  unit_assert_operator_equal(0, diff.a_b.translationTable.size());
917  unit_assert_operator_equal(0, diff.b_a.translationTable.size());
918 }

References diff(), pwiz::identdata::DatabaseTranslation::frames, MS_translation_table, MS_translation_table_description, os_, pwiz::identdata::DatabaseTranslation::translationTable, unit_assert, and unit_assert_operator_equal.

Referenced by test().

◆ testSpectrumIdentificationProtocol()

void testSpectrumIdentificationProtocol ( )

Definition at line 921 of file DiffTest.cpp.

922 {
923  if (os_) *os_ << "testSpectrumIdentificationProtocol()\n";
924 
925  SpectrumIdentificationProtocol a("a_id", "a_name"), b;
926 
927  a.analysisSoftwarePtr = AnalysisSoftwarePtr(new AnalysisSoftware("a_as"));
928 
929  a.searchType.cvid = MS_pmf_search;
930  a.additionalSearchParams.set(MS_SEQUEST_CleavesAt, "cleavage");
931  SearchModificationPtr smp(new SearchModification());
932  smp->fixedMod = true;
933  a.modificationParams.push_back(smp);
934  a.enzymes.enzymes.push_back(EnzymePtr(new Enzyme("a_enzyme")));
935  a.massTable.push_back(MassTablePtr(new MassTable("mt_id")));
936  a.fragmentTolerance.set(MS_search_tolerance_plus_value, 1.0);
937  a.parentTolerance.set(MS_search_tolerance_plus_value, 2.0);
938  a.threshold.set(MS_search_tolerance_minus_value, 3.0);
939  FilterPtr filter = FilterPtr(new Filter());
940  filter->filterType.set(MS_FileFilter);
941  a.databaseFilters.push_back(filter);
942  a.databaseTranslation = DatabaseTranslationPtr(new DatabaseTranslation());
943  b = a;
944 
946  unit_assert(!diff);
947 
948  b.id = "b_id";
949  b.name = "b_name";
950 
951  diff(a, b);
952  if (os_) *os_ << diff_string<TextWriter>(diff) << endl;
953 
954  // TODO debug removal - put it back
955  //unit_assert(diff);
956 
957  b.analysisSoftwarePtr = AnalysisSoftwarePtr(new AnalysisSoftware("b_as"));
958 
961  b.modificationParams.clear();
962  b.enzymes.enzymes.clear();
963  b.massTable.clear();
967  b.databaseFilters.clear();
968 
969  diff(a, b);
970  if (os_) *os_ << diff_string<TextWriter>(diff) << endl;
971 
972  unit_assert(diff);
973 }

References pwiz::identdata::SpectrumIdentificationProtocol::additionalSearchParams, pwiz::identdata::SpectrumIdentificationProtocol::analysisSoftwarePtr, pwiz::data::CVParam::cvid, pwiz::identdata::SpectrumIdentificationProtocol::databaseFilters, diff(), pwiz::identdata::Enzymes::enzymes, pwiz::identdata::SpectrumIdentificationProtocol::enzymes, ralab::base::filter::filter(), pwiz::identdata::SpectrumIdentificationProtocol::fragmentTolerance, pwiz::identdata::Identifiable::id, pwiz::identdata::SpectrumIdentificationProtocol::massTable, pwiz::identdata::SpectrumIdentificationProtocol::modificationParams, MS_FileFilter, MS_ms_ms_search, MS_pmf_search, MS_search_tolerance_minus_value, MS_search_tolerance_plus_value, MS_SEQUEST_CleavesAt, pwiz::identdata::Identifiable::name, os_, pwiz::identdata::SpectrumIdentificationProtocol::parentTolerance, pwiz::identdata::SpectrumIdentificationProtocol::searchType, pwiz::data::ParamContainer::set(), pwiz::identdata::SpectrumIdentificationProtocol::threshold, and unit_assert.

Referenced by test().

◆ testProteinDetectionProtocol()

void testProteinDetectionProtocol ( )

Definition at line 976 of file DiffTest.cpp.

977 {
978  if (os_) *os_ << "testProteinDetectionProtocol()\n";
979 
980  ProteinDetectionProtocol a("a_id", "a_name"), b;
981 
982  a.analysisSoftwarePtr = AnalysisSoftwarePtr(new AnalysisSoftware());
983 
984  a.analysisParams.set(MS_low_intensity_threshold);
985  a.threshold.set(MS_low_intensity_threshold);
986 
987  b = a;
988 
990  unit_assert(!diff);
991 
992  b.id = "b_id";
993  b.name = "b_name";
994 
995  diff(a, b);
996  if (os_) *os_ << diff_string<TextWriter>(diff) << endl;
997 
998  //unit_assert(diff);
999 }

References pwiz::identdata::ProteinDetectionProtocol::analysisSoftwarePtr, diff(), pwiz::identdata::Identifiable::id, MS_low_intensity_threshold, pwiz::identdata::Identifiable::name, os_, and unit_assert.

Referenced by test().

◆ testAnalysisProtocolCollection()

void testAnalysisProtocolCollection ( )

Definition at line 1002 of file DiffTest.cpp.

1003 {
1004  if (os_) *os_ << "testAnalysisProtocolCollection()\n";
1005 }

References os_.

Referenced by test().

◆ testContact()

void testContact ( )

Definition at line 1008 of file DiffTest.cpp.

1009 {
1010  if (os_) *os_ << "testContact()\n";
1011 
1012  Contact a("a_id", "a_name"), b;
1013 
1014  a.set(MS_contact_address, "address");
1015  a.set(MS_contact_phone_number, "phone");
1016  a.set(MS_contact_email, "email");
1017  a.set(MS_contact_fax_number, "fax");
1018  a.set(MS_contact_toll_free_phone_number, "tollFreePhone");
1019 
1020  b = a;
1021 
1023  unit_assert(!diff);
1024 
1025  b.id = "b_id";
1026  b.name = "b_name";
1027 
1028  diff(a, b);
1029  if (os_) *os_ << diff_string<TextWriter>(diff) << endl;
1030 
1031  unit_assert(diff);
1032 
1033  b.set(MS_contact_address, "b_address");
1034  b.set(MS_contact_phone_number, "b_phone");
1035  b.set(MS_contact_email, "b_email");
1036  b.set(MS_contact_fax_number, "b_fax");
1037  b.set(MS_contact_toll_free_phone_number, "b_tollFreePhone");
1038 
1039 
1040  diff(a, b);
1041  if (os_) *os_ << diff_string<TextWriter>(diff) << endl;
1042 
1043  unit_assert(diff);
1044 }

References diff(), pwiz::identdata::IdentifiableParamContainer::id, MS_contact_address, MS_contact_email, MS_contact_fax_number, MS_contact_phone_number, MS_contact_toll_free_phone_number, pwiz::identdata::IdentifiableParamContainer::name, os_, pwiz::data::ParamContainer::set(), and unit_assert.

Referenced by test().

◆ testPerson()

void testPerson ( )

Definition at line 1047 of file DiffTest.cpp.

1048 {
1049  if (os_) *os_ << "testPerson()\n";
1050 
1051  Person a, b;
1052 
1053  a.lastName = "last";
1054  a.firstName = "first";
1055  a.midInitials = "mi";
1056 
1057  a.affiliations.push_back(OrganizationPtr(new Organization("org")));
1058 
1059  b = a;
1061  unit_assert(!diff);
1062 
1063  b.lastName = "smith";
1064  diff(a, b);
1065  unit_assert(diff);
1066 
1067  a.lastName = "smith";
1068  b.firstName = "john";
1069  diff(a, b);
1070  unit_assert(diff);
1071 
1072  a.firstName = "john";
1073  b.midInitials = "j.j.";
1074  diff(a, b);
1075  unit_assert(diff);
1076 
1077  a.midInitials = "j.j.";
1078  b.affiliations.clear();
1079  diff(a, b);
1080  unit_assert(diff);
1081 }

References pwiz::identdata::Person::affiliations, diff(), pwiz::identdata::Person::firstName, pwiz::identdata::Person::lastName, pwiz::identdata::Person::midInitials, os_, and unit_assert.

Referenced by test().

◆ testOrganization()

void testOrganization ( )

Definition at line 1084 of file DiffTest.cpp.

1085 {
1086  if (os_) *os_ << "testOrganization()\n";
1087 }

References os_.

Referenced by test().

◆ testBibliographicReference()

void testBibliographicReference ( )

Definition at line 1090 of file DiffTest.cpp.

1091 {
1092  if (os_) *os_ << "testBibliographicReference()\n";
1093 }

References os_.

Referenced by test().

◆ testProteinDetection()

void testProteinDetection ( )

Definition at line 1096 of file DiffTest.cpp.

1097 {
1098  if (os_) *os_ << "testProteinDetection()\n";
1099 }

References os_.

Referenced by test().

◆ testSpectrumIdentification()

void testSpectrumIdentification ( )

Definition at line 1102 of file DiffTest.cpp.

1103 {
1104  if (os_) *os_ << "testSpectrumIdentification()\n";
1105 }

References os_.

Referenced by test().

◆ testAnalysisCollection()

void testAnalysisCollection ( )

Definition at line 1108 of file DiffTest.cpp.

1109 {
1110  if (os_) *os_ << "testAnalysisCollection()\n";
1111 
1112 }

References os_.

Referenced by test().

◆ testDBSequence()

void testDBSequence ( )

Definition at line 1115 of file DiffTest.cpp.

1116 {
1117  if (os_) *os_ << "testDBSequence()\n";
1118 }

References os_.

Referenced by test().

◆ testModification()

void testModification ( )

Definition at line 1121 of file DiffTest.cpp.

1122 {
1123  if (os_) *os_ << "testModification()\n";
1124 }

References os_.

Referenced by test().

◆ testSubstitutionModification()

void testSubstitutionModification ( )

Definition at line 1127 of file DiffTest.cpp.

1128 {
1129  if (os_) *os_ << "testSubstitutionModification()\n";
1130 }

References os_.

Referenced by test().

◆ testPeptide()

void testPeptide ( )

Definition at line 1133 of file DiffTest.cpp.

1134 {
1135  if (os_) *os_ << "testPeptide()\n";
1136 }

References os_.

Referenced by test().

◆ testSequenceCollection()

void testSequenceCollection ( )

Definition at line 1139 of file DiffTest.cpp.

1140 {
1141  if (os_) *os_ << "testSequenceCollection()\n";
1142 }

References os_.

Referenced by test().

◆ testSampleComponent()

void testSampleComponent ( )

Definition at line 1145 of file DiffTest.cpp.

1146 {
1147  if (os_) *os_ << "testSampleComponent()\n";
1148 }

References os_.

Referenced by test().

◆ testSample()

void testSample ( )

Definition at line 1151 of file DiffTest.cpp.

1152 {
1153  if (os_) *os_ << "testSample()\n";
1154 
1155  Sample a, b;
1156 
1157  a.contactRole.push_back(ContactRolePtr(new ContactRole(MS_role_type, ContactPtr(new Person("contactPtr")))));
1158  b = a;
1159 
1161  if (os_) *os_ << diff_string<TextWriter>(diff) << endl;
1162  unit_assert(!diff);
1163 
1164  b.contactRole.back().reset(new ContactRole(MS_role_type, ContactPtr(new Person("fer_rehto"))));
1165  b.set(MS_sample_name);
1166 
1167  diff(a, b);
1168  if (os_) *os_ << diff_string<TextWriter>(diff) << endl;
1169 
1170  // a diff was found
1171  unit_assert(diff);
1172 
1173  // and correctly
1174  unit_assert(diff.a_b.cvParams.size() == 0);
1175  unit_assert(diff.b_a.cvParams.size() == 1);
1176  unit_assert(diff.a_b.contactRole.size() == 1);
1177  unit_assert(diff.b_a.contactRole.size() == 1);
1178  unit_assert(diff.a_b.contactRole.back().get());
1179  unit_assert(diff.b_a.contactRole.back().get());
1180  unit_assert(diff.a_b.contactRole.back()->contactPtr.get());
1181  unit_assert(diff.b_a.contactRole.back()->contactPtr.get());
1182  unit_assert(diff.a_b.contactRole.back()->contactPtr->id == "contactPtr");
1183  unit_assert(diff.b_a.contactRole.back()->contactPtr->id == "fer_rehto");
1184  unit_assert(diff.b_a.hasCVParam(MS_sample_name));
1185 }

References pwiz::identdata::Sample::contactRole, diff(), MS_role_type, MS_sample_name, os_, pwiz::data::ParamContainer::set(), and unit_assert.

Referenced by test().

◆ testSpectrumIdentificationItem()

void testSpectrumIdentificationItem ( )

Definition at line 1188 of file DiffTest.cpp.

1189 {
1190  if (os_) *os_ << "testSpectrumIdentificationItem()\n";
1191 }

References os_.

Referenced by test().

◆ testSpectrumIdentificationResult()

void testSpectrumIdentificationResult ( )

Definition at line 1194 of file DiffTest.cpp.

1195 {
1196  if (os_) *os_ << "testSpectrumIdentificationResult()\n";
1197 }

References os_.

Referenced by test().

◆ testAnalysisSampleCollection()

void testAnalysisSampleCollection ( )

Definition at line 1200 of file DiffTest.cpp.

1201 {
1202  if (os_) *os_ << "testAnalysisSampleCollection()\n";
1203 }

References os_.

Referenced by test().

◆ testProvider()

void testProvider ( )

Definition at line 1206 of file DiffTest.cpp.

1207 {
1208  if (os_) *os_ << "testProvider()\n";
1209 }

References os_.

Referenced by test().

◆ testContactRole()

void testContactRole ( )

Definition at line 1212 of file DiffTest.cpp.

1213 {
1214  if (os_) *os_ << "testContactRole()\n";
1215 
1216  ContactRole a, b;
1217 
1218  a.contactPtr = ContactPtr(new Person("cid", "cname"));
1220 
1221  b = a;
1222 
1224  if (os_) *os_ << diff_string<TextWriter>(diff) << endl;
1225  unit_assert(!diff);
1226 
1227  b.contactPtr = ContactPtr(new Organization("cid2", "cname2"));
1228 
1229  diff(a, b);
1230 
1231  if (os_) *os_ << diff_string<TextWriter>(diff) << endl;
1232  unit_assert(diff);
1233 
1234  unit_assert(diff.b_a.contactPtr.get());
1235  unit_assert(diff.a_b.contactPtr.get());
1236  unit_assert(diff.a_b.contactPtr->id == "cid");
1237  unit_assert(diff.b_a.contactPtr->id == "cid2");
1238  unit_assert(diff.a_b.contactPtr->name == "cname");
1239  unit_assert(diff.b_a.contactPtr->name == "cname2");
1240 }

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

Referenced by test().

◆ testAnalysisSoftware()

void testAnalysisSoftware ( )

Definition at line 1243 of file DiffTest.cpp.

1244 {
1245  if (os_) *os_ << "testAnalysisSoftware()\n";
1246 
1247  AnalysisSoftware a, b;
1248 
1250  unit_assert(!diff);
1251 
1252  // a.version
1253  a.version="version";
1254  // b.contactRole
1255  // a.softwareName
1256  // b.URI
1257  b.URI="URI";
1258  // a.customizations
1259  a.customizations="customizations";
1260 
1261  diff(a, b);
1262 }

References pwiz::identdata::AnalysisSoftware::customizations, diff(), os_, unit_assert, pwiz::identdata::AnalysisSoftware::URI, and pwiz::identdata::AnalysisSoftware::version.

Referenced by test().

◆ testDataCollection()

void testDataCollection ( )

Definition at line 1265 of file DiffTest.cpp.

1266 {
1267  if (os_) *os_ << "testDataCollection()\n";
1268 
1269  DataCollection a, b;
1271  unit_assert(!diff);
1272 
1273  // a.inputs
1274  a.inputs.sourceFile.push_back(SourceFilePtr(new SourceFile()));
1275  b.inputs.searchDatabase.push_back(SearchDatabasePtr(new SearchDatabase()));
1276  a.inputs.spectraData.push_back(SpectraDataPtr(new SpectraData()));
1277 
1278  // b.analysisData
1279  b.analysisData.spectrumIdentificationList.push_back(SpectrumIdentificationListPtr(new SpectrumIdentificationList()));
1280 
1281  diff(a, b);
1282  if (os_) *os_ << diff_string<TextWriter>(diff) << endl;
1283 
1284 }

References pwiz::identdata::DataCollection::analysisData, diff(), pwiz::identdata::DataCollection::inputs, os_, pwiz::identdata::Inputs::searchDatabase, pwiz::identdata::Inputs::sourceFile, pwiz::identdata::Inputs::spectraData, pwiz::identdata::AnalysisData::spectrumIdentificationList, and unit_assert.

Referenced by test().

◆ testIdentData()

void testIdentData ( )

Definition at line 1287 of file DiffTest.cpp.

1288 {
1289  if (os_) *os_ << "testIdentData()\n";
1290 
1291  IdentData a, b;
1292 
1295 
1297  unit_assert(!diff);
1298 
1299  a.cvs.push_back(CV());
1300  b.analysisSoftwareList.push_back(AnalysisSoftwarePtr(new AnalysisSoftware));
1301  a.auditCollection.push_back(ContactPtr(new Contact()));
1302  b.bibliographicReference.push_back(BibliographicReferencePtr(new BibliographicReference));
1303  // a.analysisSampleCollection
1304  // b.sequenceCollection
1305  // a.analysisCollection
1306  // b.analysisProtocolCollection
1307  // a.dataCollection
1308  // b.bibliographicReference
1309 
1310  diff(a, b);
1311  if (os_) *os_ << diff_string<TextWriter>(diff) << endl;
1312 
1313  unit_assert(diff);
1314 
1315  unit_assert(diff.a_b.cvs.size() == 1);
1316  unit_assert(diff.b_a.cvs.empty());
1317 }

References pwiz::identdata::IdentData::analysisSoftwareList, pwiz::identdata::IdentData::auditCollection, pwiz::identdata::IdentData::bibliographicReference, pwiz::identdata::IdentData::cvs, diff(), pwiz::identdata::examples::initializeTiny(), os_, and unit_assert.

Referenced by test().

◆ test()

void test ( )

Definition at line 1319 of file DiffTest.cpp.

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

Referenced by main().

◆ main()

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

Definition at line 1371 of file DiffTest.cpp.

1372 {
1373  TEST_PROLOG_EX(argc, argv, "_IdentData")
1374 
1375  try
1376  {
1377  if (argc>1 && !strcmp(argv[1],"-v")) os_ = &cout;
1378  test();
1379  }
1380  catch (exception& e)
1381  {
1382  TEST_FAILED(e.what())
1383  }
1384  catch (...)
1385  {
1386  TEST_FAILED("Caught unknown exception.")
1387  }
1388 
1389  TEST_EPILOG
1390 }

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

Variable Documentation

◆ os_

ostream* os_ = 0

Definition at line 40 of file DiffTest.cpp.

Referenced by main(), testAmbiguousResidue(), testAnalysisCollection(), testAnalysisData(), testAnalysisProtocolCollection(), testAnalysisSampleCollection(), testAnalysisSoftware(), testBibliographicReference(), testBinaryDataArray(), testBinaryDataOnly(), testChromatogram(), testChromatogramList(), testComponent(), testComponentList(), testCompound(), testConfiguration(), testContact(), testContactRole(), testDatabaseTranslation(), testDataCollection(), testDataProcessing(), testDBSequence(), testEnzyme(), testEnzymes(), testEvidence(), testFileContent(), testFileDescription(), testFilter(), testFragmentArray(), testIdentData(), testIdentifiable(), testInputs(), testInstrument(), testInstrumentConfiguration(), testIonType(), testMassTable(), testMaxPrecisionDiff(), testMeasure(), testModification(), testMSData(), testMSDiffUpdate(), testOrganization(), testPeptide(), testPeptideEvidence(), testPeptideHypothesis(), testPerson(), testPrecursor(), testPrediction(), testProcessingMethod(), testProduct(), testProtein(), testProteinAmbiguityGroup(), testProteinDetection(), testProteinDetectionHypothesis(), testProteinDetectionList(), testProteinDetectionProtocol(), testProteinList(), testProteomeData(), testProvider(), testResidue(), testRetentionTime(), testRun(), testSample(), testSampleComponent(), testScan(), testScanList(), testScanSettings(), testSearchDatabase(), testSearchModification(), testSequenceCollection(), testSoftware(), testSource(), testSourceFile(), testSpectraData(), testSpectrum(), testSpectrumIdentification(), testSpectrumIdentificationItem(), testSpectrumIdentificationList(), testSpectrumIdentificationProtocol(), testSpectrumIdentificationResult(), testSpectrumList(), testSubstitutionModification(), testTarget(), testTraData(), testTransition(), and testValidation().

◆ epsilon

const double epsilon = numeric_limits<double>::epsilon()
MS_product_ion_m_z
MS_product_ion_m_z
product ion m/z: The m/z of the product ion.
Definition: cv.hpp:4101
testDataCollection
void testDataCollection()
Definition: DiffTest.cpp:1265
os_
ostream * os_
Definition: DiffTest.cpp:40
pwiz::identdata::SpectrumIdentificationProtocol::modificationParams
std::vector< SearchModificationPtr > modificationParams
Definition: IdentData.hpp:554
pwiz::identdata::Enzyme::nTermGain
std::string nTermGain
Definition: IdentData.hpp:413
pwiz::identdata::SpectrumIdentificationItem
Implementation of SpectrumIdentificationItemType from the mzIdentML schema.
Definition: IdentData.hpp:669
MS_product_ion_intensity
MS_product_ion_intensity
product ion intensity: The intensity of a single product ion.
Definition: cv.hpp:4107
pwiz::identdata::Person
Implementation of PersonType from the mzIdentML schema.
Definition: IdentData.hpp:152
testPeptide
void testPeptide()
Definition: DiffTest.cpp:1133
pwiz::identdata::Person::lastName
std::string lastName
Definition: IdentData.hpp:157
pwiz::identdata::DatabaseTranslation::translationTable
std::vector< TranslationTablePtr > translationTable
Definition: IdentData.hpp:533
MS_frag__z_ion
MS_frag__z_ion
frag: z ion: Fragmentation information, type of product: z ion.
Definition: cv.hpp:4122
testSpectrumIdentification
void testSpectrumIdentification()
Definition: DiffTest.cpp:1102
pwiz::identdata::FragmentArray::measurePtr
MeasurePtr measurePtr
Definition: IdentData.hpp:592
pwiz::identdata::PeptideEvidence
Implementation of PeptideEvidenceType from the mzIdentML schema.
Definition: IdentData.hpp:626
pwiz::identdata::MassTable::ambiguousResidue
std::vector< AmbiguousResiduePtr > ambiguousResidue
Definition: IdentData.hpp:488
pwiz::identdata::SpectraData::location
std::string location
Definition: IdentData.hpp:702
pwiz::identdata::PeptideEvidence::dbSequencePtr
DBSequencePtr dbSequencePtr
Definition: IdentData.hpp:632
testProteinDetection
void testProteinDetection()
Definition: DiffTest.cpp:1096
pwiz::data::ParamContainer::clear
void clear()
clears the collections
testSearchModification
void testSearchModification()
Definition: DiffTest.cpp:195
pwiz::identdata::DiffConfig
Definition: Diff.hpp:395
testSample
void testSample()
Definition: DiffTest.cpp:1151
pwiz::identdata::Residue
Implementation of ResidueType from the mzIdentML schema.
Definition: IdentData.hpp:445
testProteinDetectionHypothesis
void testProteinDetectionHypothesis()
Definition: DiffTest.cpp:366
pwiz::identdata::SpectrumIdentificationProtocol::additionalSearchParams
ParamContainer additionalSearchParams
Definition: IdentData.hpp:553
pwiz::identdata::MassTable::msLevel
std::vector< int > msLevel
Definition: IdentData.hpp:485
testSearchDatabase
void testSearchDatabase()
Definition: DiffTest.cpp:519
testSampleComponent
void testSampleComponent()
Definition: DiffTest.cpp:1145
pwiz::identdata::SearchDatabase::numDatabaseSequences
long numDatabaseSequences
Definition: IdentData.hpp:278
testSpectrumIdentificationProtocol
void testSpectrumIdentificationProtocol()
Definition: DiffTest.cpp:921
unit_assert_equal
#define unit_assert_equal(x, y, epsilon)
Definition: unit.hpp:99
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::cv::CV
Information about an ontology or CV source and a short 'lookup' tag to refer to.
Definition: cv.hpp:14915
pwiz::identdata::AmbiguousResidue
Implementation of AmbiguousResidueType from the mzIdentML schema.
Definition: IdentData.hpp:463
testMassTable
void testMassTable()
Definition: DiffTest.cpp:745
pwiz::identdata::Enzyme::missedCleavages
int missedCleavages
Definition: IdentData.hpp:416
pwiz::identdata::SpectrumIdentificationResult
Implementation of SpectrumIdentificationResultType from the mzIdentML schema.
Definition: IdentData.hpp:722
MS_contact_toll_free_phone_number
MS_contact_toll_free_phone_number
contact toll-free phone number: Toll-free phone number of the contact person or organization.
Definition: cv.hpp:5685
pwiz::identdata::Enzyme::siteRegexp
std::string siteRegexp
Definition: IdentData.hpp:419
pwiz::identdata::ProteinDetectionHypothesis
Implementation of ProteinDetectionHypothesisType from the mzIdentML schema.
Definition: IdentData.hpp:819
testSpectrumIdentificationItem
void testSpectrumIdentificationItem()
Definition: DiffTest.cpp:1188
MS_role_type
MS_role_type
role type: Role of a Person or Organization.
Definition: cv.hpp:4218
pwiz::identdata::Filter::exclude
ParamContainer exclude
Definition: IdentData.hpp:505
pwiz::identdata::SpectraData
Implementation of SpectraDataType from the mzIdentML schema.
Definition: IdentData.hpp:697
testDatabaseTranslation
void testDatabaseTranslation()
Definition: DiffTest.cpp:876
testSequenceCollection
void testSequenceCollection()
Definition: DiffTest.cpp:1139
testFragmentArray
void testFragmentArray()
Definition: DiffTest.cpp:90
pwiz::identdata::IonType::fragmentArray
std::vector< FragmentArrayPtr > fragmentArray
Definition: IdentData.hpp:613
UNIMOD_Gln__pyro_Glu
UNIMOD_Gln__pyro_Glu
Gln->pyro-Glu: Pyro-glu from Q.
Definition: cv.hpp:9435
testAnalysisData
void testAnalysisData()
Definition: DiffTest.cpp:484
pwiz::identdata::IdentData::bibliographicReference
std::vector< BibliographicReferencePtr > bibliographicReference
Definition: IdentData.hpp:1022
pwiz::identdata::SpectrumIdentificationProtocol::enzymes
Enzymes enzymes
Definition: IdentData.hpp:555
pwiz::identdata::SpectrumIdentificationList::numSequencesSearched
long numSequencesSearched
Definition: IdentData.hpp:748
MS_DB_MW_filter
MS_DB_MW_filter
DB MW filter: Filtering applied specifically by protein molecular weight, specified as either a range...
Definition: cv.hpp:3564
testProvider
void testProvider()
Definition: DiffTest.cpp:1206
MS_sample_name
MS_sample_name
sample name: A reference string relevant to the sample under study.
Definition: cv.hpp:267
testOrganization
void testOrganization()
Definition: DiffTest.cpp:1084
pwiz::identdata::TranslationTable
Implementation of TranslationTableType from the mzIdentML schema.
Definition: IdentData.hpp:517
pwiz::identdata::ProteinDetectionHypothesis::peptideHypothesis
std::vector< PeptideHypothesis > peptideHypothesis
Definition: IdentData.hpp:826
pwiz::identdata::SourceFile::externalFormatDocumentation
std::vector< std::string > externalFormatDocumentation
Definition: IdentData.hpp:928
pwiz::identdata::ProteinAmbiguityGroup::proteinDetectionHypothesis
std::vector< ProteinDetectionHypothesisPtr > proteinDetectionHypothesis
Definition: IdentData.hpp:844
pwiz::identdata::Contact
Implementation of ContactType from mzIdentML.
Definition: IdentData.hpp:117
pwiz::identdata::SearchModification::massDelta
double massDelta
Definition: IdentData.hpp:393
pwiz::identdata::SpectrumIdentificationProtocol::massTable
std::vector< MassTablePtr > massTable
Definition: IdentData.hpp:556
pwiz::identdata::SourceFile
Implementation of SourceFileType from the mzIdentML schema.
Definition: IdentData.hpp:923
pwiz::identdata::PeptideEvidence::pre
char pre
Definition: IdentData.hpp:635
pwiz::identdata::AmbiguousResidue::code
char code
Definition: IdentData.hpp:467
pwiz::identdata::PeptideEvidence::translationTablePtr
TranslationTablePtr translationTablePtr
Definition: IdentData.hpp:637
pwiz::identdata::PeptideEvidence::isDecoy
bool isDecoy
Definition: IdentData.hpp:639
test
void test()
Definition: DiffTest.cpp:1319
pwiz::identdata::Organization
Implementation of AbstractOrganizationType from the mzIdentML schema.
Definition: IdentData.hpp:135
pwiz::identdata::SpectraData::fileFormat
CVParam fileFormat
Definition: IdentData.hpp:705
pwiz::identdata::IonType
Implementation of IonTypeType from the mzIdentML schema.
Definition: IdentData.hpp:607
pwiz::identdata::Enzymes::enzymes
std::vector< EnzymePtr > enzymes
Definition: IdentData.hpp:435
pwiz::identdata::SpectrumIdentificationProtocol::databaseFilters
std::vector< FilterPtr > databaseFilters
Definition: IdentData.hpp:560
pwiz::identdata::SearchDatabase::releaseDate
std::string releaseDate
Definition: IdentData.hpp:277
pwiz::data::BaseDiffConfig::ignoreVersions
bool ignoreVersions
Definition: diff_std.hpp:46
MS_alternate_single_letter_codes
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:4488
pwiz::identdata::Enzyme
Implementation of EnzymeType from the mzIdentML schema.
Definition: IdentData.hpp:408
MS_contact_address
MS_contact_address
contact address: Postal address of the contact person or organization.
Definition: cv.hpp:2412
unit_assert_operator_equal
#define unit_assert_operator_equal(expected, actual)
Definition: unit.hpp:92
testSubstitutionModification
void testSubstitutionModification()
Definition: DiffTest.cpp:1127
testPeptideEvidence
void testPeptideEvidence()
Definition: DiffTest.cpp:233
pwiz::identdata::Residue::mass
double mass
Definition: IdentData.hpp:450
MS_contact_fax_number
MS_contact_fax_number
contact fax number: Fax number for the contact person or organization.
Definition: cv.hpp:5682
MS_database_filtering
MS_database_filtering
database filtering: Was there filtering used on the database.
Definition: cv.hpp:3555
pwiz::identdata::IonType::index
std::vector< int > index
Definition: IdentData.hpp:611
pwiz::identdata::Identifiable
Parent class representing extensions of the IdentifiableType from the mzIdentML schema.
Definition: IdentData.hpp:64
pwiz::identdata::Residue::code
char code
Definition: IdentData.hpp:449
pwiz::identdata::BibliographicReference
Implementation for the BibliographicReferenceType tag in the mzIdentML schema.
Definition: IdentData.hpp:95
pwiz::data::Diff
Calculate diffs of objects in a ProteoWizard data model hierarchy.
Definition: diff_std.hpp:142
pwiz::identdata::AnalysisData::spectrumIdentificationList
std::vector< SpectrumIdentificationListPtr > spectrumIdentificationList
Definition: IdentData.hpp:962
pwiz::identdata::PeptideHypothesis
Implementation of PeptideHypothesisType from the mzIdentML schema.
Definition: IdentData.hpp:806
testMeasure
void testMeasure()
Definition: DiffTest.cpp:170
pwiz::identdata::IdentifiableParamContainer::id
std::string id
Definition: IdentData.hpp:85
pwiz::identdata::DatabaseTranslation
Implementation of DatabaseTranslationType from the mzIdentML schema.
Definition: IdentData.hpp:530
pwiz::identdata::Filter::filterType
ParamContainer filterType
Definition: IdentData.hpp:503
pwiz::identdata::ProteinDetectionList
Implementation of ProteinDetectionListType from the mzIdentML schema.
Definition: IdentData.hpp:855
pwiz::identdata::SpectrumIdentificationProtocol::searchType
CVParam searchType
Definition: IdentData.hpp:552
pwiz::identdata::Inputs
Implementation of the InputsType from the mzIdentML schema.
Definition: IdentData.hpp:943
pwiz::identdata::SpectraData::externalFormatDocumentation
std::vector< std::string > externalFormatDocumentation
Definition: IdentData.hpp:704
pwiz::identdata::FragmentArray
Implementation of FragmentArrayType from the mzIdentML schema.
Definition: IdentData.hpp:589
MS_SEQUEST_CleavesAt
MS_SEQUEST_CleavesAt
SEQUEST:CleavesAt:
Definition: cv.hpp:3516
pwiz::identdata::SearchDatabase::numResidues
long numResidues
Definition: IdentData.hpp:279
MS_search_tolerance_minus_value
MS_search_tolerance_minus_value
search tolerance minus value:
Definition: cv.hpp:4638
pwiz::identdata::ProteinDetectionHypothesis::passThreshold
bool passThreshold
Definition: IdentData.hpp:825
pwiz::identdata::SourceFile::fileFormat
CVParam fileFormat
Definition: IdentData.hpp:926
pwiz::identdata::SearchDatabase::version
std::string version
Definition: IdentData.hpp:276
pwiz::identdata::ProteinDetectionProtocol
Implementation of ProteinDetectionProtocolType from the mzIdentML schema.
Definition: IdentData.hpp:786
TEST_EPILOG
#define TEST_EPILOG
Definition: unit.hpp:183
pwiz::identdata::MassTable::residues
std::vector< ResiduePtr > residues
Definition: IdentData.hpp:487
pwiz::identdata::IdentData::cvs
std::vector< CV > cvs
Definition: IdentData.hpp:1004
pwiz::identdata::SpectrumIdentificationList::fragmentationTable
std::vector< MeasurePtr > fragmentationTable
Definition: IdentData.hpp:750
pwiz::identdata::SpectrumIdentificationProtocol
Implementation of SpectrumIdentificationProtocolType from the mzIdentML schema.
Definition: IdentData.hpp:545
pwiz::identdata::AnalysisSoftware::version
std::string version
Definition: IdentData.hpp:217
testIdentData
void testIdentData()
Definition: DiffTest.cpp:1287
pwiz::identdata::DataCollection::inputs
Inputs inputs
Definition: IdentData.hpp:976
pwiz::identdata::ContactRole::contactPtr
ContactPtr contactPtr
Definition: IdentData.hpp:180
pwiz::identdata::IdentifiableParamContainer::name
std::string name
Definition: IdentData.hpp:86
pwiz::identdata::Filter::include
ParamContainer include
Definition: IdentData.hpp:504
pwiz::identdata::SearchModification
Implementation of SearchModificationType from the mzIdentML schema.
Definition: IdentData.hpp:388
pwiz::identdata::PeptideHypothesis::peptideEvidencePtr
PeptideEvidencePtr peptideEvidencePtr
Definition: IdentData.hpp:808
pwiz::identdata::SpectrumIdentificationProtocol::parentTolerance
ParamContainer parentTolerance
Definition: IdentData.hpp:558
pwiz::identdata::PeptideEvidence::post
char post
Definition: IdentData.hpp:636
pwiz::identdata::AnalysisData::proteinDetectionListPtr
ProteinDetectionListPtr proteinDetectionListPtr
Definition: IdentData.hpp:963
MS_software_vendor
MS_software_vendor
software vendor: Software vendor role.
Definition: cv.hpp:4221
pwiz::identdata::ProteinDetectionProtocol::analysisSoftwarePtr
AnalysisSoftwarePtr analysisSoftwarePtr
Definition: IdentData.hpp:791
pwiz::identdata::ContactRole
Implementation of ContactRoleType from the mzIdentML schema.
Definition: IdentData.hpp:175
pwiz::identdata::Person::firstName
std::string firstName
Definition: IdentData.hpp:158
pwiz::identdata::SpectrumIdentificationProtocol::analysisSoftwarePtr
AnalysisSoftwarePtr analysisSoftwarePtr
Definition: IdentData.hpp:550
testSpectraData
void testSpectraData()
Definition: DiffTest.cpp:567
pwiz::identdata::MassTable
Implementation of MassTableType from the mzIdentML schema.
Definition: IdentData.hpp:480
MS_Trypsin
MS_Trypsin
Trypsin: Enzyme trypsin.
Definition: cv.hpp:4179
pwiz::identdata::MassTable::id
std::string id
Definition: IdentData.hpp:484
diff
void diff(const string &filename1, const string &filename2)
Definition: FrequencyDataTest.cpp:40
pwiz::identdata::DataCollection
Implementation of DataCollectionType from the mzIdentML schema.
Definition: IdentData.hpp:974
pwiz::identdata::examples::initializeTiny
PWIZ_API_DECL void initializeTiny(IdentData &mzid)
pwiz::identdata::PeptideEvidence::frame
int frame
Definition: IdentData.hpp:638
pwiz::identdata::PeptideHypothesis::spectrumIdentificationItemPtr
std::vector< SpectrumIdentificationItemPtr > spectrumIdentificationItemPtr
Definition: IdentData.hpp:809
pwiz::identdata::SearchDatabase
Implementation of SearchDatabaseType from the mzIdentML schema.
Definition: IdentData.hpp:270
pwiz::identdata::IdentData
Implementation of the MzIdentMLType from the mzIdentML schema.
Definition: IdentData.hpp:993
pwiz::identdata::SourceFile::location
std::string location
Definition: IdentData.hpp:925
pwiz::identdata::ProteinDetectionList::proteinAmbiguityGroup
std::vector< ProteinAmbiguityGroupPtr > proteinAmbiguityGroup
Definition: IdentData.hpp:860
MS_sample_number
MS_sample_number
sample number: A reference number relevant to the sample under study.
Definition: cv.hpp:264
pwiz::identdata::Sample
Implementation of the SampleType from the mzIdentML schema.
Definition: IdentData.hpp:195
MS_contact_email
MS_contact_email
contact email: Email address of the contact person or organization.
Definition: cv.hpp:2418
MS_DB_filter_taxonomy
MS_DB_filter_taxonomy
DB filter taxonomy: A taxonomy filter was to the database search.
Definition: cv.hpp:3558
testContactRole
void testContactRole()
Definition: DiffTest.cpp:1212
testInputs
void testInputs()
Definition: DiffTest.cpp:641
pwiz::identdata::Identifiable::id
std::string id
Definition: IdentData.hpp:70
pwiz::identdata::Enzyme::terminalSpecificity
proteome::Digestion::Specificity terminalSpecificity
Definition: IdentData.hpp:415
testModification
void testModification()
Definition: DiffTest.cpp:1121
pwiz::identdata::Enzymes::independent
boost::logic::tribool independent
Definition: IdentData.hpp:433
testAnalysisProtocolCollection
void testAnalysisProtocolCollection()
Definition: DiffTest.cpp:1002
pwiz::identdata::Inputs::sourceFile
std::vector< SourceFilePtr > sourceFile
Definition: IdentData.hpp:946
MS_low_intensity_threshold
MS_low_intensity_threshold
low intensity threshold: Threshold below which some action is taken.
Definition: cv.hpp:2559
MS_DB_PI_filter
MS_DB_PI_filter
DB PI filter: Filtering applied specifically by predicted protein isoelectric focussing point (pI),...
Definition: cv.hpp:3567
pwiz::msdata::SourceFilePtr
boost::shared_ptr< SourceFile > SourceFilePtr
Description of the source file, including location and type.
Definition: MSData.hpp:76
pwiz::identdata::FragmentArray::values
std::vector< double > values
Definition: IdentData.hpp:591
pwiz::identdata::IonType::charge
int charge
Definition: IdentData.hpp:612
TEST_FAILED
#define TEST_FAILED(x)
Definition: unit.hpp:177
pwiz::identdata::AnalysisData
Implementation of AnalysisDataType from the mzIdentML schema.
Definition: IdentData.hpp:960
testResidue
void testResidue()
Definition: DiffTest.cpp:785
pwiz::identdata::Enzyme::minDistance
int minDistance
Definition: IdentData.hpp:417
MS_FileFilter
MS_FileFilter
FileFilter: Extracts or manipulates portions of data from peak, feature or consensus feature files.
Definition: cv.hpp:2940
pwiz::identdata::SearchDatabase::databaseName
ParamContainer databaseName
Definition: IdentData.hpp:282
pwiz::identdata::Measure
Implementation of MeasureType from the mzIdentML schema.
Definition: IdentData.hpp:573
pwiz::identdata::Enzyme::enzymeName
ParamContainer enzymeName
Definition: IdentData.hpp:420
testSourceFile
void testSourceFile()
Definition: DiffTest.cpp:601
pwiz::identdata::DBSequence
Implementation of DBSequenceType from the mzIdentML schema.
Definition: IdentData.hpp:296
UNIMOD_Oxidation
UNIMOD_Oxidation
Oxidation: Oxidation or Hydroxylation.
Definition: cv.hpp:9450
pwiz::data::ParamContainer::set
void set(CVID cvid, const std::string &value="", CVID units=CVID_Unknown)
set/add a CVParam (not recursive)
testEnzyme
void testEnzyme()
Definition: DiffTest.cpp:679
MS_ms_ms_search
MS_ms_ms_search
ms-ms search: An MS2 search (with fragment ions).
Definition: cv.hpp:3708
testPerson
void testPerson()
Definition: DiffTest.cpp:1047
testAmbiguousResidue
void testAmbiguousResidue()
Definition: DiffTest.cpp:813
pwiz::identdata::Person::midInitials
std::string midInitials
Definition: IdentData.hpp:159
testIonType
void testIonType()
Definition: DiffTest.cpp:128
pwiz::identdata::PeptideEvidence::end
int end
Definition: IdentData.hpp:634
testContact
void testContact()
Definition: DiffTest.cpp:1008
epsilon
const double epsilon
Definition: DiffTest.cpp:41
pwiz::identdata::SearchModification::residues
std::vector< char > residues
Definition: IdentData.hpp:394
pwiz::identdata::SpectrumIdentificationList::spectrumIdentificationResult
std::vector< SpectrumIdentificationResultPtr > spectrumIdentificationResult
Definition: IdentData.hpp:751
pwiz::identdata::PeptideEvidence::start
int start
Definition: IdentData.hpp:633
pwiz::identdata::AnalysisSoftware
Implementation of AnalysisSoftwareType from the mzIdentML schema.
Definition: IdentData.hpp:211
pwiz::identdata::SpectrumIdentificationProtocol::fragmentTolerance
ParamContainer fragmentTolerance
Definition: IdentData.hpp:557
pwiz::identdata::Filter
Implementation of FilterType from the mzIdentML schema.
Definition: IdentData.hpp:501
pwiz::identdata::SearchDatabase::fileFormat
CVParam fileFormat
Definition: IdentData.hpp:281
pwiz::identdata::ProteinDetectionHypothesis::dbSequencePtr
DBSequencePtr dbSequencePtr
Definition: IdentData.hpp:824
testAnalysisSampleCollection
void testAnalysisSampleCollection()
Definition: DiffTest.cpp:1200
testProteinDetectionProtocol
void testProteinDetectionProtocol()
Definition: DiffTest.cpp:976
testSpectrumIdentificationResult
void testSpectrumIdentificationResult()
Definition: DiffTest.cpp:1194
TEST_PROLOG_EX
#define TEST_PROLOG_EX(argc, argv, suffix)
Definition: unit.hpp:157
MS_frag__a_ion
MS_frag__a_ion
frag: a ion: Fragmentation information, type of product: a ion.
Definition: cv.hpp:4119
testSpectrumIdentificationList
void testSpectrumIdentificationList()
Definition: DiffTest.cpp:415
MS_contact_phone_number
MS_contact_phone_number
contact phone number: Phone number of the contact person or organization.
Definition: cv.hpp:5679
testEnzymes
void testEnzymes()
Definition: DiffTest.cpp:732
MS_search_tolerance_plus_value
MS_search_tolerance_plus_value
search tolerance plus value:
Definition: cv.hpp:4635
testProteinAmbiguityGroup
void testProteinAmbiguityGroup()
Definition: DiffTest.cpp:301
SemiSpecific
SemiSpecific
neither termini must match digestion motif(s)
Definition: Digestion.hpp:120
testAnalysisSoftware
void testAnalysisSoftware()
Definition: DiffTest.cpp:1243
pwiz::identdata::Inputs::spectraData
std::vector< SpectraDataPtr > spectraData
Definition: IdentData.hpp:948
pwiz::identdata::DatabaseTranslation::frames
std::vector< int > frames
Definition: IdentData.hpp:532
pwiz::identdata::AnalysisSoftware::URI
std::string URI
Definition: IdentData.hpp:218
pwiz::data::CVParam::cvid
CVID cvid
Definition: ParamTypes.hpp:46
MS_frag__b_ion
MS_frag__b_ion
frag: b ion: Fragmentation information, type of product: b ion.
Definition: cv.hpp:4098
testIdentifiable
void testIdentifiable()
Definition: DiffTest.cpp:43
MS_wolf
MS_wolf
wolf (massWolf): A software for converting Waters raw directory format to mzXML or mzML....
Definition: cv.hpp:2223
MS_Mascot_expectation_value
MS_Mascot_expectation_value
Mascot:expectation value: The Mascot result 'expectation value'.
Definition: cv.hpp:3975
unit_assert
#define unit_assert(x)
Definition: unit.hpp:85
testProteinDetectionList
void testProteinDetectionList()
Definition: DiffTest.cpp:453
pwiz::identdata::DataCollection::analysisData
AnalysisData analysisData
Definition: IdentData.hpp:977
testBibliographicReference
void testBibliographicReference()
Definition: DiffTest.cpp:1090
pwiz::tradata::ContactPtr
boost::shared_ptr< Contact > ContactPtr
Definition: TraData.hpp:57
pwiz::identdata::Enzymes
Implementation of EnzymesType from the mzIdentML schema.
Definition: IdentData.hpp:431
pwiz::identdata::IdentData::analysisSoftwareList
std::vector< AnalysisSoftwarePtr > analysisSoftwareList
Definition: IdentData.hpp:1006
testDBSequence
void testDBSequence()
Definition: DiffTest.cpp:1115
testFilter
void testFilter()
Definition: DiffTest.cpp:841
pwiz::identdata::SpectrumIdentificationList
Implementation of SpectrumIdentificationListType from the mzIdentML schema.
Definition: IdentData.hpp:743
pwiz::identdata::SpectrumIdentificationProtocol::threshold
ParamContainer threshold
Definition: IdentData.hpp:559
MS_Mascot_score
MS_Mascot_score
Mascot:score: The Mascot result 'Score'.
Definition: cv.hpp:3972
pwiz::identdata::Identifiable::name
std::string name
Definition: IdentData.hpp:71
pwiz::identdata::Enzyme::cTermGain
std::string cTermGain
Definition: IdentData.hpp:414
MS_pmf_search
MS_pmf_search
pmf search: A peptide mass fingerprint search.
Definition: cv.hpp:3702
MS_DB_filter_on_accession_numbers
MS_DB_filter_on_accession_numbers
DB filter on accession numbers: Filtering applied specifically by accession number pattern.
Definition: cv.hpp:3561
pwiz::identdata::Sample::contactRole
std::vector< ContactRolePtr > contactRole
Definition: IdentData.hpp:200
MS_translation_table_description
MS_translation_table_description
translation table description: A URL that describes the translation table used to translate the nucle...
Definition: cv.hpp:4668
pwiz::identdata::Inputs::searchDatabase
std::vector< SearchDatabasePtr > searchDatabase
Definition: IdentData.hpp:947
MS_translation_table
MS_translation_table
translation table: The translation table used to translate the nucleotides to amino acids.
Definition: cv.hpp:3573
testAnalysisCollection
void testAnalysisCollection()
Definition: DiffTest.cpp:1108
pwiz::identdata::AnalysisSoftware::customizations
std::string customizations
Definition: IdentData.hpp:219
pwiz::identdata::ProteinAmbiguityGroup
Implementation of ProteinAmbiguityGroupType from the mzIdentML schema.
Definition: IdentData.hpp:839
pwiz::identdata::IdentData::auditCollection
std::vector< ContactPtr > auditCollection
Definition: IdentData.hpp:1010
pwiz::identdata::Person::affiliations
std::vector< OrganizationPtr > affiliations
Definition: IdentData.hpp:161
pwiz::data::ParamContainer::cvParams
std::vector< CVParam > cvParams
a collection of controlled vocabulary terms
Definition: ParamTypes.hpp:250