From 69d21481a71cbc5e3bcc4cf2dffdeb20359c97b2 Mon Sep 17 00:00:00 2001 From: Joshua Kim Date: Mon, 25 Nov 2019 15:48:44 +0100 Subject: [PATCH 1/2] Add threads and output prefix to option constructor. --- include/sviper/config.h | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/include/sviper/config.h b/include/sviper/config.h index 972b5db..40d2cbd 100644 --- a/include/sviper/config.h +++ b/include/sviper/config.h @@ -23,13 +23,18 @@ struct CmdOptions std::string reference_file_name{}; std::string log_file_name{}; - CmdOptions(std::string long_, std::string short_, std::string candidate_, std::string ref_) : - threads(std::thread::hardware_concurrency()), + CmdOptions(unsigned threads_, + std::string long_, + std::string short_, + std::string candidate_, + std::string ref_, + std::string output_prefix_) : + threads(threads_), long_read_file_name(long_), short_read_file_name(short_), candidate_file_name(candidate_), - output_prefix(candidate_ + "_polished"), - reference_file_name(ref_) {} + reference_file_name(ref_), + output_prefix(output_prefix_) {} CmdOptions() = default; CmdOptions(const CmdOptions&) = default; From f7fca356f9118415b4ab7dbc43e3f2f3d6064fb4 Mon Sep 17 00:00:00 2001 From: Joshua Kim Date: Thu, 28 Nov 2019 09:50:35 +0100 Subject: [PATCH 2/2] Set default value of threads to maximum. --- include/sviper/config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/sviper/config.h b/include/sviper/config.h index 40d2cbd..23df86e 100644 --- a/include/sviper/config.h +++ b/include/sviper/config.h @@ -10,7 +10,7 @@ struct CmdOptions bool verbose{false}; bool veryVerbose{false}; bool output_polished_bam{false}; - unsigned threads{0}; + unsigned threads{std::thread::hardware_concurrency()}; int flanking_region{400}; // size of flanking region for breakpoints int mean_coverage_of_short_reads{36}; // original coverage double mean_insert_size_of_short_reads{280.054}; // original coverage