template<std::integral value_t>
class seqan3::counting_vector< value_t >
A data structure that behaves like a std::vector and can be used to consolidate the results of multiple calls to seqan3::interleaved_bloom_filter::membership_agent_type::bulk_contains.
- Template Parameters
-
value_t | The type of the count. Must model std::integral. |
When using the seqan3::interleaved_bloom_filter::membership_agent_type::bulk_contains operation, a common use case is to add up, for example, the results for all k-mers in a query. This yields, for each bin, the number of k-mers of a query that are in the respective bin. Such information can be used to apply further filtering or abundance estimation based on the k-mer counts.
The seqan3::counting_vector offers an easy way to add up the individual seqan3::interleaved_bloom_filter::membership_agent_type::binning_bitvector by offering an +=
operator.
The value_t
template parameter should be chosen in a way that no overflow occurs if all calls to bulk_contains
return a hit for a specific bin. For example, uint8_t
will suffice when processing short Illumina reads, whereas long reads will require at least uint32_t
.
Example
int main()
{
auto agent = ibf.membership_agent();
counts += agent.bulk_contains(712);
counts += agent.bulk_contains(237);
counts += agent.bulk_contains(126);
counts += counts;
}
A "pretty printer" for most SeqAn data structures and related types.
Definition debug_stream_type.hpp:79
The IBF binning directory. A data structure that efficiently answers set-membership queries for multi...
Definition interleaved_bloom_filter.hpp:131
Provides seqan3::debug_stream and related types.
debug_stream_type debug_stream
A global instance of seqan3::debug_stream_type.
Definition debug_stream.hpp:37
Provides seqan3::interleaved_bloom_filter.
A strong type that represents the number of bins for the seqan3::interleaved_bloom_filter.
Definition interleaved_bloom_filter.hpp:33
A strong type that represents the bin index for the seqan3::interleaved_bloom_filter.
Definition interleaved_bloom_filter.hpp:54
A strong type that represents the number of bits for each bin in the seqan3::interleaved_bloom_filter...
Definition interleaved_bloom_filter.hpp:40