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

#include <graph_caller.hpp>

Inheritance diagram for vg::FlowCaller:
vg::GraphCaller vg::VCFOutputCaller

Public Member Functions

 FlowCaller (const PathPositionHandleGraph &graph, SupportBasedSnarlCaller &snarl_caller, SnarlManager &snarl_manager, const string &sample_name, size_t max_traverals, const vector< string > &ref_paths={}, const vector< size_t > &ref_path_offsets={}, ostream &out_stream=cout)
 
virtual ~FlowCaller ()
 
virtual bool call_snarl (const Snarl &snarl)
 Call a given snarl, and print the output to out_stream. More...
 
virtual string vcf_header (const PathHandleGraph &graph, const vector< string > &contigs, const vector< size_t > &contig_length_overrides={}) const
 Write the vcf header (version and contigs and basic info) More...
 
- Public Member Functions inherited from vg::GraphCaller
 GraphCaller (SnarlCaller &snarl_caller, SnarlManager &snarl_manager, ostream &out_stream=cout)
 
virtual ~GraphCaller ()
 
virtual void call_top_level_snarls (bool recurse_on_fail=true)
 
- Public Member Functions inherited from vg::VCFOutputCaller
 VCFOutputCaller (const string &sample_name)
 
virtual ~VCFOutputCaller ()
 
void add_variant (vcflib::Variant &var) const
 Add a variant to our buffer. More...
 
void write_variants (ostream &out_stream) const
 Sort then write variants in the buffer. More...
 

Protected Attributes

const PathPositionHandleGraphgraph
 the graph More...
 
FlowTraversalFindertraversal_finder
 the traversal finder More...
 
vector< string > ref_paths
 keep track of the reference paths More...
 
unordered_set< string > ref_path_set
 
map< string, size_t > ref_offsets
 keep track of offsets in the reference paths More...
 
- Protected Attributes inherited from vg::GraphCaller
SnarlCallersnarl_caller
 Our Genotyper. More...
 
SnarlManagersnarl_manager
 Our snarls. More...
 
ostream & out_stream
 Where all output written. More...
 
- Protected Attributes inherited from vg::VCFOutputCaller
vcflib::VariantCallFile output_vcf
 output vcf More...
 
string sample_name
 Sample name. More...
 
vector< vector< vcflib::Variant > > output_variants
 output buffers (1/thread) (for sorting) More...
 

Additional Inherited Members

- Protected Member Functions inherited from vg::VCFOutputCaller
void emit_variant (const PathPositionHandleGraph &graph, SnarlCaller &snarl_caller, const Snarl &snarl, const vector< SnarlTraversal > &called_traversals, const vector< int > &genotype, int ref_trav_idx, const unique_ptr< SnarlCaller::CallInfo > &call_info, const string &ref_path_name, int ref_offset) const
 print a vcf variant More...
 
tuple< size_t, size_t, bool, step_handle_t, step_handle_tget_ref_interval (const PathPositionHandleGraph &graph, const Snarl &snarl, const string &ref_path_name) const
 
void flatten_common_allele_ends (vcflib::Variant &variant, bool backward) const
 clean up the alleles to not share common prefixes / suffixes More...
 

Detailed Description

FlowCaller : Uses the FlowTraversal finder to find best-supported traversals, and calls those. should work on any graph but will not report cyclic traversals. Does not (yet, anyway) support nested calling, so the entire site is processes in one shot. Designed to replace LegacyCaller, as it should miss fewer obviously good traversals, and is not dependent on old protobuf-based structures.

Constructor & Destructor Documentation

◆ FlowCaller()

vg::FlowCaller::FlowCaller ( const PathPositionHandleGraph graph,
SupportBasedSnarlCaller snarl_caller,
SnarlManager snarl_manager,
const string &  sample_name,
size_t  max_traverals,
const vector< string > &  ref_paths = {},
const vector< size_t > &  ref_path_offsets = {},
ostream &  out_stream = cout 
)

◆ ~FlowCaller()

vg::FlowCaller::~FlowCaller ( )
virtual

Member Function Documentation

◆ call_snarl()

bool vg::FlowCaller::call_snarl ( const Snarl snarl)
virtual

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

Implements vg::GraphCaller.

◆ vcf_header()

string vg::FlowCaller::vcf_header ( const PathHandleGraph graph,
const vector< string > &  contigs,
const vector< size_t > &  contig_length_overrides = {} 
) const
virtual

Write the vcf header (version and contigs and basic info)

Reimplemented from vg::VCFOutputCaller.

Member Data Documentation

◆ graph

const PathPositionHandleGraph& vg::FlowCaller::graph
protected

the graph

◆ ref_offsets

map<string, size_t> vg::FlowCaller::ref_offsets
protected

keep track of offsets in the reference paths

◆ ref_path_set

unordered_set<string> vg::FlowCaller::ref_path_set
protected

◆ ref_paths

vector<string> vg::FlowCaller::ref_paths
protected

keep track of the reference paths

◆ traversal_finder

FlowTraversalFinder* vg::FlowCaller::traversal_finder
protected

the traversal finder


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