kinship: Calculate the kinship matrix

Description Usage Arguments Details Value Examples

View source: R/kinship.R

Description

This function produces a realized relationship matrix (kinship matrix) for use in adjusting for the effect of inbred relatedness. We use the R/qtl2 function calc_kinship.

Usage

1
2
3
4
5
6
7
kinship(
  data_obj,
  geno_obj,
  type = c("overall"),
  n_cores = 4,
  pop = c("MPP", "2PP", "RIL")
)

Arguments

data_obj

a Cape object

geno_obj

a genotype object

type

type of kinship correction. Default is overall.

n_cores

The number of cores. Defaults to 4.

pop

population type, "MPP" (multi-parental population), "2PP" (2 parents), "RIL" (recombinant inbred line)

Details

Broman KW, Gatti DM, Simecek P, Furlotte NA, Prins P, Sen Ś, Yandell BS, Churchill GA (2018) R/qtl2: software for mapping quantitative trait loci with high-dimensional data and multi-parent populations. Genetics 211:495-502 doi:10.1534/genetics.118.301595

This uses the function probs_doqtl_to_qtl2 from qtl2convert: Karl W Broman (2019). qtl2convert: Convert Data among R/qtl2, R/qtl, and DOQTL. https://kbroman.org/qtl2/, https://github.com/rqtl/qtl2convert/. And genoprob_to_alleleprob from qtl2.

Value

This function returns an n by n matrix, where n is the number of individuals in the test population. The entries of the matrix represent the level of relatedness between pairs of individuals. For more information see Kang, H. M. et al. Efficient control of population structure in model organism association mapping. Genetics 178, 1709–1723 (2008).

Examples

1
2
3
4
## Not run: 
K <- kinship(data_obj, geno_obj)

## End(Not run)

cape documentation built on Feb. 10, 2021, 5:06 p.m.