hfufs: Calculate Fu's Fs for arbitrary parameters

Description Usage Arguments Details Value References See Also Examples

View source: R/hfufs.R

Description

Returns Fu's Fs statistic.

Usage

1
hfufs(n, k, theta)

Arguments

n

The number of total sequences/individuals

k

The number of unique alleles

theta

The average pairwise nucleotide divergence

Details

Fu's Fs is a population genetics statistic that is useful for detecting loci that are responsible for population expansion, for example. Fu's Fs can be formulated as a calculation that involves Stirling numbers of the first kind. These can get large very quickly and exceed the floating point range for modern genomic data sets.

‘hfufs' calculates Fu’s Fs either directly, if the numbers are small enough, or using a logarithmic estimator for Stirling numbers implemented in the lstirling function.

Value

Fu's Fs

References

Fu, Y.X. (1997) Statistical Tests of Neutrality of Mutations Against Population Growth, Hitchhiking and Background Selection. Genetics 147:915-25

See Also

‘hstrobecks' for a Strobeck’s S calculator and 'lstirling' for the Stirling number estimator

Examples

1
2
3
4
5
n <- 100
k <- 30
theta <- 12.345
hfufs(n, k, theta)
# -0.7374915

swainechen/hfufs documentation built on June 22, 2020, 7:02 a.m.