Calculate FST for the admixed individuals
This function returns the generalized FST of the admixed individuals given their admixture proportion matrix, the coancestry matrix of intermediate subpopulations (or its special cases, see coanc_subpops
parameter below), and optional weights for individuals.
This FST equals the weighted mean of the diagonal of the coancestry matrix (see \link{coanc_admix}
).
Below there are n
individuals and k
intermediate subpopulations.
fst_admix(admix_proportions, coanc_subpops, weights = NULL)
admix_proportions |
The |
coanc_subpops |
Either the |
weights |
Optional length- |
The generalized FST of the admixed individuals
# set desired parameters # number of individuals n_ind <- 1000 # number of intermediate subpopulations k_subpops <- 10 # differentiation of intermediate subpopulations coanc_subpops <- ( 1 : k_subpops ) / k_subpops # construct admixture proportions admix_proportions <- admix_prop_1d_linear(n_ind, k_subpops, sigma = 1) # lastly, calculate Fst!!! (uniform weights in this case) fst_admix(admix_proportions, coanc_subpops)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.