41const double epsilon = numeric_limits<double>::epsilon();
45 if (
os_) *
os_ <<
"testIdentifiable()\n";
53 if (
diff &&
os_) *os_ << diff_string<TextWriter>(
diff) << endl;
60 if (
os_) *os_ << diff_string<TextWriter>(
diff) << endl;
73 if (
os_) *os_ << diff_string<TextWriter>(diff0) << endl;
79 if (
os_) *os_ << diff_string<TextWriter>(diff1) << endl;
85 if (
os_) *os_ << diff_string<TextWriter>(diff2) << endl;
92 if (
os_) *
os_ <<
"testFragmentArray()\n";
102 if (
os_) *os_ << diff_string<TextWriter>(
diff) << endl;
125 if (
os_) *os_ << diff_string<TextWriter>(
diff) << endl;
130 if (
os_) *
os_ <<
"testIonType()\n";
133 a.
index.push_back(1);
142 if (
os_ &&
diff) *os_ << diff_string<TextWriter>(
diff) << endl;
153 if (
os_) *os_ << diff_string<TextWriter>(
diff) << endl;
166 unit_assert(
diff.b_a.fragmentArray.back()->measurePtr->id ==
"Graduated_cylinder");
172 if (
os_) *
os_ <<
"testMeasure()\n";
184 if (
os_) *os_ << diff_string<TextWriter>(
diff) << endl;
197 if (
os_) *
os_ <<
"testSearchModification()\n";
216 if (
os_) *os_ << diff_string<TextWriter>(
diff) << endl;
235 if (
os_) *
os_ <<
"testPeptideEvidence()\n";
240 if (
os_) *os_ << diff_string<TextWriter>(
diff) << endl;
268 if (
os_) *os_ << diff_string<TextWriter>(
diff) << endl;
279 unit_assert(
diff.a_b.translationTablePtr->id ==
"TranslationTable_ref");
281 unit_assert(
diff.b_a.translationTablePtr->id ==
"fer_elbaTnoitalsnarT");
303 if (
os_) *
os_ <<
"testProteinAmbiguityGroup()\n";
319 if (
os_) *os_ << diff_string<TextWriter>(
diff) << endl;
327 unit_assert(
diff.a_b.proteinDetectionHypothesis.back()->dbSequencePtr->id ==
"DBSequence_ref");
337 if (
os_) *
os_ <<
"testPeptideHypothesis()\n";
349 if (
os_) *os_ << diff_string<TextWriter>(
diff) << endl;
360 unit_assert(
diff.a_b.spectrumIdentificationItemPtr.back()->id ==
"sii_a");
362 unit_assert(
diff.b_a.spectrumIdentificationItemPtr.back()->id ==
"sii_b");
368 if (
os_) *
os_ <<
"testProteinDetectionHypothesis()\n";
389 if (
os_) *os_ << diff_string<TextWriter>(
diff) << endl;
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");
417 if (
os_) *
os_ <<
"testSpectrumIdentificationList()\n";
435 if (
os_) *os_ << diff_string<TextWriter>(
diff) << endl;
455 if (
os_) *
os_ <<
"testProteinDetectionList()\n";
467 if (
os_) *os_ << diff_string<TextWriter>(
diff) << endl;
486 if (
os_) *
os_ <<
"testAnalysisData()\n";
501 if (
os_) *os_ << diff_string<TextWriter>(
diff) << endl;
521 if (
os_) *
os_ <<
"testSearchDatabase()" << endl;
543 if (
os_) *os_ << diff_string<TextWriter>(
diff) << endl;
569 if (
os_) *
os_ <<
"testSpectraData()\n" << endl;
582 if (
os_) *os_ << diff_string<TextWriter>(
diff) << endl;
592 unit_assert(
diff.a_b.externalFormatDocumentation.back() ==
"wikipedia");
603 if (
os_) *
os_ <<
"testSourceFile()\n" << endl;
618 if (
os_) *os_ << diff_string<TextWriter>(
diff) << endl;
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");
644 if (
os_) *
os_ <<
"testInputs()\n";
660 if (
os_) *os_ << diff_string<TextWriter>(
diff) << endl;
681 if (
os_) *
os_ <<
"testEnzyme()\n";
685 if (
diff &&
os_) *os_ << diff_string<TextWriter>(
diff) << endl;
688 a.
id =
"Donald Trump";
689 b.
id =
"Donald Duck";
705 if (
os_) *os_ << diff_string<TextWriter>(
diff) << endl;
716 unit_assert(
diff.a_b.terminalSpecificity == proteome::Digestion::SemiSpecific);
717 unit_assert(
diff.b_a.terminalSpecificity == proteome::Digestion::FullySpecific);
734 if (
os_) *
os_ <<
"testEnzymes()\n";
738 if (
diff &&
os_) *os_ << diff_string<TextWriter>(
diff) << endl;
747 if (
os_) *
os_ <<
"testMassTable()\n";
787 if (
os_) *
os_ <<
"testResidue()\n";
802 if (
os_) *os_ << diff_string<TextWriter>(
diff) << endl;
815 if (
os_) *
os_ <<
"testAmbiguousResidue()\n";
830 if (
os_) *os_ << diff_string<TextWriter>(
diff) << endl;
843 if (
os_) *
os_ <<
"testFilter()\n";
863 if (
os_) *os_ << diff_string<TextWriter>(
diff) << endl;
878 if (
os_) *
os_ <<
"testDatabaseTranslation()\n";
897 if (
os_) *os_ << diff_string<TextWriter>(
diff) << endl;
910 if (
os_) *os_ << diff_string<TextWriter>(
diff) << endl;
923 if (
os_) *
os_ <<
"testSpectrumIdentificationProtocol()\n";
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")));
939 FilterPtr filter = FilterPtr(
new Filter());
941 a.databaseFilters.push_back(filter);
952 if (
os_) *os_ << diff_string<TextWriter>(
diff) << endl;
970 if (
os_) *os_ << diff_string<TextWriter>(
diff) << endl;
978 if (
os_) *
os_ <<
"testProteinDetectionProtocol()\n";
996 if (
os_) *os_ << diff_string<TextWriter>(
diff) << endl;
1004 if (
os_) *
os_ <<
"testAnalysisProtocolCollection()\n";
1010 if (
os_) *
os_ <<
"testContact()\n";
1012 Contact a(
"a_id",
"a_name"), b;
1029 if (
os_) *os_ << diff_string<TextWriter>(
diff) << endl;
1041 if (
os_) *os_ << diff_string<TextWriter>(
diff) << endl;
1049 if (
os_) *
os_ <<
"testPerson()\n";
1086 if (
os_) *
os_ <<
"testOrganization()\n";
1092 if (
os_) *
os_ <<
"testBibliographicReference()\n";
1098 if (
os_) *
os_ <<
"testProteinDetection()\n";
1104 if (
os_) *
os_ <<
"testSpectrumIdentification()\n";
1110 if (
os_) *
os_ <<
"testAnalysisCollection()\n";
1117 if (
os_) *
os_ <<
"testDBSequence()\n";
1123 if (
os_) *
os_ <<
"testModification()\n";
1129 if (
os_) *
os_ <<
"testSubstitutionModification()\n";
1135 if (
os_) *
os_ <<
"testPeptide()\n";
1141 if (
os_) *
os_ <<
"testSequenceCollection()\n";
1147 if (
os_) *
os_ <<
"testSampleComponent()\n";
1153 if (
os_) *
os_ <<
"testSample()\n";
1161 if (
os_) *os_ << diff_string<TextWriter>(
diff) << endl;
1168 if (
os_) *os_ << diff_string<TextWriter>(
diff) << endl;
1182 unit_assert(
diff.a_b.contactRole.back()->contactPtr->id ==
"contactPtr");
1183 unit_assert(
diff.b_a.contactRole.back()->contactPtr->id ==
"fer_rehto");
1190 if (
os_) *
os_ <<
"testSpectrumIdentificationItem()\n";
1196 if (
os_) *
os_ <<
"testSpectrumIdentificationResult()\n";
1202 if (
os_) *
os_ <<
"testAnalysisSampleCollection()\n";
1208 if (
os_) *
os_ <<
"testProvider()\n";
1214 if (
os_) *
os_ <<
"testContactRole()\n";
1224 if (
os_) *os_ << diff_string<TextWriter>(
diff) << endl;
1231 if (
os_) *os_ << diff_string<TextWriter>(
diff) << endl;
1245 if (
os_) *
os_ <<
"testAnalysisSoftware()\n";
1267 if (
os_) *
os_ <<
"testDataCollection()\n";
1282 if (
os_) *os_ << diff_string<TextWriter>(
diff) << endl;
1289 if (
os_) *
os_ <<
"testIdentData()\n";
1299 a.
cvs.push_back(
CV());
1311 if (
os_) *os_ << diff_string<TextWriter>(
diff) << endl;
1377 if (argc>1 && !strcmp(argv[1],
"-v"))
os_ = &cout;
1380 catch (exception& e)
MS_sample_name
sample name: A reference string relevant to the sample under study.
MS_Trypsin
Trypsin: Enzyme trypsin.
MS_alternate_single_letter_codes
alternate single letter codes: List of standard residue one letter codes which are used to replace a ...
MS_DB_MW_filter
DB MW filter: Filtering applied specifically by protein molecular weight, specified as either a range...
MS_product_ion_m_z
product ion m/z: The m/z of the product ion.
MS_SEQUEST_CleavesAt
SEQUEST:CleavesAt:
MS_FileFilter
FileFilter: Extracts or manipulates portions of data from peak, feature or consensus feature files.
MS_ms_ms_search
ms-ms search: An MS2 search (with fragment ions).
UNIMOD_Oxidation
Oxidation: Oxidation or Hydroxylation.
MS_translation_table
translation table: The translation table used to translate the nucleotides to amino acids.
MS_wolf
wolf (massWolf): A software for converting Waters raw directory format to mzXML or mzML....
MS_frag__z_ion
frag: z ion: Fragmentation information, type of product: z ion.
MS_contact_phone_number
contact phone number: Phone number of the contact person or organization.
UNIMOD_Gln__pyro_Glu
Gln->pyro-Glu: Pyro-glu from Q.
MS_DB_filter_on_accession_numbers
DB filter on accession numbers: Filtering applied specifically by accession number pattern.
MS_translation_table_description
translation table description: A URL that describes the translation table used to translate the nucle...
MS_low_intensity_threshold
low intensity threshold: Threshold below which some action is taken.
MS_frag__b_ion
frag: b ion: Fragmentation information, type of product: b ion.
MS_database_filtering
database filtering: Was there filtering used on the database.
MS_DB_filter_taxonomy
DB filter taxonomy: A taxonomy filter was to the database search.
MS_contact_email
contact email: Email address of the contact person or organization.
MS_software_vendor
software vendor: Software vendor role.
MS_contact_fax_number
contact fax number: Fax number for the contact person or organization.
MS_Mascot_score
Mascot:score: The Mascot result 'Score'.
MS_frag__a_ion
frag: a ion: Fragmentation information, type of product: a ion.
MS_pmf_search
pmf search: A peptide mass fingerprint search.
MS_search_tolerance_plus_value
search tolerance plus value:
MS_DB_PI_filter
DB PI filter: Filtering applied specifically by predicted protein isoelectric focussing point (pI),...
MS_Mascot_expectation_value
Mascot:expectation value: The Mascot result 'expectation value'.
MS_sample_number
sample number: A reference number relevant to the sample under study.
MS_contact_address
contact address: Postal address of the contact person or organization.
MS_contact_toll_free_phone_number
contact toll-free phone number: Toll-free phone number of the contact person or organization.
MS_search_tolerance_minus_value
search tolerance minus value:
MS_product_ion_intensity
product ion intensity: The intensity of a single product ion.
MS_role_type
role type: Role of a Person or Organization.
void testSearchDatabase()
int main(int argc, char *argv[])
void testSearchModification()
void testSampleComponent()
void testSubstitutionModification()
void testAmbiguousResidue()
void testProteinDetectionHypothesis()
void testSpectrumIdentificationResult()
void testProteinDetectionList()
void testDataCollection()
void testDatabaseTranslation()
void testProteinDetectionProtocol()
void testBibliographicReference()
void testPeptideHypothesis()
void testSpectrumIdentificationProtocol()
void testSpectrumIdentificationItem()
void testAnalysisCollection()
void testSpectrumIdentification()
void testProteinAmbiguityGroup()
void testSequenceCollection()
void testPeptideEvidence()
void testProteinDetection()
void testAnalysisSampleCollection()
void testAnalysisProtocolCollection()
void testSpectrumIdentificationList()
void testAnalysisSoftware()
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.
boost::shared_ptr< Contact > ContactPtr
Information about an ontology or CV source and a short 'lookup' tag to refer to.
Calculate diffs of objects in a ProteoWizard data model hierarchy.
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.
std::string customizations
Implementation for the BibliographicReferenceType tag in the mzIdentML schema.
Implementation of DBSequenceType from the mzIdentML schema.
Implementation of DataCollectionType from the mzIdentML schema.
AnalysisData analysisData
Implementation of DatabaseTranslationType from the mzIdentML schema.
std::vector< TranslationTablePtr > translationTable
std::vector< int > frames
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 filterType
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.
Implementation of IonTypeType from the mzIdentML schema.
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.
DBSequencePtr dbSequencePtr
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
DBSequencePtr dbSequencePtr
Implementation of ProteinDetectionListType from the mzIdentML schema.
std::vector< ProteinAmbiguityGroupPtr > proteinAmbiguityGroup
Implementation of ProteinDetectionProtocolType from the mzIdentML schema.
AnalysisSoftwarePtr analysisSoftwarePtr
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.
long numDatabaseSequences
ParamContainer databaseName
Implementation of SearchModificationType from the mzIdentML schema.
std::vector< char > residues
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
long numSequencesSearched
Implementation of SpectrumIdentificationProtocolType from the mzIdentML schema.
ParamContainer additionalSearchParams
std::vector< SearchModificationPtr > modificationParams
ParamContainer fragmentTolerance
std::vector< FilterPtr > databaseFilters
std::vector< MassTablePtr > massTable
ParamContainer parentTolerance
AnalysisSoftwarePtr analysisSoftwarePtr
Implementation of SpectrumIdentificationResultType from the mzIdentML schema.
Implementation of TranslationTableType from the mzIdentML schema.
#define TEST_PROLOG_EX(argc, argv, suffix)
#define unit_assert_equal(x, y, epsilon)
#define unit_assert_operator_equal(expected, actual)