btllib
Public Member Functions | List of all members
btllib::KmerBloomFilter Class Reference

#include <bloom_filter.hpp>

Public Member Functions

 KmerBloomFilter (unsigned k, size_t bytes, unsigned hash_num=4)
 
void insert (const std::string &seq)
 
void insert (const char *seq, size_t seq_len)
 
unsigned contains (const std::string &seq)
 
unsigned contains (const char *seq, size_t seq_len)
 

Detailed Description

Bloom filter data structure that kmerizes and hashes given sequences, storing the results.

Constructor & Destructor Documentation

◆ KmerBloomFilter()

btllib::KmerBloomFilter::KmerBloomFilter ( unsigned  k,
size_t  bytes,
unsigned  hash_num = 4 
)
inline

Constructor.

Parameters
kkmer size
bytesbytes to allocate for the filter
hash_numnumber of hashes

Member Function Documentation

◆ contains() [1/2]

unsigned btllib::KmerBloomFilter::contains ( const char *  seq,
size_t  seq_len 
)
inline

Query the kmers of a sequence.

Parameters
seqsequence to kmerize
seq_lenlength of seq
Returns
number of kmers found in seq

◆ contains() [2/2]

unsigned btllib::KmerBloomFilter::contains ( const std::string &  seq)
inline

Query the kmers of a sequence.

Parameters
seqsequence to kmerize
Returns
number of kmers found in seq

◆ insert() [1/2]

void btllib::KmerBloomFilter::insert ( const char *  seq,
size_t  seq_len 
)
inline

Store the kmers of a sequence.

Parameters
seqsequence to kmerize
seq_lenlength of seq

◆ insert() [2/2]

void btllib::KmerBloomFilter::insert ( const std::string &  seq)
inline

Store the kmers of a sequence.

Parameters
seqsequence to kmerize

The documentation for this class was generated from the following file: