Compute population specific FIS
pop_fis.Rd
This function computes population specific FIS, using either the approach of Nei 1987 (as computed by hierfstat::basic.stats()
) or of Weir and Goudet 2017
(as computed by hierfstat::fis.dosage()
).
Usage
pop_fis(
.x,
method = c("Nei87", "WG17"),
by_locus = FALSE,
include_global = FALSE,
allele_sharing_mat = NULL
)
Arguments
- .x
a grouped
gen_tibble
(as obtained by usingdplyr::group_by()
)- method
one of "Nei87" (based on Nei 1987, eqn 7.41) or "WG17" (for Weir and Goudet 2017) to compute FIS
- by_locus
boolean, determining whether FIS should be returned by locus(TRUE), or as a single genome wide value (FALSE, the default). Note that this is only relevant for "Nei87", as "WG17" always returns a single value.
- include_global
boolean determining whether, besides the population specific estiamtes, a global estimate should be appended. Note that this will return a vector of n populations plus 1 (the global value), or a matrix with n+1 columns if
by_locus=TRUE
.- allele_sharing_mat
optional and only relevant for "WG17", the matrix of Allele Sharing returned by
pairwise_allele_sharing()
withas_matrix=TRUE
. As a number of statistics can be derived from the Allele Sharing matrix, it it sometimes more efficient to pre-compute this matrix.