diff --git a/src/core/peptideevidence.cpp b/src/core/peptideevidence.cpp index 5cfd69cf41c2df51977b82cd31891b61bc7c1eda..be909da736089e89e943d150181f9401ece3df0d 100644 --- a/src/core/peptideevidence.cpp +++ b/src/core/peptideevidence.cpp @@ -102,6 +102,12 @@ PeptideEvidence::setIdentificationEngine( _identification_engine = identification_engine; } +IdentificationEngine +PeptideEvidence::getIdentificationEngine() const +{ + return _identification_engine; +} + /** \brief set specific parameter value */ void diff --git a/src/core/peptideevidence.h b/src/core/peptideevidence.h index 628aaf09e63fdaeb5f0329cde584317e15bab04c..acda0872c788e579fbf98c937b1242b95e1f5049 100644 --- a/src/core/peptideevidence.h +++ b/src/core/peptideevidence.h @@ -99,6 +99,12 @@ public : * by default, this is the identification engine of the datasource */ void setIdentificationEngine(IdentificationEngine identification_engine); + + /** @brief get the identification engine + * by default, this is the identification engine of the datasource + */ + IdentificationEngine getIdentificationEngine() const; + void setChecked(bool arg1); bool isChecked() const; bool isValid() const; diff --git a/src/input/pepxmlsaxhandler.cpp b/src/input/pepxmlsaxhandler.cpp index a031df10c82be012faa8b4b22f819f5baa240c69..05090d158db014bdd42b9728e9f9eab8b25c7f4a 100644 --- a/src/input/pepxmlsaxhandler.cpp +++ b/src/input/pepxmlsaxhandler.cpp @@ -297,7 +297,7 @@ PepXmlSaxHandler::startElement_spectrum_query(QXmlAttributes attributes) //<alternative_protein protein="sp|P46784|RS10B_YEAST" protein_descr="40S // ribosomal protein S10-B OS=Saccharomyces cerevisiae (strain ATCC 204508 -// \ +// \ //S288c) GN=RPS10B PE=1 SV=1" num_tol_term="2" peptide_prev_aa="K" // peptide_next_aa="N"/> bool @@ -482,18 +482,33 @@ PepXmlSaxHandler::startElement_search_score(QXmlAttributes attributes) if(name == "expect") { _p_peptide_evidence->setEvalue(valueStr.simplified().toDouble()); + if(_p_peptide_evidence->getIdentificationEngine() == + IdentificationEngine::OMSSA) + { + _p_peptide_evidence->setParam(PeptideEvidenceParam::omssa_evalue, + valueStr.simplified().toDouble()); + } } - if(name == "EValue") + else if(name == "EValue") { _p_peptide_evidence->setEvalue(valueStr.simplified().toDouble()); } // <search_score name="hyperscore" value="232"/> - if(name == "hyperscore") + else if(name == "hyperscore") { _p_peptide_evidence->setParam( PeptideEvidenceParam::tandem_hyperscore, QVariant(attributes.value("hyperscore").toDouble())); } + else if(name == "pvalue") + { + if(_p_peptide_evidence->getIdentificationEngine() == + IdentificationEngine::OMSSA) + { + _p_peptide_evidence->setParam(PeptideEvidenceParam::omssa_pvalue, + valueStr.simplified().toDouble()); + } + } } return is_ok; } diff --git a/src/input/xtpxpipsaxhandler.cpp b/src/input/xtpxpipsaxhandler.cpp index 3d9fa5c3104d78877ba7a9d1fd850e1ede482bd5..596759c864c55065cba08e97cc11c35c808db665 100644 --- a/src/input/xtpxpipsaxhandler.cpp +++ b/src/input/xtpxpipsaxhandler.cpp @@ -423,6 +423,7 @@ bool XtpXpipSaxHandler::startElement_peptide_evidence(QXmlAttributes attributes) _p_peptide_evidence->setChecked(true); } _p_peptide_evidence->setCharge(attributes.value("charge").toUInt()); + _p_peptide_evidence->setIdentificationEngine(static_cast<IdentificationEngine>(attributes.value("eng").toUInt())); _p_peptide_evidence->setRetentionTime(attributes.value("rt").toDouble()); _p_peptide_evidence->setEvalue(attributes.value("evalue").toDouble()); _p_peptide_evidence->setExperimentalMass(attributes.value("exp_mass").toDouble()); diff --git a/src/output/xpip.cpp b/src/output/xpip.cpp index ce0ecf20b02747f16cca1cc472988b3b0d40748f..5a7761cd36823433091b8773036c945394123e2c 100644 --- a/src/output/xpip.cpp +++ b/src/output/xpip.cpp @@ -438,6 +438,7 @@ void Xpip::writePeptideEvidence(const PeptideEvidence * p_peptide_evidence) { qDebug() << "Xpip::writePeptideEvidence scan"; _output_stream->writeAttribute("scan",QString("%1").arg(p_peptide_evidence->getScan())); writeDoubleAttribute("rt",p_peptide_evidence->getRetentionTime()); + _output_stream->writeAttribute("eng",QString("%1").arg((unsigned int) p_peptide_evidence->getIdentificationEngine())); writeDoubleAttribute("evalue",p_peptide_evidence->getEvalue()); writeDoubleAttribute("exp_mass",p_peptide_evidence->getExperimentalMass()); _output_stream->writeAttribute("charge",QString("%1").arg(p_peptide_evidence->getCharge())); diff --git a/src/utils/types.h b/src/utils/types.h index 1a193327c481677e06ee47c6a08ad310f95f1144..9c7ed47c5246d57f57ab26f196c72bdc98903ca0 100644 --- a/src/utils/types.h +++ b/src/utils/types.h @@ -73,6 +73,10 @@ enum class PeptideEvidenceParam : std::int8_t 3, ///< PSI-MS MS:1001172 mascot:expectation value 2.42102904673618e-006 peptide_prophet_probability = 4, ///< no PSI MS description peptide_inter_prophet_probability = 5, ///< no PSI MS description + omssa_evalue = 6, ///< MS:1001328 "OMSSA E-value." [PSI:PI] + omssa_pvalue = 7, ///< MS:1001329 "OMSSA p-value." [PSI:PI] + + }; /** \def IdentificationEngineParam identification engine parameters