vg
tools for working with variation graphs
|
#include <snarl_caller.hpp>
Public Member Functions | |
RatioSupportSnarlCaller (const PathHandleGraph &graph, SnarlManager &snarl_manager, TraversalSupportFinder &support_finder) | |
virtual | ~RatioSupportSnarlCaller () |
void | set_het_bias (double het_bias, double ref_het_bias=0.) |
Set some of the parameters. More... | |
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) |
Get the genotype of a site. More... | |
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... | |
virtual void | update_vcf_header (string &header) const |
Define any header fields needed by the above. More... | |
Public Member Functions inherited from vg::SupportBasedSnarlCaller | |
SupportBasedSnarlCaller (const PathHandleGraph &graph, SnarlManager &snarl_manager, TraversalSupportFinder &support_finder) | |
virtual | ~SupportBasedSnarlCaller () |
void | set_min_supports (double min_mad_for_call, double min_support_for_call, double min_site_support) |
Set some of the parameters. More... | |
TraversalSupportFinder & | get_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 () |
Protected Member Functions | |
double | get_bias (const vector< int > &traversal_sizes, int best_trav, int second_best_trav, int ref_trav_idx) const |
unordered_map< id_t, size_t > | get_ref_offsets (const SnarlTraversal &ref_trav) const |
Protected Attributes | |
double | max_het_bias = 6 |
Tuning. More... | |
double | max_ref_het_bias = 6 |
Like above, but applied to ref / alt ratio (instead of alt / ref) More... | |
double | max_indel_het_bias = 6 |
Like the max het bias, but applies to novel indels. More... | |
double | max_ma_bias = 0 |
double | min_ad_log_likelihood_for_filter = -9 |
what's the min log likelihood for allele depth assignments to PASS? More... | |
Protected Attributes inherited from vg::SupportBasedSnarlCaller | |
const PathHandleGraph & | graph |
SnarlManager & | snarl_manager |
TraversalSupportFinder & | support_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 |
Additional Inherited Members | |
Static Protected Member Functions inherited from vg::SupportBasedSnarlCaller | |
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... | |
Find the genotype of some traversals in a site using read support and a bias ratio to tell heterozygous from homozygous
vg::RatioSupportSnarlCaller::RatioSupportSnarlCaller | ( | const PathHandleGraph & | graph, |
SnarlManager & | snarl_manager, | ||
TraversalSupportFinder & | support_finder | ||
) |
|
virtual |
|
virtual |
Get the genotype of a site.
Implements vg::SnarlCaller.
|
protected |
Get the bias used to for comparing two traversals (It differrs heuristically depending whether they are alt/ref/het/hom/snp/indel see tuning parameters below)
|
protected |
get a map of the beginning of a node (in forward orientation) on a traversal used for up-weighting large deletion edges in complex snarls with average support
void vg::RatioSupportSnarlCaller::set_het_bias | ( | double | het_bias, |
double | ref_het_bias = 0. |
||
) |
Set some of the parameters.
|
virtual |
Define any header fields needed by the above.
Implements vg::SnarlCaller.
|
virtual |
Update INFO and FORMAT fields of the called variant.
Reimplemented from vg::SupportBasedSnarlCaller.
|
protected |
Tuning.
What fraction of the reads supporting an alt are we willing to discount? At 2, if twice the reads support one allele as the other, we'll call homozygous instead of heterozygous. At infinity, every call will be heterozygous if even one read supports each allele.
|
protected |
Like the max het bias, but applies to novel indels.
|
protected |
Used for calling 1/2 calls. If both alts (times this bias) are greater than the reference, the call is made. set to 0 to deactivate.
|
protected |
Like above, but applied to ref / alt ratio (instead of alt / ref)
|
protected |
what's the min log likelihood for allele depth assignments to PASS?