| pop_fst | R Documentation |
This function computes population specific Fst, using the approach in Weir
and Goudet 2017 (as computed by hierfstat::fst.dosage()).
pop_fst(.x, include_global = FALSE, allele_sharing_mat = NULL)
.x |
a grouped |
include_global |
boolean determining whether, besides the population specific Fst, a global Fst should be appended. Note that this will return a vector of n populations plus 1 (the global value) |
allele_sharing_mat |
optional, the matrix of Allele Sharing returned by
|
a vector of population specific Fst (plus the global value if
include_global=TRUE)
Weir, BS and Goudet J (2017) A Unified Characterization of Population Structure and Relatedness. Genetics (2017) 206:2085
hierfstat::fst.dosage()
example_gt <- load_example_gt("grouped_gen_tbl")
# Compute FIS using Nei87
example_gt %>% pop_fst()
# To include the global Fst, set include_global = TRUE
example_gt %>% pop_fst(include_global = TRUE)
# To calculate from a pre-computed allele sharing matrix:
allele_sharing_mat <- pairwise_allele_sharing(example_gt, as_matrix = TRUE)
example_gt %>% pop_fst(allele_sharing_mat = allele_sharing_mat)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.