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

#include <mapper.hpp>

Public Member Functions

 FragmentLengthDistribution (size_t maximum_sample_size, size_t reestimation_frequency, double robust_estimation_fraction)
 
 FragmentLengthDistribution (void)
 
 ~FragmentLengthDistribution ()
 
void force_parameters (double mean, double stddev)
 Instead of estimating anything, just use these parameters. More...
 
void register_fragment_length (int64_t length)
 Record an observed fragment length. More...
 
double mean () const
 Robust mean of the distribution observed so far. More...
 
double std_dev () const
 Robust standard deviation of the distribution observed so far. More...
 
bool is_finalized () const
 
size_t max_sample_size () const
 
size_t curr_sample_size () const
 Returns the number of samples that have been collected so far. More...
 
multiset< double >::const_iterator measurements_begin () const
 
multiset< double >::const_iterator measurements_end () const
 

Private Member Functions

void estimate_distribution ()
 

Private Attributes

multiset< double > lengths
 
bool is_fixed = false
 
double robust_estimation_fraction
 
size_t maximum_sample_size
 
size_t reestimation_frequency
 
double mu = 0.0
 
double sigma = 1.0
 

Constructor & Destructor Documentation

◆ FragmentLengthDistribution() [1/2]

vg::FragmentLengthDistribution::FragmentLengthDistribution ( size_t  maximum_sample_size,
size_t  reestimation_frequency,
double  robust_estimation_fraction 
)

Initialize distribution

Args: maximum_sample_size sample size at which reestimation stops reestimation_frequency update running estimate after this many samples robust_estimation_fraction robustly estimate using this fraction of samples

◆ FragmentLengthDistribution() [2/2]

vg::FragmentLengthDistribution::FragmentLengthDistribution ( void  )

◆ ~FragmentLengthDistribution()

vg::FragmentLengthDistribution::~FragmentLengthDistribution ( )

Member Function Documentation

◆ curr_sample_size()

size_t vg::FragmentLengthDistribution::curr_sample_size ( ) const

Returns the number of samples that have been collected so far.

◆ estimate_distribution()

void vg::FragmentLengthDistribution::estimate_distribution ( )
private

◆ force_parameters()

void vg::FragmentLengthDistribution::force_parameters ( double  mean,
double  stddev 
)

Instead of estimating anything, just use these parameters.

◆ is_finalized()

bool vg::FragmentLengthDistribution::is_finalized ( ) const

Returns true if the maximum sample size has been reached, which finalizes the distribution estimate

◆ max_sample_size()

size_t vg::FragmentLengthDistribution::max_sample_size ( ) const

Returns the max sample size up to which the distribution will continue to reestimate parameters

◆ mean()

double vg::FragmentLengthDistribution::mean ( ) const

Robust mean of the distribution observed so far.

◆ measurements_begin()

multiset< double >::const_iterator vg::FragmentLengthDistribution::measurements_begin ( ) const

Begin iterator to the measurements that the distribution has used to estimate the parameters

◆ measurements_end()

multiset< double >::const_iterator vg::FragmentLengthDistribution::measurements_end ( ) const

End iterator to the measurements that the distribution has used to estimate the parameters

◆ register_fragment_length()

void vg::FragmentLengthDistribution::register_fragment_length ( int64_t  length)

Record an observed fragment length.

◆ std_dev()

double vg::FragmentLengthDistribution::std_dev ( ) const

Robust standard deviation of the distribution observed so far.

Member Data Documentation

◆ is_fixed

bool vg::FragmentLengthDistribution::is_fixed = false
private

◆ lengths

multiset<double> vg::FragmentLengthDistribution::lengths
private

◆ maximum_sample_size

size_t vg::FragmentLengthDistribution::maximum_sample_size
private

◆ mu

double vg::FragmentLengthDistribution::mu = 0.0
private

◆ reestimation_frequency

size_t vg::FragmentLengthDistribution::reestimation_frequency
private

◆ robust_estimation_fraction

double vg::FragmentLengthDistribution::robust_estimation_fraction
private

◆ sigma

double vg::FragmentLengthDistribution::sigma = 1.0
private

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