vg
tools for working with variation graphs
|
#include <nested_traversal_finder.hpp>
Public Member Functions | |
NestedTraversalFinder (SupportAugmentedGraph &augmented, SnarlManager &snarl_manager) | |
virtual | ~NestedTraversalFinder ()=default |
virtual vector< SnarlTraversal > | find_traversals (const Snarl &site) |
Public Member Functions inherited from vg::TraversalFinder | |
virtual | ~TraversalFinder ()=default |
virtual vector< Traversal > | find_traversals (const handle_t &snarl_start, const handle_t &snarl_end) |
Public Attributes | |
bool | verbose = false |
Should we emit verbose debugging info? More... | |
Protected Member Functions | |
pair< Support, vector< Visit > > | find_bubble (Node *node, Edge *edge, const Snarl *child, const Snarl &site) |
Support | min_support_in_path (const vector< Visit > &path) |
set< pair< size_t, list< Visit > > > | search_left (const Visit &root, const Snarl &site) |
set< pair< size_t, list< Visit > > > | search_right (const Visit &root, const Snarl &site) |
size_t | bp_length (const list< Visit > &path) |
Protected Attributes | |
SupportAugmentedGraph & | augmented |
The annotated, augmented graph we're finding traversals in. More... | |
SnarlManager & | snarl_manager |
The SnarlManager managiung the snarls we use. More... | |
This TraversalFinder emits at least one traversal representing every node, edge, or child Snarl. Only works on ultrabubbles, and so does not handle cycles.
vg::NestedTraversalFinder::NestedTraversalFinder | ( | SupportAugmentedGraph & | augmented, |
SnarlManager & | snarl_manager | ||
) |
|
virtualdefault |
|
protected |
Get the length of a path through nodes and child sites, in base pairs. Ignores any bases inside child sites.
|
protected |
Given an edge or node or child snarl in the augmented graph, look out from the edge or node or child in both directions to find a shortest bubble connecting the start and end of the given site.
Exactly one of edge and node and child must be non-null.
Return the found traversal as a vector of Visits, including anchoring Visits to the site's start and end nodes. Also return the minimum support found on any edge or node in the bubble that is not contained within a child.
If there is no path with any support, returns a zero Support and a possibly empty Path.
|
virtual |
Find traversals to cover the nodes, edges, and children of the snarl. Always emits the primary path traversal first, if applicable.
Implements vg::TraversalFinder.
Get the minimum support of all nodes and edges used in the given path that are not inside child snarls.
|
protected |
Do a breadth-first search left from the given node traversal, and return lengths (in visits) and paths starting at the given node and ending on the given indexed path. Refuses to visit nodes with no support.
Lengths are included so that shorter paths sort first.
|
protected |
Do a breadth-first search right from the given node traversal, and return lengths (in visits) and paths starting at the given node and ending on the given indexed path.
Lengths are included so that shorter paths sort first.
|
protected |
The annotated, augmented graph we're finding traversals in.
|
protected |
The SnarlManager managiung the snarls we use.
bool vg::NestedTraversalFinder::verbose = false |
Should we emit verbose debugging info?