Learn R Programming

nadiv (version 2.11)

makeS: Creates the additive genetic relationship matrix for the sex chromosomes

Description

This is a preliminary function and may still contain some errors. The function returns the inverse of the additive relationship matrix in sparse matrix format for the sex chromosomes (i.e., either X or Z).

Usage

makeS(pedigree, heterogametic = "0", DosageComp = c(NULL, "ndc", "hoin"), returnS = FALSE)

Arguments

pedigree
A pedigree where the columns are ordered ID, Dam, Sire, Sex
heterogametic
Character indicating the label corresponding to the heterogametic sex used in the "Sex" column
DosageComp
A character indicating whether a model of no dosage compensation ("ndc") or homozygous inactivation ("hoin") should be used. The former ("ndc") follows the algorithm presented in Fernando and Grossman (1990) and has been validated. However, the latter (
returnS
Logical statement, indicating if the relationship matrix should be constructed in addition to the inverse

Value

  • modelthe model of sex-chromosome dosage compensation assumed.
  • Sthe sex-chromosome relationship matrix in sparse matrix form or NULL if returnS = FALSE
  • Sinvthe inverse of the S matrix in sparse matrix form
  • listSinvthe three column form of the non-zero elements for the inverse of the S matrix

Details

Missing parents (e.g., base population) should be denoted by either 'NA', '0', or '*'.

The inverse of the sex-chromosome additive genetic relationship matrix (S-matrix) is constructed according to the algorithm presented in Fernando & Grossman (1990). Additionally, the S-matrix itself can be constructed (although this takes much longer than computing S-inverse directly).

The algorithm in Fernando & Grossman (1990) does not account for any form of sex chromosome dosage compensation mechanism. I have implemented one model, random X-inactivation (i.e., lyonization), in an attempt for more congruence with the biology of many organisms (e.g., eutherian mammals). This second model of random inactivation in the homozygous sex is still preliminary and has yet to be properly peer reviewed.

References

Fernando, R.L. & Grossman, M. 1990. Genetic evaluation with autosomal and X-chromosomal inheritance. Theoretical and Applied Genetics, 80:75-80.

Examples

Run this code
makeS(FG90, heterogametic = "0", returnS = TRUE)

Run the code above in your browser using DataLab