Title: | Multi-Gene Descent Probabilities |
---|---|
Description: | Do multi-gene descent probabilities (Thompson, 1983, <doi:10.1098/rspb.1983.0072>) and special cases thereof (Thompson, 1986, <doi:10.1002/zoo.1430050210>) including inbreeding and kinship coefficients. But does much more: probabilities of any set of genes descending from any other set of genes. |
Authors: | Charles J. Geyer <[email protected]> and Elizabeth A. Thompson <[email protected]> |
Maintainer: | Charles J. Geyer <[email protected]> |
License: | GPL (>= 2) |
Version: | 0.3 |
Built: | 2025-03-06 03:47:34 UTC |
Source: | https://github.com/cran/sped |
Pedigree of Asian wild horse (also called Mongolian wild horse) Equus przewalskii individuals living in Alberta, Canada in 1988.
data(alberta)
data(alberta)
A matrix with 69 rows giving (individual, father, mother) triplets.
The column labels are ind
, pa
, and ma
.
The names (which are numbers) are studbook numbers.
There are 82 individuals in this pedigree in all.
There are founders.
library(sped) data(alberta) head(alberta)
library(sped) data(alberta) head(alberta)
Calculate probabilities that genes randomly chosen from some set of individuals are descended from some specified set of genes.
descent(individuals, pedigree, geneset, check.sex=FALSE)
descent(individuals, pedigree, geneset, check.sex=FALSE)
individuals |
an atomic vector of names of individuals. Must be of type integer or character. |
pedigree |
a matrix with three columns. Each row contains the name of an individual and its father and mother, in that order. Must be the same type as the preceding argument. |
geneset |
an integer vector having names that are contained in the preceding argument. Allowed values are 0, 1, or 2, but zero values may be omitted. |
check.sex |
If |
We work relative to the pedigree defined by argument pedigree
in
which every individual has either two parents or none specified. Those with
none specified are called founders. Any ancestors of founders
are assumed to not be individuals in the pedigree, that is, we are assuming
all unknown individuals are different from all known individuals.
Thompson (1983) defines multigene descent probabilities
to be the probability that genes at one autosomal locus randomly chosen
from each of the individuals
, ...,
are all descended
from genes (not necessarily the same gene) in some set
of genes in
individuals in the pedigree. The individuals need not be distinct (there
can be repeats). The individuals are specified by argument
individuals
.
The gene set is specified by argument
geneset
.
the calculated probability.
Geyer, C.~J. (1988) Software for calculating gene survival and multigene descent probabilities and for pedigree manipulation and drawing. Technical Report No. 153, Department of Statistics, University of Washington. https://stat.uw.edu/sites/default/files/files/reports/1988/tr153.pdf.
Thompson, E. A. (1983) Gene extinction and allelic origins in complex genealogies (with discussion). Proceedings of the Royal Society of London. Series B, Biological Sciences, 219, 241–251. doi:10.1098/rspb.1983.0072.
Thompson, E. A. (1986) Ancestry of alleles and extinction of genes in populations with defined pedigrees. Zoo Biology, 5, 161–170. doi:10.1002/zoo.1430050210.
# In alberta pedigree, probability that one gene picked at random # from individual 1260 is descended from one gene in founder 52. library(sped) data(alberta) descent(1260, alberta, c("52"=1))
# In alberta pedigree, probability that one gene picked at random # from individual 1260 is descended from one gene in founder 52. library(sped) data(alberta) descent(1260, alberta, c("52"=1))
Calculate particular multigene descent probabilities of particular interest.
alphas(individuals, pedigree) betas(individuals, pedigree) gammas(individuals, pedigree) inbreeding(individuals, pedigree)
alphas(individuals, pedigree) betas(individuals, pedigree) gammas(individuals, pedigree) inbreeding(individuals, pedigree)
individuals |
an atomic vector of names of individuals. Must be of type integer or character. |
pedigree |
a matrix with three columns. Each row contains the name of an individual and its father and mother, in that order. Must be the same type as the preceding argument. |
We work relative to the pedigree defined by argument pedigree
in
which every individual has either two parents or none specified. Those with
none specified are called founders. Any ancestors of founders
are assumed to not be individuals in the pedigree, that is, we are assuming
all unknown individuals are different from all known individuals.
A matrix whose rows are probabilities relating to particular founders and whose columns are probabilities relating to particular individuals. The row and column labels say which founders and which individuals.
R function gammas
gives the probability that a gene chosen at random
from the individual comes from either gene of the founder.
R function betas
gives the probability that both genes
from the individual comes from the genes (not necessarily the same gene)
of the founder.
R function alphas
gives inbreeding of the individual relative
to the founder: the probability that both genes
from the individual comes from the same gene (either gene) of the founder.
R function inbreeding
gives inbreeding coefficients of the individuals.
R function kinship
returns a matrix whose entries are the kinship
coefficients of the individuals.
Geyer, C.~J. (1988) Software for calculating gene survival and multigene descent probabilities and for pedigree manipulation and drawing. Technical Report No. 153, Department of Statistics, University of Washington. https://stat.uw.edu/sites/default/files/files/reports/1988/tr153.pdf.
Thompson, E. A. (1983) Gene extinction and allelic origins in complex genealogies (with discussion). Proceedings of the Royal Society of London. Series B, Biological Sciences, 219, 241–251. doi:10.1098/rspb.1983.0072.
Thompson, E. A. (1986) Ancestry of alleles and extinction of genes in populations with defined pedigrees. Zoo Biology, 5, 161–170. doi:10.1002/zoo.1430050210.
# In alberta pedigree, probability that one gene picked at random # from individual 1260 is descended from one gene in founder 52. library(sped) data(alberta) gammas(c(1260, 1272), alberta) data(thompson) betas(c("U", "V", "Q", "R", "W"), thompson) alphas(c("U", "V", "Q", "R", "W"), thompson) inbreeding(c("U", "V", "Q", "R", "W"), thompson) kinship(c("U", "V", "Q", "R", "W"), thompson)
# In alberta pedigree, probability that one gene picked at random # from individual 1260 is descended from one gene in founder 52. library(sped) data(alberta) gammas(c(1260, 1272), alberta) data(thompson) betas(c("U", "V", "Q", "R", "W"), thompson) alphas(c("U", "V", "Q", "R", "W"), thompson) inbreeding(c("U", "V", "Q", "R", "W"), thompson) kinship(c("U", "V", "Q", "R", "W"), thompson)
Pedigree of Example data from Thompson (1986).
data(thompson)
data(thompson)
A matrix with 15 rows giving (individual, father, mother) triplets.
The column labels are ind
, pa
, and ma
.
The names are letters of the alphabet.
There are 21 individuals in this pedigree in all.
There are founders.
Thompson, E. A. (1986) Ancestry of alleles and extinction of genes in populations with defined pedigrees. Zoo Biology, 5, 161–170. doi:10.1002/zoo.1430050210.
library(sped) data(thompson) head(thompson)
library(sped) data(thompson) head(thompson)