This function estimates Fst between population pairs based on Weir and Cockerham's theta (Weir & Cockerham 1984) adapted for pairwise comparison from a GENEPOP data object (Rousset 2008). Missing genotype values in the GENEPOP file ("0000" or "000000") are simply ignored.
Population data object created by read.genepop function from a GENEPOP file.
Weir and Cockerham (1984) derived an unbiased estimator of a coancestry coefficient (theta) based on a random effect model. It expresses the extent of genetic heterogeneity within the population. The second stage common approach is to investigate the detailed pattern of the population structure, based on a measure of genetic difference between pairs of subpopulations (demes). We call this by pairwise Fst. This function follows the formula of Weir and Cockerham's theta with the sample size r = 2. Given the pair, our finite sample correction multiplies a of Weir & Cockerham's theta by (r - 1) / r (equation 2 in p.1359 of Weir & Cockerham 1984).
Matrix of estimated pairwise Fst by theta with finite sample correction.
Reiichiro Nakamichi, Hirohisa Kishino, Shuichi Kitada
Rousset F (2008) Genepop'007: a complete reimplementation of the Genepop software for Windows and Linux. Mol. Ecol. Resources, 8, 103-106.
Weir BS, Cockerham CC (1984) Estimating F-statistics for the analysis of population structure. Evolution, 38, 1358-1370.
1 2 3 4 5 6 7 8 9 10 11 12 13 14
# Example of GENEPOP file data(jsmackerel) cat(jsmackerel$MS.genepop, file="JSM_MS_genepop.txt", sep="\n") cat(jsmackerel$popname, file="JSM_popname.txt", sep=" ") # Data load # Prepare your GENEPOP file and population name file in the working directory # (Here, these files were provided as "JSM_MS_genepop.txt" and "JSM_popname.txt".) popdata <- read.genepop(genepop="JSM_MS_genepop.txt", popname="JSM_popname.txt") # theta estimation result.theta.pair <- thetaWC.pair(popdata) write.csv(result.theta.pair, "result_thetaWCpair.csv", na="") print(as.dist(result.theta.pair))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.