pcrelateToMatrix | R Documentation |
pcrelateToMatrix
is used to create a genetic relationship matrix (GRM) of pairwise kinship coefficient estimates from the output of pcrelate
.
## S4 method for signature 'pcrelate'
pcrelateToMatrix(pcrelobj, sample.include = NULL, thresh = NULL, scaleKin = 2,
verbose = TRUE)
pcrelobj |
The object containing the output from |
sample.include |
A vector of IDs for samples to be included in the GRM. The default is NULL, which includes all samples in |
thresh |
Kinship threshold for clustering samples to make the output matrix sparse block-diagonal. This thresholding is done after scaling kinship values by |
scaleKin |
Specifies a numeric constant to scale each estimated kinship coefficient by in the GRM. The default value is 2. |
verbose |
Logical indicator of whether updates from the function should be printed to the console; the default is TRUE. |
This function provides a quick and easy way to construct a genetic relationship matrix (GRM) from the output of pcrelate
.
thresh
sets a threhsold for clustering samples such that any pair with an estimated kinship value greater than thresh
is in the same cluster. All pairwise estimates within a cluster are kept, even if they are below thresh
. All pairwise estimates between clusters are set to 0, creating a sparse, block-diagonal matrix. When thresh
is NULL
, no clustering is done and all samples are returned in one block. This feature may be useful for creating a sparse GRM when running association tests with very large sample sizes. Note that thresholding is done after scaling kinship values by scaleKin
.
An object of class 'Matrix
' with pairwise kinship coefficients.
Matthew P. Conomos
Conomos M.P., Reiner A.P., Weir B.S., & Thornton T.A. (2016). Model-free Estimation of Recent Genetic Relatedness. American Journal of Human Genetics, 98(1), 127-148.
pcrelate
for the function that performs PC-Relate.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.