1- /* Copyright (C) 2013-2025 University of Southern California and
2- * Andrew D. Smith and Timothy Daley
1+ /* Copyright (C) 2013-2025 Andrew D. Smith and Timothy Daley
32 *
43 * Authors: Timothy Daley and Andrew Smith
54 *
@@ -54,7 +53,7 @@ lc_extrap::main(int argc, char *argv[]) -> int { // NOLINT(*-avoid-c-arrays)
5453 // NOLINTBEGIN(*-avoid-magic-numbers)
5554 int diagonal{0 };
5655 std::size_t orig_max_terms{100 };
57- double max_extrap{ 1.0e10 };
56+ std:: uint64_t max_extrap_int{ 10'000'000'000 };
5857 double step_size{1e6 };
5958 std::size_t n_bootstraps{100 };
6059 double c_level{0.95 };
@@ -80,17 +79,20 @@ lc_extrap::main(int argc, char *argv[]) -> int { // NOLINT(*-avoid-c-arrays)
8079 app.add_option (" -i,--input" , input_file_name, " input file" )
8180 ->option_text (" FILE" )
8281 ->required ()
82+ // ->check(CLI::ReadPermission)
8383 ->check (CLI::ExistingFile);
8484 app.add_option (" -o,--output" , outfile, " output filename (directory must exist)" )
8585 ->option_text (" FILE" )
86+ // ->check(CLI::WritePermission)
8687 ->required ();
87- app.add_option (" -e,--extrap" , max_extrap, " maximum extrapolation" );
88+ app.add_option (" -e,--extrap" , max_extrap_int, " maximum extrapolation (must be integer)" )
89+ ->check (CLI::PositiveNumber);
8890 app.add_option (" -s,--step" , step_size, " extrapolation step size" );
8991 app.add_option (" -n,--boots" , n_bootstraps, " number of bootstraps" );
9092 app.add_option (" -c,--cval" , c_level, " level for confidence intervals" );
9193 app.add_option (" -x,--terms" , orig_max_terms, " maximum terms in estimator" );
9294 app.add_option (" -r,--seed" , seed, " seed for random number generator" );
93- app.add_flag (" -P ,--pe " , paired_end, " input is paired end read file" );
95+ app.add_flag (" -p ,--paired-end " , paired_end, " input is paired end read file" );
9496 app.add_flag (" -Q,--quick" , single_estimate,
9597 " do not use bootstraps for confidence intervals" );
9698 app.add_flag (" -D,--defects" , allow_defects, " no testing for defects" );
@@ -104,6 +106,8 @@ lc_extrap::main(int argc, char *argv[]) -> int { // NOLINT(*-avoid-c-arrays)
104106 }
105107 CLI11_PARSE (app, argc, argv);
106108
109+ const double max_extrap = max_extrap_int;
110+
107111 const auto input_format = get_input_format_type (input_file_name);
108112 if (is_unknown (input_format)) {
109113 std::cerr << " unknown input format\n " ;
@@ -191,8 +195,6 @@ lc_extrap::main(int argc, char *argv[]) -> int { // NOLINT(*-avoid-c-arrays)
191195
192196 out << " TOTAL_READS\t EXPECTED_DISTINCT\n " ;
193197 out.setf (std::ios_base::fixed, std::ios_base::floatfield);
194- out.precision (1 );
195-
196198 out << 0 << ' \t ' << 0 << ' \n ' ;
197199 for (std::size_t i = 0 ; i < std::size (yield_estimates); ++i)
198200 out << (i + 1 ) * step_size << ' \t ' << yield_estimates[i] << ' \n ' ;
0 commit comments