Model that handles "direct" kmers, ie sequences of nucleotides. The associated value of such a kmer is computed as a polynom P(X) with X=4 and where the coefficients are in [0..3]. By convention, we use A=0, C=1, T=2 and G=3.
More...
|
| ModelDirect (size_t kmerSize=span-1) |
|
template<class Convert > |
int | first (const char *buffer, Kmer &value, size_t startIndex) const |
|
template<class Convert > |
void | next (char c, Kmer &value, bool isValid) const |
|
| ModelAbstract (size_t sizeKmer=span-1) |
|
size_t | getSpan () const |
|
size_t | getMemorySize () const |
|
size_t | getKmerSize () const |
|
const Type & | getKmerMax () const |
|
std::string | toString (const Type &kmer) const |
|
Type | reverse (const Type &kmer) const |
|
Kmer | getKmer (const tools::misc::Data &data, size_t startIndex=0) const |
|
bool | iterate (tools::misc::Data &data, Callback callback) const |
|
Kmer | codeSeed (const char *seq, tools::misc::Data::Encoding_e encoding, size_t startIndex=0) const |
|
Kmer | codeSeedRight (const Kmer &kmer, char nucl, tools::misc::Data::Encoding_e encoding) const |
|
bool | build (tools::misc::Data &data, std::vector< Kmer > &kmersBuffer) const |
|
void | iterateNeighbors (const Type &source, const Functor &fct, const std::bitset< 8 > &mask=0xFF) const |
|
void | iterateOutgoingNeighbors (const Type &source, Functor &fct, const std::bitset< 4 > &mask=0x0F) const |
|
void | iterateIncomingNeighbors (const Type &source, Functor &fct, const std::bitset< 4 > &mask=0x0F) const |
|
void | use () |
|
void | forget () |
|
virtual | ~ISmartPointer () |
|
template<size_t span = KMER_DEFAULT_SPAN>
class gatb::core::kmer::impl::Kmer< span >::ModelDirect
Model that handles "direct" kmers, ie sequences of nucleotides. The associated value of such a kmer is computed as a polynom P(X) with X=4 and where the coefficients are in [0..3]. By convention, we use A=0, C=1, T=2 and G=3.
Example of use:
ModelDirect model (kmerSize);
std::cout << std::endl;
std::cout << "-------------------- DIRECT --------------------" << std::endl;
std::cout <<
"kmer value is: " << kmer.
value() << std::endl;
std::cout << "kmer string is: " << model.toString(kmer.value()) << std::endl;