ProteoWizard
Classes | Functions | Variables
Serializer_pepXML_Test.cpp File Reference
#include "Serializer_pepXML.hpp"
#include "Diff.hpp"
#include "References.hpp"
#include "examples.hpp"
#include "pwiz/utility/misc/unit.hpp"
#include "pwiz/utility/misc/Std.hpp"
#include "pwiz/utility/misc/Filesystem.hpp"
#include "pwiz/data/proteome/Digestion.hpp"
#include "TextWriter.hpp"
#include "boost/range/adaptor/transformed.hpp"
#include "boost/range/algorithm/max_element.hpp"
#include "boost/range/algorithm/min_element.hpp"
#include "boost/range/algorithm_ext/erase.hpp"
#include <cstring>

Go to the source code of this file.

Classes

struct  EnzymePtr_specificity
 
struct  EnzymePtr_missedCleavages
 
struct  UserParamNameIs
 

Functions

void stripUnmappedMetadata (IdentData &mzid)
 
void testTranslation (const string &str)
 
void testSerializeReally (IdentData &mzid, const Serializer_pepXML::Config &config)
 
void testSerialize ()
 
void testPepXMLSpecificity ()
 
void testStripChargeFromConventionalSpectrumId ()
 
void testTranslation ()
 
int main (int argc, char **argv)
 

Variables

ostream * os_ = 0
 

Function Documentation

◆ stripUnmappedMetadata()

void stripUnmappedMetadata ( IdentData mzid)

Definition at line 67 of file Serializer_pepXML_Test.cpp.

68 {
69  mzid.bibliographicReference.clear();
70  mzid.analysisSampleCollection.samples.clear();
71  mzid.auditCollection.clear();
72  mzid.provider = Provider();
73  mzid.dataCollection.inputs.sourceFile.clear();
74 
75  BOOST_FOREACH(AnalysisSoftwarePtr& as, mzid.analysisSoftwareList)
76  {
77  as->URI.clear();
78  as->customizations.clear();
79  as->contactRolePtr.reset();
80  }
81 
83 
84  // pepXML only provides a single min_number_termini and max_num_internal_cleavages for all enzymes
85  int minSpecificity = *boost::range::min_element(sip.enzymes.enzymes | boost::adaptors::transformed(EnzymePtr_specificity()));
86  int maxMissedCleavages = *boost::range::max_element(sip.enzymes.enzymes | boost::adaptors::transformed(EnzymePtr_missedCleavages()));
87  BOOST_FOREACH(const EnzymePtr& ez, sip.enzymes.enzymes)
88  {
89  ez->terminalSpecificity = (proteome::Digestion::Specificity) minSpecificity;
90  ez->missedCleavages = maxMissedCleavages;
91  }
92 
93  // pepXML doesn't map these elements
94  sip.massTable.clear();
95  sip.threshold.clear();
96  sip.databaseFilters.clear();
97  sip.databaseTranslation.reset();
98 
99  // pepXML doesn't map these attributes
100  mzid.analysisCollection.spectrumIdentification[0]->searchDatabase[0]->name.clear();
101  mzid.analysisCollection.spectrumIdentification[0]->searchDatabase[0]->version.clear();
102  mzid.analysisCollection.spectrumIdentification[0]->searchDatabase[0]->releaseDate.clear();
103  mzid.analysisCollection.spectrumIdentification[0]->searchDatabase[0]->databaseName.clear();
104 
105  // pepXML doesn't reliably store location or file format
106  string& location = mzid.analysisCollection.spectrumIdentification[0]->inputSpectra[0]->location;
107  location = BFS_STRING(bfs::path(location).replace_extension("").filename());
108  mzid.analysisCollection.spectrumIdentification[0]->inputSpectra[0]->fileFormat = CVParam();
109 
110  string& location2 = mzid.analysisCollection.spectrumIdentification[0]->searchDatabase[0]->location;
111  location2 = BFS_STRING(bfs::path(location2).replace_extension("").filename());
112 
113  // pepXML doesn't support protein sequences
114  BOOST_FOREACH(DBSequencePtr& dbSequence, mzid.sequenceCollection.dbSequences)
115  {
116  dbSequence->seq.clear();
117  dbSequence->length = 0;
118  dbSequence->id = "DBSeq_" + dbSequence->accession;
119  }
120 
121  // pepXML can only support one mass type (we pick the max mass in case one of them is 0)
122  BOOST_FOREACH(PeptidePtr& peptide, mzid.sequenceCollection.peptides)
123  BOOST_FOREACH(ModificationPtr& mod, peptide->modification)
124  mod->monoisotopicMassDelta = mod->avgMassDelta = max(mod->monoisotopicMassDelta, mod->avgMassDelta);
125 
126  // pepXML doesn't support fragment metadata
127  mzid.dataCollection.analysisData.spectrumIdentificationList[0]->fragmentationTable.clear();
128 
129  BOOST_FOREACH(SpectrumIdentificationResultPtr& sir, mzid.dataCollection.analysisData.spectrumIdentificationList[0]->spectrumIdentificationResult)
130  BOOST_FOREACH(SpectrumIdentificationItemPtr& sii, sir->spectrumIdentificationItem)
131  {
132  // pepXML doesn't support fragment metadata or mass tables
133  sii->fragmentation.clear();
134  sii->massTablePtr.reset();
135 
136  for (size_t i=0; i < sii->peptideEvidencePtr.size(); ++i)
137  {
138  PeptideEvidence& pe = *sii->peptideEvidencePtr[i];
139 
140  // pepXML does not store peptide start and end offsets
141  pe.start = pe.end = 0;
142 
143  // pepXML's alternative_proteins do not store prev/next AA or missed cleavages
144  if (i > 0)
145  pe.pre = pe.post = '?';
146  }
147  }
148 
149  // pepXML doesn't have protein assembly
152 
153  // pepXML expects the residues to be '.' or an amino acid list
154  BOOST_FOREACH(SearchModificationPtr& sm, mzid.analysisProtocolCollection.spectrumIdentificationProtocol[0]->modificationParams)
155  if (sm->residues.empty())
156  sm->residues.push_back('.');
157 }

References pwiz::identdata::IdentData::analysisCollection, pwiz::identdata::DataCollection::analysisData, pwiz::identdata::IdentData::analysisProtocolCollection, pwiz::identdata::IdentData::analysisSampleCollection, pwiz::identdata::IdentData::analysisSoftwareList, pwiz::identdata::IdentData::auditCollection, BFS_STRING, pwiz::identdata::IdentData::bibliographicReference, pwiz::data::ParamContainer::clear(), pwiz::identdata::SpectrumIdentificationProtocol::databaseFilters, pwiz::identdata::SpectrumIdentificationProtocol::databaseTranslation, pwiz::identdata::IdentData::dataCollection, pwiz::identdata::SequenceCollection::dbSequences, pwiz::identdata::PeptideEvidence::end, pwiz::identdata::Enzymes::enzymes, pwiz::identdata::SpectrumIdentificationProtocol::enzymes, pwiz::identdata::DataCollection::inputs, pwiz::identdata::SpectrumIdentificationProtocol::massTable, pwiz::identdata::peptide(), pwiz::identdata::SequenceCollection::peptides, pwiz::identdata::PeptideEvidence::post, pwiz::identdata::PeptideEvidence::pre, pwiz::identdata::AnalysisCollection::proteinDetection, pwiz::identdata::AnalysisData::proteinDetectionListPtr, pwiz::identdata::IdentData::provider, pwiz::identdata::AnalysisSampleCollection::samples, pwiz::identdata::IdentData::sequenceCollection, pwiz::identdata::Inputs::sourceFile, pwiz::identdata::AnalysisCollection::spectrumIdentification, pwiz::identdata::AnalysisData::spectrumIdentificationList, pwiz::identdata::AnalysisProtocolCollection::spectrumIdentificationProtocol, pwiz::identdata::PeptideEvidence::start, and pwiz::identdata::SpectrumIdentificationProtocol::threshold.

Referenced by testSerialize().

◆ testTranslation() [1/2]

void testTranslation ( const string &  str)

Definition at line 159 of file Serializer_pepXML_Test.cpp.

160 {
161  // test that search engine name is written using preferred name
162  unit_assert(bal::contains(str, "search_engine=\"Mascot\""));
163 
164  // test that score names are written using preferred name
165  unit_assert(bal::contains(str, "name=\"ionscore\""));
166  unit_assert(bal::contains(str, "name=\"homologyscore\""));
167  unit_assert(bal::contains(str, "name=\"identityscore\""));
168  unit_assert(bal::contains(str, "name=\"expect\""));
169  unit_assert(bal::contains(str, "name=\"an extra score\""));
170 
171  // test that nativeID is preserved
172  unit_assert(bal::contains(str, "spectrumNativeID=\"controllerType=0 controllerNumber=1 scan=420\""));
173 }

References unit_assert.

Referenced by main(), and testSerializeReally().

◆ testSerializeReally()

void testSerializeReally ( IdentData mzid,
const Serializer_pepXML::Config config 
)

Definition at line 175 of file Serializer_pepXML_Test.cpp.

176 {
177  if (os_) *os_ << "begin testSerialize" << endl;
178 
179  Serializer_pepXML serializer(config);
180  ostringstream oss;
181  serializer.write(oss, mzid, "tiny.pepXML");
182 
183  if (os_) *os_ << "oss:\n" << oss.str() << endl;
184  if (config.readSpectrumQueries)
185  testTranslation(oss.str());
186 
187  shared_ptr<istringstream> iss(new istringstream(oss.str()));
188  IdentData mzid2;
189  serializer.read(iss, mzid2);
190 
191  References::resolve(mzid2);
192 
193  // remove DecoyPrefix userParam that is redundant with the decoy DB prefix cvParam
194  boost::range::remove_erase_if(mzid2.analysisProtocolCollection.spectrumIdentificationProtocol[0]->additionalSearchParams.userParams, UserParamNameIs("DecoyPrefix"));
195 
196  Diff<IdentData, DiffConfig> diff(mzid, mzid2);
197  if (os_ && diff) *os_ << diff << endl;
198  unit_assert(!diff);
199 }

References pwiz::identdata::IdentData::analysisProtocolCollection, diff(), os_, pwiz::identdata::Serializer_pepXML::read(), pwiz::identdata::Serializer_pepXML::Config::readSpectrumQueries, pwiz::identdata::References::resolve(), pwiz::identdata::AnalysisProtocolCollection::spectrumIdentificationProtocol, testTranslation(), unit_assert, and pwiz::identdata::Serializer_pepXML::write().

Referenced by testSerialize().

◆ testSerialize()

void testSerialize ( )

Definition at line 201 of file Serializer_pepXML_Test.cpp.

202 {
203  IdentData mzid;
205  stripUnmappedMetadata(mzid);
207 
208 
209  // test non-specific enzyme
210  mzid.analysisProtocolCollection.spectrumIdentificationProtocol[0]->enzymes.enzymes.clear();
211  EnzymePtr noEnzyme(new Enzyme);
212  noEnzyme->id = "ENZ_1";
213  noEnzyme->cTermGain = "OH";
214  noEnzyme->nTermGain = "H";
215  noEnzyme->missedCleavages = 2;
216  noEnzyme->minDistance = 1;
217  noEnzyme->terminalSpecificity = proteome::Digestion::NonSpecific;
218  noEnzyme->siteRegexp = "(?<=[KR])";
219  noEnzyme->enzymeName.set(MS_Trypsin_P);
220  mzid.analysisProtocolCollection.spectrumIdentificationProtocol[0]->enzymes.enzymes.push_back(noEnzyme);
222 
223 
224  // test sense="N" enzymes
225  mzid.analysisProtocolCollection.spectrumIdentificationProtocol[0]->enzymes.enzymes.clear();
226  EnzymePtr aspN(new Enzyme);
227  aspN->id = "ENZ_1";
228  aspN->cTermGain = "OH";
229  aspN->nTermGain = "H";
230  aspN->missedCleavages = 2;
231  aspN->minDistance = 1;
232  aspN->terminalSpecificity = proteome::Digestion::FullySpecific;
233  aspN->siteRegexp = "(?=[BD])";
234  aspN->enzymeName.set(MS_Asp_N);
235  mzid.analysisProtocolCollection.spectrumIdentificationProtocol[0]->enzymes.enzymes.push_back(aspN);
237 
238  aspN->missedCleavages = 4;
239  aspN->minDistance = 2;
240  aspN->terminalSpecificity = proteome::Digestion::SemiSpecific;
241  aspN->siteRegexp = "(?=[BND])";
242  aspN->enzymeName.clear();
243  aspN->enzymeName.userParams.push_back(UserParam("custom"));
245 
246 
247  // test with readSpectrumQueries == false
248 
249  // clear the original SequenceCollection
250  mzid.sequenceCollection.dbSequences.clear();
251  mzid.sequenceCollection.peptides.clear();
252  mzid.sequenceCollection.peptideEvidence.clear();
253 
254  // clear the original analysis data
255  mzid.analysisCollection.spectrumIdentification[0]->inputSpectra[0]->spectrumIDFormat = CVParam();
256  mzid.analysisCollection.spectrumIdentification[0]->spectrumIdentificationListPtr.reset();
259 
261 }

References pwiz::identdata::IdentData::analysisCollection, pwiz::identdata::DataCollection::analysisData, pwiz::identdata::IdentData::analysisProtocolCollection, pwiz::identdata::IdentData::dataCollection, pwiz::identdata::SequenceCollection::dbSequences, pwiz::identdata::examples::initializeBasicSpectrumIdentification(), MS_Asp_N, MS_Trypsin_P, NonSpecific, pwiz::identdata::SequenceCollection::peptideEvidence, pwiz::identdata::SequenceCollection::peptides, pwiz::identdata::AnalysisData::proteinDetectionListPtr, SemiSpecific, pwiz::identdata::IdentData::sequenceCollection, pwiz::identdata::AnalysisCollection::spectrumIdentification, pwiz::identdata::AnalysisData::spectrumIdentificationList, pwiz::identdata::AnalysisProtocolCollection::spectrumIdentificationProtocol, stripUnmappedMetadata(), and testSerializeReally().

Referenced by main().

◆ testPepXMLSpecificity()

void testPepXMLSpecificity ( )

Definition at line 263 of file Serializer_pepXML_Test.cpp.

264 {
265  PepXMLSpecificity result;
266  Enzyme ez;
267 
269  result = pepXMLSpecificity(ez);
270  unit_assert_operator_equal("C", result.sense);
271  unit_assert_operator_equal("KR", result.cut);
272  unit_assert_operator_equal("P", result.no_cut);
273 
274  ez.enzymeName.clear();
276  result = pepXMLSpecificity(ez);
277  unit_assert_operator_equal("C", result.sense);
278  unit_assert_operator_equal("KR", result.cut);
280 
281  ez.enzymeName.clear();
282  ez.enzymeName.userParams.push_back(UserParam("trypsin/p"));
283  result = pepXMLSpecificity(ez);
284  unit_assert_operator_equal("C", result.sense);
285  unit_assert_operator_equal("KR", result.cut);
287 
288  ez.enzymeName.clear();
289  ez.name = "trypsin/p";
290  result = pepXMLSpecificity(ez);
291  unit_assert_operator_equal("C", result.sense);
292  unit_assert_operator_equal("KR", result.cut);
294 
295  ez.name.clear();
296  ez.enzymeName.set(MS_Asp_N);
297  result = pepXMLSpecificity(ez);
298  unit_assert_operator_equal("N", result.sense);
299  unit_assert_operator_equal("BD", result.cut);
301 
302  ez.enzymeName.clear();
304  result = pepXMLSpecificity(ez);
305  unit_assert_operator_equal("C", result.sense);
306  unit_assert_operator_equal("KR", result.cut);
307  unit_assert_operator_equal("P", result.no_cut);
308 
310  result = pepXMLSpecificity(ez);
311  unit_assert_operator_equal("C", result.sense);
312  unit_assert_operator_equal("KR", result.cut);
314 
316  result = pepXMLSpecificity(ez);
317  unit_assert_operator_equal("N", result.sense);
318  unit_assert_operator_equal("BD", result.cut);
320 
321 
322  // REMEMBER: update the pepXMLSpecificity function when new CV enzymes are added
323  bool allCleavageAgentsHandled = true;
324  ez.siteRegexp.clear();
326  try
327  {
328  ez.enzymeName.clear();
330  result = pepXMLSpecificity(ez);
331  }
332  catch (exception& e)
333  {
334  cerr << e.what() << endl;
335  allCleavageAgentsHandled = false;
336  }
337  unit_assert(allCleavageAgentsHandled);
338 
339 
340  ez.siteRegexp = "(?<=[QWERTY])(?=[QWERTY])";
341  result = pepXMLSpecificity(ez);
342  unit_assert_operator_equal("C", result.sense);
343  unit_assert_operator_equal("QWERTY", result.cut);
344  unit_assert_operator_equal("ABCDFGHIJKLMNOPSUVZ", result.no_cut);
345 
346  ez.siteRegexp = "(?<![QWERTY])(?![QWERTY])";
347  result = pepXMLSpecificity(ez);
348  unit_assert_operator_equal("C", result.sense);
349  unit_assert_operator_equal("ABCDFGHIJKLMNOPSUVZ", result.cut);
350  unit_assert_operator_equal("QWERTY", result.no_cut);
351 
352  ez.siteRegexp = "(?<=[QWERTY])";
353  result = pepXMLSpecificity(ez);
354  unit_assert_operator_equal("C", result.sense);
355  unit_assert_operator_equal("QWERTY", result.cut);
357 
358  ez.siteRegexp = "(?=[QWERTY])";
359  result = pepXMLSpecificity(ez);
360  unit_assert_operator_equal("N", result.sense);
361  unit_assert_operator_equal("QWERTY", result.cut);
363 
364  ez.siteRegexp = "(?<![QWERTY])";
365  result = pepXMLSpecificity(ez);
366  unit_assert_operator_equal("C", result.sense);
367  unit_assert_operator_equal("ABCDFGHIJKLMNOPSUVZ", result.cut);
369 
370  ez.siteRegexp = "(?![QWERTY])";
371  result = pepXMLSpecificity(ez);
372  unit_assert_operator_equal("N", result.sense);
373  unit_assert_operator_equal("ABCDFGHIJKLMNOPSUVZ", result.cut);
375 }

References pwiz::data::ParamContainer::clear(), pwiz::identdata::cleavageAgent(), pwiz::identdata::PepXMLSpecificity::cut, pwiz::identdata::Enzyme::enzymeName, pwiz::proteome::Digestion::getCleavageAgentRegex(), pwiz::proteome::Digestion::getCleavageAgents(), MS_Asp_N, MS_Trypsin, MS_Trypsin_P, pwiz::identdata::Identifiable::name, pwiz::identdata::PepXMLSpecificity::no_cut, pwiz::identdata::pepXMLSpecificity(), pwiz::identdata::PepXMLSpecificity::sense, pwiz::data::ParamContainer::set(), pwiz::identdata::Enzyme::siteRegexp, unit_assert, unit_assert_operator_equal, and pwiz::data::ParamContainer::userParams.

Referenced by main().

◆ testStripChargeFromConventionalSpectrumId()

void testStripChargeFromConventionalSpectrumId ( )

Definition at line 378 of file Serializer_pepXML_Test.cpp.

379 {
380  unit_assert_operator_equal("basename.123.123", stripChargeFromConventionalSpectrumId("basename.123.123.2"));
381  unit_assert_operator_equal("basename.ext.123.123", stripChargeFromConventionalSpectrumId("basename.ext.123.123.12"));
382  unit_assert_operator_equal("basename.2.2", stripChargeFromConventionalSpectrumId("basename.2.2.2"));
383  unit_assert_operator_equal("basename.ext.3.3", stripChargeFromConventionalSpectrumId("basename.ext.3.3.3"));
384  unit_assert_operator_equal("basename.123.123", stripChargeFromConventionalSpectrumId("basename.123.123"));
385  unit_assert_operator_equal("basename.ext.123.123", stripChargeFromConventionalSpectrumId("basename.ext.123.123"));
386  unit_assert_operator_equal("locus:1.1.1.123", stripChargeFromConventionalSpectrumId("locus:1.1.1.123.2"));
387  unit_assert_operator_equal("basename.123", stripChargeFromConventionalSpectrumId("basename.123"));
389 }

References pwiz::identdata::stripChargeFromConventionalSpectrumId(), and unit_assert_operator_equal.

Referenced by main().

◆ testTranslation() [2/2]

void testTranslation ( )

Definition at line 392 of file Serializer_pepXML_Test.cpp.

393 {
397 
401 
404 
409 
410 
413 
416 
419 
422 
423 
424  unit_assert_operator_equal(MS_Thermo_nativeID_format, nativeIdStringToCVID("controllerType=1 controllerNumber=0 scan=1234"));
425  unit_assert_operator_equal(MS_WIFF_nativeID_format, nativeIdStringToCVID("sample=1 period=1 cycle=1234 experiment=2"));
426 }

References CVID_Unknown, MS_Comet, MS_Comet_xcorr, MS_MyriMatch, MS_MyriMatch_MVH, MS_SEQUEST, MS_SEQUEST_xcorr, MS_Thermo_nativeID_format, MS_WIFF_nativeID_format, MS_X_Tandem, pwiz::identdata::nativeIdStringToCVID(), pwiz::identdata::pepXMLScoreNameToCVID(), pwiz::identdata::pepXMLSoftwareNameToCVID(), pwiz::identdata::scoreCVIDToPepXMLScoreName(), pwiz::identdata::softwareCVIDToPepXMLSoftwareName(), and unit_assert_operator_equal.

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 429 of file Serializer_pepXML_Test.cpp.

430 {
431  TEST_PROLOG(argc, argv)
432 
433  try
434  {
435  if (argc>1 && !strcmp(argv[1],"-v")) os_ = &cout;
438  testTranslation();
439  testSerialize();
440  }
441  catch (exception& e)
442  {
443  TEST_FAILED(e.what())
444  }
445  catch (...)
446  {
447  TEST_FAILED("Caught unknown exception.")
448  }
449 
451 }

References os_, TEST_EPILOG, TEST_FAILED, TEST_PROLOG, testPepXMLSpecificity(), testSerialize(), testStripChargeFromConventionalSpectrumId(), and testTranslation().

Variable Documentation

◆ os_

ostream* os_ = 0

Definition at line 44 of file Serializer_pepXML_Test.cpp.

Referenced by main(), and testSerializeReally().

pwiz::data::UserParam
Uncontrolled user parameters (essentially allowing free text). Before using these,...
Definition: ParamTypes.hpp:186
UserParamNameIs
Definition: Serializer_pepXML_Test.cpp:59
pwiz::identdata::PeptideEvidence
Implementation of PeptideEvidenceType from the mzIdentML schema.
Definition: IdentData.hpp:627
pwiz::data::ParamContainer::clear
void clear()
clears the collections
stripUnmappedMetadata
void stripUnmappedMetadata(IdentData &mzid)
Definition: Serializer_pepXML_Test.cpp:67
pwiz::data::unimod::modification
PWIZ_API_DECL const Modification & modification(CVID cvid)
find a modification by CVID
MS_Comet
MS_Comet
Comet: Comet open-source sequence search engine developed at the University of Washington.
Definition: cv.hpp:7200
MS_WIFF_nativeID_format
MS_WIFF_nativeID_format
WIFF nativeID format: Native format defined by sample=xsd:nonNegativeInteger period=xsd:nonNegativeIn...
Definition: cv.hpp:2982
testPepXMLSpecificity
void testPepXMLSpecificity()
Definition: Serializer_pepXML_Test.cpp:263
pwiz::identdata::Enzyme::siteRegexp
std::string siteRegexp
Definition: IdentData.hpp:419
pwiz::identdata::pepXMLSpecificity
PWIZ_API_DECL PepXMLSpecificity pepXMLSpecificity(const Enzyme &ez)
converts an identdata::Enzyme into a pepXML cut/no_cut/sense tuple
pwiz::identdata::Provider
Implementation of ProviderType from the mzIdentML schema.
Definition: IdentData.hpp:235
pwiz::identdata::IdentData::analysisCollection
AnalysisCollection analysisCollection
Definition: IdentData.hpp:1016
EnzymePtr_specificity
Definition: Serializer_pepXML_Test.cpp:47
pwiz::identdata::IdentData::bibliographicReference
std::vector< BibliographicReferencePtr > bibliographicReference
Definition: IdentData.hpp:1022
pwiz::identdata::SpectrumIdentificationProtocol::enzymes
Enzymes enzymes
Definition: IdentData.hpp:555
pwiz::data::ParamContainer::userParams
std::vector< UserParam > userParams
a collection of uncontrolled user terms
Definition: ParamTypes.hpp:253
EnzymePtr_missedCleavages
Definition: Serializer_pepXML_Test.cpp:53
MS_X_Tandem
MS_X_Tandem
X!Tandem: X!Tandem was used to analyze the spectra.
Definition: cv.hpp:4833
pwiz::identdata::pepXMLSoftwareNameToCVID
PWIZ_API_DECL CVID pepXMLSoftwareNameToCVID(const std::string &softwareName)
converts a software name stored in pepXML software element into its corresponding CVID,...
pwiz::identdata::PepXMLSpecificity::sense
std::string sense
Definition: Serializer_pepXML.hpp:67
pwiz::identdata::References::resolve
PWIZ_API_DECL void resolve(ContactRole &cr, IdentData &mzid)
pwiz::identdata::Serializer_pepXML
MZIDData <-> pepXML stream serialization.
Definition: Serializer_pepXML.hpp:37
pwiz::identdata::AnalysisSampleCollection::samples
std::vector< SamplePtr > samples
Definition: IdentData.hpp:260
pwiz::identdata::SpectrumIdentificationProtocol::massTable
std::vector< MassTablePtr > massTable
Definition: IdentData.hpp:556
pwiz::identdata::cleavageAgent
PWIZ_API_DECL CVID cleavageAgent(const Enzyme &ez)
returns a cleavage agent CVID for an identdata::Enzyme
pwiz::identdata::PeptideEvidence::pre
char pre
Definition: IdentData.hpp:635
pwiz::identdata::AnalysisCollection::spectrumIdentification
std::vector< SpectrumIdentificationPtr > spectrumIdentification
Definition: IdentData.hpp:897
pwiz::proteome::Digestion::getCleavageAgents
static const std::set< CVID > & getCleavageAgents()
returns the set of predefined cleavage agents defined in the PSI-MS CV
pwiz::identdata::ProteinDetection
Implementation of ProteinDetectionType from the mzIdentML schema.
Definition: IdentData.hpp:873
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::Enzyme
Implementation of EnzymeType from the mzIdentML schema.
Definition: IdentData.hpp:409
unit_assert_operator_equal
#define unit_assert_operator_equal(expected, actual)
Definition: unit.hpp:92
pwiz::identdata::softwareCVIDToPepXMLSoftwareName
PWIZ_API_DECL const std::string & softwareCVIDToPepXMLSoftwareName(CVID softwareCVID)
converts a software CVID to the preferred name for that software in pepXML; an unrecognized software ...
pwiz::identdata::PepXMLSpecificity::cut
std::string cut
Definition: Serializer_pepXML.hpp:67
MS_SEQUEST
MS_SEQUEST
SEQUEST: The name of the SEQUEST search engine.
Definition: cv.hpp:4053
pwiz::identdata::SequenceCollection::peptideEvidence
std::vector< PeptideEvidencePtr > peptideEvidence
Definition: IdentData.hpp:656
pwiz::data::Diff
Calculate diffs of objects in a ProteoWizard data model hierarchy.
Definition: diff_std.hpp:143
pwiz::identdata::AnalysisData::spectrumIdentificationList
std::vector< SpectrumIdentificationListPtr > spectrumIdentificationList
Definition: IdentData.hpp:962
pwiz::identdata::Serializer_pepXML::Config
Serializer_pepXML configuration.
Definition: Serializer_pepXML.hpp:42
pwiz::identdata::peptide
PWIZ_API_DECL proteome::Peptide peptide(const Peptide &peptide)
creates a proteome::Peptide from an identdata::Peptide
pwiz::identdata::scoreCVIDToPepXMLScoreName
PWIZ_API_DECL const std::string & scoreCVIDToPepXMLScoreName(CVID softwareCVID, CVID scoreCVID)
for a given software CVID, converts a score CVID into the preferred name for that score in pepXML; an...
TEST_EPILOG
#define TEST_EPILOG
Definition: unit.hpp:183
MS_SEQUEST_xcorr
MS_SEQUEST_xcorr
SEQUEST:xcorr: The SEQUEST result 'XCorr'.
Definition: cv.hpp:3924
pwiz::identdata::SpectrumIdentificationProtocol
Implementation of SpectrumIdentificationProtocolType from the mzIdentML schema.
Definition: IdentData.hpp:546
pwiz::identdata::DataCollection::inputs
Inputs inputs
Definition: IdentData.hpp:976
CVID_Unknown
CVID_Unknown
Definition: cv.hpp:114
pwiz::proteome::Digestion::getCleavageAgentRegex
static const std::string & getCleavageAgentRegex(CVID agentCvid)
returns the official PSI Perl regular expression defining the places in a polypeptide or protein that...
MS_Asp_N
MS_Asp_N
Asp-N: Endoproteinase Asp-N.
Definition: cv.hpp:4320
pwiz::identdata::PeptideEvidence::post
char post
Definition: IdentData.hpp:636
pwiz::identdata::AnalysisData::proteinDetectionListPtr
ProteinDetectionListPtr proteinDetectionListPtr
Definition: IdentData.hpp:963
pwiz::identdata::IdentData::provider
Provider provider
Definition: IdentData.hpp:1008
testSerialize
void testSerialize()
Definition: Serializer_pepXML_Test.cpp:201
MS_Trypsin
MS_Trypsin
Trypsin: Enzyme trypsin.
Definition: cv.hpp:4179
pwiz::identdata::IdentData::analysisSampleCollection
AnalysisSampleCollection analysisSampleCollection
Definition: IdentData.hpp:1012
pwiz::identdata::SpectrumIdentificationProtocol::databaseTranslation
DatabaseTranslationPtr databaseTranslation
Definition: IdentData.hpp:561
diff
void diff(const string &filename1, const string &filename2)
Definition: FrequencyDataTest.cpp:40
pwiz::identdata::SequenceCollection::dbSequences
std::vector< DBSequencePtr > dbSequences
Definition: IdentData.hpp:654
pwiz::identdata::PepXMLSpecificity
Definition: Serializer_pepXML.hpp:66
pwiz::identdata::examples::initializeBasicSpectrumIdentification
PWIZ_API_DECL void initializeBasicSpectrumIdentification(IdentData &mzid)
testSerializeReally
void testSerializeReally(IdentData &mzid, const Serializer_pepXML::Config &config)
Definition: Serializer_pepXML_Test.cpp:175
pwiz::identdata::IdentData
Implementation of the MzIdentMLType from the mzIdentML schema.
Definition: IdentData.hpp:994
pwiz::identdata::IdentData::sequenceCollection
SequenceCollection sequenceCollection
Definition: IdentData.hpp:1014
pwiz::identdata::stripChargeFromConventionalSpectrumId
PWIZ_API_DECL std::string stripChargeFromConventionalSpectrumId(const std::string &id)
strips charge state from known conventions of the pepXML spectrum attribute; used to find a unique id...
pwiz::identdata::Inputs::sourceFile
std::vector< SourceFilePtr > sourceFile
Definition: IdentData.hpp:946
pwiz::identdata::SequenceCollection::peptides
std::vector< PeptidePtr > peptides
Definition: IdentData.hpp:655
os_
ostream * os_
Definition: Serializer_pepXML_Test.cpp:44
MS_Thermo_nativeID_format
MS_Thermo_nativeID_format
Thermo nativeID format: Native format defined by controllerType=xsd:nonNegativeInteger controllerNumb...
Definition: cv.hpp:2976
pwiz::identdata::nativeIdStringToCVID
PWIZ_API_DECL CVID nativeIdStringToCVID(const std::string &id)
attempts to convert a period-delimited id into a nativeID format (e.g. "1.0.123" appears to be a Ther...
pwiz::identdata::IdentData::dataCollection
DataCollection dataCollection
Definition: IdentData.hpp:1020
MS_Trypsin_P
MS_Trypsin_P
Trypsin/P: Cleavage agent Trypsin/P.
Definition: cv.hpp:4350
TEST_FAILED
#define TEST_FAILED(x)
Definition: unit.hpp:177
TEST_PROLOG
#define TEST_PROLOG(argc, argv)
Definition: unit.hpp:175
BFS_STRING
#define BFS_STRING(p)
Definition: Filesystem.hpp:58
pwiz::identdata::Serializer_pepXML::Config::readSpectrumQueries
bool readSpectrumQueries
Definition: Serializer_pepXML.hpp:43
pwiz::identdata::Enzyme::enzymeName
ParamContainer enzymeName
Definition: IdentData.hpp:420
pwiz::data::ParamContainer::set
void set(CVID cvid, const std::string &value="", CVID units=CVID_Unknown)
set/add a CVParam (not recursive)
pwiz::identdata::PeptideEvidence::end
int end
Definition: IdentData.hpp:634
pwiz::identdata::PeptideEvidence::start
int start
Definition: IdentData.hpp:633
pwiz::identdata::PepXMLSpecificity::no_cut
std::string no_cut
Definition: Serializer_pepXML.hpp:67
testTranslation
void testTranslation(const string &str)
Definition: Serializer_pepXML_Test.cpp:159
SemiSpecific
SemiSpecific
neither termini must match digestion motif(s)
Definition: Digestion.hpp:120
pwiz::identdata::IdentData::analysisProtocolCollection
AnalysisProtocolCollection analysisProtocolCollection
Definition: IdentData.hpp:1018
MS_Comet_xcorr
MS_Comet_xcorr
Comet:xcorr: The Comet result 'XCorr'.
Definition: cv.hpp:7203
pwiz::identdata::AnalysisProtocolCollection::spectrumIdentificationProtocol
std::vector< SpectrumIdentificationProtocolPtr > spectrumIdentificationProtocol
Definition: IdentData.hpp:911
pwiz::identdata::AnalysisCollection::proteinDetection
ProteinDetection proteinDetection
Definition: IdentData.hpp:898
unit_assert
#define unit_assert(x)
Definition: unit.hpp:85
pwiz::identdata::DataCollection::analysisData
AnalysisData analysisData
Definition: IdentData.hpp:977
MS_MyriMatch_MVH
MS_MyriMatch_MVH
MyriMatch:MVH: Using the multivariate hypergeometric distribution and a peak list divided into severa...
Definition: cv.hpp:5169
pwiz::identdata::IdentData::analysisSoftwareList
std::vector< AnalysisSoftwarePtr > analysisSoftwareList
Definition: IdentData.hpp:1006
pwiz::identdata::SpectrumIdentificationProtocol::threshold
ParamContainer threshold
Definition: IdentData.hpp:559
pwiz::data::CVParam
represents a tag-value pair, where the tag comes from the controlled vocabulary
Definition: ParamTypes.hpp:45
pwiz::identdata::Identifiable::name
std::string name
Definition: IdentData.hpp:71
NonSpecific
NonSpecific
Definition: Digestion.hpp:119
MS_MyriMatch
MS_MyriMatch
MyriMatch: Tabb Lab software for directly comparing peptides in a database to tandem mass spectra.
Definition: cv.hpp:5157
testStripChargeFromConventionalSpectrumId
void testStripChargeFromConventionalSpectrumId()
Definition: Serializer_pepXML_Test.cpp:378
pwiz::tradata::PeptidePtr
boost::shared_ptr< Peptide > PeptidePtr
Definition: TraData.hpp:236
pwiz::identdata::pepXMLScoreNameToCVID
PWIZ_API_DECL CVID pepXMLScoreNameToCVID(CVID softwareCVID, const std::string &scoreName)
for a given software CVID, converts a pepXML score name into its corresponding CVID,...
pwiz::identdata::IdentData::auditCollection
std::vector< ContactPtr > auditCollection
Definition: IdentData.hpp:1010