trans_polygenic {clipp} | R Documentation |
The transmission matrix for the hypergeometric polygenic model
Description
A function to calculate the transmission matrix for the hypergeometric polygenic model of (Cannings et al., 1978), see also Section 8.9 of (Lange, 2002) for a nice description of this model.
Usage
trans_polygenic(n_loci, annotate = FALSE)
Arguments
n_loci |
A positive integer, interpreted as the number of biallelic
genetic loci that contribute to the polygene. The polygene will have
|
annotate |
A logical flag. When |
Details
This function calculates the genetic transmission probabilities
(i.e. the conditional probability of a person's genotype, given his
or her biological parents' genotypes) for the hypergeometric polygenic model,
which is described in geno_freq_polygenic
.
When annotate
is FALSE
,
a matrix of transmission probabilities is returned, with rows
corresponding to the possible joint parental genotypes and columns
corresponding to the possible offspring genotypes.
Setting annotate
to TRUE
shows which rows and columns correspond to
which genotypes, by adding offspring genotypes as column names and adding
columns gm
and gf
containing (respectively) the mother's and father's
genotypes. Note that if the output of this function is to be used as the trans
argument of pedigree_loglikelihood
then the annotate
option
must be set to FALSE
.
Value
Either a matrix of genetic transmission probabilities suitable to be
used as the trans
argument of pedigree_loglikelihood
(if annotate
is FALSE
), or a data frame that is an annotated version of
this matrix (if annotate
is TRUE
).
References
Cannings C, Thompson E, Skolnick M. Probability functions on complex pedigrees. Advances in Applied Probability, 1978;10(1):26-61.
Lange K. Mathematical and Statistical Methods for Genetic Analysis (second edition). Springer, New York. 2002.
Examples
trans_polygenic(4, annotate = TRUE)
apply(trans_polygenic(4), 1, sum)