@@ -37,28 +37,7 @@ int execute(chopper::configuration & config,
37
37
std::vector<std::vector<std::string>> const & filenames,
38
38
std::vector<seqan::hibf::sketch::hyperloglog> const & sketches)
39
39
{
40
- assert (config.hibf_config .number_of_user_bins > 0 );
41
-
42
- if (config.hibf_config .disable_estimate_union )
43
- config.hibf_config .disable_rearrangement = true ;
44
-
45
- if (config.hibf_config .tmax == 0 ) // no tmax was set by the user on the command line
46
- {
47
- // Set default as sqrt(#samples). Experiments showed that this is a reasonable default.
48
- if (size_t number_samples = config.hibf_config .number_of_user_bins ;
49
- number_samples >= 1ULL << 32 ) // sqrt is bigger than uint16_t
50
- throw std::invalid_argument{" Too many samples. Please set a tmax (see help via `-hh`)." }; // GCOVR_EXCL_LINE
51
- else
52
- config.hibf_config .tmax =
53
- chopper::next_multiple_of_64 (static_cast <uint16_t >(std::ceil (std::sqrt (number_samples))));
54
- }
55
- else if (config.hibf_config .tmax % 64 != 0 )
56
- {
57
- config.hibf_config .tmax = chopper::next_multiple_of_64 (config.hibf_config .tmax );
58
- std::cerr << " [CHOPPER LAYOUT WARNING]: Your requested number of technical bins was not a multiple of 64. "
59
- << " Due to the architecture of the HIBF, it will use up space equal to the next multiple of 64 "
60
- << " anyway, so we increased your number of technical bins to " << config.hibf_config .tmax << " .\n " ;
61
- }
40
+ config.hibf_config .validate_and_set_defaults ();
62
41
63
42
seqan::hibf::layout::layout hibf_layout;
64
43
std::vector<size_t > kmer_counts;
0 commit comments