get_x_covar {qtl2} | R Documentation |
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 |
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)