Skip to content
Snippets Groups Projects
Commit 60bbae60 authored by Renne Thomas's avatar Renne Thomas
Browse files

Correct output and remove residu potential modif 1, 2

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