Sequence::FST Class Reference
[Analysis of molecular population genetic data]

analysis of population structure using $F_{ST}$ More...

#include <Sequence/FST.hpp>

List of all members.

Public Member Functions

 FST (const PolyTable *data, unsigned npop, const unsigned *config=NULL, const double *weights=NULL, bool haveOutgroup=false, unsigned outgroup=0) throw (SeqException)
double HSM (void) const
double Slatkin (void) const
double HBK (void) const
double piB (void) const
double piT (void) const
double piS (void) const
double piD (void) const
std::set< double > shared (unsigned pop1, unsigned pop2) const
std::set< double > fixed (unsigned pop1, unsigned pop2) const
std::pair< std::set< double >
, std::set< double > > 
Private (unsigned pop1, unsigned pop2) const

Detailed Description

analysis of population structure using $F_{ST}$

Definition at line 39 of file FST.hpp.


Constructor & Destructor Documentation

Sequence::FST::FST ( const PolyTable data,
unsigned  npop,
const unsigned *  config = NULL,
const double *  weights = NULL,
bool  haveOutgroup = false,
unsigned  outgroup = 0 
) throw (SeqException) [explicit]
Parameters:
data a Sequence::PolyTable with the data for all populations
npop the number of populations
config a list of sample sizes. the number of elements in config must equal npop, otherwise a segfault may occur. An exception is thrown if the sum of the elements in config does not equal data->size().
Note:
If haveOutgroup is true, then the sum of the elements in config must be 1 less than the size of data (i.e. it should sum to the size of the polymorphism sample only!).
Parameters:
weights a list of weights to assign to each population. If NULL, all pops are weighted equally. The number of elements in weights must be >= npop. Also, the sum of the elements in the range &weights[0] to &weights[npop] must be 1, else an exception will be thrown.
haveOutgroup false if no outgroup sequence is present, set to true otherwise. Please note that it is rather unwise to have an outgroup tested when doing a permutation test of Fst, since the index of the outgroup will likely get scrambled and not correspond to outgroup.
outgroup if haveOutgroup is true, outgroup is the index of the outgroup in data

Definition at line 159 of file FST.cc.


Member Function Documentation

std::set< double > Sequence::FST::fixed ( unsigned  pop1,
unsigned  pop2 
) const
Returns:
an object of type std::set<double> representing the positions of sites at which fixed differences occur and a list of positions at which fixed differences occur
Parameters:
pop1 a population index
pop2 a population index

Definition at line 313 of file FST.cc.

double Sequence::FST::HBK ( void   )  const
Returns:

\[F_{ST}= 1 - \frac{\pi_S}{\pi_T} , \]

which is the definition of $F_{ST}$ according to Hudson, Boos, and Kaplan (1992) A statistical test for detecting geographic subdivision. Mol. Biol. Evol. 9:138-151

Definition at line 417 of file FST.cc.

double Sequence::FST::HSM ( void   )  const
Returns:

\[F_{ST}=\frac{\pi_{D}}{\pi_S + \pi_D},\]

which is the definition of $F_{ST}$ according to Hudson, Slatkin and Maddison (1992) Estimation of levels of gene flow from population data. Genetics 132:583-589

Definition at line 393 of file FST.cc.

double Sequence::FST::piB ( void   )  const
Returns:

\[\pi_B= \frac{\sum_{i<j}w_i w_j \pi_{ij}}{\sum_{i<j}w_i w_j}, \]

which is the mean parwise divergence between 2 alleles drawn from 2 populations

Definition at line 430 of file FST.cc.

double Sequence::FST::piD ( void   )  const
Returns:

\[ \pi_D = \frac{\pi_T - \pi_S}{2 \sum_{i<j}w_i w_j}, \]

which is a measure of between-population divergence that is proportional to $t_1 - t_0,$ where $t_1$ is the mean time to coalescence for 2 alleles drawn from different populations, and $t_o$ is the mean time to coalescence for 2 alleles drawn from the same population

Definition at line 463 of file FST.cc.

double Sequence::FST::piS ( void   )  const
Returns:

\[\pi_S = \frac{\sum_i w_i^2 \pi_{ii}}{\sum_i w_i^2},\]

which is the mean within-population diversity

Definition at line 452 of file FST.cc.

double Sequence::FST::piT ( void   )  const
Returns:

\[\pi_T = \sum_i w_i^2 \pi_{ii} + 2\sum_{i<j}w_i w_j \pi_{ij}, \]

which is the total diversity in the sample

Definition at line 441 of file FST.cc.

std::pair< std::set< double >, std::set< double > > Sequence::FST::Private ( unsigned  pop1,
unsigned  pop2 
) const
Returns:
std::pair containing two objects of type std::set<double> The first member of the pair represents the segregating sites with private mutations in pop1, the second member the sites with private polymorphisms in pop2. Returns a pair of empty sets if pop1 or pop2 are out of range
Parameters:
pop1 a population index
pop2 a population index

Definition at line 346 of file FST.cc.

std::set< double > Sequence::FST::shared ( unsigned  pop1,
unsigned  pop2 
) const
Returns:
an object of type std::set<double> representing the positions where shared polymorphisms are inferred
Parameters:
pop1 a population index
pop2 a population index

Definition at line 276 of file FST.cc.

double Sequence::FST::Slatkin ( void   )  const
Returns:

\[F_{ST}=\frac{\pi_D}{2\pi_S + \pi_D},\]

which is the definition of $F_{ST}$ according to Slatkin (1993) Isolation by distance in equilibrium and non-equilibrium populations. Evolution 47: 264-279

Definition at line 405 of file FST.cc.


The documentation for this class was generated from the following files:
Generated on Thu Aug 11 13:22:01 2011 for libsequence by  doxygen 1.6.3