#include <graph_caller.hpp>
|
| LegacyCaller (const PathPositionHandleGraph &graph, SupportBasedSnarlCaller &snarl_caller, SnarlManager &snarl_manager, const string &sample_name, const vector< string > &ref_paths={}, const vector< size_t > &ref_path_offsets={}) |
|
virtual | ~LegacyCaller () |
|
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...
|
|
| GraphCaller (SnarlCaller &snarl_caller, SnarlManager &snarl_manager, ostream &out_stream=cout) |
|
virtual | ~GraphCaller () |
|
virtual void | call_top_level_snarls (bool recurse_on_fail=true) |
|
| 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...
|
|
|
pair< vector< SnarlTraversal >, vector< int > > | top_down_genotype (const Snarl &snarl, TraversalFinder &trav_finder, int ploidy, const string &ref_path_name, pair< size_t, size_t > ref_interval) const |
|
SnarlTraversal | get_reference_traversal (const Snarl &snarl, TraversalFinder &trav_finder) const |
| we need the reference traversal for VCF, but if the ref is not called, the above method won't find it. More...
|
|
tuple< vector< SnarlTraversal >, vector< int >, unique_ptr< SnarlCaller::CallInfo > > | re_genotype (const Snarl &snarl, TraversalFinder &trav_finder, const vector< SnarlTraversal > &in_traversals, const vector< int > &in_genotype, int ploidy, const string &ref_path_name, pair< size_t, size_t > ref_interval) const |
|
void | emit_variant (const Snarl &snarl, TraversalFinder &trav_finder, const vector< SnarlTraversal > &called_traversals, const vector< int > &genotype, const unique_ptr< SnarlCaller::CallInfo > &call_info, const string &ref_path_name) const |
| print a vcf variant More...
|
|
bool | is_traversable (const Snarl &snarl) |
| check if a site can be handled by the RepresentativeTraversalFinder More...
|
|
pair< string, PathIndex * > | find_index (const Snarl &snarl, const vector< PathIndex * > path_indexes) const |
| look up a path index for a site and return its name too More...
|
|
tuple< size_t, size_t, bool > | get_ref_interval (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...
|
|
LegacyCaller : Preserves (most of) the old vg call logic by using the RepresentativeTraversalFinder to recursively find traversals through arbitrary sites.
◆ LegacyCaller()
◆ ~LegacyCaller()
vg::LegacyCaller::~LegacyCaller |
( |
| ) |
|
|
virtual |
◆ call_snarl()
bool vg::LegacyCaller::call_snarl |
( |
const Snarl & |
snarl | ) |
|
|
virtual |
Call a given snarl, and print the output to out_stream.
Implements vg::GraphCaller.
◆ emit_variant()
◆ find_index()
pair< string, PathIndex * > vg::LegacyCaller::find_index |
( |
const Snarl & |
snarl, |
|
|
const vector< PathIndex * > |
path_indexes |
|
) |
| const |
|
protected |
look up a path index for a site and return its name too
◆ flatten_common_allele_ends()
void vg::LegacyCaller::flatten_common_allele_ends |
( |
vcflib::Variant & |
variant, |
|
|
bool |
backward |
|
) |
| const |
|
protected |
clean up the alleles to not share common prefixes / suffixes
◆ get_ref_interval()
tuple< size_t, size_t, bool > vg::LegacyCaller::get_ref_interval |
( |
const Snarl & |
snarl, |
|
|
const string & |
ref_path_name |
|
) |
| const |
|
protected |
get the interval of a snarl from our reference path using the PathPositionHandleGraph interface the bool is true if the snarl's backward on the path
◆ get_reference_traversal()
we need the reference traversal for VCF, but if the ref is not called, the above method won't find it.
◆ is_traversable()
bool vg::LegacyCaller::is_traversable |
( |
const Snarl & |
snarl | ) |
|
|
protected |
◆ re_genotype()
re-genotype output of top_down_genotype. it may give slightly different results as it's working with fully-defined traversals and can exactly determine lengths and supports it will also make sure the reference traversal is in the beginning of the output
◆ top_down_genotype()
pair< vector< SnarlTraversal >, vector< int > > vg::LegacyCaller::top_down_genotype |
( |
const Snarl & |
snarl, |
|
|
TraversalFinder & |
trav_finder, |
|
|
int |
ploidy, |
|
|
const string & |
ref_path_name, |
|
|
pair< size_t, size_t > |
ref_interval |
|
) |
| const |
|
protected |
recursively genotype a snarl todo: can this be pushed to a more generic class?
◆ vcf_header()
string vg::LegacyCaller::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.
◆ graph
◆ is_vg
bool vg::LegacyCaller::is_vg |
|
protected |
non-vg inputs are converted into vg as-needed, at least until we get the traversal finding ported
◆ max_bubble_paths
size_t vg::LegacyCaller::max_bubble_paths = 100 |
|
protected |
What's the maximum number of bubble path combinations we can explore while finding one with maximum support?
◆ max_search_depth
int vg::LegacyCaller::max_search_depth = 1000 |
|
protected |
Tuning.
How many nodes should we be willing to look at on our path back to the primary path? Keep in mind we need to look at all valid paths (and all combinations thereof) until we find a valid pair.
◆ max_search_width
int vg::LegacyCaller::max_search_width = 1000 |
|
protected |
How many search states should we allow on the DFS stack when searching for traversals?
◆ path_indexes
vector<PathIndex*> vg::LegacyCaller::path_indexes |
|
protected |
Needed by above (only used when working on vg inputs – generated on the fly otherwise)
◆ ref_offsets
map<string, size_t> vg::LegacyCaller::ref_offsets |
|
protected |
keep track of offsets in the reference paths
◆ ref_paths
vector<string> vg::LegacyCaller::ref_paths |
|
protected |
keep track of the reference paths
◆ traversal_finder
The old vg call traversal finder. It is fairly efficient but daunting to maintain. We keep it around until a better replacement is implemented. It is not compatible with the Handle Graph API because it relise on PathIndex. We convert to VG as needed in order to use it.
The documentation for this class was generated from the following files: