knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
The goal of kimura is to fit Kimura distributions to heteroplasmy data and
test for evidence of selection pressure.
You can install the development version of kimura from GitHub with:
# install.packages("devtools") library("devtools") devtools::install_github("lbozhilova/kimura")
The principal purpose of this package is to perform hypothesis test for the presence of selection pressure in mtDNA heteroplasmy distributions (Wonnapinij et al., 2008). This can be done like so:
library(kimura) # Load some heteroplasmy data h <- c(0.06, 0.08, 0.27, 0.37, 0.40, 0.45, 0.56, 0.61, 0.75, 0.79) # Carry out test for selection test_kimura(h)
There is also some additional functionality for generating data from the Kimura distribution.
# Initialise Kimura parameters p <- 0.6 b <- 0.95 # Probability of allele loss dkimura(0, p, b) # Probability of fixing an allele dkimura(1, p, b) # Kimura(p, d) CDF at 0.1 intervals pkimura(seq(0, 1, 0.1), p, b) # Random number generation rkimura(10, p, b)
Wonnapinij, Passorn, Patrick F. Chinnery, and David C. Samuels. "The distribution of mitochondrial DNA heteroplasmy due to random genetic drift." The American Journal of Human Genetics 83.5 (2008): 582-593.
Kimura, Motoo. "Solution of a process of random genetic drift with a continuous model." Proceedings of the National Academy of Sciences of the United States of America 41.3 (1955): 144.
This package started out as a toy reimplementation of lbozhilova/Kimura-Distribution.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.