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

#include <graph_caller.hpp>

Inheritance diagram for vg::VCFOutputCaller:
vg::FlowCaller vg::LegacyCaller vg::MCMCCaller vg::VCFGenotyper

Public Member Functions

 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...
 

Protected Member Functions

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_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, size_t len_override) const
 

Protected Attributes

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...
 

Detailed Description

Helper class that vcf writers can inherit from to for some common code to output sorted VCF

Constructor & Destructor Documentation

◆ VCFOutputCaller()

vg::VCFOutputCaller::VCFOutputCaller ( const string &  sample_name)

◆ ~VCFOutputCaller()

vg::VCFOutputCaller::~VCFOutputCaller ( )
virtual

Member Function Documentation

◆ add_variant()

void vg::VCFOutputCaller::add_variant ( vcflib::Variant &  var) const

Add a variant to our buffer.

◆ emit_variant()

void vg::VCFOutputCaller::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
protected

print a vcf variant

◆ flatten_common_allele_ends()

void vg::VCFOutputCaller::flatten_common_allele_ends ( vcflib::Variant &  variant,
bool  backward,
size_t  len_override 
) const
protected

clean up the alleles to not share common prefixes / suffixes if len_override given, just do that many bases without thinking

◆ get_ref_interval()

tuple< size_t, size_t, bool, step_handle_t, step_handle_t > vg::VCFOutputCaller::get_ref_interval ( const PathPositionHandleGraph graph,
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

◆ vcf_header()

string vg::VCFOutputCaller::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 in vg::FlowCaller, vg::LegacyCaller, and vg::VCFGenotyper.

◆ write_variants()

void vg::VCFOutputCaller::write_variants ( ostream &  out_stream) const

Sort then write variants in the buffer.

Member Data Documentation

◆ max_uncalled_alleles

size_t vg::VCFOutputCaller::max_uncalled_alleles = 5
protected

print up to this many uncalled alleles when doing ref-genotpes in -a mode

◆ output_variants

vector<vector<vcflib::Variant> > vg::VCFOutputCaller::output_variants
mutableprotected

output buffers (1/thread) (for sorting)

◆ output_vcf

vcflib::VariantCallFile vg::VCFOutputCaller::output_vcf
mutableprotected

output vcf

◆ sample_name

string vg::VCFOutputCaller::sample_name
protected

Sample name.


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