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

WIP : writing MassChroqML quantification methods

parent dd0842a8
No related branches found
No related tags found
No related merge requests found
......@@ -182,7 +182,6 @@ bool XpipSaxHandler::startElement_sample(QXmlAttributes attributes) {
qDebug() << "startElement_sample ";
MsRunSp ms_run = _p_project->getMsRunStore().getInstance(attributes.value("value").simplified());
ms_run.get()->setXmlId(attributes.value("value").simplified());
ms_run.get()->setFilename(attributes.value("value").simplified());
_current_identification_group_p->addMsRunSp(ms_run);
qDebug() << "startElement_sample end" ;
......
......@@ -131,9 +131,120 @@ void MassChroQml::write(ProjectSp sp_project) {
writeProteinList();
writePeptideList();
writeIsotopeLabelList();
writeAlignments();
writeQuantificationMethods();
}
void MassChroQml::writeQuantificationMethods() {
//<quantification_methods>
_output_stream->writeStartElement("quantification_methods");
//<quantification_method id="my_qzivy">
_output_stream->writeStartElement("quantification_method");
_output_stream->writeAttribute("id","quant1");
//<xic_extraction xic_type="sum">
_output_stream->writeStartElement("xic_extraction");
_output_stream->writeAttribute("xic_type","max");
_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-->
_output_stream->writeStartElement("ppm_range");
_output_stream->writeAttribute("min","10");
_output_stream->writeAttribute("max","10");
_output_stream->writeComment("For XIC extraction on Da use: mz_range");
_output_stream->writeEndElement();
//</xic_extraction>
_output_stream->writeEndElement();
//<xic_filters>
_output_stream->writeStartElement("xic_filters");
//<anti_spike half="5"/>
_output_stream->writeStartElement("anti_spike");
_output_stream->writeAttribute("half","5");
_output_stream->writeEndElement();
//<background half_mediane="5" half_min_max="20"/>
_output_stream->writeComment("<background half_mediane=\"5\" half_min_max=\"20\"/>");
//</xic_filters>
_output_stream->writeEndElement();
//<peak_detection>
_output_stream->writeStartElement("peak_detection");
//<detection_zivy>
_output_stream->writeStartElement("detection_zivy");
//<mean_filter_half_edge>1</mean_filter_half_edge>
_output_stream->writeStartElement("mean_filter_half_edge");
_output_stream->writeCharacters("1");
_output_stream->writeEndElement();
//<minmax_half_edge>3</minmax_half_edge>
_output_stream->writeStartElement("minmax_half_edge");
_output_stream->writeCharacters("3");
_output_stream->writeEndElement();
//<maxmin_half_edge>2</maxmin_half_edge>
_output_stream->writeStartElement("maxmin_half_edge");
_output_stream->writeCharacters("2");
_output_stream->writeEndElement();
//<detection_threshold_on_max>5000</detection_threshold_on_max>
_output_stream->writeStartElement("detection_threshold_on_max");
_output_stream->writeCharacters("5000");
_output_stream->writeEndElement();
//<detection_threshold_on_min>3000</detection_threshold_on_min>
_output_stream->writeStartElement("detection_threshold_on_min");
_output_stream->writeCharacters("3000");
_output_stream->writeEndElement();
//</detection_zivy>
_output_stream->writeEndElement();
//</peak_detection>
_output_stream->writeEndElement();
//</quantification_method>
_output_stream->writeEndElement();
//</quantification_methods>
_output_stream->writeEndElement();
}
void MassChroQml::writeAlignments() {
//<alignments>
_output_stream->writeStartElement("alignments");
//<alignment_methods>
_output_stream->writeStartElement("alignment_methods");
//<alignment_method id="my_ms2">
_output_stream->writeStartElement("alignment_method");
_output_stream->writeAttribute("id","my_ms2");
//<ms2><!-- write_time_values_output_dir="directory" to write retention time corrections -->
_output_stream->writeStartElement("ms2");
_output_stream->writeComment("write_time_values_output_dir=\"directory\" to write retention time corrections");
//<ms2_tendency_halfwindow>10</ms2_tendency_halfwindow>
_output_stream->writeStartElement("ms2_tendency_halfwindow");
_output_stream->writeCharacters("10");
_output_stream->writeEndElement();
//<ms2_smoothing_halfwindow>5</ms2_smoothing_halfwindow>
_output_stream->writeStartElement("ms2_smoothing_halfwindow");
_output_stream->writeCharacters("15");
_output_stream->writeEndElement();
//<ms1_smoothing_halfwindow>3</ms1_smoothing_halfwindow>
_output_stream->writeStartElement("ms1_smoothing_halfwindow");
_output_stream->writeCharacters("0");
_output_stream->writeEndElement();
//</ms2>
_output_stream->writeEndElement();
//</alignment_method>
_output_stream->writeEndElement();
_output_stream->writeComment("<alignment_method id=\"my_obiwarp\"> \n<obiwarp>\n <lmat_precision>1</lmat_precision>\n <mz_start>500</mz_start>\n <mz_stop>1200</mz_stop>\n </obiwarp>\n </alignment_method>");
//</alignment_methods>
_output_stream->writeEndElement();
//<align group_id="G1" method_id="my_ms2" reference_data_id="samp0" />
//<align group_id="G2" method_id="my_obiwarp" reference_data_id="samp2" />
_output_stream->writeStartElement("align");
_output_stream->writeAttribute("group_id","fractiona1");
_output_stream->writeAttribute("method_id","my_ms2");
_output_stream->writeAttribute("reference_data_id","sampa1");
_output_stream->writeEndElement();
//</alignments>
_output_stream->writeEndElement();
}
void MassChroQml::writeIsotopeLabelList() {
//<isotope_label_list>
_output_stream->writeStartElement("isotope_label_list");
......
......@@ -49,6 +49,8 @@ private:
void writeProteinList();
void writePeptideList();
void writeIsotopeLabelList();
void writeAlignments();
void writeQuantificationMethods();
private :
QFile * _output_file;
QXmlStreamWriter * _output_stream;
......
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