vg
tools for working with variation graphs
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
vg::CactusSnarlFinder Class Reference

#include <cactus_snarl_finder.hpp>

Inheritance diagram for vg::CactusSnarlFinder:
vg::SnarlFinder

Public Member Functions

 CactusSnarlFinder (const PathHandleGraph &graph, const string &hint_path="")
 
virtual SnarlManager find_snarls ()
 
virtual SnarlManager find_snarls_parallel ()
 
- Public Member Functions inherited from vg::SnarlFinder
virtual ~SnarlFinder ()=default
 

Protected Member Functions

const Snarlrecursively_emit_snarls (const Visit &start, const Visit &end, const Visit &parent_start, const Visit &parent_end, stList *chains_list, stList *unary_snarls_list, SnarlManager &destination)
 
virtual SnarlManager find_snarls_impl (bool known_single_component, bool finish_index)
 

Protected Attributes

const PathHandleGraphgraph
 Holds the vg graph we are looking for sites in. More...
 
unordered_set< string > hint_paths
 Holds the names of reference path hints. More...
 

Detailed Description

Class for finding all snarls using the base-level Cactus snarl decomposition interface.

Constructor & Destructor Documentation

◆ CactusSnarlFinder()

vg::CactusSnarlFinder::CactusSnarlFinder ( const PathHandleGraph graph,
const string &  hint_path = "" 
)

Make a new CactusSnarlFinder to find snarls in the given graph. We can't filter trivial bubbles because that would break our chains.

Optionally takes a hint path name.

Member Function Documentation

◆ find_snarls()

SnarlManager vg::CactusSnarlFinder::find_snarls ( )
virtual

Find all the snarls with Cactus, and put them into a SnarlManager.

Implements vg::SnarlFinder.

◆ find_snarls_impl()

SnarlManager vg::CactusSnarlFinder::find_snarls_impl ( bool  known_single_component,
bool  finish_index 
)
protectedvirtual

Find all the snarls with Cactus, and put them into a SnarlManager. Skip breaking into connected components if "known_single_component" is true Skip making the snarl manager index if finish_index is false

◆ find_snarls_parallel()

SnarlManager vg::CactusSnarlFinder::find_snarls_parallel ( )
virtual

Find all the snarls of weakly connected components in parallel. Even single-threaded, this may be worth using as it will use less memory by only considering each component in the context of itself.

Reimplemented from vg::SnarlFinder.

◆ recursively_emit_snarls()

const Snarl * vg::CactusSnarlFinder::recursively_emit_snarls ( const Visit start,
const Visit end,
const Visit parent_start,
const Visit parent_end,
stList *  chains_list,
stList *  unary_snarls_list,
SnarlManager destination 
)
protected

Create a snarl in the given SnarlManager with the given start and end, containing the given child snarls in the list of chains of children and the given list of unary children. Recursively creates snarls in the SnarlManager for the children. Returns a pointer to the finished snarl in the SnarlManager. Start and end may be empty visits, in which case no snarl is created, all the child chains are added as root chains, and null is returned. If parent_start and parent_end are empty Visits, no parent() is added to the produced snarl.

Member Data Documentation

◆ graph

const PathHandleGraph* vg::CactusSnarlFinder::graph
protected

Holds the vg graph we are looking for sites in.

◆ hint_paths

unordered_set<string> vg::CactusSnarlFinder::hint_paths
protected

Holds the names of reference path hints.


The documentation for this class was generated from the following files: