btllib
Loading...
Searching...
No Matches
btllib::BlindSeedNtHash Class Reference

#include <nthash_seed.hpp>

Public Member Functions

 BlindSeedNtHash (const char *seq, const std::vector< std::string > &seeds, hashing_internals::NUM_HASHES_TYPE num_hashes_per_seed, hashing_internals::K_TYPE k, long pos=0)
 
 BlindSeedNtHash (const BlindSeedNtHash &seed_nthash)
 
 BlindSeedNtHash (BlindSeedNtHash &&)=default
 
void roll (char char_in)
 
void roll_back (char char_in)
 
const uint64_t * hashes () const
 
long get_pos () const
 
unsigned get_hash_num () const
 
hashing_internals::NUM_HASHES_TYPE get_hash_num_per_seed () const
 
hashing_internals::K_TYPE get_k () const
 
uint64_t * get_forward_hash () const
 
uint64_t * get_reverse_hash () const
 

Detailed Description

Similar to the SeedNtHash class, but instead of rolling on a predefined sequence, BlindSeedNtHash needs to be fed the new character on each roll.

Constructor & Destructor Documentation

◆ BlindSeedNtHash()

btllib::BlindSeedNtHash::BlindSeedNtHash ( const char * seq,
const std::vector< std::string > & seeds,
hashing_internals::NUM_HASHES_TYPE num_hashes_per_seed,
hashing_internals::K_TYPE k,
long pos = 0 )
inline

Construct an ntHash object for hashing spaced seeds on-the-fly.

Parameters
seqC-string of the data. Only the first k characters will be used, starting from pos.
seedsVector of parsed spaced seed patterns (vectors of don't care positions)
num_hashes_per_seedNumber of hashes to generate per seed
kK-mer size
posPosition in seq to start hashing from

Member Function Documentation

◆ get_forward_hash()

uint64_t * btllib::BlindSeedNtHash::get_forward_hash ( ) const
inline

Get the hash values of the forward strand.

Returns
Array of forward hash value arrays for each seed

◆ get_hash_num()

unsigned btllib::BlindSeedNtHash::get_hash_num ( ) const
inline

Get the length of the hash array.

Returns
Number of seeds times get_hash_num_per_seed()

◆ get_hash_num_per_seed()

hashing_internals::NUM_HASHES_TYPE btllib::BlindSeedNtHash::get_hash_num_per_seed ( ) const
inline

Get the number of hashes generated per seed.

Returns
Number of hashes per seed

◆ get_k()

hashing_internals::K_TYPE btllib::BlindSeedNtHash::get_k ( ) const
inline

Get the length of the k-mers.

Returns
k

◆ get_pos()

long btllib::BlindSeedNtHash::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 * btllib::BlindSeedNtHash::get_reverse_hash ( ) const
inline

Get the hash values of the reverse strand.

Returns
Array of reverse-complement hash value arrays for each seed

◆ hashes()

const uint64_t * btllib::BlindSeedNtHash::hashes ( ) const
inline

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

Returns
Pointer to the hash array

◆ roll()

void btllib::BlindSeedNtHash::roll ( char char_in)
inline

Like the NtHash::roll() function, but instead of advancing in the sequence BlindSeedNtHash object was constructed on, the provided character char_in is used as the next base.

◆ roll_back()

void btllib::BlindSeedNtHash::roll_back ( char char_in)
inline

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


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