| tmx_genotypic_effect | R Documentation |
tmx_genotypic_effect allows you to explore the concept of genotypic effect at a locus. With it,
you can interactively explore the effects of allele frequency, additive variance, and
dominance.
This function lets you explore the simplest two-allele system (B and b), with three possible
genotypes, BB, Bb, and bb.
The point between the two homozygotes is m – the mean effect of the homozygous genotypes.
Parameter a is half the measured phenotypic difference between the homozygotes BB and bb.
It corresponds to the additive effect of each additional B allele, relative to the bb phenotype.
Parameter d is the deviation of the heterozygote Bb phenotype from the homozygote mid-point m.
It corresponds to the non-additive (dominance) effect of the B allele. The heterozygote phenotype
may lie on either side of m and the sign of d will vary accordingly.
Old system from book ed 2:
Adapted from Mather and Jinks, 1977, p. 32). See book issue old-style nomenclature https://github.com/tbates/BGBook/issues/23
u = Frequency of the dominant allele (now = p).
v = Frequency of the recessive allele (now = q).
m = midpoint between the two homozygotes
d = half the difference between the two homozygote (now a)
h = deviation of the heterozygote from m (now = d)
New system:
u and v -> p and q
d and h -> a and d
See BGBook issue 23
tmx_genotypic_effect(p = 0.75, q = (1 - p), a = 0.5, d = 0, m = 0, show = TRUE)
p |
The frequency of the B allele (Default .5) |
q |
The frequency of the b allele (Default 1-p) |
a |
Half the difference between the two homozygote phenotypes (Default .5) |
d |
The deviation of the heterozygote from m (Default 0) |
m |
The value of the midpoint between the homozygotes (Default 0) |
show |
Whether to draw the plot or just return it (Default = TRUE) |
optional plot
Neale, M. C. (2005). Quantitative Genetics. In Encyclopedia of Life Sciences. New York: John Wiley & Sons, Ltd. pdf
Other Teaching and testing Functions:
tmx_is.identified(),
umx
library(umx);
# =========================
# = Pure additivity: d= 0 =
# =========================
tmx_genotypic_effect(p = .5, a = 1, d = 0, m = 0, show = TRUE);
# =============================
# = Complete dominance: a=d=1 =
# =============================
tmx_genotypic_effect(p = .5, q =.5, a = 1, d = 1, m = 0, show = TRUE);
# ===========================
# = Over dominance: a< d =1 =
# ===========================
tmx_genotypic_effect(p = .5, q =.5, a =.5, d = 1, m = 0)
p = tmx_genotypic_effect(p = .5, q = .5, a = 1, d = .5, m = 0, show = TRUE);
# p = p + ggplot2::geom_point()
# p + ggplot2::geom_text(hjust = 0, nudge_x = 0.05, label= "x")
# ggsave(paste0(base, "c03_genotypic_effect_by_gene_dose.pdf"), width = 4.6, height = 4.6)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.