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

#include <snarl_caller.hpp>

Inheritance diagram for vg::SupportBasedSnarlCaller:
vg::SnarlCaller vg::PoissonSupportSnarlCaller vg::RatioSupportSnarlCaller

Public Member Functions

 SupportBasedSnarlCaller (const PathHandleGraph &graph, SnarlManager &snarl_manager, TraversalSupportFinder &support_finder)
 
virtual ~SupportBasedSnarlCaller ()
 
virtual void update_vcf_info (const Snarl &snarl, const vector< SnarlTraversal > &traversals, const vector< int > &genotype, const unique_ptr< CallInfo > &call_info, const string &sample_name, vcflib::Variant &variant)
 Update INFO and FORMAT fields of the called variant. More...
 
void set_min_supports (double min_mad_for_call, double min_support_for_call, double min_site_support)
 Set some of the parameters. More...
 
TraversalSupportFinderget_support_finder () const
 Get the traversal support finder. More...
 
virtual int get_min_total_support_for_call () const
 Get the minimum total support for call. More...
 
virtual function< bool(const SnarlTraversal &, int iteration)> get_skip_allele_fn () const
 Use min_alt_path_support threshold as cutoff. More...
 
- Public Member Functions inherited from vg::SnarlCaller
virtual ~SnarlCaller ()
 
virtual pair< vector< int >, unique_ptr< CallInfo > > genotype (const Snarl &snarl, const vector< SnarlTraversal > &traversals, int ref_trav_idx, int ploidy, const string &ref_path_name, pair< size_t, size_t > ref_range)=0
 
virtual void update_vcf_header (string &header) const =0
 Define any header fields needed by the above. More...
 

Static Protected Member Functions

static int get_best_support (const vector< Support > &supports, const vector< int > &skips)
 Get the best support out of a list of supports, ignoring skips. More...
 
static double support_val (const Support &support)
 Relic from old code. More...
 

Protected Attributes

const PathHandleGraphgraph
 
SnarlManagersnarl_manager
 
TraversalSupportFindersupport_finder
 Get support from traversals. More...
 
int min_total_support_for_call = 2
 
size_t min_mad_for_filter = 1
 
size_t min_site_depth = 4
 
double min_alt_path_support = 0.5
 

Detailed Description

Interface for a caller that relies on a TraversalSupportFinder and has a few very basic support-based cutoffs Not every exciting but is currently required for the LegacySupportCaller which needs this to interface with the RepresentativeTraversalFinder

Constructor & Destructor Documentation

◆ SupportBasedSnarlCaller()

vg::SupportBasedSnarlCaller::SupportBasedSnarlCaller ( const PathHandleGraph graph,
SnarlManager snarl_manager,
TraversalSupportFinder support_finder 
)

◆ ~SupportBasedSnarlCaller()

vg::SupportBasedSnarlCaller::~SupportBasedSnarlCaller ( )
virtual

Member Function Documentation

◆ get_best_support()

int vg::SupportBasedSnarlCaller::get_best_support ( const vector< Support > &  supports,
const vector< int > &  skips 
)
staticprotected

Get the best support out of a list of supports, ignoring skips.

◆ get_min_total_support_for_call()

int vg::SupportBasedSnarlCaller::get_min_total_support_for_call ( ) const
virtual

Get the minimum total support for call.

◆ get_skip_allele_fn()

function< bool(const SnarlTraversal &, int)> vg::SupportBasedSnarlCaller::get_skip_allele_fn ( ) const
virtual

Use min_alt_path_support threshold as cutoff.

Reimplemented from vg::SnarlCaller.

◆ get_support_finder()

TraversalSupportFinder & vg::SupportBasedSnarlCaller::get_support_finder ( ) const

Get the traversal support finder.

◆ set_min_supports()

void vg::SupportBasedSnarlCaller::set_min_supports ( double  min_mad_for_call,
double  min_support_for_call,
double  min_site_support 
)

Set some of the parameters.

◆ support_val()

static double vg::SupportBasedSnarlCaller::support_val ( const Support support)
inlinestaticprotected

Relic from old code.

◆ update_vcf_info()

void vg::SupportBasedSnarlCaller::update_vcf_info ( const Snarl snarl,
const vector< SnarlTraversal > &  traversals,
const vector< int > &  genotype,
const unique_ptr< CallInfo > &  call_info,
const string &  sample_name,
vcflib::Variant &  variant 
)
virtual

Update INFO and FORMAT fields of the called variant.

Implements vg::SnarlCaller.

Reimplemented in vg::PoissonSupportSnarlCaller, and vg::RatioSupportSnarlCaller.

Member Data Documentation

◆ graph

const PathHandleGraph& vg::SupportBasedSnarlCaller::graph
protected

◆ min_alt_path_support

double vg::SupportBasedSnarlCaller::min_alt_path_support = 0.5
protected

used only for pruning alleles in the VCFTraversalFinder: minimum support of an allele's alt-path for it to be considered in the brute-force enumeration

◆ min_mad_for_filter

size_t vg::SupportBasedSnarlCaller::min_mad_for_filter = 1
protected

what's the minimum ref or alt allele depth to give a PASS in the filter column? Also used as a min actual support for a second-best allele call

◆ min_site_depth

size_t vg::SupportBasedSnarlCaller::min_site_depth = 4
protected

what's the minimum total support (over all alleles) of the site to make a call

◆ min_total_support_for_call

int vg::SupportBasedSnarlCaller::min_total_support_for_call = 2
protected

What's the minimum integer number of reads that must support a call? We don't necessarily want to call a SNP as het because we have a single

◆ snarl_manager

SnarlManager& vg::SupportBasedSnarlCaller::snarl_manager
protected

◆ support_finder

TraversalSupportFinder& vg::SupportBasedSnarlCaller::support_finder
protected

Get support from traversals.


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