10#include <seqan3/search/views/minimiser_hash.hpp>
20template <
bool compressed>
34 template <
typename view_t =
int>
35 [[nodiscard]]
auto operator()(view_t && hash_filter_view = 0)
const
37 auto tmp = construct(std::move(hash_filter_view));
39 if constexpr (!compressed)
48 template <
typename view_t>
49 auto construct(view_t && hash_filter_view)
const
51 using sequence_file_t = seqan3::sequence_file_input<dna4_traits, seqan3::fields<seqan3::field::seq>>;
53 assert(arguments !=
nullptr);
55 raptor_index<> index{*arguments};
57 auto hash_view = [&]()
59 if constexpr (std::same_as<view_t, int>)
61 return seqan3::views::minimiser_hash(arguments->
shape,
62 seqan3::window_size{arguments->window_size},
63 seqan3::seed{adjust_seed(arguments->shape.count())});
67 return seqan3::views::minimiser_hash(arguments->
shape,
68 seqan3::window_size{arguments->window_size},
69 seqan3::seed{adjust_seed(arguments->shape.count())})
74 auto worker = [&](
auto && zipped_view,
auto &&)
76 auto &
ibf = index.ibf();
78 for (
auto && [file_names, bin_number] : zipped_view)
79 for (
auto && file_name : file_names)
80 for (
auto && [seq] : sequence_file_t{file_name})
81 for (
auto && value : seq | hash_view())
82 ibf.emplace(value, seqan3::bin_index{bin_number});
Definition: index_factory.hpp:22
index_factory(index_factory const &)=default
index_factory(build_arguments const &args)
Definition: index_factory.hpp:31
index_factory & operator=(index_factory &&)=default
index_factory & operator=(index_factory const &)=default
index_factory(index_factory &&)=default
auto operator()(view_t &&hash_filter_view=0) const
Definition: index_factory.hpp:35
seqan3::interleaved_bloom_filter< seqan3::data_layout::uncompressed > ibf
Definition: index.hpp:22
Definition: adjust_seed.hpp:13
void call_parallel_on_bins(algorithm_t &&worker, build_arguments const &arguments)
Definition: call_parallel_on_bins.hpp:20
Definition: build_arguments.hpp:21
seqan3::shape shape
Definition: build_arguments.hpp:27