Commit 60bbae60 authored by Renne Thomas's avatar Renne Thomas
Browse files

Correct output and remove residu potential modif 1, 2

parent 86da5409
This diff is collapsed.
......@@ -106,7 +106,7 @@
<item>
<widget class="QTabWidget" name="tabWidget">
<property name="currentIndex">
<number>5</number>
<number>2</number>
</property>
<widget class="QWidget" name="spectrum_tab">
<property name="sizePolicy">
......@@ -1126,8 +1126,8 @@
<layout class="QVBoxLayout" name="verticalLayout_9">
<item>
<layout class="QGridLayout" name="gridLayout">
<item row="9" column="2">
<widget class="QPushButton" name="rpmmotif2_push_button">
<item row="5" column="2">
<widget class="QPushButton" name="rpmmotif_push_button">
<property name="text">
<string>?</string>
</property>
......@@ -1184,7 +1184,7 @@
</property>
</widget>
</item>
<item row="7" column="0">
<item row="5" column="0">
<widget class="QLabel" name="label_36">
<property name="text">
<string>Potential modifications motif</string>
......@@ -1208,76 +1208,8 @@
</property>
</widget>
</item>
<item row="5" column="2">
<widget class="QPushButton" name="rpmm1_push_button">
<property name="text">
<string>?</string>
</property>
</widget>
</item>
<item row="7" column="1">
<widget class="QLineEdit" name="rpmmotif_edit"/>
</item>
<item row="7" column="2">
<widget class="QPushButton" name="rpmmotif_push_button">
<property name="text">
<string>?</string>
</property>
</widget>
</item>
<item row="6" column="2">
<widget class="QPushButton" name="rpmm2_push_button">
<property name="text">
<string>?</string>
</property>
</widget>
</item>
<item row="8" column="2">
<widget class="QPushButton" name="rpmmotif1_push_button">
<property name="text">
<string>?</string>
</property>
</widget>
</item>
<item row="9" column="1">
<widget class="QLineEdit" name="rpmmotif2_edit"/>
</item>
<item row="8" column="1">
<widget class="QLineEdit" name="rpmmotif1_edit"/>
</item>
<item row="6" column="1">
<widget class="QLineEdit" name="rpmm2_edit"/>
</item>
<item row="5" column="1">
<widget class="QLineEdit" name="rpmm1_edit"/>
</item>
<item row="9" column="0">
<widget class="QLabel" name="label_38">
<property name="text">
<string>Potential modifications motif 2</string>
</property>
</widget>
</item>
<item row="8" column="0">
<widget class="QLabel" name="label_37">
<property name="text">
<string>Potential modifications motif 1</string>
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QLabel" name="label_35">
<property name="text">
<string>Potential modifications 2</string>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="label_34">
<property name="text">
<string>Potential modifications 1</string>
</property>
</widget>
<widget class="QLineEdit" name="rpmmotif_edit"/>
</item>
</layout>
</item>
......@@ -2352,7 +2284,7 @@
<property name="geometry">
<rect>
<x>0</x>
<y>-1</y>
<y>0</y>
<width>992</width>
<height>457</height>
</rect>
......@@ -3674,22 +3606,6 @@
</hint>
</hints>
</connection>
<connection>
<sender>rpmm1_push_button</sender>
<signal>clicked()</signal>
<receiver>EditTandemPresetView</receiver>
<slot>doHelp()</slot>
<hints>
<hint type="sourcelabel">
<x>1031</x>
<y>336</y>
</hint>
<hint type="destinationlabel">
<x>1690</x>
<y>366</y>
</hint>
</hints>
</connection>
<connection>
<sender>rpmmotif_push_button</sender>
<signal>clicked()</signal>
......@@ -4410,54 +4326,6 @@
</hint>
</hints>
</connection>
<connection>
<sender>rpmm2_push_button</sender>
<signal>clicked()</signal>
<receiver>EditTandemPresetView</receiver>
<slot>doHelp()</slot>
<hints>
<hint type="sourcelabel">
<x>1031</x>
<y>370</y>
</hint>
<hint type="destinationlabel">
<x>1691</x>
<y>336</y>
</hint>
</hints>
</connection>
<connection>
<sender>rpmmotif2_push_button</sender>
<signal>clicked()</signal>
<receiver>EditTandemPresetView</receiver>
<slot>doHelp()</slot>
<hints>
<hint type="sourcelabel">
<x>1031</x>
<y>472</y>
</hint>
<hint type="destinationlabel">
<x>1637</x>
<y>435</y>
</hint>
</hints>
</connection>
<connection>
<sender>rpmmotif1_push_button</sender>
<signal>clicked()</signal>
<receiver>EditTandemPresetView</receiver>
<slot>doHelp()</slot>
<hints>
<hint type="sourcelabel">
<x>1031</x>
<y>438</y>
</hint>
<hint type="destinationlabel">
<x>1637</x>
<y>385</y>
</hint>
</hints>
</connection>
</connections>
<slots>
<slot>doCopy()</slot>
......@@ -4470,39 +4338,38 @@
<slot>doSelectDir()</slot>
</slots>
<buttongroups>
<buttongroup name="pqa_button_group"/>
<buttongroup name="buttonGroup_8"/>
<buttongroup name="pstpb_button_group"/>
<buttongroup name="szi_button_group"/>
<buttongroup name="pcsemi_button_group"/>
<buttongroup name="sir_button_group"/>
<buttongroup name="ospec_button_group"/>
<buttongroup name="rpm_button_group"/>
<buttongroup name="sai_button_group"/>
<buttongroup name="buttonGroup_5"/>
<buttongroup name="spmmeu_button_group"/>
<buttongroup name="buttonGroup_7"/>
<buttongroup name="buttonGroup_6"/>
<buttongroup name="pqp_button_group"/>
<buttongroup name="ruc_button_group"/>
<buttongroup name="buttonGroup_4"/>
<buttongroup name="sci_button_group"/>
<buttongroup name="rupmffr_button_group"/>
<buttongroup name="sxi_button_group"/>
<buttongroup name="sir_button_group"/>
<buttongroup name="pcsemi_button_group"/>
<buttongroup name="suca_button_group"/>
<buttongroup name="buttonGroup_3"/>
<buttongroup name="pstpb_button_group"/>
<buttongroup name="buttonGroup_7"/>
<buttongroup name="scp_button_group"/>
<buttongroup name="oresu_button_group"/>
<buttongroup name="sunlw_button_group"/>
<buttongroup name="scp_button_group"/>
<buttongroup name="refine_button_group"/>
<buttongroup name="pqa_button_group"/>
<buttongroup name="ospec_button_group"/>
<buttongroup name="spmmie_button_group"/>
<buttongroup name="szi_button_group"/>
<buttongroup name="syi_button_group"/>
<buttongroup name="buttonGroup"/>
<buttongroup name="oresu_button_group"/>
<buttongroup name="spmmeu_button_group"/>
<buttongroup name="buttonGroup_8"/>
<buttongroup name="suca_button_group"/>
<buttongroup name="sci_button_group"/>
<buttongroup name="rss_button_group"/>
<buttongroup name="buttonGroup_2"/>
<buttongroup name="buttonGroup_5"/>
<buttongroup name="rpm_button_group"/>
<buttongroup name="sfmmeu_button_group"/>
<buttongroup name="mzid_button_group"/>
<buttongroup name="pqp_button_group"/>
<buttongroup name="ruc_button_group"/>
<buttongroup name="spmmie_button_group"/>
<buttongroup name="rcsemi_button_group"/>
<buttongroup name="syi_button_group"/>
<buttongroup name="sbi_button_group"/>
<buttongroup name="sai_button_group"/>
<buttongroup name="buttonGroup_2"/>
<buttongroup name="rss_button_group"/>
</buttongroups>
</ui>
......@@ -34,15 +34,14 @@
XtandemParamSaxHandler::XtandemParamSaxHandler(
TandemParameters *p_tandem_parameters)
TandemParameters *p_tandem_parameters)
{
_p_tandem_parameters = p_tandem_parameters;
_p_tandem_parameters = p_tandem_parameters;
//<note type="input" label="output, xsl path">tandem-style.xsl</note>
_p_tandem_parameters->setParamLabelValue("output, xsl path",
"tandem-style.xsl");
//<note type="input" label="output, xsl path">tandem-style.xsl</note>
_p_tandem_parameters->setParamLabelValue("output, xsl path",
"tandem-style.xsl");
//<note type="input" label="output, mzid">no</note>
_p_tandem_parameters->setParamLabelValue("output, mzid", "no");
}
XtandemParamSaxHandler::~XtandemParamSaxHandler()
{
......@@ -51,7 +50,7 @@ XtandemParamSaxHandler::~XtandemParamSaxHandler()
bool
XtandemParamSaxHandler::isTandemParameter() const
{
return m_isTandemParameter;
return m_isTandemParameter;
}
bool
XtandemParamSaxHandler::startElement(const QString &namespaceURI,
......@@ -59,58 +58,58 @@ XtandemParamSaxHandler::startElement(const QString &namespaceURI,
const QString &qName,
const QXmlAttributes &attributes)
{
// qDebug()<< "XtandemParamSaxHandler::startElement begin" << namespaceURI <<
// " " << localName << " " << qName ;
_tag_stack.push_back(qName);
bool is_ok = true;
// qDebug()<< "XtandemParamSaxHandler::startElement begin" << namespaceURI <<
// " " << localName << " " << qName ;
_tag_stack.push_back(qName);
bool is_ok = true;
try
try
{
//<bioml label="example api document">
if(_tag_stack.size() == 1)
//<bioml label="example api document">
if(_tag_stack.size() == 1)
{
if(qName != "bioml")
if(qName != "bioml")
{
_errorStr = QObject::tr(
"ERROR in XtandemParamSaxHandler::startElement "
"root tag %1 is not <bioml>")
_errorStr = QObject::tr(
"ERROR in XtandemParamSaxHandler::startElement "
"root tag %1 is not <bioml>")
.arg(qName);
m_isTandemParameter = false;
return false;
m_isTandemParameter = false;
return false;
}
else
else
{
m_isTandemParameter = true;
m_isTandemParameter = true;
}
}
// startElement_group
// startElement_group
if(qName == "note")
if(qName == "note")
{
is_ok = startElement_note(attributes);
is_ok = startElement_note(attributes);
}
_current_text.clear();
_current_text.clear();
}
catch(pappso::PappsoException exception_pappso)
catch(pappso::PappsoException exception_pappso)
{
_errorStr = QObject::tr(
"ERROR in XtandemParamSaxHandler::startElement "
"tag %1, PAPPSO exception:\n%2")
_errorStr = QObject::tr(
"ERROR in XtandemParamSaxHandler::startElement "
"tag %1, PAPPSO exception:\n%2")
.arg(qName)
.arg(exception_pappso.qwhat());
return false;
return false;
}
catch(std::exception exception_std)
catch(std::exception exception_std)
{
_errorStr = QObject::tr(
"ERROR in XtandemParamSaxHandler::startElement "
"tag %1, std exception:\n%2")
_errorStr = QObject::tr(
"ERROR in XtandemParamSaxHandler::startElement "
"tag %1, std exception:\n%2")
.arg(qName)
.arg(exception_std.what());
return false;
return false;
}
return is_ok;
return is_ok;
}
bool
......@@ -119,75 +118,75 @@ XtandemParamSaxHandler::endElement(const QString &namespaceURI,
const QString &qName)
{
bool is_ok = true;
// endElement_peptide_list
try
bool is_ok = true;
// endElement_peptide_list
try
{
if(qName == "note")
if(qName == "note")
{
is_ok = endElement_note();
is_ok = endElement_note();
}
}
catch(pappso::PappsoException exception_pappso)
catch(pappso::PappsoException exception_pappso)
{
_errorStr = QObject::tr(
"ERROR in XtandemParamSaxHandler::endElement tag "
"%1, PAPPSO exception:\n%2")
_errorStr = QObject::tr(
"ERROR in XtandemParamSaxHandler::endElement tag "
"%1, PAPPSO exception:\n%2")
.arg(qName)
.arg(exception_pappso.qwhat());
return false;
return false;
}
catch(std::exception exception_std)
catch(std::exception exception_std)
{
_errorStr = QObject::tr(
"ERROR in XtandemParamSaxHandler::endElement tag "
"%1, std exception:\n%2")
_errorStr = QObject::tr(
"ERROR in XtandemParamSaxHandler::endElement tag "
"%1, std exception:\n%2")
.arg(qName)
.arg(exception_std.what());
return false;
return false;
}
_current_text.clear();
_tag_stack.pop_back();
_current_text.clear();
_tag_stack.pop_back();
return is_ok;
return is_ok;
}
bool
XtandemParamSaxHandler::error(const QXmlParseException &exception)
{
_errorStr = QObject::tr(
"Parse error at line %1, column %2 :\n"
"%3")
_errorStr = QObject::tr(
"Parse error at line %1, column %2 :\n"
"%3")
.arg(exception.lineNumber())
.arg(exception.columnNumber())
.arg(exception.message());
qDebug() << __FILE__ << " " << __FUNCTION__ << " " << __LINE__ << " "
<< _errorStr;
return false;
qDebug() << __FILE__ << " " << __FUNCTION__ << " " << __LINE__ << " "
<< _errorStr;
return false;
}
bool
XtandemParamSaxHandler::fatalError(const QXmlParseException &exception)
{
_errorStr = QObject::tr(
"Parse error at line %1, column %2 :\n"
"%3")
_errorStr = QObject::tr(
"Parse error at line %1, column %2 :\n"
"%3")
.arg(exception.lineNumber())
.arg(exception.columnNumber())
.arg(exception.message());
qDebug() << __FILE__ << " " << __FUNCTION__ << " " << __LINE__ << " "
<< _errorStr;
return false;
qDebug() << __FILE__ << " " << __FUNCTION__ << " " << __LINE__ << " "
<< _errorStr;
return false;
}
QString
XtandemParamSaxHandler::errorString() const
{
return _errorStr;
return _errorStr;
}
......@@ -195,67 +194,67 @@ bool
XtandemParamSaxHandler::endDocument()
{
return true;
return true;
}
bool
XtandemParamSaxHandler::startDocument()
{
/*<?xml version="1.0" encoding="UTF-8"?>
<bioml label="example api document">
<note type="input" label="spectrum, parent monoisotopic mass error
units">ppm</note> <note type="input" label="spectrum, parent monoisotopic mass
error minus">10</note>
*/
return true;
/*<?xml version="1.0" encoding="UTF-8"?>
<bioml label="example api document">
<note type="input" label="spectrum, parent monoisotopic mass error
units">ppm</note> <note type="input" label="spectrum, parent monoisotopic mass
error minus">10</note>
*/
return true;
}
bool
XtandemParamSaxHandler::characters(const QString &str)
{
_current_text += str;
return true;
_current_text += str;
return true;
}
bool
XtandemParamSaxHandler::startElement_note(QXmlAttributes attributes)
{
// qDebug() << "XtandemParamSaxHandler::startElement_note begin " <<
// attributes.value("type");
_current_label = "";
// qDebug() << "XtandemParamSaxHandler::startElement_note begin " <<
// attributes.value("type");
_current_label = "";
if(attributes.value("type") == "input")
if(attributes.value("type") == "input")
{
_current_label = attributes.value("label");
_current_label = attributes.value("label");
}
// qDebug() << "XtandemParamSaxHandler::startElement_note _current_label " <<
// _current_label;
return true;
// qDebug() << "XtandemParamSaxHandler::startElement_note _current_label " <<
// _current_label;
return true;
}
bool
XtandemParamSaxHandler::endElement_note()
{
// qDebug() << "XtandemParamSaxHandler::endElement_note begin " <<
// _current_label << " " << _current_text.simplified();
if(!_current_label.isEmpty())
// qDebug() << "XtandemParamSaxHandler::endElement_note begin " <<
// _current_label << " " << _current_text.simplified();
if(!_current_label.isEmpty())
{
try
try
{
_p_tandem_parameters->setParamLabelValue(_current_label,
_current_text.simplified());
_p_tandem_parameters->setParamLabelValue(_current_label,
_current_text.simplified());
}
catch(pappso::PappsoException &exception)
catch(pappso::PappsoException &exception)
{
_errorStr =
QObject::tr("Error reading tandem input parameter \"%1\" :\n%2")
.arg(_current_label)
.arg(exception.qwhat());
qDebug() << __FILE__ << " " << __FUNCTION__ << " " << __LINE__ << " "
<< _errorStr;
return false;
_errorStr =
QObject::tr("Error reading tandem input parameter \"%1\" :\n%2")
.arg(_current_label)
.arg(exception.qwhat());
qDebug() << __FILE__ << " " << __FUNCTION__ << " " << __LINE__ << " "
<< _errorStr;
return false;
}
}
return true;
return true;
}
......@@ -34,11 +34,7 @@
<note type="input" label="residue, modification mass 1"></note>
<note type="input" label="residue, modification mass 2"></note>
<note type="input" label="residue, potential modification mass">15.99491@M</note>
<note type="input" label="residue, potential modification mass 1"></note>
<note type="input" label="residue, potential modification mass 2"></note>
<note type="input" label="residue, potential modification motif"></note>
<note type="input" label="residue, potential modification motif 1"></note>
<note type="input" label="residue, potential modification motif 2"></note>
<note type="input" label="scoring, minimum ion count">4</note>
<note type="input" label="scoring, maximum missed cleavage sites">1</note>
<note type="input" label="scoring, cyclic permutation">yes</note>
......@@ -81,5 +77,4 @@
<note type="input" label="output, histogram column width">30</note>
<note type="input" label="output, path hashing">no</note>
<note type="input" label="output, xsl path">tandem-style.xsl</note>
<note type="input" label="output, mzid">no</note>
</bioml>
\ No newline at end of file
</bioml>