From 0a6dce3ed8e52dee6bd7a52b96f3afa128c6f18f Mon Sep 17 00:00:00 2001 From: Olivier Langella <Olivier.Langella@moulon.inra.fr> Date: Wed, 19 Apr 2017 14:26:41 +0200 Subject: [PATCH] remove translation stop reading xtandem results --- src/input/xpipsaxhandler.cpp | 6 +++++- src/input/xtandemsaxhandler.cpp | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/input/xpipsaxhandler.cpp b/src/input/xpipsaxhandler.cpp index c3ead7438..71ae62ab5 100644 --- a/src/input/xpipsaxhandler.cpp +++ b/src/input/xpipsaxhandler.cpp @@ -180,7 +180,7 @@ bool XpipSaxHandler::startElement_modifs_mass(QXmlAttributes attributes) { bool XpipSaxHandler::startElement_sample(QXmlAttributes attributes) { qDebug() << "startElement_sample "; - + MsRunSp ms_run = _p_project->getMsRunStore().getInstance(attributes.value("value").simplified()); ms_run.get()->setFilename(attributes.value("value").simplified()); _current_identification_group_p->addMsRunSp(ms_run); @@ -277,6 +277,8 @@ bool XpipSaxHandler::endElement_peptide() { bool XpipSaxHandler::endElement_sequence() { //if ((_tag_stack.size() > 1) && (_tag_stack[_tag_stack.size() - 1] == "protein")) { + + //._sequence.replace(QRegExp("\\*"), "")).removeTranslationStop() _current_protein.setSequence(_current_text); //} //else { @@ -285,6 +287,7 @@ bool XpipSaxHandler::endElement_sequence() { return true; } bool XpipSaxHandler::endElement_protein() { + ProteinXtpSp sp_xtp_protein = _current_protein.makeProteinXtpSp(); _p_protein_match->setProteinXtpSp(_p_project->getProteinStore().getInstance(sp_xtp_protein)); @@ -392,3 +395,4 @@ pappso::AaModificationP XpipSaxHandler::getAaModificationP(pappso::mz mass) cons throw pappso::ExceptionNotFound(QObject::tr("XpipSaxHandler::getAaModificationP => modification not found for mass %1").arg(mass)); } + diff --git a/src/input/xtandemsaxhandler.cpp b/src/input/xtandemsaxhandler.cpp index 5647756b3..c616abcf6 100644 --- a/src/input/xtandemsaxhandler.cpp +++ b/src/input/xtandemsaxhandler.cpp @@ -189,7 +189,8 @@ bool XtandemSaxHandler::startElement_domain(QXmlAttributes attributes) { bool is_ok = true; _current_text = _current_text.simplified().replace(" ", ""); if (!_current_text.isEmpty()) { - _p_protein_match->getProteinXtpSp().get()->setSequence(_current_text); + //._sequence.replace(QRegExp("\\*"), "")).removeTranslationStop() + _p_protein_match->getProteinXtpSp().get()->setSequence(_current_text.replace(QRegExp("\\*"), "")); } // <domain id="4017.1.1" start="21" end="31" expect="2.0e-06" -- GitLab