vg
tools for working with variation graphs
Classes | Functions
handlegraph::algorithms Namespace Reference

Classes

class  SubHandleGraph
 

Functions

void append_handle_graph (const HandleGraph *from, MutableHandleGraph *into)
 
void append_path_handle_graph (const PathHandleGraph *from, MutablePathMutableHandleGraph *into, bool only_connect_path_tips)
 
unordered_set< nid_tapply_orientations (MutableHandleGraph *graph, const vector< handle_t > &orientations)
 
bool are_equivalent (const HandleGraph *graph_1, const HandleGraph *graph_2, bool verbose)
 
bool are_equivalent_with_paths (const PathHandleGraph *graph_1, const PathHandleGraph *graph_2, bool verbose)
 
void copy_handle_graph (const HandleGraph *from, MutableHandleGraph *into)
 
void copy_path_handle_graph (const PathHandleGraph *from, MutablePathMutableHandleGraph *into)
 
void copy_path (const PathHandleGraph *from, const path_handle_t &path, MutablePathHandleGraph *into)
 
tuple< vector< handle_t >, unordered_map< handle_t, size_t >, bool > count_walks_through_nodes (const HandleGraph *graph)
 
size_t count_walks (const HandleGraph *graph)
 
unordered_map< nid_t, nid_tdagify (const HandleGraph *graph, MutableHandleGraph *into, size_t min_preserved_path_length)
 
bool dijkstra (const HandleGraph *g, handle_t start, function< bool(const handle_t &, size_t)> reached_callback, bool traverse_leftward)
 
bool dijkstra (const HandleGraph *g, const unordered_set< handle_t > &starts, function< bool(const handle_t &, size_t)> reached_callback, bool traverse_leftward)
 
vector< handle_teades_algorithm (const HandleGraph *graph)
 
void extend (const HandleGraph *source, MutableHandleGraph *into)
 
unordered_map< handle_t, size_t > find_shortest_paths (const HandleGraph *g, handle_t start, bool traverse_leftward)
 
vector< handle_thead_nodes (const HandleGraph *g)
 
vector< handle_ttail_nodes (const HandleGraph *g)
 
vector< handle_tfind_tips (const HandleGraph *g)
 
bool is_acyclic (const HandleGraph *graph)
 
bool is_directed_acyclic (const HandleGraph *graph)
 
bool is_single_stranded (const HandleGraph *graph)
 
vector< handle_tsingle_stranded_orientation (const HandleGraph *graph)
 
unordered_set< nid_tmake_single_stranded (MutableHandleGraph *graph)
 
void reverse_complement_graph (const HandleGraph *source, MutableHandleGraph *into)
 
unordered_map< handle_t, handle_tsplit_strands (const HandleGraph *source, MutableHandleGraph *into)
 
void dfs (const HandleGraph &graph, const function< void(const handle_t &)> &handle_begin_fn, const function< void(const handle_t &)> &handle_end_fn, const function< bool(void)> &break_fn, const function< void(const edge_t &)> &edge_fn, const function< void(const edge_t &)> &tree_fn, const function< void(const edge_t &)> &edge_curr_fn, const function< void(const edge_t &)> &edge_cross_fn, const vector< handle_t > &sources, const unordered_set< handle_t > &sinks)
 
void dfs (const HandleGraph &graph, const function< void(const handle_t &)> &handle_begin_fn, const function< void(const handle_t &)> &handle_end_fn, const vector< handle_t > &sources, const unordered_set< handle_t > &sinks)
 
void dfs (const HandleGraph &graph, const function< void(const handle_t &)> &handle_begin_fn, const function< void(const handle_t &)> &handle_end_fn, const function< bool(void)> &break_fn)
 
vector< unordered_set< nid_t > > strongly_connected_components (const HandleGraph *handle_graph)
 
vector< handle_ttopological_order (const HandleGraph *g)
 
vector< handle_tlazy_topological_order_internal (const HandleGraph *g, bool lazier)
 
vector< handle_tlazy_topological_order (const HandleGraph *g)
 
vector< handle_tlazier_topological_order (const HandleGraph *g)
 
void unchop (handlegraph::MutablePathDeletableHandleGraph *graph)
 
void chop (handlegraph::MutableHandleGraph *graph, size_t max_node_length)
 
vector< unordered_set< nid_t > > weakly_connected_components (const HandleGraph *graph)
 
vector< pair< unordered_set< nid_t >, vector< handle_t > > > weakly_connected_components_with_tips (const HandleGraph *graph)
 
bool is_weakly_connected (const HandleGraph *graph)
 

Function Documentation

◆ append_handle_graph()

void handlegraph::algorithms::append_handle_graph ( const HandleGraph from,
MutableHandleGraph into 
)

◆ append_path_handle_graph()

void handlegraph::algorithms::append_path_handle_graph ( const PathHandleGraph from,
MutablePathMutableHandleGraph into,
bool  only_connect_path_tips 
)

◆ apply_orientations()

unordered_set<nid_t> handlegraph::algorithms::apply_orientations ( MutableHandleGraph graph,
const vector< handle_t > &  orientations 
)

◆ are_equivalent()

bool handlegraph::algorithms::are_equivalent ( const HandleGraph graph_1,
const HandleGraph graph_2,
bool  verbose 
)

◆ are_equivalent_with_paths()

bool handlegraph::algorithms::are_equivalent_with_paths ( const PathHandleGraph graph_1,
const PathHandleGraph graph_2,
bool  verbose 
)

◆ chop()

void handlegraph::algorithms::chop ( handlegraph::MutableHandleGraph graph,
size_t  max_node_length 
)

◆ copy_handle_graph()

void handlegraph::algorithms::copy_handle_graph ( const HandleGraph from,
MutableHandleGraph into 
)

◆ copy_path()

void handlegraph::algorithms::copy_path ( const PathHandleGraph from,
const path_handle_t path,
MutablePathHandleGraph into 
)

◆ copy_path_handle_graph()

void handlegraph::algorithms::copy_path_handle_graph ( const PathHandleGraph from,
MutablePathMutableHandleGraph into 
)

◆ count_walks()

size_t handlegraph::algorithms::count_walks ( const HandleGraph graph)

◆ count_walks_through_nodes()

tuple<vector<handle_t>, unordered_map<handle_t, size_t>, bool> handlegraph::algorithms::count_walks_through_nodes ( const HandleGraph graph)

◆ dagify()

unordered_map<nid_t, nid_t> handlegraph::algorithms::dagify ( const HandleGraph graph,
MutableHandleGraph into,
size_t  min_preserved_path_length 
)

◆ dfs() [1/3]

void handlegraph::algorithms::dfs ( const HandleGraph graph,
const function< void(const handle_t &)> &  handle_begin_fn,
const function< void(const handle_t &)> &  handle_end_fn,
const function< bool(void)> &  break_fn 
)

◆ dfs() [2/3]

void handlegraph::algorithms::dfs ( const HandleGraph graph,
const function< void(const handle_t &)> &  handle_begin_fn,
const function< void(const handle_t &)> &  handle_end_fn,
const function< bool(void)> &  break_fn,
const function< void(const edge_t &)> &  edge_fn,
const function< void(const edge_t &)> &  tree_fn,
const function< void(const edge_t &)> &  edge_curr_fn,
const function< void(const edge_t &)> &  edge_cross_fn,
const vector< handle_t > &  sources,
const unordered_set< handle_t > &  sinks 
)

◆ dfs() [3/3]

void handlegraph::algorithms::dfs ( const HandleGraph graph,
const function< void(const handle_t &)> &  handle_begin_fn,
const function< void(const handle_t &)> &  handle_end_fn,
const vector< handle_t > &  sources,
const unordered_set< handle_t > &  sinks 
)

◆ dijkstra() [1/2]

bool handlegraph::algorithms::dijkstra ( const HandleGraph g,
const unordered_set< handle_t > &  starts,
function< bool(const handle_t &, size_t)>  reached_callback,
bool  traverse_leftward 
)

◆ dijkstra() [2/2]

bool handlegraph::algorithms::dijkstra ( const HandleGraph g,
handle_t  start,
function< bool(const handle_t &, size_t)>  reached_callback,
bool  traverse_leftward 
)

◆ eades_algorithm()

vector<handle_t> handlegraph::algorithms::eades_algorithm ( const HandleGraph graph)

◆ extend()

void handlegraph::algorithms::extend ( const HandleGraph source,
MutableHandleGraph into 
)

◆ find_shortest_paths()

unordered_map<handle_t, size_t> handlegraph::algorithms::find_shortest_paths ( const HandleGraph g,
handle_t  start,
bool  traverse_leftward 
)

◆ find_tips()

vector<handle_t> handlegraph::algorithms::find_tips ( const HandleGraph g)

◆ head_nodes()

vector<handle_t> handlegraph::algorithms::head_nodes ( const HandleGraph g)

◆ is_acyclic()

bool handlegraph::algorithms::is_acyclic ( const HandleGraph graph)

◆ is_directed_acyclic()

bool handlegraph::algorithms::is_directed_acyclic ( const HandleGraph graph)

◆ is_single_stranded()

bool handlegraph::algorithms::is_single_stranded ( const HandleGraph graph)

◆ is_weakly_connected()

bool handlegraph::algorithms::is_weakly_connected ( const HandleGraph graph)

◆ lazier_topological_order()

vector<handle_t> handlegraph::algorithms::lazier_topological_order ( const HandleGraph g)

◆ lazy_topological_order()

vector<handle_t> handlegraph::algorithms::lazy_topological_order ( const HandleGraph g)

◆ lazy_topological_order_internal()

vector<handle_t> handlegraph::algorithms::lazy_topological_order_internal ( const HandleGraph g,
bool  lazier 
)

◆ make_single_stranded()

unordered_set<nid_t> handlegraph::algorithms::make_single_stranded ( MutableHandleGraph graph)

◆ reverse_complement_graph()

void handlegraph::algorithms::reverse_complement_graph ( const HandleGraph source,
MutableHandleGraph into 
)

◆ single_stranded_orientation()

vector<handle_t> handlegraph::algorithms::single_stranded_orientation ( const HandleGraph graph)

◆ split_strands()

unordered_map<handle_t, handle_t> handlegraph::algorithms::split_strands ( const HandleGraph source,
MutableHandleGraph into 
)

◆ strongly_connected_components()

vector<unordered_set<nid_t> > handlegraph::algorithms::strongly_connected_components ( const HandleGraph handle_graph)

◆ tail_nodes()

vector<handle_t> handlegraph::algorithms::tail_nodes ( const HandleGraph g)

◆ topological_order()

vector<handle_t> handlegraph::algorithms::topological_order ( const HandleGraph g)

◆ unchop()

void handlegraph::algorithms::unchop ( handlegraph::MutablePathDeletableHandleGraph graph)

◆ weakly_connected_components()

vector<unordered_set<nid_t> > handlegraph::algorithms::weakly_connected_components ( const HandleGraph graph)

◆ weakly_connected_components_with_tips()

vector<pair<unordered_set<nid_t>, vector<handle_t> > > handlegraph::algorithms::weakly_connected_components_with_tips ( const HandleGraph graph)