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

tpp tandem version compliant

parent 08a7e39e
......@@ -33,6 +33,25 @@
#include <pappsomspp/exception/exceptionnotfound.h>
#include <pappsomspp/exception/exceptionnotpossible.h>
/*
*
specific parameters for the modified TPP tandem version :
http://tools.proteomecenter.org/wiki/index.php?title=TPP:X%21Tandem_and_the_TPP
<note label="scoring, algorithm" type="input">k-score</note>
<note label="spectrum, use conditioning" type="input">no</note>
<note label="scoring, minimum ion count" type="input">1</note>
new labels :
"protein, taxon" https://www.thegpm.org/TANDEM/api/pt.html
"protein, homolog management"
"refine, sequence path" https://www.thegpm.org/TANDEM/api/rsp.html
"refine, tic percent" https://www.thegpm.org/TANDEM/api/rtp.html
"output, log path" https://www.thegpm.org/TANDEM/api/olp.html
"output, message" https://www.thegpm.org/TANDEM/api/om.html
"output, sequence path" https://www.thegpm.org/TANDEM/api/osp.html
"output, path" https://www.thegpm.org/TANDEM/api/opath.html
*/
TandemParameters::TandemParameters()
{
}
......@@ -159,7 +178,9 @@ TandemParameters::setParamLabelValue(const QString &label, const QString &value)
(label == "output, parameters") || (label == "output, performance") ||
(label == "output, histograms") ||
(label == "output, path hashing") ||
(label == "spectrum, use noise suppression"))
(label == "spectrum, use noise suppression") ||
(label == "spectrum, use conditioning") ||
(label == "protein, homolog management"))
{
if((value != "yes") && (value != "no"))
{
......@@ -168,12 +189,6 @@ TandemParameters::setParamLabelValue(const QString &label, const QString &value)
.arg(label)
.arg(value));
}
/*
<note label="scoring, algorithm" type="input">k-score</note>
<note label="spectrum, use conditioning" type="input">no</note>
<note label="scoring, minimum ion count" type="input">1</note>
*/
}
else if((label == "spectrum, parent monoisotopic mass error minus") ||
......@@ -190,7 +205,8 @@ TandemParameters::setParamLabelValue(const QString &label, const QString &value)
(label == "spectrum, neutral loss window") ||
(label == "spectrum, minimum fragment mz") ||
(label == "output, maximum valid expectation value") ||
(label == "output, maximum valid protein expectation value")
(label == "output, maximum valid protein expectation value") ||
(label == "refine, tic percent")
)
......@@ -235,8 +251,11 @@ TandemParameters::setParamLabelValue(const QString &label, const QString &value)
(label == "refine, potential modification motif 1") ||
(label == "refine, potential modification motif 2") ||
(label == "output, sort results by") ||
(label == "output, xsl path")||
(label == "spectrum, path"))
(label == "output, xsl path") || (label == "spectrum, path") ||
(label == "scoring, algorithm") || (label == "protein, taxon") ||
(label == "refine, sequence path") || (label == "output, log path") ||
(label == "output, message") || (label == "output, sequence path") ||
(label == "output, path"))
{
// string
}
......@@ -246,7 +265,7 @@ TandemParameters::setParamLabelValue(const QString &label, const QString &value)
(label == "spectrum, sequence batch size") ||
(label == "spectrum, threads") ||
(label == "scoring, minimum ion count") ||
(label == "scoring, maximum missed cleavage sites")||
(label == "scoring, maximum missed cleavage sites") ||
(label == "output, histogram column width"))
{
......
......@@ -1016,14 +1016,31 @@ EditTandemPresetDialog::populate()
}
//<note type="input" label="protein, cleavage C-terminal mass
// change">+17.00305</note>
ui->pcctmc_edit->setText(
_tandem_params.getValue("protein, cleavage C-terminal mass change"));
//<note type="input" label="protein, cleavage N-terminal mass
// change">+1.00794</note>
ui->pcntmc_edit->setText(
_tandem_params.getValue("protein, cleavage N-terminal mass change"));
try
{
//<note type="input" label="protein, cleavage C-terminal mass
// change">+17.00305</note>
ui->pcctmc_edit->setText(_tandem_params.getValue(
"protein, cleavage C-terminal mass change"));
}
catch(pappso::ExceptionNotFound &error)
{
ui->pcctmc_edit->setText("+17.00305");
}
try
{
//<note type="input" label="protein, cleavage N-terminal mass
// change">+1.00794</note>
ui->pcntmc_edit->setText(_tandem_params.getValue(
"protein, cleavage N-terminal mass change"));
}
catch(pappso::ExceptionNotFound &error)
{
ui->pcntmc_edit->setText("+1.00794");
}
//<note type="input" label="protein, C-terminal residue modification
// mass">0.0</note>
......@@ -1056,10 +1073,16 @@ EditTandemPresetDialog::populate()
//<note type="input" label="protein, stP bias">yes</note>
ui->pstpb_yes_radio_button->setChecked(true);
ui->pstpb_no_radio_button->setChecked(false);
if(_tandem_params.getValue("protein, stP bias") == "no")
{ // -1 for not found
ui->pstpb_yes_radio_button->setChecked(false);
ui->pstpb_no_radio_button->setChecked(true);
try
{
if(_tandem_params.getValue("protein, stP bias") == "no")
{ // -1 for not found
ui->pstpb_yes_radio_button->setChecked(false);
ui->pstpb_no_radio_button->setChecked(true);
}
}
catch(pappso::ExceptionNotFound &error)
{
}
//<note type="input" label="protein, modified residue mass file"></note>
......@@ -1070,37 +1093,80 @@ EditTandemPresetDialog::populate()
ui->rmm_edit->setText(
_tandem_params.getValue("residue, modification mass"));
//<note type="input" label="residue, modification mass 1"></note>
ui->rmm1_edit->setText(
_tandem_params.getValue("residue, modification mass 1"));
//<note type="input" label="residue, modification mass 2"></note>
ui->rmm2_edit->setText(
_tandem_params.getValue("residue, modification mass 2"));
try
{
//<note type="input" label="residue, modification mass 1"></note>
ui->rmm1_edit->setText(
_tandem_params.getValue("residue, modification mass 1"));
}
catch(pappso::ExceptionNotFound &error)
{
ui->rmm1_edit->setText("");
}
try
{
//<note type="input" label="residue, modification mass 2"></note>
ui->rmm2_edit->setText(
_tandem_params.getValue("residue, modification mass 2"));
}
catch(pappso::ExceptionNotFound &error)
{
ui->rmm2_edit->setText("");
}
//<note type="input" label="residue, potential modification
// mass">15.99491@M</note>
ui->rpmm_edit->setText(
_tandem_params.getValue("residue, potential modification mass"));
//<note type="input" label="residue, potential modification mass
// 1"></note>
ui->rpmm1_edit->setText(
_tandem_params.getValue("residue, potential modification mass 1"));
//<note type="input" label="residue, potential modification mass
// 2"></note>
ui->rpmm2_edit->setText(
_tandem_params.getValue("residue, potential modification mass 2"));
try
{
//<note type="input" label="residue, potential modification mass
// 1"></note>
ui->rpmm1_edit->setText(
_tandem_params.getValue("residue, potential modification mass 1"));
}
catch(pappso::ExceptionNotFound &error)
{
ui->rpmm1_edit->setText("");
}
try
{
//<note type="input" label="residue, potential modification mass
// 2"></note>
ui->rpmm2_edit->setText(
_tandem_params.getValue("residue, potential modification mass 2"));
}
catch(pappso::ExceptionNotFound &error)
{
ui->rpmm2_edit->setText("");
}
//<note type="input" label="residue, potential modification motif"></note>
ui->rpmmotif_edit->setText(
_tandem_params.getValue("residue, potential modification motif"));
//<note type="input" label="residue, potential modification motif
// 1"></note>
ui->rpmmotif1_edit->setText(
_tandem_params.getValue("residue, potential modification motif 1"));
//<note type="input" label="residue, potential modification motif
// 2"></note>
ui->rpmmotif2_edit->setText(
_tandem_params.getValue("residue, potential modification motif 2"));
try
{
//<note type="input" label="residue, potential modification motif
// 1"></note>
ui->rpmmotif1_edit->setText(
_tandem_params.getValue("residue, potential modification motif 1"));
}
catch(pappso::ExceptionNotFound &error)
{
ui->rpmmotif1_edit->setText("");
}
try
{
//<note type="input" label="residue, potential modification motif
// 2"></note>
ui->rpmmotif2_edit->setText(
_tandem_params.getValue("residue, potential modification motif 2"));
}
catch(pappso::ExceptionNotFound &error)
{
ui->rpmmotif2_edit->setText("");
}
//<note type="input" label="scoring, minimum ion count">4</note>
ui->smic_edit->setText(
......@@ -1199,33 +1265,78 @@ EditTandemPresetDialog::populate()
//<note type="input" label="refine, modification mass">57.02146@C</note>
ui->refmm_edit->setText(
_tandem_params.getValue("refine, modification mass"));
//<note type="input" label="refine, modification mass 1"></note>
ui->refmm1_edit->setText(
_tandem_params.getValue("refine, modification mass 1"));
//<note type="input" label="refine, modification mass 2"></note>
ui->refmm2_edit->setText(
_tandem_params.getValue("refine, modification mass 2"));
try
{
//<note type="input" label="refine, modification mass 1"></note>
ui->refmm1_edit->setText(
_tandem_params.getValue("refine, modification mass 1"));
}
catch(pappso::ExceptionNotFound &error)
{
ui->refmm1_edit->setText("");
}
try
{
//<note type="input" label="refine, modification mass 2"></note>
ui->refmm2_edit->setText(
_tandem_params.getValue("refine, modification mass 2"));
}
catch(pappso::ExceptionNotFound &error)
{
ui->refmm2_edit->setText("");
}
//<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"));
try
{
//<note type="input" label="refine, potential modification mass
// 1"></note>
ui->refpmm1_edit->setText(
_tandem_params.getValue("refine, potential modification mass 1"));
}
catch(pappso::ExceptionNotFound &error)
{
ui->refpmm1_edit->setText("");
}
try
{
//<note type="input" label="refine, potential modification mass
// 2"></note>
ui->refpmm2_edit->setText(
_tandem_params.getValue("refine, potential modification mass 2"));
}
catch(pappso::ExceptionNotFound &error)
{
ui->refpmm2_edit->setText("");
}
//<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"));
try
{
//<note type="input" label="refine, potential modification motif
// 1"></note>
ui->refpmmotif1_edit->setText(
_tandem_params.getValue("refine, potential modification motif 1"));
}
catch(pappso::ExceptionNotFound &error)
{
ui->refpmmotif1_edit->setText("");
}
try
{
//<note type="input" label="refine, potential modification motif
// 2"></note>
ui->refpmmotif2_edit->setText(
_tandem_params.getValue("refine, potential modification motif 2"));
}
catch(pappso::ExceptionNotFound &error)
{
ui->refpmmotif2_edit->setText("");
}
//<note type="input" label="refine, use potential modifications for full
// refinement">yes</note>
ui->rupmffr_yes_radio_button->setChecked(true);
......@@ -1239,10 +1350,16 @@ EditTandemPresetDialog::populate()
//<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);
try
{
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);
}
}
catch(pappso::ExceptionNotFound &error)
{
}
//<note type="input" label="refine, unanticipated cleavage">no</note>
ui->ruc_yes_radio_button->setChecked(true);
......@@ -1270,14 +1387,31 @@ EditTandemPresetDialog::populate()
}
//<note type="input" label="output, maximum valid expectation
// value">0.05</note>
ui->omvev_edit->setText(
_tandem_params.getValue("output, maximum valid expectation value"));
//<note type="input" label="output, maximum valid protein expectation
// value">0.05</note>
ui->omvpev_edit->setText(_tandem_params.getValue(
"output, maximum valid protein expectation value"));
try
{
//<note type="input" label="output, maximum valid expectation
// value">0.05</note>
ui->omvev_edit->setText(
_tandem_params.getValue("output, maximum valid expectation value"));
}
catch(pappso::ExceptionNotFound &error)
{
ui->omvev_edit->setText("0.01");
}
try
{
//<note type="input" label="output, maximum valid protein expectation
// value">0.05</note>
ui->omvpev_edit->setText(_tandem_params.getValue(
"output, maximum valid protein expectation value"));
}
catch(pappso::ExceptionNotFound &error)
{
ui->omvpev_edit->setText("0.01");
}
//<note type="input" label="output, results">valid</note>
ui->oresu_all_radio_button->setChecked(false);
ui->oresu_valid_radio_button->setChecked(true);
......
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