btllib
 All Classes Namespaces Functions Variables
Public Member Functions | List of all members
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

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

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
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()
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
hashing_internals::K_TYPE btllib::BlindSeedNtHash::get_k ( ) const
inline

Get the length of the k-mers.

Returns
k
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
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
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
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.

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: