Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

decomp_kinship

Calculate eigen decomposition of kinship matrix


Description

Calculate the eigen decomposition of a kinship matrix, or of a list of such matrices.

Usage

decomp_kinship(kinship, cores = 1)

Arguments

kinship

A square matrix, or a list of square matrices.

cores

Number of CPU cores to use, for parallel calculations. (If 0, use parallel::detectCores().) Alternatively, this can be links to a set of cluster sockets, as produced by parallel::makeCluster().

Details

The result contains an attribute "eigen_decomp".

Value

The eigen values and the transposed eigen vectors, as a list containing a vector values and a matrix vectors.

Examples

iron <- read_cross2(system.file("extdata", "iron.zip", package="qtl2"))

map <- insert_pseudomarkers(iron$gmap, step=1)
probs <- calc_genoprob(iron, map, error_prob=0.002)
K <- calc_kinship(probs)

Ke <- decomp_kinship(K)

qtl2

Quantitative Trait Locus Mapping in Experimental Crosses

v0.24
GPL-3
Authors
Karl W Broman [aut, cre] (<https://orcid.org/0000-0002-4914-6671>), R Core Team [ctb]
Initial release
2020-12-16

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.