ntHash
Loading...
Searching...
No Matches
nthash::BlindNtHash Class Reference

Public Member Functions

 BlindNtHash (const char *seq, typedefs::NUM_HASHES_TYPE num_hashes, typedefs::K_TYPE k, ssize_t 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
 
ssize_t get_pos () const
 
typedefs::NUM_HASHES_TYPE get_hash_num () const
 
typedefs::K_TYPE get_k () const
 
uint64_t get_forward_hash () const
 
uint64_t get_reverse_hash () const
 

Constructor & Destructor Documentation

◆ BlindNtHash()

nthash::BlindNtHash::BlindNtHash ( const char *  seq,
typedefs::NUM_HASHES_TYPE  num_hashes,
typedefs::K_TYPE  k,
ssize_t  pos = 0 
)

Construct an ntHash object for hashing k-mers on-the-fly.

Parameters
seqC-string of the data. Only the first k characters will be used, starting from pos.
hash_numNumber of hashes to generate per k-mer
kK-mer size
posPosition in sequence to start hashing from

Member Function Documentation

◆ get_forward_hash()

uint64_t nthash::BlindNtHash::get_forward_hash ( ) const
inline

Get the hash value of the forward strand.

Returns
Forward hash value

◆ get_hash_num()

typedefs::NUM_HASHES_TYPE nthash::BlindNtHash::get_hash_num ( ) const
inline

Get the number of hashes generated per k-mer.

Returns
Number of hashes per k-mer

◆ get_k()

typedefs::K_TYPE nthash::BlindNtHash::get_k ( ) const
inline

Get the length of the k-mers.

Returns
k

◆ get_pos()

ssize_t nthash::BlindNtHash::get_pos ( ) const
inline

Get the position of last hashed k-mer or the k-mer to be hashed if roll() has never been called on this NtHash object.

Returns
Position of the most recently hashed k-mer's first base-pair

◆ get_reverse_hash()

uint64_t nthash::BlindNtHash::get_reverse_hash ( ) const
inline

Get the hash value of the reverse strand.

Returns
Reverse-complement hash value

◆ hashes()

const uint64_t * nthash::BlindNtHash::hashes ( ) const
inline

Get the array of current hash values (length = get_hash_num())

Returns
Pointer to the hash array

◆ peek()

void nthash::BlindNtHash::peek ( char  char_in)

Like NtHash::peek(), but as if roll(char char_in) was called.

◆ peek_back()

void nthash::BlindNtHash::peek_back ( char  char_in)

Like peek(char char_in), but as if roll_back(char char_in) was called.

◆ roll()

void nthash::BlindNtHash::roll ( char  char_in)

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.

◆ roll_back()

void nthash::BlindNtHash::roll_back ( char  char_in)

Like the roll(char char_in) function, but advance backwards.


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