Learn R Programming

ribd (version 1.3.1)

condensedIdentityX: Identity coefficients on X

Description

Computes the X chromosomal condensed identity coefficients of a pairwise relationship.

Usage

condensedIdentityX(x, ids, sparse = NA, verbose = FALSE)

Arguments

x

A pedigree in the form of a pedtools::ped object

ids

A character (or coercible to character) containing ID labels of two or more pedigree members.

sparse

A positive integer, indicating the pedigree size limit for using sparse arrays (as implemented by the slam package) instead of ordinary arrays.

verbose

A logical

Value

If ids has length 2: A vector of length 9, containing the condensed identity coefficients. If any of the individuals are male, certain states are undefined, and the corresponding coefficients are NA. (See Details.)

If ids has length > 2: A data frame with one row for each pair of individuals, and 11 columns. The first two columns contain the ID labels, and columns 3-11 contain the condensed identity coefficients.

Details

The implementation is inspired by Karigl's recursive algorithm (1981) for the autosomal case, modified to account for X-linked inheritance.

The X chromosomal pairwise identity states depend on the sexes of the two individuals. If both are female, the states are the same as in the autosomal case. When males are involved, the two individuals have less than 4 alleles, hence the states differ from the autosomal ones. However, to avoid drawing (and learning) new pictures we re-use the autosomal states by using the following simple rule: Replace any hemizygous male allele with a pair of autozygous alleles. In this way each X state corresponds to a unique autosomal state.

For simplicity the output always contains 9 coefficients, but with NA's in the positions of undefined states (depending on the sex combination). The README file on the GitHub home page of ribd has a table illustrating this.

See Also

kinshipX(), condensedIdentity(), pedtools::founderInbreeding()

Examples

Run this code
# NOT RUN {
x = fullSibMating(1)
x_sisters = swapSex(x, 5)
x_brothers = swapSex(x, 6)

condensedIdentityX(x, ids = 5:6)
condensedIdentityX(x_sisters, ids = 5:6)
condensedIdentityX(x_brothers, ids = 5:6)

# }

Run the code above in your browser using DataLab