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

scoring form ok

parent 95aea211
No related branches found
No related tags found
No related merge requests found
......@@ -95,14 +95,13 @@ void TandemParameters::setParamLabelValue(const QString & label, const QString &
throw pappso::ExceptionNotPossible(QObject::tr("%1 value must be Daltons or ppm (not %2)").arg(label).arg(value));
}
}
if ((label == "spectrum, parent monoisotopic mass isotope error") || (label == "spectrum, use neutral loss window") || (label == "spectrum, use contrast angle") || (label == "protein, cleavage semi") || (label == "protein, quick acetyl") || (label == "protein, quick pyrolidone") || (label == "protein, stP bias") || (label == "scoring, cyclic permutation")) {
if ((label == "spectrum, parent monoisotopic mass isotope error") || (label == "spectrum, use neutral loss window") || (label == "spectrum, use contrast angle") || (label == "protein, cleavage semi") || (label == "protein, quick acetyl") || (label == "protein, quick pyrolidone") || (label == "protein, stP bias") || (label == "scoring, cyclic permutation") || (label == "scoring, include reverse") || (label == "scoring, y ions") || (label == "scoring, b ions") || (label == "scoring, c ions") || (label == "scoring, z ions") || (label == "scoring, a ions") || (label == "scoring, x ions")) {
if ((value != "yes") && (value != "no")) {
throw pappso::ExceptionNotPossible(QObject::tr("%1 value must be yes or no (not %2)").arg(label).arg(value));
}
}
if ((label == "spectrum, parent monoisotopic mass error minus") || (label == "spectrum, parent monoisotopic mass error plus")|| (label == "spectrum, dynamic range") || (label == "spectrum, minimum parent m+h") || (label == "protein, cleavage C-terminal mass change")|| (label == "protein, cleavage N-terminal mass change") || (label == "protein, C-terminal residue modification mass") || (label == "protein, N-terminal residue modification mass")) {
bool ok;
value.toDouble(&ok);
......
......@@ -310,6 +310,35 @@ void EditTandemPresetDialog::doHelp() {
{
html_doc.setFileName(":/tandem/resources/html_doc/scp.html");
}
if(senderObjName == "sir_push_button")
{
html_doc.setFileName(":/tandem/resources/html_doc/sir.html");
}
if(senderObjName == "syi_push_button")
{
html_doc.setFileName(":/tandem/resources/html_doc/syi.html");
}
if(senderObjName == "sbi_push_button")
{
html_doc.setFileName(":/tandem/resources/html_doc/sbi.html");
}
if(senderObjName == "sci_push_button")
{
html_doc.setFileName(":/tandem/resources/html_doc/sci.html");
}
if(senderObjName == "szi_push_button")
{
html_doc.setFileName(":/tandem/resources/html_doc/szi.html");
}
if(senderObjName == "sai_push_button")
{
html_doc.setFileName(":/tandem/resources/html_doc/sai.html");
}
if(senderObjName == "sxi_push_button")
{
html_doc.setFileName(":/tandem/resources/html_doc/sxi.html");
}
_tandem_params.setParamLabelValue("residue, potential modification mass", ui->rpmm_edit->text());
......@@ -409,9 +438,36 @@ void EditTandemPresetDialog::readUi() {
if (ui->scp_yes_radio_button->isChecked()) {
_tandem_params.setParamLabelValue("scoring, cyclic permutation", "yes");
}
_tandem_params.setParamLabelValue("scoring, include reverse", "no");
if (ui->sir_yes_radio_button->isChecked()) {
_tandem_params.setParamLabelValue("scoring, include reverse", "yes");
}
_tandem_params.setParamLabelValue("scoring, minimum ion count", ui->smic_edit->text());
_tandem_params.setParamLabelValue("scoring, y ions", "no");
if (ui->syi_yes_radio_button->isChecked()) {
_tandem_params.setParamLabelValue("scoring, y ions", "yes");
}
_tandem_params.setParamLabelValue("scoring, b ions", "no");
if (ui->sbi_yes_radio_button->isChecked()) {
_tandem_params.setParamLabelValue("scoring, b ions", "yes");
}
_tandem_params.setParamLabelValue("scoring, c ions", "no");
if (ui->sci_yes_radio_button->isChecked()) {
_tandem_params.setParamLabelValue("scoring, c ions", "yes");
}
_tandem_params.setParamLabelValue("scoring, z ions", "no");
if (ui->szi_yes_radio_button->isChecked()) {
_tandem_params.setParamLabelValue("scoring, z ions", "yes");
}
_tandem_params.setParamLabelValue("scoring, a ions", "no");
if (ui->sai_yes_radio_button->isChecked()) {
_tandem_params.setParamLabelValue("scoring, a ions", "yes");
}
_tandem_params.setParamLabelValue("scoring, x ions", "no");
if (ui->sxi_yes_radio_button->isChecked()) {
_tandem_params.setParamLabelValue("scoring, x ions", "yes");
}
}
catch (pappso::PappsoException & error) {
QMessageBox::warning(this,tr("Error in parameters :"), error.qwhat());
......@@ -581,12 +637,54 @@ void EditTandemPresetDialog::populate() {
ui->scp_no_radio_button->setChecked(true);
}
//<note type="input" label="scoring, include reverse">yes</note>
ui->sir_yes_radio_button->setChecked(true);
ui->sir_no_radio_button->setChecked(false);
if ( _tandem_params.getValue("scoring, include reverse") == "no" ) { // -1 for not found
ui->sir_yes_radio_button->setChecked(false);
ui->sir_no_radio_button->setChecked(true);
}
//<note type="input" label="scoring, y ions">yes</note>
ui->syi_yes_radio_button->setChecked(true);
ui->syi_no_radio_button->setChecked(false);
if ( _tandem_params.getValue("scoring, y ions") == "no" ) { // -1 for not found
ui->syi_yes_radio_button->setChecked(false);
ui->syi_no_radio_button->setChecked(true);
}
//<note type="input" label="scoring, b ions">yes</note>
ui->sbi_yes_radio_button->setChecked(true);
ui->sbi_no_radio_button->setChecked(false);
if ( _tandem_params.getValue("scoring, b ions") == "no" ) { // -1 for not found
ui->sbi_yes_radio_button->setChecked(false);
ui->sbi_no_radio_button->setChecked(true);
}
//<note type="input" label="scoring, c ions">no</note>
ui->sci_yes_radio_button->setChecked(true);
ui->sci_no_radio_button->setChecked(false);
if ( _tandem_params.getValue("scoring, c ions") == "no" ) { // -1 for not found
ui->sci_yes_radio_button->setChecked(false);
ui->sci_no_radio_button->setChecked(true);
}
//<note type="input" label="scoring, z ions">no</note>
ui->szi_yes_radio_button->setChecked(true);
ui->szi_no_radio_button->setChecked(false);
if ( _tandem_params.getValue("scoring, z ions") == "no" ) { // -1 for not found
ui->szi_yes_radio_button->setChecked(false);
ui->szi_no_radio_button->setChecked(true);
}
//<note type="input" label="scoring, a ions">no</note>
ui->sai_yes_radio_button->setChecked(true);
ui->sai_no_radio_button->setChecked(false);
if ( _tandem_params.getValue("scoring, a ions") == "no" ) { // -1 for not found
ui->sai_yes_radio_button->setChecked(false);
ui->sai_no_radio_button->setChecked(true);
}
//<note type="input" label="scoring, x ions">no</note>
ui->sxi_yes_radio_button->setChecked(true);
ui->sxi_no_radio_button->setChecked(false);
if ( _tandem_params.getValue("scoring, x ions") == "no" ) { // -1 for not found
ui->sxi_yes_radio_button->setChecked(false);
ui->sxi_no_radio_button->setChecked(true);
}
qDebug() << "EditTandemPresetDialog::populate end";
}
......
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