gen_tibble
objectpairwise_ibs.Rd
This function computes the IBS matrix.
pairwise_ibs(
x,
as_matrix = FALSE,
type = c("proportion", "adjusted_counts", "raw_counts"),
block_size = bigstatsr::block_size(count_loci(x))
)
a gen_tibble
object.
boolean, determining whether the results should be a square symmetrical matrix (TRUE), or a tidied tibble (FALSE, the default)
one of "proportion" (equivalent to "ibs" in PLINK), "adjusted_counts" ("distance" in PLINK), and "raw_counts" (the counts of identical alleles and non-missing alleles, from which the two other quantities are computed)
maximum number of loci read at once. More loci should improve speed, but will tax memory.
a bigstatsr::FBM of proportion or adjusted counts, or a list of two bigstatsr::FBM matrices, one of counts of IBS by alleles, and one of number of valid alleles (i.e. 2n_loci - 2missing_loci)
Note that monomorphic sites are currently counted. Should we filter them beforehand? What does plink do?