thetaWC.pair: Weir and Cockerham's theta adapted for pairwise Fst.

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/thetaWC.pair.R

Description

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.

Usage

1
thetaWC.pair(popdata)

Arguments

popdata

Population data object created by read.genepop function from a GENEPOP file.

Details

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).

Value

Matrix of estimated pairwise Fst by theta with finite sample correction.

Author(s)

Reiichiro Nakamichi, Hirohisa Kishino, Shuichi Kitada

References

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.

See Also

read.genepop

Examples

 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))

Example output

Calculating population 1:2 1:3 1:4 1:5 1:6 1:7 1:8 2:3 2:4 2:5 2:6 2:7 2:8 3:4 3:5 3:6 3:7 3:8 4:5 4:6 4:7 4:8 5:6 5:7 5:8 6:7 6:8 7:8  done.
               OS           HM2            BS           HI1           HI2
HM2  3.919023e-04                                                        
BS   4.449433e-04  1.129259e-03                                          
HI1 -8.061170e-04  6.667548e-04  9.786471e-04                            
HI2  9.938051e-06  2.372445e-04 -5.554017e-05  1.471106e-04              
HAa  1.223697e-02  9.155487e-03  1.200075e-02  1.274030e-02  1.047189e-02
HAb  4.466499e-02  4.878038e-02  4.562866e-02  4.657297e-02  4.957882e-02
HAr  5.803605e-03  3.338822e-03  4.539634e-03  5.304568e-03  3.944313e-03
              HAa           HAb
HM2                            
BS                             
HI1                            
HI2                            
HAa                            
HAb  5.865741e-02              
HAr  9.982593e-03  4.792496e-02

FinePop documentation built on May 22, 2018, 5:07 p.m.