compute$kinship
Compute Sample Kinship Matrix
Description
Estimates the genetic relatedness (kinship) between all pairs of samples in a PolyGeniusData object. It extracts allele dosages for a defined set of variants and calls PLINK’s kinship routine to produce a sample-by-sample kinship coefficient matrix.
Usage
`compute$kinship`(data, variants = NULL)
Arguments
data
|
A |
variants
|
(Optional) Specification of which genetic markers to use when constructing the sample × variant dosage matrix for kinship estimation. You may supply:
If |
Value
Invisibly returns the original data object, with the computed kinship matrix saved to data$obsp[[key]].