vg
tools for working with variation graphs
|
#include <mcmc_caller.hpp>
Public Member Functions | |
MCMCCaller (const PathPositionHandleGraph *path_position_handle_graph, PhasedGenome &genome, SnarlManager &snarl_manager, const string &sample_name, const vector< string > &ref_paths={}, const vector< size_t > &ref_path_offsets={}, const vector< size_t > &ref_path_lengths={}, ostream &out_stream=cout) | |
virtual | ~MCMCCaller () |
void | call_top_level_snarls (bool recurse_on_fail=true) |
virtual string | vcf_header (const PathPositionHandleGraph &graph, const vector< string > &ref_paths, const vector< size_t > &contig_length_overrides) const |
print vcf header More... | |
![]() | |
VCFOutputCaller (const string &sample_name) | |
virtual | ~VCFOutputCaller () |
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... | |
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... | |
Public Attributes | |
PhasedGenome & | genome |
SnarlManager & | snarl_manager |
const string & | sample_name = "SAMPLE" |
const vector< size_t > & | ref_path_offsets = {} |
const vector< size_t > & | ref_path_lengths = {} |
ostream & | out_stream |
const SnarlTraversal | trav |
Protected Member Functions | |
void | update_vcf_info (const Snarl &snarl, const vector< SnarlTraversal > &traversals, const vector< int > &genotype, const string &sample_name, vcflib::Variant &variant) const |
Update INFO and FORMAT fields of the called variant. More... | |
void | emit_variant (const Snarl &snarl, const vector< int > &genotype, SnarlTraversal ref_trav, const string &ref_path_name, const vector< SnarlTraversal > &haplo_travs) const |
print a vcf variant More... | |
bool | call_snarl (const Snarl &snarl) |
Call a given snarl, and print the output to out_stream. More... | |
bool | is_traversable (const Snarl &snarl) |
check if a site can be handled More... | |
pair< size_t, bool > | get_ref_position (const Snarl &snarl, const string &ref_path_name) const |
get position of reference path More... | |
void | flatten_common_allele_ends (vcflib::Variant &variant, bool backward) const |
clean up the alleles to not share common prefixes / suffixes More... | |
![]() | |
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, bool genotype_snarls) const |
print a vcf variant More... | |
tuple< size_t, size_t, bool, step_handle_t, step_handle_t > | get_ref_interval (const PathPositionHandleGraph &graph, const Snarl &snarl, const string &ref_path_name) const |
void | flatten_common_allele_ends (vcflib::Variant &variant, bool backward, size_t len_override) const |
Protected Attributes | |
const PathPositionHandleGraph * | path_position_handle_graph |
path position handle graph More... | |
vector< string > | ref_paths |
keep track of the reference paths More... | |
map< string, size_t > | ref_offsets |
keep track of offsets in the reference paths More... | |
![]() | |
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... | |
size_t | max_uncalled_alleles = 5 |
print up to this many uncalled alleles when doing ref-genotpes in -a mode More... | |
vg::MCMCCaller::MCMCCaller | ( | const PathPositionHandleGraph * | path_position_handle_graph, |
PhasedGenome & | genome, | ||
SnarlManager & | snarl_manager, | ||
const string & | sample_name, | ||
const vector< string > & | ref_paths = {} , |
||
const vector< size_t > & | ref_path_offsets = {} , |
||
const vector< size_t > & | ref_path_lengths = {} , |
||
ostream & | out_stream = cout |
||
) |
MCMCCaller : Inherits from VCFOutputCaller
keep track of offsets in the reference paths
|
virtual |
|
protected |
Call a given snarl, and print the output to out_stream.
void vg::MCMCCaller::call_top_level_snarls | ( | bool | recurse_on_fail = true | ) |
Run call_snarl() on every top-level snarl in the manager. For any that return false, try the children, etc. (when recurse_on_fail true) Snarls are processed in parallel
|
protected |
print a vcf variant
|
protected |
clean up the alleles to not share common prefixes / suffixes
|
protected |
get position of reference path
|
protected |
check if a site can be handled
|
protected |
Update INFO and FORMAT fields of the called variant.
|
virtual |
print vcf header
PhasedGenome& vg::MCMCCaller::genome |
ostream& vg::MCMCCaller::out_stream |
|
protected |
path position handle graph
|
protected |
keep track of offsets in the reference paths
const vector<size_t>& vg::MCMCCaller::ref_path_lengths = {} |
const vector<size_t>& vg::MCMCCaller::ref_path_offsets = {} |
|
protected |
keep track of the reference paths
const string& vg::MCMCCaller::sample_name = "SAMPLE" |
SnarlManager& vg::MCMCCaller::snarl_manager |
const SnarlTraversal vg::MCMCCaller::trav |