gatb.core-API-0.0.0
|
Class performing the kmer counting (also known as 'DSK') More...
#include <SortingCountAlgorithm.hpp>
Static Public Member Functions | |
static tools::misc::IOptionsParser * | getOptionsParser (bool mandatory=true) |
static tools::misc::IProperties * | getDefaultProperties () |
static CountProcessor * | getDefaultProcessor (tools::misc::IProperties *params, tools::storage::impl::Storage *dskStorage, tools::storage::impl::Storage *otherStorage=0) |
static std::vector< ICountProcessor< span > * > | getDefaultProcessorVector (Configuration &config, tools::misc::IProperties *params, tools::storage::impl::Storage *dskStorage, tools::storage::impl::Storage *otherStorage=0) |
Static Public Member Functions inherited from Algorithm | |
template<template< size_t > class Functor> | |
static int | mainloop (tools::misc::IOptionsParser *parser, int argc, char *argv[]) |
Additional Inherited Members | |
Protected Member Functions inherited from Algorithm | |
std::string | getUriByKey (const std::string &key) |
std::string | getUri (const std::string &str) |
void | setInput (IProperties *input) |
Protected Member Functions inherited from SmartPointer | |
SmartPointer () | |
virtual | ~SmartPointer () |
Class performing the kmer counting (also known as 'DSK')
This class does the real job of counting the kmers from a reads database.
This is a template class whose template argument is the kind of integer used for kmers (integers on 64 bits, 128 bits, etc...)
We define some template instantiations of this SortingCountAlgorithm; such an instantiation does the real job of kmers counting. By defining several instantiations, we allow to choose dynamically the correct class according to the user choice for kmer size (remember that initial Minia version had to be re-compiled for different kmer size).
Actually, this class is mainly used in the debruijn::impl::Graph class as a first step for the de Bruijn graph creation.
SortingCountAlgorithm | ( | tools::misc::IProperties * | params = 0 | ) |
Constructor. Can be used as default constructor in no parameters are provided
[in] | params | : parameters to be used for configuring the algorithm |
SortingCountAlgorithm | ( | gatb::core::bank::IBank * | bank, |
tools::misc::IProperties * | params | ||
) |
Constructor.
[in] | bank | : input bank from which solid kmers are counted |
[in] | params | : parameters to be used for configuring the algorithm |
SortingCountAlgorithm | ( | gatb::core::bank::IBank * | bank, |
const Configuration & | config, | ||
Repartitor * | repartitor, | ||
std::vector< CountProcessor * > | processors, | ||
tools::misc::IProperties * | params | ||
) |
Constructor.
[in] | bank | : input bank from which solid kmers are counted |
[in] | config | : configuration information |
[in] | repartitor | : hash function for minimizers |
[in] | processor | : object that processes counts |
|
virtual |
Destructor
|
inline |
Setter for the CountProcessor to be used by the algorithm.
[in] | processor | : the count processor to be used. |
|
virtual |
Process the kmers counting. It is mainly composed of a loop over the passes, and for each pass : 1) we build the partition files then 2) we fill the solid kmers file from the partitions.
Implements Algorithm.
|
inline |
Get the configuration object for the algorithm.
|
static |
Creates a default CountProcessor instance (ie. the default one used by DSK)
[in] | params | : used for configuring the processor |
[in] | dskStorage | : storage for dumping [kmer,count] couples |
[in] | otherStorage | : used for histogram for instance |
|
static |
Creates a vector holding the default CountProcessor configuration
[in] | params | : used for configuring the processor |
[in] | dskStorage | : storage for dumping [kmer,count] couples |
[in] | otherStorage | : used for histogram for instance |
|
static |
Get the default values defined in the default option parser.
|
static |
Get an option parser for kmers counting parameters. Dynamic allocation, so must be released when no more used.
[in] | mandatory | : tells whether an argument has to be mandatory |
|
inline |
Getter for the CountProcessor to be used by the algorithm.
[in] | idx | : index of the processor to be retrieved |
|
inline |
Get the number of count processors associated to the object.
|
inline |
Get the repartitor instance, ie. the hash function built on minimizer information.
Partition< typename SortingCountAlgorithm< span >::Count > * getSolidCounts | ( | ) |
Get the iterable over the computed solid kmers.
Iterable< typename SortingCountAlgorithm< span >::Type > * getSolidKmers | ( | ) |
Get the iterable over the computed solid kmers.
SortingCountAlgorithm< span > & operator= | ( | const SortingCountAlgorithm< span > & | s | ) |
operator=
[in] | s | : object to be copied. |