if (FALSE) { # all(rlang::is_installed(c("RhpcBLASctl", "data.table")))
# \dontshow{
data.table::setDTthreads(2)
RhpcBLASctl::blas_set_num_threads(2)
RhpcBLASctl::omp_set_num_threads(2)
# }
example_gt <- load_example_gt("gen_tbl")
# For a basic global pairwise Fst calculation:
example_gt %>%
group_by(population) %>%
pairwise_pop_fst(method = "Nei87")
# With a pairwise matrix:
example_gt %>%
group_by(population) %>%
pairwise_pop_fst(method = "Nei87", type = "pairwise")
# To calculate Fst by locus:
example_gt %>%
group_by(population) %>%
pairwise_pop_fst(method = "Hudson", by_locus = TRUE)
}
Run the code above in your browser using DataLab