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

pepxml : take into account buggy engines that do not use correctly protein...

pepxml  : take into account buggy engines that do not use correctly protein accession and description
parent 40cf0ba0
No related branches found
No related tags found
No related merge requests found
......@@ -101,8 +101,8 @@ const FastaFile * ProteinXtp::getFastaFileP() const {
void ProteinXtp::setCompleteDescription(const QString & full_description) {
setAccession (full_description.simplified().section(" ", 0,0));
setDescription (full_description.simplified().section(" ", 1));
}
void ProteinXtp::setIsContaminant(bool conta) {
_is_contaminant = conta;
}
......
......@@ -58,6 +58,8 @@ public:
ProteinXtpSp makeProteinXtpSp() const;
/** @brief separates accession from description based on first space separator
*/
void setCompleteDescription(const QString & full_description);
void setIsContaminant(bool conta);
......
......@@ -326,7 +326,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
......@@ -335,7 +335,14 @@ PepXmlSaxHandler::startElement_alternative_protein(QXmlAttributes attributes)
bool is_ok = true;
ProteinXtpSp sp_xtp_protein = ProteinXtp().makeProteinXtpSp();
sp_xtp_protein.get()->setAccession(attributes.value("protein"));
sp_xtp_protein.get()->setDescription(attributes.value("protein_descr"));
if(attributes.value("protein_descr").isEmpty())
{
sp_xtp_protein.get()->setCompleteDescription(attributes.value("protein"));
}
else
{
sp_xtp_protein.get()->setDescription(attributes.value("protein_descr"));
}
sp_xtp_protein.get()->setFastaFileP(
_p_identification_data_source->getFastaFileList()[0].get());
......@@ -364,7 +371,14 @@ PepXmlSaxHandler::startElement_search_hit(QXmlAttributes attributes)
//_current_protein.setAccession(attributes.value("protein"));
ProteinXtpSp sp_xtp_protein = ProteinXtp().makeProteinXtpSp();
sp_xtp_protein.get()->setAccession(attributes.value("protein"));
sp_xtp_protein.get()->setDescription(attributes.value("protein_descr"));
if(attributes.value("protein_descr").isEmpty())
{
sp_xtp_protein.get()->setCompleteDescription(attributes.value("protein"));
}
else
{
sp_xtp_protein.get()->setDescription(attributes.value("protein_descr"));
}
sp_xtp_protein.get()->setFastaFileP(
_p_identification_data_source->getFastaFileList()[0].get());
......@@ -413,6 +427,13 @@ PepXmlSaxHandler::startElement_search_hit(QXmlAttributes attributes)
// search_engine="X! Tandem (k-score)"
search_engine = IdentificationEngine::XTandem;
}
else if(_current_search_engine == "X! Tandem")
{
// files coming from msfragger
search_engine = IdentificationEngine::XTandem;
}
else if(_current_search_engine == "OMSSA")
{
search_engine = IdentificationEngine::OMSSA;
......
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