Skip to content
Snippets Groups Projects
Commit 86b2c9df authored by Langella Olivier's avatar Langella Olivier
Browse files

new: store identification engine in peptide evidence

parent 53a96c0a
No related branches found
No related tags found
No related merge requests found
......@@ -102,6 +102,12 @@ PeptideEvidence::setIdentificationEngine(
_identification_engine = identification_engine;
}
IdentificationEngine
PeptideEvidence::getIdentificationEngine() const
{
return _identification_engine;
}
/** \brief set specific parameter value
*/
void
......
......@@ -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;
......
......@@ -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;
}
......
......@@ -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());
......
......@@ -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()));
......
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment