pairwise_fst: compute pairwise Fst using SNPRelate

Description Usage Arguments

View source: R/pairwise_fst.R

Description

This just wraps SNPRelate's function and makes it easy to compute Fst for all pairwise combinations. Returns a tidy data frame.

Usage

1
pairwise_fst(dat012, sample_groups)

Arguments

dat012

An 012 matrix. Missing data should be -1.

sample_groups

this should be a tibble with a column "sample" and another column "group". The Fst calculations are done pairwise between the groups. You probably don't want individuals in sample_groups that are not in the rownames of dat012. If group is NA for any individuals, they get silently tossed out.


eriqande/genoscapeRtools documentation built on Dec. 27, 2021, 8:01 a.m.