View source: R/genetic_covariance.R
| fst_from_biallelic | R Documentation |
Estimates pairwise F_{ST} from counts of the derived allele across
biallelic markers using the ratio-of-averages estimator of Bhatia et al.
(2013).
fst_from_biallelic(Y, N)
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 |
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.
A symmetric numeric matrix of pairwise F_{ST} with zero
diagonal.
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")}
cov_from_biallelic, dist_from_biallelic
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.