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

writing xic extraction range in mcq file

parent 9fdacf52
No related branches found
No related tags found
No related merge requests found
......@@ -102,6 +102,8 @@ ExportMasschroqDialog::setMasschroqFileParameters(
ui->ms2TendencySpinBox->setValue(params.ms2_tendency_half_window);
ui->ms2SmoothingSpinBox->setValue(params.ms2_smoothing_half_window);
ui->ms1SmoothingSpinBox->setValue(params.ms1_smoothing_half_window);
ui->xicRangeWidget->setPrecision(params.xic_extraction_range);
}
......@@ -132,6 +134,8 @@ ExportMasschroqDialog::getMasschroqFileParameters() const
params.ms2_tendency_half_window = ui->ms2TendencySpinBox->value();
params.ms2_smoothing_half_window = ui->ms2SmoothingSpinBox->value();
params.ms1_smoothing_half_window = ui->ms1SmoothingSpinBox->value();
params.xic_extraction_range = ui->xicRangeWidget->getPrecision();
return params;
}
......
......@@ -61,6 +61,10 @@ MasschroqFileParameters::save() const
ms2_smoothing_half_window);
settings.setValue("export_masschroqml/ms1_smoothing_half_window",
ms1_smoothing_half_window);
settings.setValue("export_masschroqml/xic_extraction_range",
xic_extraction_range->toString());
}
void
MasschroqFileParameters::load()
......@@ -112,4 +116,8 @@ MasschroqFileParameters::load()
ms1_smoothing_half_window =
settings.value("export_masschroqml/ms1_smoothing_half_window", "0")
.toUInt();
xic_extraction_range = pappso::Precision::fromString(
settings.value("export_masschroqml/xic_extraction_range", "10 ppm")
.toString());
}
......@@ -32,6 +32,7 @@
#include "../../../utils/types.h"
#include <QString>
#include <pappsomspp/mass_range.h>
struct MasschroqFileParameters
{
......@@ -54,4 +55,6 @@ struct MasschroqFileParameters
unsigned int ms2_tendency_half_window;
unsigned int ms2_smoothing_half_window;
unsigned int ms1_smoothing_half_window;
pappso::PrecisionP xic_extraction_range;
};
......@@ -305,9 +305,22 @@ MassChroQml::writeQuantificationMethods()
_output_stream->writeComment("For XIC extraction on Da use: mz_range");
_output_stream->writeStartElement("ppm_range");
_output_stream->writeAttribute("min", "10");
_output_stream->writeAttribute("max", "10");
if(m_params.xic_extraction_range->getUnit() == pappso::PrecisionUnit::ppm)
{
_output_stream->writeStartElement("ppm_range");
}
if(m_params.xic_extraction_range->getUnit() == pappso::PrecisionUnit::dalton)
{
_output_stream->writeStartElement("dalton_range");
}
else
{
//error
}
_output_stream->writeAttribute(
"min", QString("%1").arg(m_params.xic_extraction_range->getValue()));
_output_stream->writeAttribute(
"max", QString("%1").arg(m_params.xic_extraction_range->getValue()));
_output_stream->writeEndElement();
//</xic_extraction>
_output_stream->writeEndElement();
......
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