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

extraction range written, check precision unit for masschroq

parent c18c237a
No related branches found
Tags xtpcpp_0.1.16-1
No related merge requests found
......@@ -271,16 +271,58 @@
<property name="title">
<string>XIC extraction parameters</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_6">
<layout class="QVBoxLayout" name="verticalLayout_10">
<item>
<widget class="QLabel" name="label_5">
<property name="text">
<string>XIC range</string>
</property>
</widget>
<layout class="QHBoxLayout" name="horizontalLayout_7">
<item>
<widget class="QLabel" name="label_5">
<property name="text">
<string>XIC range</string>
</property>
</widget>
</item>
<item>
<widget class="pappso::PrecisionWidget" name="xicRangeWidget" native="true">
<property name="minimumSize">
<size>
<width>2</width>
<height>2</height>
</size>
</property>
<property name="baseSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="pappso::PrecisionWidget" name="xicRangeWidget" native="true"/>
<layout class="QHBoxLayout" name="horizontalLayout_8">
<item>
<widget class="QLabel" name="label_6">
<property name="text">
<string>inside range, take the</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="sumMaxComboBox">
<item>
<property name="text">
<string>max</string>
</property>
</item>
<item>
<property name="text">
<string>sum</string>
</property>
</item>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
......
......@@ -102,8 +102,10 @@ 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);
ui->sumMaxComboBox->setCurrentText(params.xic_extraction_method);
}
......@@ -134,8 +136,11 @@ 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();
params.xic_extraction_method = ui->sumMaxComboBox->currentText();
return params;
}
......
......@@ -65,6 +65,9 @@ MasschroqFileParameters::save() const
settings.setValue("export_masschroqml/xic_extraction_range",
xic_extraction_range->toString());
settings.setValue("export_masschroqml/xic_extraction_method",
xic_extraction_method);
}
void
MasschroqFileParameters::load()
......@@ -120,4 +123,8 @@ MasschroqFileParameters::load()
xic_extraction_range = pappso::Precision::fromString(
settings.value("export_masschroqml/xic_extraction_range", "10 ppm")
.toString());
xic_extraction_method =
settings.value("export_masschroqml/xic_extraction_method", "max")
.toString();
}
......@@ -57,4 +57,6 @@ struct MasschroqFileParameters
unsigned int ms1_smoothing_half_window;
pappso::PrecisionP xic_extraction_range;
QString xic_extraction_method; //sum or max
};
......@@ -299,7 +299,7 @@ MassChroQml::writeQuantificationMethods()
_output_stream->writeAttribute("id", "quant1");
//<xic_extraction xic_type="sum">
_output_stream->writeStartElement("xic_extraction");
_output_stream->writeAttribute("xic_type", "max");
_output_stream->writeAttribute("xic_type", m_params.xic_extraction_method);
_output_stream->writeComment("max : XIC on BasePeak; sum : XIC on TIC");
//<ppm_range min="10" max="10"/><!--For XIC extraction on Da use: mz_range-->
......@@ -311,11 +311,15 @@ MassChroQml::writeQuantificationMethods()
}
if(m_params.xic_extraction_range->getUnit() == pappso::PrecisionUnit::dalton)
{
_output_stream->writeStartElement("dalton_range");
_output_stream->writeStartElement("mz_range");
}
else
{
//error
// error
throw pappso::PappsoException(
QObject::tr("error : this precision unit is not taken into account by "
"MassChroQ : %1\n")
.arg(m_params.xic_extraction_range->toString()));
}
_output_stream->writeAttribute(
"min", QString("%1").arg(m_params.xic_extraction_range->getValue()));
......
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