1 #ifndef BFG_DATAACCESSOR_HPP 2 #define BFG_DATAACCESSOR_HPP 20 template<
typename Unitig_data_t =
void>
23 typedef Unitig_data_t U;
135 inline uint8_t
get()
const {
return da_id; }
137 inline void set(
const uint8_t id) { da_id = id; }
string serialize(const const_UnitigColorMap< U > &um_src) const
Serialize the data to a GFA-formatted string.
void extract(const UnitigColorMap< U > &um_src, const bool last_extraction)
Extract data and colors corresponding to a sub-unitig of a unitig A.
Represent the k-mer color sets of a unitig.
Definition: ColorSet.hpp:21
void clear(const UnitigColorMap< U > &um)
Clear the colors and data associated with a colored unitig.
DataAccessor(const uint8_t id=0)
Constructor (set up an empty DataAccessor).
const UnitigColors * getUnitigColors(const const_UnitigColorMap< U > &um) const
Get the colors of the reference unitig.
Definition: ColorSet.hpp:16
Interface for UnitigColors, the unitig container of k-mer color sets used in ColoredCDBG.
Contain all the information for the mapping of a k-mer or a sequence to a unitig of a Compacted de Br...
Definition: NeighborIterator.hpp:12
If data are to be associated with the unitigs of the compacted de Bruijn graph, those data must be wr...
Definition: CompactedDBG.hpp:204
Interface to access the colors and the data associated with a unitig of a ColoredCDBG.
Definition: ColorSet.hpp:15
void concat(const UnitigColorMap< U > &um_dest, const UnitigColorMap< U > &um_src)
Join data and colors of two colored unitigs which are going to be concatenated.
void merge(const UnitigColorMap< U > &um_dest, const const_UnitigColorMap< U > &um_src)
Merge the data and colors of a sub-unitig B to the data and colors of a sub-unitig A...
Interface for the Compacted de Bruijn graph API.
UnitigColors getSubUnitigColors(const const_UnitigColorMap< U > &um) const
Create a new UnitigColors object for a unitig B corresponding to a unitig mapping to a reference unit...
vector< string > getSubUnitigColorNames(const const_UnitigColorMap< U > &um) const
Obtain the name of the colors present on AT LEAST one k-mer of a unitig mapping.
const U * getData(const const_UnitigColorMap< U > &um) const
Get the unitig data.