From 98afae589169b1e9f13f6b20cf940dad41a017aa Mon Sep 17 00:00:00 2001
From: Olivier Langella <olivier.langella@u-psud.fr>
Date: Mon, 25 Sep 2017 21:59:20 +0200
Subject: [PATCH] introducing MsRunStatistics

---
 src/output/ods/samplesheet.cpp | 4 +++-
 src/output/ods/samplesheet.h   | 1 +
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/output/ods/samplesheet.cpp b/src/output/ods/samplesheet.cpp
index 170cae5c..af749782 100644
--- a/src/output/ods/samplesheet.cpp
+++ b/src/output/ods/samplesheet.cpp
@@ -90,7 +90,9 @@ void SampleSheet::writeHeaders()  {
 void SampleSheet::writeIdentificationDataSource(IdentificationDataSource * p_ident_data_source) {
     _p_writer->writeLine();
     MsRunSp msrun_sp = p_ident_data_source->getMsRunSp();
-    SpectrumStore::checkMsRunStatistics(msrun_sp);
+    if (_msrun_statistics) {
+        SpectrumStore::checkMsRunStatistics(msrun_sp);
+    }
     
     _p_writer->writeCell(msrun_sp.get()->getXmlId());
     _p_writer->writeCell(msrun_sp.get()->getSampleName());
diff --git a/src/output/ods/samplesheet.h b/src/output/ods/samplesheet.h
index 00de25a3..9c1fc7c4 100644
--- a/src/output/ods/samplesheet.h
+++ b/src/output/ods/samplesheet.h
@@ -46,6 +46,7 @@ private :
     OdsExport * _p_ods_export;
     const Project * _p_project;
     CalcWriterInterface * _p_writer;
+    bool _msrun_statistics = false;
 };
 
 #endif // SAMPLESHEET_H
-- 
GitLab