diff --git a/src/input/xtandemsaxhandler.cpp b/src/input/xtandemsaxhandler.cpp index f075a4ea050a816acc9198c0c0ddfc9026d2715a..41757804d29b102b56bb7fad8153deca0301d2a0 100644 --- a/src/input/xtandemsaxhandler.cpp +++ b/src/input/xtandemsaxhandler.cpp @@ -157,27 +157,6 @@ bool XtandemSaxHandler::startElement_note(QXmlAttributes attributes) { return is_ok; } -bool XtandemSaxHandler::startElement_protein(QXmlAttributes attributes) { -//<protein expect="-704.6" id="1976.1" uid="195701" label="GRMZM2G083841_P01 P04711 Phosphoenolpyruvate carboxylase 1 (PEPCase 1)(PEPC 1)(EC..." sumI="9.36" > - bool is_ok = true; - //qDebug() << "startElement_protein begin"; - QString accession = attributes.value("label").simplified().split(" ", QString::SkipEmptyParts).at(0); - //qDebug() << "startElement_protein accession" << accession; - _p_protein_match = _p_identification_group->getProteinMatchInstance(accession); - - //qDebug() << "startElement_protein p_protein_match 1 " << _p_protein_match; - _current_protein.setAccession(accession); - _p_protein_match->setChecked(false); - //qDebug() << "startElement_protein p_protein_match 3 " << _p_protein_match; - ProteinXtpSp sp_xtp_protein = _current_protein.makeProteinXtpSp(); - _p_protein_match->setProteinXtpSp(_p_project->getProteinStore().getInstance(sp_xtp_protein)); - _p_protein_match->setChecked(true); - - //qDebug() << "startElement_protein end" ; - return is_ok; -} - - bool XtandemSaxHandler::startElement_file(QXmlAttributes attributes) { bool is_ok = true; //<file type="peptide" URL="/gorgone/pappso/formation/TD/Database/Genome_Z_mays_5a.fasta"/> @@ -374,9 +353,9 @@ bool XtandemSaxHandler::endElement_note() { _current_protein.setAccession(QString("%1%2").arg(_current_protein.getAccession()).arg(":reversed")); } //for older versions < 2013.09.01.1 - if (!_p_protein_match->getProteinXtpSp().get()->getAccession().endsWith("|reversed") && _p_protein_match->getProteinXtpSp().get()->getDescription().endsWith("|reversed")) { + if (!_current_protein.getAccession().endsWith("|reversed") && _current_protein.getDescription().endsWith("|reversed")) { //to fit most cases, just check that the :reversed chars added by X!Tandem are not in the description. if so, then add it too in the accession - _p_protein_match->getProteinXtpSp().get()->setAccession(QString("%1%2").arg(_p_protein_match->getProteinXtpSp().get()->getAccession()).arg("|reversed")); + _current_protein.setAccession(QString("%1%2").arg(_current_protein.getAccession()).arg("|reversed")); } //qDebug() << "startElement_protein accession" << accession;