snp_king | R Documentation |
This function computes the KING-robust estimator of kinship.
snp_king(
X,
ind.row = bigstatsr::rows_along(X),
ind.col = bigstatsr::cols_along(X),
block.size = bigstatsr::block_size(nrow(X)) * 4
)
X |
a bigstatsr::FBM.code256 matrix (as found in the |
ind.row |
An optional vector of the row indices that are used. If not specified, all rows are used. Don't use negative indices. |
ind.col |
An optional vector of the column indices that are used. If not specified, all columns are used. Don't use negative indices. |
block.size |
maximum number of columns read at once. |
a square symmetrical matrix of relationship coefficients between individuals
example_gt <- load_example_gt("gen_tbl")
X <- attr(example_gt$genotypes, "bigsnp")
snp_king(X$genotypes)
# Compute for individuals 1 to 5
snp_king(X$genotypes, ind.row = 1:5, ind.col = 1:5)
# Adjust block size
snp_king(X$genotypes, block.size = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.