15#include <seqan3/io/sequence_file/format_fasta.hpp>
34 if (arguments.use_filesize_dependent_cutoff)
36 cutoff_kind = cutoff_kinds::filesize_dependent;
40 cutoff_kind = cutoff_kinds::fixed;
48 case cutoff_kinds::filesize_dependent:
49 return impl(filename);
52 assert(cutoff_kind == cutoff_kinds::fixed);
61 return extension ==
".gz" || extension ==
".bgzf" || extension ==
".bz2";
65 enum class cutoff_kinds
71 cutoff_kinds cutoff_kind{cutoff_kinds::fixed};
73 uint8_t fixed_cutoff{};
88 bool const is_compressed = file_is_compressed(filename);
89 bool const is_fasta = check_for_fasta_format(filename);
97 for (
size_t i = 0; i < cutoff_bounds.
size(); ++i)
99 if (filesize <= cutoff_bounds[i])
117 size_t const suffix_length{suffix.size()};
118 size_t const str_length{str.
size()};
119 return suffix_length > str_length ? false
122 [](
char const chr1,
char const chr2)
124 return std::tolower(chr1) == std::tolower(chr2);
128 auto case_insensitive_ends_with = [&](
std::string const & ext)
130 return case_insensitive_string_ends_with(extension, ext);
133 return std::ranges::find_if(valid_extensions, case_insensitive_ends_with) != valid_extensions.end();
Definition: cutoff.hpp:23
Provides raptor::prepare_arguments.
Definition: prepare_arguments.hpp:28