Model that handles "canonical" kmers, ie the minimum value of the direct kmer and its reverse complement.
More...
|
| ModelCanonical (size_t kmerSize=span-1) |
|
template<class Convert > |
int | first (const char *seq, 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 >::ModelCanonical
Model that handles "canonical" kmers, ie the minimum value of the direct kmer and its reverse complement.
Example of use:
ModelCanonical model (kmerSize);
std::cout << std::endl;
std::cout << "-------------------- CANONICAL --------------------" << std::endl;
std::cout <<
"kmer value is: " << kmer.
value() << std::endl;
std::cout << "kmer string is: " << model.toString(kmer.value()) << std::endl;
std::cout << "forward value is: " << kmer.forward() << std::endl;
std::cout << "forward string is: " << model.toString(kmer.forward()) << std::endl;
std::cout << "revcomp value is: " << kmer.revcomp() << std::endl;
std::cout << "revcomp string is: " << model.toString(kmer.revcomp()) << std::endl;
std::cout <<
"used strand is : " <<
toString(kmer.strand()) << std::endl;