BankKmers Class Reference

Bank whose sequences are all the possible kmers of a kmer model. More...

#include <BankKmers.hpp>

Inheritance diagram for BankKmers:
Inheritance graph

Public Member Functions

 BankKmers (size_t kmerSize)
std::string getId ()
int64_t getNbItems ()
void estimate (u_int64_t &number, u_int64_t &totalSize, u_int64_t &maxSize)
void insert (const bank::Sequence &item)
void flush ()
u_int64_t getSize ()
tools::dp::Iterator< bank::Sequence > * iterator ()
- Public Member Functions inherited from AbstractBank
 AbstractBank ()
std::string getIdNb (int i)
int64_t estimateNbItemsBanki (int i)
const std::vector< IBank * > getBanks () const
int64_t estimateNbItems ()
u_int64_t estimateSequencesSize ()
u_int64_t getEstimateThreshold ()
void setEstimateThreshold (u_int64_t nbSeq)
void remove ()
void finalize ()
size_t getCompositionNb ()
- Public Member Functions inherited from Iterable< Sequence >
void iterate (Functor f)
virtual Sequence * getItems (Sequence *&buffer)
virtual size_t getItems (Sequence *&buffer, size_t start, size_t nb)
- Public Member Functions inherited from ISmartPointer
virtual ~ISmartPointer ()
- Public Member Functions inherited from Bag< Sequence >
virtual void insert (const Sequence &item)=0
virtual void insert (const std::vector< Sequence > &items, size_t length=0)
virtual void insert (const Sequence *items, size_t length)
- Public Member Functions inherited from SmartPointer
void use ()
void forget ()

Additional Inherited Members

- Protected Member Functions inherited from SmartPointer
 SmartPointer ()
virtual ~SmartPointer ()

Detailed Description

Bank whose sequences are all the possible kmers of a kmer model.

For instance, for a kmer size of 3, the bank will iterate the 3^4 possible kmers.

Constructor & Destructor Documentation

BankKmers ( size_t  kmerSize)


[in]kmerSize: size of the kmers to be iterated.

Member Function Documentation

void estimate ( u_int64_t &  number,
u_int64_t &  totalSize,
u_int64_t &  maxSize 

Give an estimation of sequences information in the bank.

[out]number: sequences number
[out]totalSize: sequences size (in bytes)
[out]maxSize: max size size (in bytes)

Implements IBank.

void flush ( )

Flush the current content. May be useful for implementation that uses a cache.

Implements Bag< Sequence >.

std::string getId ( )

Get an unique identifier for the bank (could be the URI of a FASTA file for instance).

the identifier

Implements IBank.

int64_t getNbItems ( )

Return the number of items. If a specific implementation doesn't know the value, it should return -1 by convention.

the number of items if known, -1 otherwise.

Implements Iterable< Sequence >.

u_int64_t getSize ( )

Return the size of the bank (comments + data)

The returned value may be an approximation in some case. For instance, if we use a zipped bank, an implementation may be not able to give accurate answer to the size of the original file.

the bank size in bytes.

Implements IBank.

void insert ( const bank::Sequence item)

Insert an item into the bag.

[in]item: the item to be inserted.

Implements IBank.

tools::dp::Iterator<bank::Sequence>* iterator ( )

Create an iterator for the given Iterable instance.

the new iterator.

Implements IBank.

The documentation for this class was generated from the following file: