Commit e786ed45 authored by Langella Olivier's avatar Langella Olivier
Browse files

WIP: refinement module

parent 80a20e52
......@@ -95,13 +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") || (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") || (label == "refine")) {
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") || (label == "refine") || (label == "refine, use potential modifications for full refinement") || (label == "refine, cleavage semi") ) {
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") || (label == "refine, maximum valid expectation value")) {
bool ok;
value.toDouble(&ok);
......
......@@ -354,16 +354,31 @@ void EditTandemPresetDialog::doHelp() {
{
html_doc.setFileName(":/tandem/resources/html_doc/refpctm.html");
}
if ((senderObjName == "refmm_push_button")|| (senderObjName == "refmm1_push_button")|| (senderObjName == "refmm2_push_button"))
if ((senderObjName == "refmm_push_button")|| (senderObjName == "refmm1_push_button")|| (senderObjName == "refmm2_push_button"))
{
html_doc.setFileName(":/tandem/resources/html_doc/refmm.html");
}
_tandem_params.setParamLabelValue("residue, potential modification mass", ui->rpmm_edit->text());
_tandem_params.setParamLabelValue("residue, potential modification mass 1", ui->rpmm1_edit->text());
_tandem_params.setParamLabelValue("residue, potential modification mass 2", ui->rpmm2_edit->text());
if ((senderObjName == "refpmm_push_button")|| (senderObjName == "refpmm1_push_button")|| (senderObjName == "refpmm2_push_button"))
{
html_doc.setFileName(":/tandem/resources/html_doc/refpmm.html");
}
if ((senderObjName == "refpmmotif_push_button")|| (senderObjName == "refpmmotif1_push_button")|| (senderObjName == "refpmmotif2_push_button"))
{
html_doc.setFileName(":/tandem/resources/html_doc/refpmmotif.html");
}
if(senderObjName == "rupmffr_push_button")
{
html_doc.setFileName(":/tandem/resources/html_doc/rupmffr.html");
}
if(senderObjName == "rcsemi_push_button")
{
html_doc.setFileName(":/tandem/resources/html_doc/rcsemi.html");
}
if(senderObjName == "ruc_push_button")
{
html_doc.setFileName(":/tandem/resources/html_doc/ruc.html");
}
if (html_doc.open(QFile::ReadOnly | QFile::Text)) {
QTextStream in(&html_doc);
ui->doc_plain_text_edit->setHtml(in.readAll());
......@@ -498,7 +513,24 @@ void EditTandemPresetDialog::readUi() {
_tandem_params.setParamLabelValue("refine, modification mass", ui->refmm_edit->text());
_tandem_params.setParamLabelValue("refine, modification mass 1", ui->refmm1_edit->text());
_tandem_params.setParamLabelValue("refine, modification mass 2", ui->refmm2_edit->text());
_tandem_params.setParamLabelValue("refine, potential modification mass", ui->refpmm_edit->text());
_tandem_params.setParamLabelValue("refine, potential modification mass 1", ui->refpmm1_edit->text());
_tandem_params.setParamLabelValue("refine, potential modification mass 2", ui->refpmm2_edit->text());
_tandem_params.setParamLabelValue("refine, potential modification motif", ui->refpmmotif_edit->text());
_tandem_params.setParamLabelValue("refine, potential modification motif 1", ui->refpmmotif1_edit->text());
_tandem_params.setParamLabelValue("refine, potential modification motif 2", ui->refpmmotif2_edit->text());
_tandem_params.setParamLabelValue("refine, use potential modifications for full refinement", "no");
if (ui->rupmffr_yes_radio_button->isChecked()) {
_tandem_params.setParamLabelValue("refine, use potential modifications for full refinement", "yes");
}
_tandem_params.setParamLabelValue("refine, cleavage semi", "no");
if (ui->rcsemi_yes_radio_button->isChecked()) {
_tandem_params.setParamLabelValue("refine, cleavage semi", "yes");
}
_tandem_params.setParamLabelValue("refine, unanticipated cleavage", "no");
if (ui->ruc_yes_radio_button->isChecked()) {
_tandem_params.setParamLabelValue("refine, unanticipated cleavage", "yes");
}
}
catch (pappso::PappsoException & error) {
......@@ -740,14 +772,38 @@ void EditTandemPresetDialog::populate() {
//<note type="input" label="refine, modification mass 2"></note>
ui->refmm2_edit->setText(_tandem_params.getValue("refine, modification mass 2"));
//<note type="input" label="refine, potential modification mass">15.99491@M</note>
ui->refpmm_edit->setText(_tandem_params.getValue("refine, potential modification mass"));
//<note type="input" label="refine, potential modification mass 1"></note>
ui->refpmm1_edit->setText(_tandem_params.getValue("refine, potential modification mass 1"));
//<note type="input" label="refine, potential modification mass 2"></note>
ui->refpmm2_edit->setText(_tandem_params.getValue("refine, potential modification mass 2"));
//<note type="input" label="refine, potential modification motif"></note>
ui->refpmmotif_edit->setText(_tandem_params.getValue("refine, potential modification motif"));
//<note type="input" label="refine, potential modification motif 1"></note>
ui->refpmmotif1_edit->setText(_tandem_params.getValue("refine, potential modification motif 1"));
//<note type="input" label="refine, potential modification motif 2"></note>
ui->refpmmotif2_edit->setText(_tandem_params.getValue("refine, potential modification motif 2"));
//<note type="input" label="refine, use potential modifications for full refinement">yes</note>
ui->rupmffr_yes_radio_button->setChecked(true);
ui->rupmffr_no_radio_button->setChecked(false);
if ( _tandem_params.getValue("refine, use potential modifications for full refinement") == "no" ) { // -1 for not found
ui->rupmffr_yes_radio_button->setChecked(false);
ui->rupmffr_no_radio_button->setChecked(true);
}
//<note type="input" label="refine, cleavage semi">no</note>
ui->rcsemi_yes_radio_button->setChecked(true);
ui->rcsemi_no_radio_button->setChecked(false);
if ( _tandem_params.getValue("refine, cleavage semi") == "no" ) { // -1 for not found
ui->rcsemi_yes_radio_button->setChecked(false);
ui->rcsemi_no_radio_button->setChecked(true);
}
//<note type="input" label="refine, unanticipated cleavage">no</note>
ui->ruc_yes_radio_button->setChecked(true);
ui->ruc_no_radio_button->setChecked(false);
if ( _tandem_params.getValue("refine, unanticipated cleavage") == "no" ) { // -1 for not found
ui->ruc_yes_radio_button->setChecked(false);
ui->ruc_no_radio_button->setChecked(true);
}
//<note type="input" label="refine, spectrum synthesis">yes</note>
//<note type="input" label="refine, point mutations">no</note>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment