View source: R/pairwise_king.R
pairwise_king | R Documentation |
gen_tibble
objectThis function computes the KING-robust estimator of kinship.
pairwise_king(
x,
as_matrix = FALSE,
block_size = bigstatsr::block_size(nrow(x))
)
x |
a |
as_matrix |
boolean, determining whether the results should be a square symmetrical matrix (TRUE), or a tidied tibble (FALSE, the default) |
block_size |
maximum number of loci read at once. More loci should improve speed, but will tax memory. |
Note that monomorphic sites are currently considered. Remove monomorphic sites before running pairwise_king if this is a concern.
a square symmetrical matrix of relationship coefficients between
individuals if as_matrix
is TRUE, or a tidied tibble of coefficients if
as_matrix
is FALSE.
example_gt <- load_example_gt("gen_tbl")
# Compute the KING-robust matrix
pairwise_king(example_gt, as_matrix = TRUE)
# Or return a tidy tibble
pairwise_king(example_gt, as_matrix = FALSE)
# Adjust block_size
pairwise_king(example_gt, block_size = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.