Go to the documentation of this file. 1 #ifndef BIFROST_DATA_ACCESSOR_HPP
2 #define BIFROST_DATA_ACCESSOR_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; }
const U * getData(const const_UnitigColorMap< U > &um) const
Get the unitig data.
const UnitigColors * getUnitigColors(const const_UnitigColorMap< U > &um) const
Get the colors of the reference unitig.
void extract(const UnitigColorMap< U > &um_src, const bool last_extraction)
Extract data and colors corresponding to a sub-unitig of a unitig A.
If data are to be associated with the unitigs of the compacted de Bruijn graph, those data must be wr...
Definition: CompactedDBG.hpp:220
Contain all the information for the mapping of a k-mer or a sequence to a unitig of a Compacted de Br...
Definition: UnitigMap.hpp:92
Interface for the Compacted de Bruijn graph API.
DataAccessor(const uint8_t id=0)
Constructor (set up an empty DataAccessor).
string serialize(const const_UnitigColorMap< U > &um_src) const
Serialize the data to a GFA-formatted string.
Represent the k-mer color sets of a unitig.
Definition: ColorSet.hpp:21
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.
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...
U * getData(const UnitigColorMap< U > &um) const
Get the unitig data.
Interface to access the colors and the data associated with a unitig of a ColoredCDBG.
Definition: DataAccessor.hpp:21
UnitigColors * getUnitigColors(const UnitigColorMap< U > &um) const
Get the colors of the reference unitig.
void clear(const UnitigColorMap< U > &um)
Clear the colors and data associated with a colored unitig.
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.
Definition: ColorSet.hpp:16
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.
Interface for UnitigColors, the unitig container of k-mer color sets used in ColoredCDBG.