|
| SeedAAHash (const char *seq, const std::vector< SpacedSeed > &seeds, unsigned hash_num_per_seed, unsigned k, size_t pos=0) |
|
| SeedAAHash (const std::string &seq, const std::vector< SpacedSeed > &seeds, unsigned hash_num_per_seed, unsigned k, size_t pos=0) |
|
| SeedAAHash (const char *seq, const std::vector< std::string > &seeds, unsigned hash_num_per_seed, unsigned k, size_t pos=0) |
|
| SeedAAHash (const std::string &seq, const std::vector< std::string > &seeds, unsigned hash_num_per_seed, unsigned k, size_t pos=0) |
|
| SeedAAHash (const SeedAAHash &seed_aahash) |
|
| SeedAAHash (SeedAAHash &&)=default |
|
bool | roll () |
|
const uint64_t * | hashes () const |
|
size_t | get_pos () const |
|
unsigned | get_hash_num () const |
|
unsigned | get_hash_num_per_seed () const |
|
unsigned | get_k () const |
|
btllib::SeedAAHash::SeedAAHash |
( |
const char * |
seq, |
|
|
const std::vector< SpacedSeed > & |
seeds, |
|
|
unsigned |
hash_num_per_seed, |
|
|
unsigned |
k, |
|
|
size_t |
pos = 0 |
|
) |
| |
|
inline |
Constructor.
- Parameters
-
seq | String of DNA sequence to be hashed. |
seeds | Multi-level seeds to use for hashing. The seed(s) must be of the same length as k and supplied to the constructor in either a vector of unsigned or string. Valid levels in the seed(s) are 0, 1, 2, or 3. |
hash_num_per_seed | Number of hashes to produce per seed. |
k | K-mer size. |
pos | Position in seq to start hashing from. |
bool btllib::SeedAAHash::roll |
( |
| ) |
|
Calculate the hash values of current k-mer based on the seed(s) and advance to the next. SeedAAHash advances one amino acid at a time until it finds a k-mer with valid characters and skips over those with invalid characters. This method must be called before hashes() is accessed, for the first and every subsequent hashed kmer. get_pos() may be called at any time to obtain the position of last hashed k-mer or the k-mer to be hashed if roll() has never been called on this AAHash object. It is important to note that the number of roll() calls is NOT necessarily equal to get_pos(), if there are N or invalid characters in the hashed sequence.
- Returns
- true on success and false otherwise.
The documentation for this class was generated from the following file: