EBFST: Empirical Bayes estimator of Fst.

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

Description

This function estimates global/pairwise Fst among subpopulations using empirical Bayes method (Kitada et al. 2007, 2017). Preciseness of estimated pairwise Fst is evaluated by bootstrap method. This function accepts two types of data object, GENEPOP data (Rousset 2008) and allele (haplotype) frequency data (Kitada et al. 2007). Missing genotype values in the GENEPOP file ("0000" or "000000") are simply ignored.

Usage

1
EBFST(popdata, num.iter = 100, locus = F)

Arguments

popdata

Genotype data object of populations created by read.genepop function from a GENEPOP file. Allele (haplotype) frequency data object created by read.frequency function from a frequency format file also is acceptable.

num.iter

A positive integer value specifying the number of iterations in empirical Bayes simulation.

locus

A Logical argument indicating whether locus-specific Fst values should be calculated.

Details

Frequency format file is a plain text file containing allele (haplotype) count data. This format is mainly for mitochondrial DNA (mtDNA) haplotype frequency data, however nuclear DNA (nDNA) data also is applicable. In the data object created by read.frequency function, "number of samples" means haplotype count. Therefore, it equals the number of individuals in mtDNA data, however it is the twice of the number of individuals in nDNA data. First part of the frequency format file is the number of subpopulations, second part is the number of loci, and latter parts are [population x allele] matrices of the observed allele (haplotype) counts at each locus. Two examples of frequency format files are attached in this package. See jsmackerel.

Value

global:

theta

Estimated gene flow rate.

fst

Estimated genome-wide global Fst.

fst.locus

Estimated locus-specific global Fst. (If locus = TRUE)

pairwise:

fst

Estimated genome-wide pairwise Fst.

fst.boot

Bootstrap mean of estimated Fst.

fst.boot.sd

Bootstrap standard deviation of estimated Fst.

fst.locus

Estimated locus-specific pairwise Fst. (If locus = TRUE)

Author(s)

Reiichiro Nakamichi, Hirohisa Kishino, Shuichi Kitada

References

Kitada S, Kitakado T, Kishino H (2007) Empirical Bayes inference of pairwise FST and its distribution in the genome. Genetics, 177, 861-873.

Kitada S, Nakamichi R, Kishino H (2017) The empirical Bayes estimators of fine-scale population structure in high gene flow species. Mol. Ecol. Resources, DOI: 10.1111/1755-0998.12663

Rousset F (2008) Genepop'007: a complete reimplementation of the Genepop software for Windows and Linux. Mol. Ecol. Resources, 8, 103-106.

See Also

read.genepop, read.frequency, as.dist, as.dendrogram, hclust, cmdscale, nj

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# 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")

# Fst estimation
result.eb <- EBFST(popdata)
ebfst <- result.eb$pairwise$fst
write.csv(ebfst, "result_EBFST.csv", na="")
ebfst.d <- as.dist(ebfst)
print(ebfst.d)

# dendrogram
ebfst.hc <- hclust(ebfst.d,method="average")
plot(as.dendrogram(ebfst.hc), xlab="",ylab="",main="", las=1)

# MDS plot
mds <- cmdscale(ebfst.d)
plot(mds, type="n", xlab="",ylab="")
text(mds[,1],mds[,2], popdata$pop_names)

# NJ tree
library(ape)
ebfst.nj <- nj(ebfst.d)
plot(ebfst.nj,type="u",main="",sub="")

Example output

Computing global differenciation with ML method... done.
Computing pairwise differenciation with EB method... pop 1:21:31:41:51:61:71:82:32:42:52:62:72:83:43:53:63:73:84:54:64:74:85:65:75:86:76:87:8done.
Estimating variance of differenciation with BS method... done.
!!! FINISH !!!
             OS         HM2          BS         HI1         HI2         HAa
HM2 0.003540515                                                            
BS  0.003710454 0.003754437                                                
HI1 0.003066905 0.003710273 0.003829935                                    
HI2 0.003270461 0.003275854 0.003097237 0.003418130                        
HAa 0.010227737 0.008254138 0.009868249 0.010215209 0.008648440            
HAb 0.026320224 0.029914392 0.026725822 0.027601175 0.029555371 0.033489915
HAr 0.006563917 0.005373949 0.006123319 0.006259743 0.005902881 0.009186911
            HAb
HM2            
BS             
HI1            
HI2            
HAa            
HAb            
HAr 0.026372131

FinePop documentation built on May 2, 2019, 3:30 p.m.