basic.stats | R Documentation |

Estimates individual counts, allelic frequencies, observed heterozygosities and genetic diversities per locus and population. Also Estimates mean observed heterozygosities, mean gene diversities within population Hs, Gene diversities overall Ht and corrected Htp, and Dst, Dstp. Finally, estimates Fst and Fstp as well as Fis following Nei (1987) per locus and overall loci

basic.stats(data,diploid=TRUE,digits=4) ## S3 method for class 'basic.stats' print(x,...) Hs(data,...) Ho(data,...)

`data` |
a data frame where the first column contains the population to which the different individuals belong, and the following columns contain the genotype of the individuals -one locus per column- |

`diploid` |
Whether individuals are diploids (default) or haploids |

`digits` |
how many digits to print out in the output (default is 4) |

`x` |
an object of class basic.stats |

`...` |
further arguments to pass to print.bas.stats |

`n.ind.samp` |
A table –with np (number of populations) columns and nl (number of loci) rows– of genotype counts |

`pop.freq` |
A list containing allele frequencies. Each element of the list is one locus. For each locus, Populations are in columns and alleles in rows |

`Ho` |
A table –with np (number of populations) columns and nl (number of loci) rows– of observed heterozygosities |

`Hs` |
A table –with np (number of populations) columns and nl (number of loci) rows– of observed gene diversities |

`Fis` |
A table –with np (number of populations) columns and nl (number of loci) rows–of observed Fis |

`perloc` |
A table –with as many rows as loci– containing basic statistics Ho, Hs, Ht, Dst, Ht', Dst', Fst, Fst' ,Fis, Dest |

`overall` |
Basic statistics averaged over loci |

For the perloc and overall tables (see value section), the following statistics, defined in eq.7.38– 7.43 pp.164–5 of Nei (1987) are estimated:

The observed heterozygosity

*Ho= 1-∑_k ∑_i Pkii/np,*

where *Pkii* represents the proportion of homozygote *i* in sample *k* and
*np* the number of samples.

The within population gene diversity (sometimes misleadingly called expected heterozygosity):

*Hs=\tilde{n}/(\tilde{n}-1)[1-∑_i\bar{p_i^2}-Ho/2\tilde{n}],
*

where *\tilde{n}=np/∑_k 1/n_k* and
*\bar{p_i^2}=∑_k p_{ki}^2/np*

The overall gene diversity

*
Ht= 1-∑_i\bar{p_i}^2+Hs/(\tilde{n} np)-Ho/(2\tilde{n}
np),*

where *\bar{p_i}=∑_kp_{ki}/np*.

The amount of gene diversity among samples *Dst=Ht-Hs*

*Dst'=np/(np-1)Dst*

*Ht'=Hs+Dst'*

*Fst=Dst/Ht*.(This is not the same as Nei's *Gst*,
Nei's *Gst* is an estimator of *Fst* based on allele frequencies only)

*Fst'=Dst'/Ht'*

*Fis=1-Ho/Hs*

Last, *Dest=np/(np-1) (Ht'-Hs)/(1-Hs)* a measure of population
differentiation as defined by Jost (2008) is also given

Here, the *p_{ki}* are unweighted by sample size. These statistics are
estimated for each locus and an overall loci estimates is also given, as the
unweighted average of the per locus estimates. In this way, monomorphic loci
are accounted for (with estimated value of 0) in the overall estimates.

Note that the equations used here all rely on genotypic rather than allelic number and are corrected for heterozygosity.

Jerome Goudet jerome.goudet@unil.ch

Nei M. (1987) Molecular Evolutionary Genetics. Columbia University Press

Jost L (2008) GST and its relatives do not measure differentiation. Molecular Ecology, 17, 4015-4026.

Nei M, Chesser R (1983) Estimation of fixation indexes and gene diversities. Annals of Human Genetics, 47, 253-259.

`ind.count`

,`pop.freq`

.

data(gtrunchier) basic.stats(gtrunchier[,-1]) Hs(gtrunchier[,-2]) Ho(gtrunchier[,-2])

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.