|
vg
tools for working with variation graphs
|
Classes | |
| struct | WalkEnds |
| The places in a snarl or chain where a walk can end. More... | |
Public Member Functions | |
| Surveyor (const SnarlManager &manager, const HandleGraph &graph, const NodeDirectory &directory, const TraversalSurvey &survey) | |
| TraversalSet | survey_snarl (const Snarl *snarl) const |
| TraversalSet | survey_chain (const Chain &chain) const |
Private Member Functions | |
| WalkEnds | walk_snarl (const Snarl *snarl, const std::vector< handle_t > &starts) const |
| WalkEnds | walk_chain (const Chain &chain, const std::vector< std::pair< size_t, bool >> &starts) const |
| bool | enter_child (const handle_t &entering, std::vector< handle_t > &exits) const |
Static Private Member Functions | |
| static void | add_walks_from_bounds (TraversalSet &traversals, const WalkEnds &from_start, const WalkEnds &from_end) |
Private Attributes | |
| const SnarlManager & | manager |
| The manager whose snarls and chains are surveyed. More... | |
| const HandleGraph & | graph |
| The graph the snarls were found in. More... | |
| const NodeDirectory & | directory |
| const TraversalSurvey & | survey |
A surveyor that finds the realizable traversals of one snarl or chain at a time, by walking the graph.
A walk crosses each child as the survey says the traversals of that child allow. So the surveyor must survey each child before its parent.
| vg::SnarlManagerDecomposition::TraversalSurvey::Surveyor::Surveyor | ( | const SnarlManager & | manager, |
| const HandleGraph & | graph, | ||
| const NodeDirectory & | directory, | ||
| const TraversalSurvey & | survey | ||
| ) |
Make a surveyor for one survey.
The surveyor keeps references to its arguments, which must outlive it.
|
staticprivate |
Add the traversals made by walks from the start and end bounds.
Also add each of those traversals taken backward that starts at a tip.
|
private |
Find where a walk that enters a child chain or free node can leave it.
Add each exit to exits. A walk leaves the child through the right side of an exit. The one exit of a free node is the entering handle.
| std::logic_error | If the handle enters a chain between its bounds. |
| SnarlManagerDecomposition::TraversalSet vg::SnarlManagerDecomposition::TraversalSurvey::Surveyor::survey_chain | ( | const Chain & | chain | ) | const |
Find the realizable traversals of a chain.
| SnarlManagerDecomposition::TraversalSet vg::SnarlManagerDecomposition::TraversalSurvey::Surveyor::survey_snarl | ( | const Snarl * | snarl | ) | const |
Find the realizable traversals of a snarl.
|
private |
Find where walks along a chain from some chain nodes can end.
Each start is the position of a chain node, and true to leave it going in reverse along the chain. Here the end bound has position chain.size() even in a looping chain. A walk that comes to a bound of a looping chain can leave there, and can also go on around the loop, since its boundary node is both bounds.
|
private |
Find where walks through a snarl from some handles can end.
A walk leaves each start through its right side. Each start is on a node in the snarl, or on a bound oriented into the snarl.
|
private |
Tells the surveyor which chain, if any, each node is a chain node of.
|
private |
The graph the snarls were found in.
|
private |
The manager whose snarls and chains are surveyed.
|
private |
Tells the surveyor the traversals of each child already surveyed.
1.9.1