From 1efacb8425c92ae88da6d1f067848f55add9e160 Mon Sep 17 00:00:00 2001
From: Yannis Duffourd <yannis.duffourd@u-bourgogne.fr>
Date: Fri, 22 Jan 2021 14:40:38 +0100
Subject: [PATCH] Adding new option to support full cs sequence writing

---
 cpp/main.cpp | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/cpp/main.cpp b/cpp/main.cpp
index 6c7cbf6..064410d 100755
--- a/cpp/main.cpp
+++ b/cpp/main.cpp
@@ -27,6 +27,7 @@ int main(int argc, char* argv[])
   cerr << "Starting Main" << endl;
 
 	bool countStop = false;
+  bool fullCS = false;
 
 	int currentThread = 0;
 	int depthThreshold;
@@ -56,7 +57,7 @@ int main(int argc, char* argv[])
 	("output,o",  po::value<string>( &outputFile ), "output result file variants." )
 	("logFile,l",  po::value<string>( &logFile ), "Log file output." )
 	("codon,c",  po::value<string>( &codonResultFile ), "output result file variants." )
-	("consensus,C",  po::value<string>( &csFile ), "Consensus sequence file (fasta)." )
+	("consensus,C",  po::value<string>( &csFile ), "Consensus sequence file to be written(fasta)." )
 
 	("integrase,I",  po::value<string>( &integraseFile ), "File annotation for integrase prot." )
 	("rt,R" , po::value<string>( &rtFile ) , "File annotation for retrotranscriptase prot." )
@@ -69,6 +70,7 @@ int main(int argc, char* argv[])
 	("ratio,a" , po::value<double>( &ratioThreshold )->default_value(0.1) , "Minimum ratio of alt reads to consider a mutation. (optional)" )
 	("pvalue,p" , po::value<double>( &pvalueThreshold )->default_value(0.05) , "pvalue threshold from FET to consider a mutation. (optional)" )
 	("stop,s" , "Activate stop codon detction." )
+  ("fullcs,f", "Write full genome consensus instead of gene by gene.")
 
 	("thread,t", po::value<int>( &nbThread )->default_value(50), "Number of thread to use. (NYI)")
 	("loglevel,L", po::value<int>( &loggingLevel )->default_value(1), "Logging level.");
@@ -180,7 +182,13 @@ int main(int argc, char* argv[])
     countStop = true;
   }
 
-	Vihgo * App = new Vihgo( bamFile , geneFile , rtFile , integraseFile , proteaseFile, referenceFile,outputFile, codonResultFile, csFile, inRunControlBam,depthThreshold, nbThread,loggingLevel, ratioThreshold ,pvalueThreshold, countStop );
+  if( vm.count( "fullcs") )
+  {
+    fullCS = true;
+  }
+
+
+	Vihgo * App = new Vihgo( bamFile , geneFile , rtFile , integraseFile , proteaseFile, referenceFile,outputFile, codonResultFile, csFile, inRunControlBam,depthThreshold, nbThread,loggingLevel, ratioThreshold ,pvalueThreshold, countStop, fullCS );
   App->mainLoop();
 
 
-- 
2.17.1