vg
tools for working with variation graphs
|
#include <mcmc_genotyper.hpp>
Public Member Functions | |
MCMCGenotyper (SnarlManager &snarls, VG &graph, const int n_iterations, const int seed) | |
unique_ptr< PhasedGenome > | run_genotype (const vector< multipath_alignment_t > &reads, const double log_base) const |
double | log_target (unique_ptr< PhasedGenome > &phased_genome, const vector< multipath_alignment_t > &reads) const |
tuple< int, const Snarl *, vector< NodeTraversal > > | proposal_sample (unique_ptr< PhasedGenome > ¤t) const |
int | generate_discrete_uniform (minstd_rand0 &random_engine, int lower_bound, int upper_bound) const |
double | generate_continuous_uniform (const double a, const double b) const |
unique_ptr< PhasedGenome > | generate_initial_guess () const |
Private Attributes | |
SnarlManager & | snarls |
VG & | graph |
const int | n_iterations |
const int | seed |
minstd_rand0 | random_engine |
This class is a genotyper that uses MCMC to find two optimal paths through the graph given a set of aligned reads.
vg::MCMCGenotyper::MCMCGenotyper | ( | SnarlManager & | snarls, |
VG & | graph, | ||
const int | n_iterations, | ||
const int | seed | ||
) |
double vg::MCMCGenotyper::generate_continuous_uniform | ( | const double | a, |
const double | b | ||
) | const |
Given a range [a,b] will return a random number uniformly distributed within that range
int vg::MCMCGenotyper::generate_discrete_uniform | ( | minstd_rand0 & | random_engine, |
int | lower_bound, | ||
int | upper_bound | ||
) | const |
Generates a number randomly using the discrete uniform distribution
unique_ptr< PhasedGenome > vg::MCMCGenotyper::generate_initial_guess | ( | ) | const |
Generate a PhasedGenome to use as an initial value in M-H Uses the two non-alt paths from the linear reference as haplotypes
double vg::MCMCGenotyper::log_target | ( | unique_ptr< PhasedGenome > & | phased_genome, |
const vector< multipath_alignment_t > & | reads | ||
) | const |
Represents the poseterior distribution function returns the posterir probability
tuple< int, const Snarl *, vector< NodeTraversal > > vg::MCMCGenotyper::proposal_sample | ( | unique_ptr< PhasedGenome > & | current | ) | const |
Generates a proposal sample over the desired distrubution returns a sample from the proposal distribution
unique_ptr< PhasedGenome > vg::MCMCGenotyper::run_genotype | ( | const vector< multipath_alignment_t > & | reads, |
const double | log_base | ||
) | const |
Takes as input a collection of mapped reads stored as a vector of multipath alignments and uses MCMC to find two optimal paths through the graph. Output: phased genome
|
private |
|
private |
|
mutableprivate |
|
private |
|
private |