Module gfatk::gfa::graph

source · []
Expand description

A module where a GFA is coerced into a petgraph Graph structure, with associated methods.

Structs

A wrapper of petgraph’s directed Graph struct, applied to a GFA. The edge weights included are the Orientation’s of the adjacent segments, and the coverage of this edge.

A wrapper of petgraph’s undirected Graph struct, applied to a GFA. No weights.

Constants

A recursion depth limit, so we don’t hit a stack overflow and instead, abort and call another function.

Functions

A function generic over certain types of Directed petgraph Graphs.

Function called by all_paths where a HashMap is supplied instead of a HashSet in order to keep track of how many times a segment/node has been passed in a path.

A safer and more reliable alternative to recursive_path_finder_incl_coverage where a HashSet determines whether a segment/node has already been seen or not.

Returns a subgraph GFA that only contains elements with the provided segment names.