ProteoWizard
DiffTest.cpp
Go to the documentation of this file.
1//
2// $Id$
3//
4//
5// Original author: Robert Burke <robert.burke@proteowizard.org>
6//
7// Copyright 2009 Spielberg Family Center for Applied Proteomics
8// University of Southern California, Los Angeles, California 90033
9//
10// Licensed under the Apache License, Version 2.0 (the "License");
11// you may not use this file except in compliance with the License.
12// You may obtain a copy of the License at
13//
14// http://www.apache.org/licenses/LICENSE-2.0
15//
16// Unless required by applicable law or agreed to in writing, software
17// distributed under the License is distributed on an "AS IS" BASIS,
18// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19// See the License for the specific language governing permissions and
20// limitations under the License.
21//
22
23#include "Diff.hpp"
24#include "TextWriter.hpp"
25#include "examples.hpp"
28#include <cstring>
29
30
31using namespace pwiz::util;
32using namespace pwiz::data;
33using namespace pwiz::data::diff_impl;
34using namespace pwiz::identdata;
35namespace proteome = pwiz::proteome;
36
37
38// TODO: Add Identifiable diff to all subclasses of Identifiable
39
40ostream* os_ = 0;
41const double epsilon = numeric_limits<double>::epsilon();
42
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;
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;
72 diff0(a, b);
73 if (os_) *os_ << diff_string<TextWriter>(diff0) << endl;
74 unit_assert(diff0);
75
76 config.ignoreVersions = true;
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
84 diff2(a, b);
85 if (os_) *os_ << diff_string<TextWriter>(diff2) << endl;
86 unit_assert(diff2);
87
88}
89
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
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
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}
127
129{
130 if (os_) *os_ << "testIonType()\n";
131
132 IonType a, b;
133 a.index.push_back(1);
134 a.charge = 1;
136 a.fragmentArray.push_back(FragmentArrayPtr(new FragmentArray));
137
138 b = a;
139
142 if (os_ && diff) *os_ << diff_string<TextWriter>(diff) << endl;
143
144 b.index.back() = 2;
145 b.charge = 2;
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
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}
168
169
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
180
182
183 diff(a, b);
184 if (os_) *os_ << diff_string<TextWriter>(diff) << endl;
185
186 // diff was found
188
189 // and correctly
190 unit_assert(diff.a_b.cvParams.size() == 0);
191 unit_assert(diff.b_a.cvParams.size() == 1);
193}
194
196{
197 if (os_) *os_ << "testSearchModification()\n";
198
200
201 a.massDelta = 1;
202 a.residues.push_back('A');
203 a.residues.push_back('B');
205 b = a;
206
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
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}
231
232
234{
235 if (os_) *os_ << "testPeptideEvidence()\n";
236
237 PeptideEvidence a, b;
238
240 if (os_) *os_ << diff_string<TextWriter>(diff) << endl;
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);
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
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}
299
300
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
314
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
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}
333
334
336{
337 if (os_) *os_ << "testPeptideHypothesis()\n";
338
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
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}
364
365
367{
368 if (os_) *os_ << "testProteinDetectionHypothesis()\n";
369
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;
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
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}
414
416{
417 if (os_) *os_ << "testSpectrumIdentificationList()\n";
418
422
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
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}
451
452
454{
455 if (os_) *os_ << "testProteinDetectionList()\n";
456
460
461 a.proteinAmbiguityGroup.push_back(ProteinAmbiguityGroupPtr(new ProteinAmbiguityGroup()));
462 a.proteinAmbiguityGroup.back()->set(MS_Mascot_expectation_value, 0.0268534444565851);
465
466 diff(a,b);
467 if (os_) *os_ << diff_string<TextWriter>(diff) << endl;
468
469 // a diff was found
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}
482
483
485{
486 if (os_) *os_ << "testAnalysisData()\n";
487
488 AnalysisData a, b;
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
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}
517
518
520{
521 if (os_) *os_ << "testSearchDatabase()" << endl;
522
523 SearchDatabase a, b;
526
527 a.version = "1.0";
528 b.version = "1.1";
529
530 a.releaseDate = "20090726";
531 b.releaseDate = "20090727";
532
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
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}
565
566
568{
569 if (os_) *os_ << "testSpectraData()\n" << endl;
570
571 SpectraData a, b;
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
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}
599
600
602{
603 if (os_) *os_ << "testSourceFile()\n" << endl;
604
605 SourceFile a,b;
608
609 a.location = "madison";
610 b.location = "middleton";
612 a.externalFormatDocumentation.push_back("The Idiot's Guide to External Formats");
613 b.externalFormatDocumentation.push_back("External Formats for Dummies");
616
617 diff(a,b);
618 if (os_) *os_ << diff_string<TextWriter>(diff) << endl;
619
620 // a diff was found
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}
639
640
642{
643
644 if (os_) *os_ << "testInputs()\n";
645
646 Inputs a, b;
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
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}
677
678
680{
681 if (os_) *os_ << "testEnzyme()\n";
682
683 Enzyme a,b;
685 if (diff && os_) *os_ << diff_string<TextWriter>(diff) << endl;
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";
694 a.terminalSpecificity = proteome::Digestion::SemiSpecific;
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
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}
730
731
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}
743
744
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;
763
764 b.id = "b_id";
765 diff(a, b);
767
768 a.id = "b_id";
769 b.msLevel.push_back(2);
770 diff(a, b);
772
773 b.msLevel.push_back(2);
774 b.residues.clear();
775 diff(a, b);
777
778 a.residues.clear();
779 b.ambiguousResidue.clear();
780 diff(a, b);
782}
783
784
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
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
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}
811
812
814{
815 if (os_) *os_ << "testAmbiguousResidue()\n";
816
817 AmbiguousResidue a, b;
818
819 a.code = 'Z';
821 b = a;
822
825
826 b.code = 'B';
828
829 diff(a, b);
830 if (os_) *os_ << diff_string<TextWriter>(diff) << endl;
831
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}
839
840
842{
843 if (os_) *os_ << "testFilter()\n";
844
845 Filter a, b;
846
850 b = a;
851
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
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}
874
875
877{
878 if (os_) *os_ << "testDatabaseTranslation()\n";
879
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
893
894 b.translationTable.clear();
895
896 diff(a, b);
897 if (os_) *os_ << diff_string<TextWriter>(diff) << endl;
898
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
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}
919
920
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
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
973}
974
975
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
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}
1000
1001
1003{
1004 if (os_) *os_ << "testAnalysisProtocolCollection()\n";
1005}
1006
1007
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
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
1044}
1045
1046
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);
1066
1067 a.lastName = "smith";
1068 b.firstName = "john";
1069 diff(a, b);
1071
1072 a.firstName = "john";
1073 b.midInitials = "j.j.";
1074 diff(a, b);
1076
1077 a.midInitials = "j.j.";
1078 b.affiliations.clear();
1079 diff(a, b);
1081}
1082
1083
1085{
1086 if (os_) *os_ << "testOrganization()\n";
1087}
1088
1089
1091{
1092 if (os_) *os_ << "testBibliographicReference()\n";
1093}
1094
1095
1097{
1098 if (os_) *os_ << "testProteinDetection()\n";
1099}
1100
1101
1103{
1104 if (os_) *os_ << "testSpectrumIdentification()\n";
1105}
1106
1107
1109{
1110 if (os_) *os_ << "testAnalysisCollection()\n";
1111
1112}
1113
1114
1116{
1117 if (os_) *os_ << "testDBSequence()\n";
1118}
1119
1120
1122{
1123 if (os_) *os_ << "testModification()\n";
1124}
1125
1126
1128{
1129 if (os_) *os_ << "testSubstitutionModification()\n";
1130}
1131
1132
1134{
1135 if (os_) *os_ << "testPeptide()\n";
1136}
1137
1138
1140{
1141 if (os_) *os_ << "testSequenceCollection()\n";
1142}
1143
1144
1146{
1147 if (os_) *os_ << "testSampleComponent()\n";
1148}
1149
1150
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"))));
1166
1167 diff(a, b);
1168 if (os_) *os_ << diff_string<TextWriter>(diff) << endl;
1169
1170 // a diff was found
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}
1186
1187
1189{
1190 if (os_) *os_ << "testSpectrumIdentificationItem()\n";
1191}
1192
1193
1195{
1196 if (os_) *os_ << "testSpectrumIdentificationResult()\n";
1197}
1198
1199
1201{
1202 if (os_) *os_ << "testAnalysisSampleCollection()\n";
1203}
1204
1205
1207{
1208 if (os_) *os_ << "testProvider()\n";
1209}
1210
1211
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;
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}
1241
1242
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}
1263
1264
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}
1285
1286
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
1314
1315 unit_assert(diff.a_b.cvs.size() == 1);
1316 unit_assert(diff.b_a.cvs.empty());
1317}
1318
1370
1371int main(int argc, char* argv[])
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
1390}
1391
MS_sample_name
sample name: A reference string relevant to the sample under study.
Definition cv.hpp:267
MS_Trypsin
Trypsin: Enzyme trypsin.
Definition cv.hpp:4179
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
MS_DB_MW_filter
DB MW filter: Filtering applied specifically by protein molecular weight, specified as either a range...
Definition cv.hpp:3564
MS_product_ion_m_z
product ion m/z: The m/z of the product ion.
Definition cv.hpp:4101
MS_SEQUEST_CleavesAt
SEQUEST:CleavesAt:
Definition cv.hpp:3516
MS_FileFilter
FileFilter: Extracts or manipulates portions of data from peak, feature or consensus feature files.
Definition cv.hpp:2940
MS_ms_ms_search
ms-ms search: An MS2 search (with fragment ions).
Definition cv.hpp:3708
UNIMOD_Oxidation
Oxidation: Oxidation or Hydroxylation.
Definition cv.hpp:9450
MS_translation_table
translation table: The translation table used to translate the nucleotides to amino acids.
Definition cv.hpp:3573
MS_wolf
wolf (massWolf): A software for converting Waters raw directory format to mzXML or mzML....
Definition cv.hpp:2223
MS_frag__z_ion
frag: z ion: Fragmentation information, type of product: z ion.
Definition cv.hpp:4122
MS_contact_phone_number
contact phone number: Phone number of the contact person or organization.
Definition cv.hpp:5679
UNIMOD_Gln__pyro_Glu
Gln->pyro-Glu: Pyro-glu from Q.
Definition cv.hpp:9435
MS_DB_filter_on_accession_numbers
DB filter on accession numbers: Filtering applied specifically by accession number pattern.
Definition cv.hpp:3561
MS_translation_table_description
translation table description: A URL that describes the translation table used to translate the nucle...
Definition cv.hpp:4668
MS_low_intensity_threshold
low intensity threshold: Threshold below which some action is taken.
Definition cv.hpp:2559
MS_frag__b_ion
frag: b ion: Fragmentation information, type of product: b ion.
Definition cv.hpp:4098
MS_database_filtering
database filtering: Was there filtering used on the database.
Definition cv.hpp:3555
MS_DB_filter_taxonomy
DB filter taxonomy: A taxonomy filter was to the database search.
Definition cv.hpp:3558
MS_contact_email
contact email: Email address of the contact person or organization.
Definition cv.hpp:2418
MS_software_vendor
software vendor: Software vendor role.
Definition cv.hpp:4221
MS_contact_fax_number
contact fax number: Fax number for the contact person or organization.
Definition cv.hpp:5682
MS_Mascot_score
Mascot:score: The Mascot result 'Score'.
Definition cv.hpp:3972
MS_frag__a_ion
frag: a ion: Fragmentation information, type of product: a ion.
Definition cv.hpp:4119
MS_pmf_search
pmf search: A peptide mass fingerprint search.
Definition cv.hpp:3702
MS_search_tolerance_plus_value
search tolerance plus value:
Definition cv.hpp:4635
MS_DB_PI_filter
DB PI filter: Filtering applied specifically by predicted protein isoelectric focussing point (pI),...
Definition cv.hpp:3567
MS_Mascot_expectation_value
Mascot:expectation value: The Mascot result 'expectation value'.
Definition cv.hpp:3975
MS_sample_number
sample number: A reference number relevant to the sample under study.
Definition cv.hpp:264
MS_contact_address
contact address: Postal address of the contact person or organization.
Definition cv.hpp:2412
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
MS_search_tolerance_minus_value
search tolerance minus value:
Definition cv.hpp:4638
MS_product_ion_intensity
product ion intensity: The intensity of a single product ion.
Definition cv.hpp:4107
MS_role_type
role type: Role of a Person or Organization.
Definition cv.hpp:4218
void testSearchDatabase()
Definition DiffTest.cpp:519
void testContactRole()
void testSpectraData()
Definition DiffTest.cpp:567
int main(int argc, char *argv[])
void testSearchModification()
Definition DiffTest.cpp:195
void testSampleComponent()
void testEnzyme()
Definition DiffTest.cpp:679
void testIdentifiable()
Definition DiffTest.cpp:43
void testInputs()
Definition DiffTest.cpp:641
void testSample()
void testSourceFile()
Definition DiffTest.cpp:601
void testOrganization()
void testSubstitutionModification()
void testAnalysisData()
Definition DiffTest.cpp:484
void testAmbiguousResidue()
Definition DiffTest.cpp:813
void testProteinDetectionHypothesis()
Definition DiffTest.cpp:366
void testDBSequence()
void testSpectrumIdentificationResult()
void testProteinDetectionList()
Definition DiffTest.cpp:453
void testPerson()
void testDataCollection()
void testDatabaseTranslation()
Definition DiffTest.cpp:876
void testPeptide()
void testProteinDetectionProtocol()
Definition DiffTest.cpp:976
void testFilter()
Definition DiffTest.cpp:841
void testBibliographicReference()
void testPeptideHypothesis()
Definition DiffTest.cpp:335
void testSpectrumIdentificationProtocol()
Definition DiffTest.cpp:921
void testIonType()
Definition DiffTest.cpp:128
void testFragmentArray()
Definition DiffTest.cpp:90
void testEnzymes()
Definition DiffTest.cpp:732
void testIdentData()
void testProvider()
const double epsilon
Definition DiffTest.cpp:41
ostream * os_
Definition DiffTest.cpp:40
void testModification()
void testSpectrumIdentificationItem()
void test()
void testAnalysisCollection()
void testSpectrumIdentification()
void testProteinAmbiguityGroup()
Definition DiffTest.cpp:301
void testSequenceCollection()
void testResidue()
Definition DiffTest.cpp:785
void testPeptideEvidence()
Definition DiffTest.cpp:233
void testMassTable()
Definition DiffTest.cpp:745
void testProteinDetection()
void testAnalysisSampleCollection()
void testAnalysisProtocolCollection()
void testSpectrumIdentificationList()
Definition DiffTest.cpp:415
void testAnalysisSoftware()
void testMeasure()
Definition DiffTest.cpp:170
void testContact()
PWIZ_API_DECL void diff(const std::string &a, const std::string &b, std::string &a_b, std::string &b_a, const BaseDiffConfig &config)
PWIZ_API_DECL void initializeTiny(IdentData &mzid)
boost::shared_ptr< SourceFile > SourceFilePtr
Description of the source file, including location and type.
Definition MSData.hpp:76
boost::shared_ptr< Contact > ContactPtr
Definition TraData.hpp:57
Information about an ontology or CV source and a short 'lookup' tag to refer to.
Definition cv.hpp:14916
Calculate diffs of objects in a ProteoWizard data model hierarchy.
Definition diff_std.hpp:143
void set(CVID cvid, const std::string &value="", CVID units=CVID_Unknown)
set/add a CVParam (not recursive)
std::vector< CVParam > cvParams
a collection of controlled vocabulary terms
void clear()
clears the collections
Implementation of AmbiguousResidueType from the mzIdentML schema.
Implementation of AnalysisDataType from the mzIdentML schema.
std::vector< SpectrumIdentificationListPtr > spectrumIdentificationList
ProteinDetectionListPtr proteinDetectionListPtr
Implementation of AnalysisSoftwareType from the mzIdentML schema.
Implementation for the BibliographicReferenceType tag in the mzIdentML schema.
Definition IdentData.hpp:96
Implementation of ContactType from mzIdentML.
Implementation of ContactRoleType from the mzIdentML schema.
Implementation of DBSequenceType from the mzIdentML schema.
Implementation of DataCollectionType from the mzIdentML schema.
Implementation of DatabaseTranslationType from the mzIdentML schema.
std::vector< TranslationTablePtr > translationTable
Implementation of EnzymeType from the mzIdentML schema.
proteome::Digestion::Specificity terminalSpecificity
ParamContainer enzymeName
Implementation of EnzymesType from the mzIdentML schema.
std::vector< EnzymePtr > enzymes
boost::logic::tribool independent
Implementation of FilterType from the mzIdentML schema.
ParamContainer exclude
ParamContainer filterType
ParamContainer include
Implementation of FragmentArrayType from the mzIdentML schema.
std::vector< double > values
Implementation of the MzIdentMLType from the mzIdentML schema.
std::vector< AnalysisSoftwarePtr > analysisSoftwareList
std::vector< ContactPtr > auditCollection
std::vector< BibliographicReferencePtr > bibliographicReference
Parent class representing extensions of the IdentifiableType from the mzIdentML schema.
Definition IdentData.hpp:65
Implementation of the InputsType from the mzIdentML schema.
std::vector< SourceFilePtr > sourceFile
std::vector< SearchDatabasePtr > searchDatabase
std::vector< SpectraDataPtr > spectraData
Implementation of IonTypeType from the mzIdentML schema.
std::vector< int > index
std::vector< FragmentArrayPtr > fragmentArray
Implementation of MassTableType from the mzIdentML schema.
std::vector< ResiduePtr > residues
std::vector< AmbiguousResiduePtr > ambiguousResidue
std::vector< int > msLevel
Implementation of MeasureType from the mzIdentML schema.
Implementation of AbstractOrganizationType from the mzIdentML schema.
Implementation of PeptideEvidenceType from the mzIdentML schema.
TranslationTablePtr translationTablePtr
Implementation of PeptideHypothesisType from the mzIdentML schema.
PeptideEvidencePtr peptideEvidencePtr
std::vector< SpectrumIdentificationItemPtr > spectrumIdentificationItemPtr
Implementation of PersonType from the mzIdentML schema.
std::vector< OrganizationPtr > affiliations
Implementation of ProteinAmbiguityGroupType from the mzIdentML schema.
std::vector< ProteinDetectionHypothesisPtr > proteinDetectionHypothesis
Implementation of ProteinDetectionHypothesisType from the mzIdentML schema.
std::vector< PeptideHypothesis > peptideHypothesis
Implementation of ProteinDetectionListType from the mzIdentML schema.
std::vector< ProteinAmbiguityGroupPtr > proteinAmbiguityGroup
Implementation of ProteinDetectionProtocolType from the mzIdentML schema.
Implementation of ResidueType from the mzIdentML schema.
Implementation of the SampleType from the mzIdentML schema.
std::vector< ContactRolePtr > contactRole
Implementation of SearchDatabaseType from the mzIdentML schema.
Implementation of SearchModificationType from the mzIdentML schema.
Implementation of SourceFileType from the mzIdentML schema.
std::vector< std::string > externalFormatDocumentation
Implementation of SpectraDataType from the mzIdentML schema.
std::vector< std::string > externalFormatDocumentation
Implementation of SpectrumIdentificationItemType from the mzIdentML schema.
Implementation of SpectrumIdentificationListType from the mzIdentML schema.
std::vector< SpectrumIdentificationResultPtr > spectrumIdentificationResult
std::vector< MeasurePtr > fragmentationTable
Implementation of SpectrumIdentificationProtocolType from the mzIdentML schema.
std::vector< SearchModificationPtr > modificationParams
Implementation of SpectrumIdentificationResultType from the mzIdentML schema.
Implementation of TranslationTableType from the mzIdentML schema.
#define unit_assert(x)
Definition unit.hpp:85
#define TEST_PROLOG_EX(argc, argv, suffix)
Definition unit.hpp:157
#define TEST_EPILOG
Definition unit.hpp:183
#define TEST_FAILED(x)
Definition unit.hpp:177
#define unit_assert_equal(x, y, epsilon)
Definition unit.hpp:99
#define unit_assert_operator_equal(expected, actual)
Definition unit.hpp:92