ProteoWizard
Functions | Variables
MinimumPepXMLTest.cpp File Reference
#include "MinimumPepXML.hpp"
#include "pwiz/utility/misc/unit.hpp"
#include "pwiz/utility/misc/Std.hpp"

Go to the source code of this file.

Functions

Specificity makeSpecificity ()
 
SampleEnzyme makeSampleEnzyme ()
 
SearchDatabase makeSearchDatabase ()
 
Q3RatioResult makeQ3RatioResult ()
 
PeptideProphetResult makePeptideProphetResult ()
 
AnalysisResult makeAnalysisResult ()
 
AlternativeProtein makeAlternativeProtein ()
 
ModAminoAcidMass makeModAminoAcidMass ()
 
ModificationInfo makeModificationInfo ()
 
SearchHit makeSearchHit ()
 
EnzymaticSearchConstraint makeEnzymaticSearchConstraint ()
 
AminoAcidModification makeAminoAcidModification ()
 
SearchSummary makeSearchSummary ()
 
SearchResult makeSearchResult ()
 
SpectrumQuery makeSpectrumQuery ()
 
MSMSRunSummary makeMSMSRunSummary ()
 
MatchPtr makeMatch ()
 
void testSpecificity ()
 
void testSampleEnzyme ()
 
void testSearchDatabase ()
 
void testQ3RatioResult ()
 
void testPeptideProphetResult ()
 
void testAnalysisResult ()
 
void testAlternativeProtein ()
 
void testModAminoAcidMass ()
 
void testModificationInfo ()
 
void testSearchHit ()
 
void testSearchResult ()
 
void testEnzymaticSearchConstraint ()
 
void testAminoAcidModification ()
 
void testSearchSummary ()
 
void testSpectrumQuery ()
 
void testMSMSRunSummary ()
 
void testMSMSPipelineAnalysis ()
 
void testMatch ()
 
void testMatchData ()
 
void testInvarianceUnderProteinProphet ()
 
int main (int argc, char *argv[])
 

Variables

ostream * os_ = 0
 

Function Documentation

Specificity makeSpecificity ( )

Definition at line 32 of file MinimumPepXMLTest.cpp.

References pwiz::data::pepxml::Specificity::cut, pwiz::data::pepxml::Specificity::minSpace, pwiz::data::pepxml::Specificity::noCut, and pwiz::data::pepxml::Specificity::sense.

Referenced by makeSampleEnzyme(), and testSpecificity().

33 {
34  Specificity specificity;
35  specificity.cut = "theCake";
36  specificity.noCut = "notTheCake";
37  specificity.sense = "non";
38  specificity.minSpace = 2;
39 
40  return specificity;
41 
42 }
std::string sense
Defines whether cleavage occurs on the C-terminal or N-terminal side of the residue(s) listed in cut ...
std::string noCut
Zero or more 1-letter residue codes.
size_t minSpace
minimum separation between adjacent cleavages. default 1.
std::string cut
One or more 1-letter residue codes.
SampleEnzyme makeSampleEnzyme ( )

Definition at line 44 of file MinimumPepXMLTest.cpp.

References pwiz::data::pepxml::SampleEnzyme::description, pwiz::data::pepxml::SampleEnzyme::fidelity, pwiz::data::pepxml::SampleEnzyme::independent, makeSpecificity(), pwiz::data::pepxml::SampleEnzyme::name, and pwiz::data::pepxml::SampleEnzyme::specificity.

Referenced by makeMSMSRunSummary(), and testSampleEnzyme().

45 {
46  SampleEnzyme sampleEnzyme;
47  sampleEnzyme.name = "oxiclean";
48  sampleEnzyme.description = "makes your whites whiter.";
49  sampleEnzyme.fidelity = "scoundrel";
50  sampleEnzyme.independent = true;
51 
52  Specificity specificity = makeSpecificity();
53  sampleEnzyme.specificity = specificity;
54 
55  return sampleEnzyme;
56 
57 }
std::string fidelity
Semispecific means that at least one end of a pepide must conform to the cleavage specificity...
Specificity makeSpecificity()
std::string name
Controlled code name for the enzyme that can be referred to by applications.
boost::tribool independent
If there are multiple specificities and independent is true, then a single peptide cannot exhibit one...
std::string description
Free text to describe alternative names, special conditions, etc.
SearchDatabase makeSearchDatabase ( )

Definition at line 59 of file MinimumPepXMLTest.cpp.

References pwiz::data::pepxml::SearchDatabase::databaseName, pwiz::data::pepxml::SearchDatabase::databaseReleaseIdentifier, pwiz::data::pepxml::SearchDatabase::localPath, pwiz::data::pepxml::SearchDatabase::sizeInDbEntries, pwiz::data::pepxml::SearchDatabase::sizeOfResidues, and pwiz::data::pepxml::SearchDatabase::type.

Referenced by makeSearchSummary(), and testSearchDatabase().

60 {
61  SearchDatabase searchDatabase;
62  searchDatabase.localPath = "http://www.eharmony.com";
63  searchDatabase.databaseName = "yenta";
64  searchDatabase.databaseReleaseIdentifier = "village busy body";
65  searchDatabase.sizeInDbEntries = 2;
66  searchDatabase.sizeOfResidues = 3;
67  searchDatabase.type = "online dating service";
68 
69  return searchDatabase;
70 }
Q3RatioResult makeQ3RatioResult ( )

Definition at line 72 of file MinimumPepXMLTest.cpp.

References pwiz::data::pepxml::Q3RatioResult::decimalRatio, pwiz::data::pepxml::Q3RatioResult::heavyArea, pwiz::data::pepxml::Q3RatioResult::heavyFirstScan, pwiz::data::pepxml::Q3RatioResult::heavyLastScan, pwiz::data::pepxml::Q3RatioResult::heavyMass, pwiz::data::pepxml::Q3RatioResult::lightArea, pwiz::data::pepxml::Q3RatioResult::lightFirstScan, pwiz::data::pepxml::Q3RatioResult::lightLastScan, pwiz::data::pepxml::Q3RatioResult::lightMass, pwiz::data::pepxml::Q3RatioResult::q2HeavyArea, and pwiz::data::pepxml::Q3RatioResult::q2LightArea.

Referenced by testAnalysisResult(), and testQ3RatioResult().

PeptideProphetResult makePeptideProphetResult ( )

Definition at line 91 of file MinimumPepXMLTest.cpp.

References pwiz::data::pepxml::PeptideProphetResult::allNttProb, and pwiz::data::pepxml::PeptideProphetResult::probability.

Referenced by makeAnalysisResult(), and testPeptideProphetResult().

92 {
93  PeptideProphetResult peptideProphetResult;
94  peptideProphetResult.probability = 0.98;
95 
96  peptideProphetResult.allNttProb.push_back(0.0000);
97  peptideProphetResult.allNttProb.push_back(0.0000);
98  peptideProphetResult.allNttProb.push_back(0.780);
99 
100  return peptideProphetResult;
101 
102 }
AnalysisResult makeAnalysisResult ( )

Definition at line 104 of file MinimumPepXMLTest.cpp.

References pwiz::data::pepxml::AnalysisResult::analysis, makePeptideProphetResult(), and pwiz::data::pepxml::AnalysisResult::peptideProphetResult.

Referenced by makeSearchHit(), and testAnalysisResult().

105 {
106  AnalysisResult analysisResult;
107  analysisResult.analysis = "peptideprophet";
108 
110  analysisResult.peptideProphetResult = pp;
111 
112  return analysisResult;
113 
114 }
PeptideProphetResult makePeptideProphetResult()
PeptideProphetResult peptideProphetResult
AlternativeProtein makeAlternativeProtein ( )

Definition at line 116 of file MinimumPepXMLTest.cpp.

References pwiz::data::pepxml::AlternativeProtein::numTolTerm, pwiz::data::pepxml::AlternativeProtein::protein, and pwiz::data::pepxml::AlternativeProtein::proteinDescr.

Referenced by makeSearchHit(), and testAlternativeProtein().

117 {
118  AlternativeProtein alternativeProtein;
119  alternativeProtein.protein = "Dos Pinos";
120  alternativeProtein.proteinDescr = "leche";
121  alternativeProtein.numTolTerm = "5";
122 
123  return alternativeProtein;
124 
125 }
ModAminoAcidMass makeModAminoAcidMass ( )

Definition at line 127 of file MinimumPepXMLTest.cpp.

References pwiz::data::pepxml::ModAminoAcidMass::mass, and pwiz::data::pepxml::ModAminoAcidMass::position.

Referenced by makeModificationInfo(), and testModAminoAcidMass().

128 {
129  ModAminoAcidMass modAminoAcidMass;
130  modAminoAcidMass.position = 2;
131  modAminoAcidMass.mass = 12.345;
132 
133  return modAminoAcidMass;
134 
135 }
ModificationInfo makeModificationInfo ( )

Definition at line 137 of file MinimumPepXMLTest.cpp.

References makeModAminoAcidMass(), pwiz::data::pepxml::ModificationInfo::modAminoAcidMass, and pwiz::data::pepxml::ModificationInfo::modifiedPeptide.

Referenced by makeSearchHit(), and testModificationInfo().

138 {
139  ModificationInfo modificationInfo;
140  modificationInfo.modifiedPeptide = "GATO";
141  modificationInfo.modAminoAcidMass = makeModAminoAcidMass();
142 
143  return modificationInfo;
144 }
ModAminoAcidMass makeModAminoAcidMass()
SearchHit makeSearchHit ( )

Definition at line 146 of file MinimumPepXMLTest.cpp.

References pwiz::data::pepxml::SearchHit::alternativeProteins, pwiz::data::pepxml::SearchHit::analysisResult, pwiz::data::pepxml::SearchHit::calcNeutralPepMass, pwiz::data::pepxml::SearchHit::hitRank, pwiz::data::pepxml::SearchHit::isRejected, makeAlternativeProtein(), makeAnalysisResult(), makeModificationInfo(), pwiz::data::pepxml::SearchHit::massDiff, pwiz::data::pepxml::SearchHit::modificationInfo, pwiz::data::pepxml::SearchHit::numMatchedIons, pwiz::data::pepxml::SearchHit::numMissedCleavages, pwiz::data::pepxml::SearchHit::numTolTerm, pwiz::data::pepxml::SearchHit::numTotalProteins, pwiz::data::pepxml::SearchHit::peptide, pwiz::data::pepxml::SearchHit::peptideNextAA, pwiz::data::pepxml::SearchHit::peptidePrevAA, pwiz::data::pepxml::SearchHit::protein, and pwiz::data::pepxml::SearchHit::proteinDescr.

Referenced by makeSearchResult(), and testSearchHit().

147 {
148  SearchHit searchHit;
149  searchHit.hitRank = 1;
150  searchHit.peptide = "RAGMALLICK";
151  searchHit.peptidePrevAA = "R";
152  searchHit.peptideNextAA = "V";
153  searchHit.protein = "PA";
154  searchHit.proteinDescr = "Bioinfomagicist";
155  searchHit.numTotalProteins = 1;
156  searchHit.numMatchedIons = 9;
157  searchHit.calcNeutralPepMass = 4.21399;
158  searchHit.massDiff = .0004;
159  searchHit.numTolTerm = 2;
160  searchHit.numMissedCleavages = 3;
161  searchHit.isRejected = 0;
162 
163  AnalysisResult analysisResult = makeAnalysisResult();
164  searchHit.href="studc89dac9d_1data_1_1pepxml_1_1_s9">test,lass="line"> 152  (searchHit. 149  searchHit. 152  (searchHit. 152auo1<_1datb4ïXotec1ca3d49f9c6clauo1<_1datb4e7" href=" 152auo1<_1datb4ïXotec1ca3d49f9c6cl00152"> 152auo1<_1datb4ïXotec1ca3d49f9c6cl00152">
 using nspan class="lineno"> 144 }
pwiz::data::pepxml::AlternativeProtein::numTolTerm
position = 2;
139d9a5int h2ÌyFirstSr8">localPath = pwiz::data::pepxml;71ae8m0d2fc75"line"8<6pan class="lineno"> 152Specificity specificic22_1_modi.ss="lineno"> 152Specificity specific 152, pwiz::data::pepxml::SearchHit::pepe80f3fb6ecbebca66ght" valign="bottom">pwiz::data::pepxml::Searctpwiz:datae80f3 = MinimumPepXML.hpp:138 152  (searchHhpp:138hitRank = 1;
pwiz::data::pepxml::SearchHit::hitRanmatae80f3 = pep_x_m_l_8hpp_source.html#l00331"9pwo7e"> 154  searchHit.
  • testLeastSquares() : Specificity specificic22_1_modi.ss="lineno"> 152unit_assert_equal(peptide.Specificity specificic22_1_modi.ss="lineno"> 152 152iv class="ttc" id="_minimum_pep_Ajaec9413<4be2a5