vg
tools for working with variation graphs
Public Member Functions | Public Attributes | List of all members
vg::VGset Class Reference

#include <vg_set.hpp>

Public Member Functions

 VGset ()
 
 VGset (vector< string > &files)
 
void transform (std::function< void(MutableHandleGraph *)> lambda)
 
void for_each (std::function< void(HandleGraph *)> lambda)
 
id_t max_node_id (void)
 Stream through the files and determine the max node id. More...
 
int64_t merge_id_space (void)
 
void to_xg (xg::XG &index)
 Transforms to a succinct, queryable representation. More...
 
void to_xg (xg::XG &index, const function< bool(const string &)> &paths_to_take, map< string, Path > *removed_paths=nullptr)
 
void for_each_kmer_parallel (size_t kmer_size, const function< void(const kmer_t &)> &lambda)
 Iterate over all kmers in the graph. More...
 
void write_gcsa_kmers_ascii (ostream &out, int kmer_size, nid_t head_id=0, nid_t tail_id=0)
 
void write_gcsa_kmers_binary (ostream &out, int kmer_size, size_t &size_limit, nid_t head_id=0, nid_t tail_id=0)
 
vector< string > write_gcsa_kmers_binary (int kmer_size, size_t &size_limit, nid_t head_id=0, nid_t tail_id=0)
 

Public Attributes

vector< string > filenames
 
bool show_progress = false
 
bool progress_bars = true
 

Constructor & Destructor Documentation

◆ VGset() [1/2]

vg::VGset::VGset ( )
inline

◆ VGset() [2/2]

vg::VGset::VGset ( vector< string > &  files)
inline

Member Function Documentation

◆ for_each()

void vg::VGset::for_each ( std::function< void(HandleGraph *)>  lambda)

◆ for_each_kmer_parallel()

void vg::VGset::for_each_kmer_parallel ( size_t  kmer_size,
const function< void(const kmer_t &)> &  lambda 
)

Iterate over all kmers in the graph.

◆ max_node_id()

id_t vg::VGset::max_node_id ( void  )

Stream through the files and determine the max node id.

◆ merge_id_space()

int64_t vg::VGset::merge_id_space ( void  )

merges the id space of a set of graphs on-disk necessary when storing many graphs in the same index

◆ to_xg() [1/2]

void vg::VGset::to_xg ( xg::XG index)

Transforms to a succinct, queryable representation.

◆ to_xg() [2/2]

void vg::VGset::to_xg ( xg::XG index,
const function< bool(const string &)> &  paths_to_take,
map< string, Path > *  removed_paths = nullptr 
)

As above, except paths with names matching the given predicate are removed. They are returned separately by inserting them into the provided map if not null.

◆ transform()

void vg::VGset::transform ( std::function< void(MutableHandleGraph *)>  lambda)

◆ write_gcsa_kmers_ascii()

void vg::VGset::write_gcsa_kmers_ascii ( ostream &  out,
int  kmer_size,
nid_t  head_id = 0,
nid_t  tail_id = 0 
)

Write out kmer lines to GCSA2. size_limit is the maximum space usage for the kmer files in bytes. When the function returns, size_limit is the total size of the kmer files in bytes. If the size limit is exceeded, throws SizeLimitExceededException, and (if relevant) deletes temporary files

◆ write_gcsa_kmers_binary() [1/2]

vector< string > vg::VGset::write_gcsa_kmers_binary ( int  kmer_size,
size_t &  size_limit,
nid_t  head_id = 0,
nid_t  tail_id = 0 
)

◆ write_gcsa_kmers_binary() [2/2]

void vg::VGset::write_gcsa_kmers_binary ( ostream &  out,
int  kmer_size,
size_t &  size_limit,
nid_t  head_id = 0,
nid_t  tail_id = 0 
)

Member Data Documentation

◆ filenames

vector<string> vg::VGset::filenames

◆ progress_bars

bool vg::VGset::progress_bars = true

◆ show_progress

bool vg::VGset::show_progress = false

The documentation for this class was generated from the following files: