btllib
|
#include <nthash_kmer.hpp>
Public Member Functions | |
BlindNtHash (const std::string &seq, hashing_internals::NUM_HASHES_TYPE num_hashes, hashing_internals::K_TYPE k, long pos=0) | |
BlindNtHash (const BlindNtHash &obj) | |
BlindNtHash (BlindNtHash &&)=default | |
void | roll (char char_in) |
void | roll_back (char char_in) |
void | peek (char char_in) |
void | peek_back (char char_in) |
const uint64_t * | hashes () const |
long | get_pos () const |
hashing_internals::NUM_HASHES_TYPE | get_hash_num () const |
hashing_internals::K_TYPE | get_k () const |
uint64_t | get_forward_hash () const |
uint64_t | get_reverse_hash () const |
Similar to the NtHash class, but instead of rolling on a predefined sequence, BlindNtHash needs to be fed the new character on each roll. This is useful when traversing an implicit de Bruijn Graph, as we need to query all bases to know the possible extensions.
|
inline |
Construct an ntHash object for hashing k-mers on-the-fly.
seq | Sequence data. Only the first k characters will be used, starting from pos . |
hash_num | Number of hashes to generate per k-mer |
k | K-mer size |
pos | Position in sequence to start hashing from |
|
inline |
Get the hash value of the forward strand.
|
inline |
Get the number of hashes generated per k-mer.
|
inline |
Get the length of the k-mers.
k
|
inline |
|
inline |
Get the hash value of the reverse strand.
|
inline |
Get the array of current hash values (length = get_hash_num()
)
|
inline |
Like NtHash::peek(), but as if roll(char char_in) was called.
|
inline |
Like peek(char char_in), but as if roll_back(char char_in) was called.
|
inline |
Like the NtHash::roll() function, but instead of advancing in the sequence BlindNtHash object was constructed on, the provided character char_in
is used as the next base. Useful if you want to query for possible paths in an implicit de Bruijn graph graph.
|
inline |
Like the roll(char char_in) function, but advance backwards.