Methods dealing with recombination. More...
Functions | |
| double | HudsonsC (const Sequence::PolyTable *data, const bool &haveOutgroup, const unsigned &outgroup) |
|
std::vector< std::vector < double > > | Disequilibrium (const Sequence::PolyTable *data, const bool &haveOutgroup, const unsigned &outgroup, const unsigned &mincount, const double max_distance) |
| bool | Disequilibrium (const Sequence::PolyTable *data, vector< double > &return_values, unsigned *i, unsigned *j, const bool &haveOutgroup, const unsigned &outgroup, const unsigned &mincount, const double max_distance) |
| bool | Disequilibrium (const Sequence::PolyTable *data, std::vector< double > &return_values, unsigned *i, unsigned *j, const bool &haveOutgroup=false, const unsigned &outgroup=0, const unsigned &mincount=1, const double max_distance=std::numeric_limits< double >::max()) |
Variables | |
| const double | PRECISION = FLT_EPSILON |
| const double | CMAX = 10000 |
Methods dealing with recombination.
This namespace exists primarily so that the file Poly.cc (which defines Sequence::Poly) does not get too large. The routines defined in this namespace all have to do with properties of the association between sites. Current methods implemented are:
1.) Recombination::HudsonsC, which calculates Hudson's C, aka 
2.) Recombination::Disequilibrium, which calculated several measures of LD for all pairs of sites, and implements a frequency filter to remove low-frequency variants if desired.
| bool Sequence::Recombination::Disequilibrium | ( | const Sequence::PolyTable * | data, | |
| vector< double > & | return_values, | |||
| unsigned * | i, | |||
| unsigned * | j, | |||
| const bool & | haveOutgroup, | |||
| const unsigned & | outgroup, | |||
| const unsigned & | mincount, | |||
| const double | max_distance | |||
| ) |
More efficient calculation of LD stats
| data | The polymorphism data | |
| return_values | a vector with enough space to store 6 elements | |
| i | a pointer to site i. Should be initialized to 0 on the first call | |
| j | a pointer to site j. Should be initialized to 1 on the first call | |
| haveOutgroup | true if data contains an outgroup, false otherwise | |
| outgroup | the index of the outgroup in data haveOutgroup is true | |
| mincount | the minimum sample frequency to include | |
| max_distance | max distance between markers (on scale in which positions in data are stored) for inclusion |
Definition at line 537 of file Recombination.cc.
| double Sequence::Recombination::HudsonsC | ( | const Sequence::PolyTable * | data, | |
| const bool & | haveOutgroup, | |||
| const unsigned & | outgroup | |||
| ) |
Returns Hudson's (1987) Genetical Research 50:245-250 moment estimator of the population recombination rate. Please note that the properties of this estimator are not ideal, and one should prefer Hudson (2001) Genetics 159: 1805-1817 or McVean et al. (2002) Genetics 160: 1231-1241
| const double Sequence::Recombination::CMAX = 10000 |
The max value that can be taken by
Definition at line 49 of file Recombination.cc.
| const double Sequence::Recombination::PRECISION = FLT_EPSILON |
The degree of numeric precision desired in calculating
FLT_EPSILON from cfloat is used, which has a precision of about 10^-7 on my machine. I tried DBL_EPSILON, but the numerical routines never seemed to finish...
Definition at line 45 of file Recombination.cc.
1.6.3