Compute pairwise population Fst
pairwise_pop_fst.Rd
This function computes pairwise Fst. The following methods are implemented:
'Hudson': Hudson's formulation, as derived in Bhatia et al (2013) for diploids.
'Nei86' : Gst according to Nei (1986), as derived in Bhatia et al (2013) for diploids.
'Nei87' : Fst according to Nei (1987) - this is equivalent to
hierfstat::pairwise.neifst()
, and includes the correction for heterozygosity when computing Ht'WC84' : Weir and Cockerham (1984), as derived in Bhatia et al (2013) for diploids.
Arguments
- .x
a grouped
gen_tibble
(as obtained by usingdplyr::group_by()
)- by_locus
boolean, determining whether Fst should be returned by locus(TRUE), or as a single genome wide value obtained by taking the ratio of the mean numerator and denominator (FALSE, the default).
- method
one of 'Hudson', 'Nei86', 'Nei87', and 'WC84'
- n_cores
number of cores to be used, it defaults to
bigstatsr::nb_cores()
Value
a tibble of genome-wide pairwise Fst values with each pairwise combination as a row if "by_locus=FALSE", else a list including the tibble of genome-wide values as well as a matrix with pairwise Fst by locus with loci as rows and and pairwise combinations as columns.