template<typename Value_t = tools::math::Integer>
struct gatb::core::debruijn::impl::Node_t< Value_t >
Node structure representing a node in the De Bruijn graph.
The Node structure needs at least two attributes for uniquely defining a node in the DBG:
- a kmer value (representing a node and its reverse complement)
- a strand value (telling on which strand the kmer has to be interpreted)
A specific Node::Value type is defined for the kmer type. It may be used sometimes when one wants to perform some action on a node without the need to know the strand.
Although it is possible to instantiate "from scratch" a Node object, it is likely that Node objects are retrieved through the Graph class. Indeed, a Node object is likely to be useful if it belongs to a graph, so it makes sense that the Graph class is the main actor for providing Node objects.
The Node structure may be inherited by other structure, mainly for refining some characteristics for some kinds of nodes. For instance, a BranchingNode structure may be defined for nodes that have more than one incoming and/or outcoming neighbors. Such inherited structures could be understood as regular Node instance with a specific invariant. They can also be the material for specialization of some template methods of the Graph class (see for instance Graph::iterator template specialization for the BranchingNode structure).
The Node structure has also a 'abundance' attribute; it gives the occurrences number of the kmer in the initial set of reads. Note that this attribute has a correct value only when nodes are iterated (from the solid kmers on disk). When Node objects are created via the Graph API (e.g. using as a result of buildNode, successors(), predecessors(), etc..), developers should not assume that the 'abundance' attribute is correctly set. Use the queryAbundance() function instead to get the abundance of a node.