fst_from_biallelic: F_ST from biallelic allele counts

View source: R/genetic_covariance.R

fst_from_biallelicR Documentation

F_ST from biallelic allele counts

Description

Estimates pairwise F_{ST} from counts of the derived allele across biallelic markers using the ratio-of-averages estimator of Bhatia et al. (2013).

Usage

fst_from_biallelic(Y, N)

Arguments

Y

Numeric matrix of derived-allele counts with rows as populations and columns as loci.

N

Numeric matrix of sampled haploid chromosomes with the same dimensions as Y. For diploid data without missing genotypes, N = 2 * n_individuals for each cell.

Details

The estimator computes, for each locus, the squared allele-frequency difference between populations, corrects for within-population heterozygosity, and then forms a ratio of locus-averages (Bhatia et al. 2013). Diagonal entries are set to 0.

The result is not guaranteed to lie in [0, 1] for every pair; small negative values can arise from sampling noise in very similar populations.

To use F_{ST} as the response in terradish, pass the matrix directly to the formula left-hand side with mlpe. This ratio estimator is not a Wishart response and has no Wishart degrees of freedom. Use covariance-derived squared distances for Wishart models.

Value

A symmetric numeric matrix of pairwise F_{ST} with zero diagonal.

References

Bhatia G, Patterson N, Sankararaman S, Price AL. 2013. Estimating and interpreting F_{ST}: the impact of rare variants. Genome Research 23(9):1514-1521. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1101/gr.154831.113")}

See Also

cov_from_biallelic, dist_from_biallelic

Examples

Y <- matrix(c(2, 1, 0,
              1, 1, 1,
              0, 1, 2), nrow = 3, byrow = TRUE)
N <- matrix(2, nrow = 3, ncol = 3)
fst_from_biallelic(Y, N)


landgraph documentation built on Sept. 26, 2026, 1:08 a.m.