Fst: Fst Computation

Description Usage Arguments Value Author(s) References Examples

View source: R/Fst.r

Description

Global and by SNP Fst computation for given populations

Usage

1
 Fst( x, pop, beg = 1, end = ncol(x) )

Arguments

x

A bed.matrix

pop

The population vector.

beg

Index of the first SNP used for Fst computation

end

Index of the last SNP used for Fst computation

Value

A List of two.

First element is a data frame giving, for each considered SNP, a, b and c computation elements defined by Weir and Cockerham and Fst.

Second element gives global Fst computed on all considered SNPs.

Author(s)

Claire Dandine-Roulland

References

Weir BS and Cockerham CC, 1984, Estimating F-statistics for the analysis of population structure, Evolution 38(6), 1358-1370

Examples

1
2
3
4
5
6
# load chr2 data set (~10k SNPs in low LD)
x <- set.stats(read.bed.matrix( system.file("extdata", "chr2.bed", package="gaston") ))

# Compute Fst
fst <- Fst(x, x@ped$population)
str(fst)

genostats/gaston.pop documentation built on Jan. 17, 2022, 10:58 a.m.