1 #ifndef BFG_COLOREDCDBG_HPP 2 #define BFG_COLOREDCDBG_HPP 6 #include <unordered_map> 7 #include <unordered_set> 10 #include "DataManager.hpp" 59 template<
typename Unitig_data_t>
62 typedef Unitig_data_t U;
150 template<
typename Unitig_data_t =
void>
154 "Type Unitig_data_t of data associated with vertices of class ColoredCDBG<Unitig_data_t> must " 155 " be void (no data) or a class extending class CCDBG_Data_t");
157 typedef Unitig_data_t U;
167 ColoredCDBG(
int kmer_length = DEFAULT_K,
int minimizer_length = DEFAULT_G);
209 inline bool operator!=(
const ColoredCDBG& o)
const;
251 bool write(
const string& prefix_output_filename,
const size_t nb_threads = 1,
const bool verbose =
false)
const;
262 bool read(
const string& input_graph_filename,
const string& input_colors_filename,
const size_t nb_threads = 1,
const bool verbose =
false);
324 string getColorName (
const size_t color_id)
const;
330 vector<string> getColorNames()
const;
341 void initUnitigColors(
const CCDBG_Build_opt& opt,
const size_t max_nb_hash = 31);
342 void buildUnitigColors(
const size_t nb_threads);
345 void resizeDataUC(
const size_t sz,
const size_t nb_threads = 1,
const size_t max_nb_hash = 31);
350 #include "ColoredCDBG.tcc" This structure inherits from CDBG_Build_opt and introduces only a few new members which are color-rel...
Definition: ColoredCDBG.hpp:30
Represent the k-mer color sets of a unitig.
Definition: ColorSet.hpp:21
vector< string > filename_seq_in
Vector of strings, each string is the name of a FASTA/FASTQ/GFA file to use for the graph constructio...
Definition: CompactedDBG.hpp:138
void clear(const UnitigColorMap< U > &um)
Clear the colors and data associated with a colored unitig.
Most members of this structure are parameters for CompactedDBG<U, G>::build(), except for: ...
Definition: CompactedDBG.hpp:124
Represent a Compacted de Bruijn graph.
Definition: CompactedDBG.hpp:297
Represent a Colored and Compacted de Bruijn graph.
Definition: ColoredCDBG.hpp:151
void extract(const UnitigColors *uc_dest, const UnitigColorMap< U > &um_src, const bool last_extraction)
Extract data corresponding to a sub-unitig of a unitig A.
Definition: ColoredCDBG.hpp:117
bool verbose
Print information messages during execution if true.
Definition: CompactedDBG.hpp:126
void concat(const UnitigColorMap< U > &um_dest, const UnitigColorMap< U > &um_src)
Join data of two unitigs which are going to be concatenated.
Definition: ColoredCDBG.hpp:88
Definition: ColorSet.hpp:16
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
string filename_colors_in
String containing the name of a Bifrost color file to read in ColoredCDBG<U>::read().
Definition: ColoredCDBG.hpp:32
Interface to access the colors and the data associated with a unitig of a ColoredCDBG.
Definition: ColorSet.hpp:15
string serialize(const const_UnitigColorMap< U > &um_src) const
Serialize the data to a GFA-formatted string.
Definition: ColoredCDBG.hpp:126
If data are to be associated with the unitigs of the colored and compacted de Bruijn graph...
Definition: ColoredCDBG.hpp:60
bool outputColors
Boolean indicating if the graph should be colored or not.
Definition: ColoredCDBG.hpp:34
void merge(const UnitigColorMap< U > &um_dest, const const_UnitigColorMap< U > &um_src)
Merge the data of a sub-unitig B to the data of a sub-unitig A.
Definition: ColoredCDBG.hpp:100
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.
const U * getData(const const_UnitigColorMap< U > &um) const
Get the unitig data.
void clear(const UnitigColorMap< U > &um_dest)
Clear the data associated with a unitig.
Definition: ColoredCDBG.hpp:72
size_t nb_threads
Number of threads to use for building the graph.
Definition: CompactedDBG.hpp:127
size_t getNbColors() const
Get the number of colors in the graph.
Definition: ColoredCDBG.hpp:335