Learn R Programming

FinePop (version 1.5.2)

GstN: Nei's Gst.

Description

This function estimates pairwise Gst among subpopulations (Nei 1973) from a GENEPOP data object (Rousset 2008). Missing genotype values in the GENEPOP file ("0000" or "000000") are simply ignored.

Usage

GstN(popdata)

Value

Matrix of estimated pairwise Gst.

Arguments

popdata

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

Author

Reiichiro Nakamichi, Hirohisa Kishino, Shuichi Kitada

References

Nei M (1973) Analysis of Gene Diversity in Subdivided Populations. Proc. Nat. Acad. Sci., 70, 3321-3323.

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

Examples

Run this code
# Example of GENEPOP file
data(jsmackerel)
jsm.ms.genepop.file <- tempfile()
jsm.popname.file <- tempfile()
cat(jsmackerel$MS.genepop, file=jsm.ms.genepop.file, sep="\n")
cat(jsmackerel$popname, file=jsm.popname.file, sep=" ")

# Data load
# Prepare your GENEPOP file and population name file in the working directory
# Replace "jsm.ms.genepop.file" and "jsm.popname.file" by your file names.
popdata <- read.genepop(genepop=jsm.ms.genepop.file, popname=jsm.popname.file)

# Gst estimation
result.gstN <- GstN(popdata)
print(as.dist(result.gstN))

Run the code above in your browser using DataLab