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

get_x_covar

Get X chromosome covariates


Description

Get the matrix of covariates to be used for the null hypothesis when performing QTL analysis with the X chromosome.

Usage

get_x_covar(cross)

Arguments

cross

Object of class "cross2". For details, see the R/qtl2 developer guide.

Details

For most crosses, the result is either NULL (indicating no additional covariates are needed) or a matrix with a single column containing sex indicators (1 for males and 0 for females).

For an intercross, we also consider cross direction. There are four cases: (1) All male or all female but just one direction: no covariate; (2) All female but both directions: covariate indicating cross direction; (3) Both sexes, one direction: covariate indicating sex; (4) Both sexes, both directions: a covariate indicating sex and a covariate that is 1 for females from the reverse direction and 0 otherwise.

Value

A matrix of size individuals x no. covariates.

Examples

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

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.