#include <genesis/population/function/fst_pool_calculator.hpp>
Inherited by FstPoolCalculatorKarlsson, FstPoolCalculatorKofler, and FstPoolCalculatorUnbiased.
Base class to compute FST between two pooled samples, given two instances of SampleCounts.
The class is to be derived from for the actual computation, such as in FstPoolCalculatorKarlsson, FstPoolCalculatorKofler, or FstPoolCalculatorUnbiased, with three virtual methods to override. Then, an instance of such a calculator can be provided to FstPoolProcessor, which processes Variants along a genome, computing FST along the way.
The idea of using classes here instead of simple iterators over Variants, such as VariantInputStream, is that we want to be able to compute FST for many pairs of samples in some input. With input iterators that just read the input files once however, we cannot iterate multiple times over the same input. Hence we would have to keep all Variants in memory to be able to compute FST for multiple pairs - which is not desirable when, e.g., computing FST for the whole genome at once... So instead, we use these classes, which accumulate all needed data along the way, and yield the FST value at the very end when calling get_result().
Definition at line 65 of file fst_pool_calculator.hpp.
Public Member Functions | |
BaseFstPoolCalculator ()=default | |
BaseFstPoolCalculator (BaseFstPoolCalculator &&)=default | |
BaseFstPoolCalculator (BaseFstPoolCalculator const &)=default | |
virtual | ~BaseFstPoolCalculator ()=default |
SampleCountsFilterStats | get_filter_stats () const |
Get the sum of filter statistics of all sample pairs processed here. More... | |
double | get_result () const |
BaseFstPoolCalculator & | operator= (BaseFstPoolCalculator &&)=default |
BaseFstPoolCalculator & | operator= (BaseFstPoolCalculator const &)=default |
void | process (SampleCounts const &p1, SampleCounts const &p2) |
void | reset () |
Protected Member Functions | |
virtual double | get_result_ () const =0 |
virtual void | process_ (SampleCounts const &p1, SampleCounts const &p2)=0 |
virtual void | reset_ ()=0 |
|
default |
|
virtualdefault |
|
default |
|
default |
|
inline |
Get the sum of filter statistics of all sample pairs processed here.
With each call to process(), the filter stats are increased according to the filter status of both provided samples. Hence, the counts returned here always have an even sum.
Definition at line 129 of file fst_pool_calculator.hpp.
|
inline |
Definition at line 118 of file fst_pool_calculator.hpp.
|
protectedpure virtual |
|
default |
|
default |
|
inline |
Definition at line 92 of file fst_pool_calculator.hpp.
|
protectedpure virtual |
|
inline |
Definition at line 86 of file fst_pool_calculator.hpp.
|
protectedpure virtual |