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

Public Member Functions

 BlindSeedNtHash (const char *seq, const std::vector< std::string > &seeds, typedefs::NUM_HASHES_TYPE num_hashes_per_seed, typedefs::K_TYPE k, ssize_t 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
 
ssize_t get_pos () const
 
unsigned get_hash_num () const
 
typedefs::NUM_HASHES_TYPE get_hash_num_per_seed () const
 
typedefs::K_TYPE get_k () const
 
uint64_t * get_forward_hash () const
 
uint64_t * get_reverse_hash () const
 

Constructor & Destructor Documentation

◆ BlindSeedNtHash()

nthash::BlindSeedNtHash::BlindSeedNtHash ( const char *  seq,
const std::vector< std::string > &  seeds,
typedefs::NUM_HASHES_TYPE  num_hashes_per_seed,
typedefs::K_TYPE  k,
ssize_t  pos = 0 
)

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 * nthash::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 nthash::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()

typedefs::NUM_HASHES_TYPE nthash::BlindSeedNtHash::get_hash_num_per_seed ( ) const
inline

Get the number of hashes generated per seed.

Returns
Number of hashes per seed

◆ get_k()

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

Get the length of the k-mers.

Returns
k

◆ get_pos()

ssize_t nthash::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 * nthash::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 * nthash::BlindSeedNtHash::hashes ( ) const
inline

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

Returns
Pointer to the hash array

◆ roll()

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

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 nthash::BlindSeedNtHash::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: