LRmut: Pairwise LR with mutation

View source: R/LRmut.R

LRmutR Documentation

Pairwise LR with mutation

Description

Reversibility is assumed for the mutation model and the LR is calculated for a pair of non-inbred individuals comparing a kappa to unrelated.

Usage

LRmut(g1, g2, n, p, M, kappa, alpha, theta = 0, K = 0)

Arguments

g1

Genotype, two integers giving the alleles for individual 1.

g2

Genotype, two integers giving the alleles for individual 2.

n

Integer vector of length 4 giving the distance between paternal-paternal, paternal-maternal, maternal-paternal and maternal-maternal alleles.

p

Vector of real numbers. Allele frequency vector.

M

Matrix of real numbers. Mutation matrix.

kappa

Vector of real numbers describing relationship. IBD parameters for 0,1,2 IBD alleles.

alpha

Four probabilities, summing to 1, giving the probability, in case IBD=1, that the alleles are paternal-paternal, paternal-maternal, maternal-paternal, and maternal-maternal.

theta

Real in '[0,1]'. Kinship coefficient.

K

Real. Proportionality factor in proportional model

Value

LR.

Author(s)

Thore Egeland <Thore.Egeland@nmbu.no>

References

Egeland, Pinto and Amorim, FSI:Genetics (2017), \Sexpr[results=rd]{tools:::Rd_expr_doi("http://dx.doi.org/10.1016/j.fsigen.2017.04.018")}.

Examples


# Parent offspring relationship LR
library(pedmut)
g1 = c(1,1)
g2 = c(2,2)
p = c("1" = 0.2, "2" = 0.8)
p = 1:10/sum(1:10)
names(p) = 1:10
M = mutationMatrix("proportional", afreq = p, rate = 0.003)
n = c(0, 1, 1, 0)
kappa = c(0, 1, 0)
alpha = c(0, 0.5, 0.5, 0)
gamma = mut2::expectedMutationRate(M, p)
K = gamma/(1- sum(p^2))
LR = LRmut(g1, g2, n, p, M, kappa = kappa, alpha, K = NULL)
LR - K # Difference implementation - exact


thoree/mut2 documentation built on May 16, 2023, 7:56 p.m.