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

#include <snarls.hpp>

Inheritance diagram for vg::HandleGraphSnarlFinder:
vg::SnarlFinder vg::IntegratedSnarlFinder

Public Member Functions

 HandleGraphSnarlFinder (const HandleGraph *graph)
 
virtual ~HandleGraphSnarlFinder ()=default
 
virtual SnarlManager find_snarls ()
 
virtual void traverse_decomposition (const function< void(handle_t)> &begin_chain, const function< void(handle_t)> &end_chain, const function< void(handle_t)> &begin_snarl, const function< void(handle_t)> &end_snarl) const =0
 
- Public Member Functions inherited from vg::SnarlFinder
virtual ~SnarlFinder ()=default
 
virtual SnarlManager find_snarls_parallel ()
 

Protected Member Functions

virtual SnarlManager find_snarls_unindexed ()
 

Protected Attributes

const HandleGraphgraph
 

Detailed Description

Wrapper base class that can convert a bottom-up traversal of snarl boundaries into a full snarl finder. Mostly worries about snarl classification and connectivity information.

Constructor & Destructor Documentation

◆ HandleGraphSnarlFinder()

vg::HandleGraphSnarlFinder::HandleGraphSnarlFinder ( const HandleGraph graph)

Create a HandleGraphSnarlFinder to find snarls in the given graph.

◆ ~HandleGraphSnarlFinder()

virtual vg::HandleGraphSnarlFinder::~HandleGraphSnarlFinder ( )
virtualdefault

Member Function Documentation

◆ find_snarls()

SnarlManager vg::HandleGraphSnarlFinder::find_snarls ( )
virtual

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

Implements vg::SnarlFinder.

◆ find_snarls_unindexed()

SnarlManager vg::HandleGraphSnarlFinder::find_snarls_unindexed ( )
protectedvirtual

Find all the snarls, and put them into a SnarlManager, but don't finish it. More snarls can be added later before it is finished.

◆ traverse_decomposition()

virtual void vg::HandleGraphSnarlFinder::traverse_decomposition ( const function< void(handle_t)> &  begin_chain,
const function< void(handle_t)> &  end_chain,
const function< void(handle_t)> &  begin_snarl,
const function< void(handle_t)> &  end_snarl 
) const
pure virtual

Visit all snarls and chains, including trivial snarls and single-node empty chains.

Calls begin_chain and end_chain when entrering and exiting chains in the traversal. Within each chain, calls begin_snarl and end_snarl when entering and exiting each snarl, in order. The caller is intended to maintain its own stack to match up begin and end events.

Each begin/end call receives the handle reading into/out of the snarl or chain.

Both empty and cyclic chains have the in and out handles the same. They are distinguished by context; empty chains have no shild snarls, while cyclic chains do.

Roots the decomposition at a global snarl with no bounding nodes, for which begin_snarl is not called. So the first call will be begin_chain.

Start handles are inward facing and end handles are outward facing. Snarls must be oriented forward in their chains.

Implemented in vg::IntegratedSnarlFinder.

Member Data Documentation

◆ graph

const HandleGraph* vg::HandleGraphSnarlFinder::graph
protected

The graph we are finding snarls on. It must outlive us.


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