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

better pepxml reader for omssa, comet, msgf+ identifications

parent 2cd28989
No related branches found
No related tags found
No related merge requests found
...@@ -90,6 +90,30 @@ PeptideTableModel::setProteinMatch(ProteinMatch *p_protein_match) ...@@ -90,6 +90,30 @@ PeptideTableModel::setProteinMatch(ProteinMatch *p_protein_match)
_engine_columns_to_display.insert( _engine_columns_to_display.insert(
PeptideListColumn::mascot_expectation_value); PeptideListColumn::mascot_expectation_value);
} }
else if(engine == IdentificationEngine::OMSSA)
{
_engine_columns_to_display.insert(PeptideListColumn::omssa_evalue);
_engine_columns_to_display.insert(PeptideListColumn::omssa_pvalue);
}
else if(engine == IdentificationEngine::MSGFplus)
{
_engine_columns_to_display.insert(PeptideListColumn::msgfplus_raw);
_engine_columns_to_display.insert(PeptideListColumn::msgfplus_denovo);
_engine_columns_to_display.insert(PeptideListColumn::msgfplus_energy);
_engine_columns_to_display.insert(
PeptideListColumn::msgfplus_SpecEValue);
_engine_columns_to_display.insert(PeptideListColumn::msgfplus_EValue);
}
else if(engine == IdentificationEngine::Comet)
{
_engine_columns_to_display.insert(PeptideListColumn::comet_deltacn);
_engine_columns_to_display.insert(PeptideListColumn::comet_deltacnstar);
_engine_columns_to_display.insert(PeptideListColumn::comet_expectation_value);
_engine_columns_to_display.insert(
PeptideListColumn::comet_sprank);
_engine_columns_to_display.insert(PeptideListColumn::comet_spscore);
_engine_columns_to_display.insert(PeptideListColumn::comet_xcorr);
}
} }
qDebug() << __FILE__ << " " << __FUNCTION__ << " " << __LINE__ << " " qDebug() << __FILE__ << " " << __FUNCTION__ << " " << __LINE__ << " "
...@@ -121,7 +145,7 @@ PeptideTableModel::rowCount(const QModelIndex &parent) const ...@@ -121,7 +145,7 @@ PeptideTableModel::rowCount(const QModelIndex &parent) const
int int
PeptideTableModel::columnCount(const QModelIndex &parent) const PeptideTableModel::columnCount(const QModelIndex &parent) const
{ {
return 33; return 39;
} }
QVariant QVariant
PeptideTableModel::headerData(int section, Qt::Orientation orientation, PeptideTableModel::headerData(int section, Qt::Orientation orientation,
...@@ -387,6 +411,85 @@ PeptideTableModel::data(const QModelIndex &index, int role) const ...@@ -387,6 +411,85 @@ PeptideTableModel::data(const QModelIndex &index, int role) const
->getParam( ->getParam(
PeptideEvidenceParam::peptide_inter_prophet_probability); PeptideEvidenceParam::peptide_inter_prophet_probability);
break; break;
case(std::int8_t)PeptideListColumn::omssa_evalue:
return _p_protein_match->getPeptideMatchList()
.at(row)
.getPeptideEvidence()
->getParam(PeptideEvidenceParam::omssa_evalue);
break;
case(std::int8_t)PeptideListColumn::omssa_pvalue:
return _p_protein_match->getPeptideMatchList()
.at(row)
.getPeptideEvidence()
->getParam(PeptideEvidenceParam::omssa_pvalue);
break;
case(std::int8_t)PeptideListColumn::msgfplus_denovo:
return _p_protein_match->getPeptideMatchList()
.at(row)
.getPeptideEvidence()
->getParam(PeptideEvidenceParam::msgfplus_denovo);
break;
case(std::int8_t)PeptideListColumn::msgfplus_energy:
return _p_protein_match->getPeptideMatchList()
.at(row)
.getPeptideEvidence()
->getParam(PeptideEvidenceParam::msgfplus_energy);
break;
case(std::int8_t)PeptideListColumn::msgfplus_EValue:
return _p_protein_match->getPeptideMatchList()
.at(row)
.getPeptideEvidence()
->getParam(PeptideEvidenceParam::msgfplus_EValue);
break;
case(std::int8_t)PeptideListColumn::msgfplus_raw:
return _p_protein_match->getPeptideMatchList()
.at(row)
.getPeptideEvidence()
->getParam(PeptideEvidenceParam::msgfplus_raw);
break;
case(std::int8_t)PeptideListColumn::msgfplus_SpecEValue:
return _p_protein_match->getPeptideMatchList()
.at(row)
.getPeptideEvidence()
->getParam(PeptideEvidenceParam::msgfplus_SpecEValue);
break;
case(std::int8_t)PeptideListColumn::comet_xcorr:
return _p_protein_match->getPeptideMatchList()
.at(row)
.getPeptideEvidence()
->getParam(PeptideEvidenceParam::comet_xcorr);
break;
case(std::int8_t)PeptideListColumn::comet_deltacn:
return _p_protein_match->getPeptideMatchList()
.at(row)
.getPeptideEvidence()
->getParam(PeptideEvidenceParam::comet_deltacn);
break;
case(std::int8_t)PeptideListColumn::comet_deltacnstar:
return _p_protein_match->getPeptideMatchList()
.at(row)
.getPeptideEvidence()
->getParam(PeptideEvidenceParam::comet_deltacnstar);
break;
case(std::int8_t)PeptideListColumn::comet_spscore:
return _p_protein_match->getPeptideMatchList()
.at(row)
.getPeptideEvidence()
->getParam(PeptideEvidenceParam::comet_spscore);
break;
case(std::int8_t)PeptideListColumn::comet_sprank:
return _p_protein_match->getPeptideMatchList()
.at(row)
.getPeptideEvidence()
->getParam(PeptideEvidenceParam::comet_sprank);
break;
case(std::int8_t)PeptideListColumn::comet_expectation_value:
return _p_protein_match->getPeptideMatchList()
.at(row)
.getPeptideEvidence()
->getParam(PeptideEvidenceParam::comet_expectation_value);
break;
} }
} }
return QString(); return QString();
...@@ -503,6 +606,34 @@ PeptideTableModel::getTitle(std::int8_t column) ...@@ -503,6 +606,34 @@ PeptideTableModel::getTitle(std::int8_t column)
return "Prophet probability"; return "Prophet probability";
case(std::int8_t)PeptideListColumn::peptide_inter_prophet_probability: case(std::int8_t)PeptideListColumn::peptide_inter_prophet_probability:
return "Inter prophet probability"; return "Inter prophet probability";
case(std::int8_t)PeptideListColumn::omssa_evalue:
return "OMSSA E-value";
case(std::int8_t)PeptideListColumn::omssa_pvalue:
return "OMSSA p-value";
case(std::int8_t)PeptideListColumn::msgfplus_denovo:
return "MS-GF de novo";
case(std::int8_t)PeptideListColumn::msgfplus_energy:
return "MS-GF energy";
case(std::int8_t)PeptideListColumn::msgfplus_EValue:
return "MS-GF E-value";
case(std::int8_t)PeptideListColumn::msgfplus_raw:
return "MS-GF raw score";
case(std::int8_t)PeptideListColumn::msgfplus_SpecEValue:
return "MS-GF spectral E-value";
case(std::int8_t)PeptideListColumn::comet_xcorr:
return "Comet XCorr";
case(std::int8_t)PeptideListColumn::comet_deltacn:
return "Comet DeltaCn";
case(std::int8_t)PeptideListColumn::comet_deltacnstar:
return "Comet DeltaCnStar";
case(std::int8_t)PeptideListColumn::comet_spscore:
return "Comet SpScore";
case(std::int8_t)PeptideListColumn::comet_sprank:
return "Comet SpRank";
case(std::int8_t)PeptideListColumn::comet_expectation_value:
return "Comet E-value";
} }
return ""; return "";
} }
...@@ -590,6 +721,32 @@ PeptideTableModel::getDescription(std::int8_t column) ...@@ -590,6 +721,32 @@ PeptideTableModel::getDescription(std::int8_t column)
return "Peptide prophet probability"; return "Peptide prophet probability";
case(std::int8_t)PeptideListColumn::peptide_inter_prophet_probability: case(std::int8_t)PeptideListColumn::peptide_inter_prophet_probability:
return "Peptide inter prophet probability"; return "Peptide inter prophet probability";
case(std::int8_t)PeptideListColumn::omssa_evalue:
return "OMSSA E-value";
case(std::int8_t)PeptideListColumn::omssa_pvalue:
return "OMSSA p-value";
case(std::int8_t)PeptideListColumn::msgfplus_denovo:
return "MS-GF de novo";
case(std::int8_t)PeptideListColumn::msgfplus_energy:
return "MS-GF energy";
case(std::int8_t)PeptideListColumn::msgfplus_EValue:
return "MS-GF E-value";
case(std::int8_t)PeptideListColumn::msgfplus_raw:
return "MS-GF raw score";
case(std::int8_t)PeptideListColumn::msgfplus_SpecEValue:
return "MS-GF spectral E-value";
case(std::int8_t)PeptideListColumn::comet_xcorr:
return "The Comet result 'XCorr'";
case(std::int8_t)PeptideListColumn::comet_deltacn:
return "The Comet result 'DeltaCn'";
case(std::int8_t)PeptideListColumn::comet_deltacnstar:
return "The Comet result 'DeltaCnStar'";
case(std::int8_t)PeptideListColumn::comet_spscore:
return "The Comet result 'SpScore'";
case(std::int8_t)PeptideListColumn::comet_sprank:
return "The Comet result 'SpRank'";
case(std::int8_t)PeptideListColumn::comet_expectation_value:
return "The Comet result 'Expectation value'";
} }
return ""; return "";
} }
......
...@@ -68,6 +68,14 @@ enum class PeptideListColumn : std::int8_t ...@@ -68,6 +68,14 @@ enum class PeptideListColumn : std::int8_t
msgfplus_energy = 30, ///< MS:1002051 "MS-GF energy score." [PSI:PI] msgfplus_energy = 30, ///< MS:1002051 "MS-GF energy score." [PSI:PI]
msgfplus_SpecEValue = 31, ///< MS:1002052 "MS-GF spectral E-value." [PSI:PI] msgfplus_SpecEValue = 31, ///< MS:1002052 "MS-GF spectral E-value." [PSI:PI]
msgfplus_EValue = 32, ///< MS:1002053 "MS-GF E-value." [PSI:PI] msgfplus_EValue = 32, ///< MS:1002053 "MS-GF E-value." [PSI:PI]
comet_xcorr = 33, ///< MS:1002252 "The Comet result 'XCorr'." [PSI:PI]
comet_deltacn = 34, ///< MS:1002253 "The Comet result 'DeltaCn'." [PSI:PI]
comet_deltacnstar =
35, ///< MS:1002254 "The Comet result 'DeltaCnStar'." [PSI:PI]
comet_spscore = 36, ///< MS:1002255 "The Comet result 'SpScore'." [PSI:PI]
comet_sprank = 37, ///< MS:1002256 "The Comet result 'SpRank'." [PSI:PI]
comet_expectation_value =
38, ///< MS:1002257 "The Comet result 'Expectation value'." [PSI:PI]
}; };
class PeptideListWindow; class PeptideListWindow;
...@@ -105,7 +113,7 @@ class PeptideTableModel : public QAbstractTableModel ...@@ -105,7 +113,7 @@ class PeptideTableModel : public QAbstractTableModel
private: private:
ProteinMatch *_p_protein_match = nullptr; ProteinMatch *_p_protein_match = nullptr;
PeptideListWindow *_p_peptide_list_window = nullptr; PeptideListWindow *_p_peptide_list_window = nullptr;
//contains columns to display (present in this peptide match) // contains columns to display (present in this peptide match)
std::set<PeptideListColumn> _engine_columns_to_display; std::set<PeptideListColumn> _engine_columns_to_display;
}; };
......
...@@ -326,7 +326,7 @@ PepXmlSaxHandler::startElement_spectrum_query(QXmlAttributes attributes) ...@@ -326,7 +326,7 @@ PepXmlSaxHandler::startElement_spectrum_query(QXmlAttributes attributes)
//<alternative_protein protein="sp|P46784|RS10B_YEAST" protein_descr="40S //<alternative_protein protein="sp|P46784|RS10B_YEAST" protein_descr="40S
// ribosomal protein S10-B OS=Saccharomyces cerevisiae (strain ATCC 204508 // 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" //S288c) GN=RPS10B PE=1 SV=1" num_tol_term="2" peptide_prev_aa="K"
// peptide_next_aa="N"/> // peptide_next_aa="N"/>
bool bool
...@@ -542,6 +542,46 @@ PepXmlSaxHandler::startElement_search_score(QXmlAttributes attributes) ...@@ -542,6 +542,46 @@ PepXmlSaxHandler::startElement_search_score(QXmlAttributes attributes)
QVariant(valueStr.simplified().toDouble())); QVariant(valueStr.simplified().toDouble()));
} }
} }
else if(identification_engine == IdentificationEngine::Comet)
{
if(name == "xcorr")
{
_p_peptide_evidence->setParam(
PeptideEvidenceParam::comet_xcorr,
QVariant(valueStr.simplified().toDouble()));
}
else if(name == "deltacn")
{
_p_peptide_evidence->setParam(
PeptideEvidenceParam::comet_deltacn,
QVariant(valueStr.simplified().toDouble()));
}
else if(name == "deltacnstar")
{
_p_peptide_evidence->setParam(
PeptideEvidenceParam::comet_deltacnstar,
QVariant(valueStr.simplified().toDouble()));
}
else if(name == "spscore")
{
_p_peptide_evidence->setParam(
PeptideEvidenceParam::comet_spscore,
QVariant(valueStr.simplified().toDouble()));
}
else if(name == "sprank")
{
_p_peptide_evidence->setParam(
PeptideEvidenceParam::comet_sprank,
QVariant(valueStr.simplified().toInt()));
}
else if(name == "expect")
{
_p_peptide_evidence->setParam(
PeptideEvidenceParam::comet_expectation_value,
QVariant(valueStr.simplified().toDouble()));
_p_peptide_evidence->setEvalue(valueStr.simplified().toDouble());
}
}
else if(identification_engine == IdentificationEngine::MSGFplus) else if(identification_engine == IdentificationEngine::MSGFplus)
{ {
if(name == "raw") if(name == "raw")
...@@ -561,6 +601,7 @@ PepXmlSaxHandler::startElement_search_score(QXmlAttributes attributes) ...@@ -561,6 +601,7 @@ PepXmlSaxHandler::startElement_search_score(QXmlAttributes attributes)
_p_peptide_evidence->setParam( _p_peptide_evidence->setParam(
PeptideEvidenceParam::msgfplus_EValue, PeptideEvidenceParam::msgfplus_EValue,
QVariant(valueStr.simplified().toDouble())); QVariant(valueStr.simplified().toDouble()));
_p_peptide_evidence->setEvalue(valueStr.simplified().toDouble());
} }
} }
} }
......
...@@ -80,6 +80,12 @@ enum class PeptideEvidenceParam : std::int8_t ...@@ -80,6 +80,12 @@ enum class PeptideEvidenceParam : std::int8_t
msgfplus_energy = 10, ///< MS:1002051 "MS-GF energy score." [PSI:PI] msgfplus_energy = 10, ///< MS:1002051 "MS-GF energy score." [PSI:PI]
msgfplus_SpecEValue = 11, ///< MS:1002052 "MS-GF spectral E-value." [PSI:PI] msgfplus_SpecEValue = 11, ///< MS:1002052 "MS-GF spectral E-value." [PSI:PI]
msgfplus_EValue = 12, ///< MS:1002053 "MS-GF E-value." [PSI:PI] msgfplus_EValue = 12, ///< MS:1002053 "MS-GF E-value." [PSI:PI]
comet_xcorr = 13, ///< MS:1002252 "The Comet result 'XCorr'." [PSI:PI]
comet_deltacn = 14, ///< MS:1002253 "The Comet result 'DeltaCn'." [PSI:PI]
comet_deltacnstar = 15, ///< MS:1002254 "The Comet result 'DeltaCnStar'." [PSI:PI]
comet_spscore = 16, ///< MS:1002255 "The Comet result 'SpScore'." [PSI:PI]
comet_sprank = 17, ///< MS:1002256 "The Comet result 'SpRank'." [PSI:PI]
comet_expectation_value = 18, ///< MS:1002257 "The Comet result 'Expectation value'." [PSI:PI]
}; };
......
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