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

#include <graph_caller.hpp>

Inheritance diagram for vg::GraphCaller:
vg::FlowCaller vg::LegacyCaller vg::NestedFlowCaller vg::VCFGenotyper

Public Types

using RecurseType = vg::RecurseType
 

Public Member Functions

 GraphCaller (SnarlCaller &snarl_caller, SnarlManager &snarl_manager)
 
virtual ~GraphCaller ()
 
virtual void call_top_level_snarls (const HandleGraph &graph, RecurseType recurse_type=RecurseOnFail)
 
virtual void call_top_level_chains (const HandleGraph &graph, size_t max_edges, size_t max_trivial, RecurseType recurise_type=RecurseOnFail)
 
virtual bool call_snarl (const Snarl &snarl)=0
 Call a given snarl, and print the output to out_stream. More...
 
void set_show_progress (bool show_progress)
 toggle progress messages More...
 
void set_snarl_batching (size_t window_size)
 
void set_ploidy_regions (PloidyRegions regions)
 

Static Public Attributes

static constexpr RecurseType RecurseOnFail = RecurseType::OnFail
 
static constexpr RecurseType RecurseAlways = RecurseType::Always
 
static constexpr RecurseType RecurseNever = RecurseType::Never
 

Protected Member Functions

vector< Chain > break_chain (const HandleGraph &graph, const Chain &chain, size_t max_edges, size_t max_trivial) const
 Break up a chain into bits that we want to call using size heuristics. More...
 

Protected Attributes

SnarlCaller & snarl_caller
 Our Genotyper. More...
 
SnarlManager & snarl_manager
 Our snarls. More...
 
size_t snarl_batch_window = 0
 
bool show_progress
 Toggle progress messages. More...
 
PloidyRegions ploidy_regions
 The ploidy of regions of the reference, which overrides the ploidy of their paths. More...
 

Detailed Description

GraphCaller: Use the snarl decomposition to call snarls in a graph

Member Typedef Documentation

◆ RecurseType

using vg::GraphCaller::RecurseType = vg::RecurseType

Constructor & Destructor Documentation

◆ GraphCaller()

vg::GraphCaller::GraphCaller ( SnarlCaller &  snarl_caller,
SnarlManager &  snarl_manager 
)

◆ ~GraphCaller()

vg::GraphCaller::~GraphCaller ( )
virtual

Member Function Documentation

◆ break_chain()

vector< Chain > vg::GraphCaller::break_chain ( const HandleGraph &  graph,
const Chain &  chain,
size_t  max_edges,
size_t  max_trivial 
) const
protected

Break up a chain into bits that we want to call using size heuristics.

◆ call_snarl()

virtual bool vg::GraphCaller::call_snarl ( const Snarl &  snarl)
pure virtual

Call a given snarl, and print the output to out_stream.

Implemented in vg::FlowCaller, vg::VCFGenotyper, vg::NestedFlowCaller, and vg::LegacyCaller.

◆ call_top_level_chains()

void vg::GraphCaller::call_top_level_chains ( const HandleGraph &  graph,
size_t  max_edges,
size_t  max_trivial,
RecurseType  recurise_type = RecurseOnFail 
)
virtual

For every chain, cut it up into pieces using max_edges and max_trivial to cap the size of each piece then make a fake snarl for each chain piece and call it. If a fake snarl fails to call, It's child chains will be recursed on (if selected)_

◆ call_top_level_snarls()

void vg::GraphCaller::call_top_level_snarls ( const HandleGraph &  graph,
RecurseType  recurse_type = RecurseOnFail 
)
virtual

Run call_snarl() on every top-level snarl in the manager, in parallel, and then on children as recurse_type says.

RecurseAlways calls the children of every snarl, RecurseOnFail the children of each snarl whose call returned false, and RecurseNever no children. Calling continues down the snarl tree the same way.

Each snarl is its own parallel job, unless set_snarl_batching(w) was called. Then each job calls, in node-ID order, the top-level snarls whose lower boundary node ID is in one window [k*w, (k+1)*w). Children are always one job each, started in node-ID order.

◆ set_ploidy_regions()

void vg::GraphCaller::set_ploidy_regions ( PloidyRegions  regions)

Set the ploidy of the regions of the reference that regions covers, in place of the ploidy of their paths.

◆ set_show_progress()

void vg::GraphCaller::set_show_progress ( bool  show_progress)

toggle progress messages

◆ set_snarl_batching()

void vg::GraphCaller::set_snarl_batching ( size_t  window_size)

Make call_top_level_snarls call top-level snarls in batches, by windows of window_size node IDs.

This suits a SnarlCaller that loads its reads one window of node IDs at a time. A size of 0 gives one job per snarl.

Member Data Documentation

◆ ploidy_regions

PloidyRegions vg::GraphCaller::ploidy_regions
protected

The ploidy of regions of the reference, which overrides the ploidy of their paths.

◆ RecurseAlways

constexpr RecurseType vg::GraphCaller::RecurseAlways = RecurseType::Always
staticconstexpr

◆ RecurseNever

constexpr RecurseType vg::GraphCaller::RecurseNever = RecurseType::Never
staticconstexpr

◆ RecurseOnFail

constexpr RecurseType vg::GraphCaller::RecurseOnFail = RecurseType::OnFail
staticconstexpr

◆ show_progress

bool vg::GraphCaller::show_progress
protected

Toggle progress messages.

◆ snarl_batch_window

size_t vg::GraphCaller::snarl_batch_window = 0
protected

The width, in node IDs, of the windows that top-level snarls are batched by, or 0 for no batching.

◆ snarl_caller

SnarlCaller& vg::GraphCaller::snarl_caller
protected

Our Genotyper.

◆ snarl_manager

SnarlManager& vg::GraphCaller::snarl_manager
protected

Our snarls.


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