|
vg
tools for working with variation graphs
|
#include <small_snarl_simplifier.hpp>
Public Member Functions | |
| SmallSnarlSimplifier (VG &graph) | |
| Make a simplifier that simplifies the given graph in place. More... | |
| pair< size_t, size_t > | simplify_once (size_t iteration=0) |
| void | simplify () |
Public Member Functions inherited from vg::Progressive | |
| void | preload_progress (const string &message) |
| void | create_progress (const string &message, long count) |
| void | create_progress (long count) |
| void | ensure_progress (long count) |
| void | update_progress (long i) |
| void | increment_progress () |
| void | destroy_progress (void) |
Public Attributes | |
| size_t | min_size = 10 |
| size_t | max_iterations = 10 |
| How many iterations of simplification should we allow in a simplify() call? More... | |
| bool | drop_hairpin_paths = false |
| FeatureSet * | features = nullptr |
Public Attributes inherited from vg::Progressive | |
| bool | show_progress = false |
Protected Attributes | |
| VG & | graph |
| Holds a reference to the graph we're simplifying. More... | |
| SnarlManager | site_manager |
| This keeps track of the sites to simplify. More... | |
| TrivialTraversalFinder | traversal_finder |
| This is used to find traversals of those sites. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from vg::Progressive | |
| static void | with_progress (bool show_progress, const std::string &task, const std::function< void(const std::function< void(size_t, size_t)> &progress)> &callback) |
A class that can be used to simplify a graph, by repeatedly popping leaf bubbles under a certain size. Keeps graph paths and an optional set of BED- like features up to date. TODO: doesn't handle path start and end positions within nodes.
| vg::SmallSnarlSimplifier::SmallSnarlSimplifier | ( | VG & | graph | ) |
Make a simplifier that simplifies the given graph in place.
| void vg::SmallSnarlSimplifier::simplify | ( | ) |
Simplify the graph until material stops being deleted or the maximum iteration count is reached.
| pair< size_t, size_t > vg::SmallSnarlSimplifier::simplify_once | ( | size_t | iteration = 0 | ) |
Simplify the graph by one step. Returns the number of nodes deleted and the number of edges deleted. Can be passed an iteration for its progress messages.
| bool vg::SmallSnarlSimplifier::drop_hairpin_paths = false |
Should we simplify bubbles where paths come in and leave through the enterance node (and delete those paths) (true)? Or should we leave those bubbles unsimplified?
| FeatureSet* vg::SmallSnarlSimplifier::features = nullptr |
If the user points this to a FeatureSet, that FeatureSet will get its features updated with changes to the graph as simplification proceeds. The user should load the features in and pull them out. TODO: Replace this with an on_path_edit event on this object that can be listened on.
|
protected |
Holds a reference to the graph we're simplifying.
| size_t vg::SmallSnarlSimplifier::max_iterations = 10 |
How many iterations of simplification should we allow in a simplify() call?
| size_t vg::SmallSnarlSimplifier::min_size = 10 |
What's the miniumum size of a bubble to keep, in involved bases? Everything smaller will get squished away.
|
protected |
This keeps track of the sites to simplify.
|
protected |
This is used to find traversals of those sites.
1.8.17