haldane | R Documentation |
Simple implementations of the classical map functions of Haldane and Kosambi, relating the genetic distance and the recombination rate between two linked loci.
haldane(cM = NULL, rho = NULL)
kosambi(cM = NULL, rho = NULL)
cM |
A numeric vector with genetic distances in centiMorgan, or NULL. |
rho |
A numeric vector with recombination rates, or NULL. |
A numeric of the same length as the input.
cM = 0:200
dat = cbind(Haldane = haldane(cM = cM),
Kosambi = kosambi(cM = cM))
matplot(cM, dat, ylab = "Recombination rate", type = "l")
legend("topleft", legend = colnames(dat), col = 1:2, lty = 1:2)
rho = seq(0, 0.49, length = 50)
dat2 = cbind(Haldane = haldane(rho = rho),
Kosambi = kosambi(rho = rho))
matplot(rho, dat2, xlab = "Recombination rate", ylab = "cM", type = "l")
legend("topleft", legend = colnames(dat), col = 1:2, lty = 1:2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.