12#include <sharg/parser.hpp>
20template <
typename argument_t>
22void validate_shape(sharg::parser & parser, argument_t & arguments)
24 if (parser.is_option_set(
"shape"))
26 if (parser.is_option_set(
"kmer"))
27 throw sharg::parser_error{
"You cannot set both shape and k-mer arguments."};
32 arguments.shape_string.data() + arguments.shape_string.size(),
36 arguments.shape = seqan3::shape{seqan3::bin_literal{tmp}};
40 arguments.shape = seqan3::shape{seqan3::ungapped{arguments.kmer_size}};
43 if (!parser.is_option_set(
"window"))
44 arguments.window_size = arguments.shape.size();
45 else if (arguments.shape.size() > arguments.window_size)
46 throw sharg::parser_error{
"The k-mer size cannot be bigger than the window size."};
Provides raptor::build_arguments.
Provides raptor::prepare_arguments.