set.K: Set covariance matrix for polygenic effect

View source: R/set.K.R

set.KR Documentation

Set covariance matrix for polygenic effect

Description

Set covariance matrix for polygenic effect

Usage

set.K(data, K = NULL, n.core = 1, LOCO = NULL)

Arguments

data

Output from read.GWASpoly

K

Optional: user-supplied matrix

n.core

Number of cores for parallel computing

LOCO

TRUE/FALSE, whether to use leave-one-chromosome-out

Details

When LOCO = TRUE, K is computed for each chromosome as $K=MM'$, where M is the centered genotype matrix (lines x markers), and scaled to have unit diagonal (the overall scaling is not important for GWAS). When LOCO = FALSE, a single K matrix is computed for all markers (this was the original behavior of the function). Alternatively, the user can supply their own positive semidefinite K, with row.names that match the genotype identifiers (this option cannot be used with LOCO).

Value

Variable of class GWASpoly.K


jendelman/GWASpoly documentation built on Oct. 16, 2024, 5:59 a.m.