likPairsPed: Likelihood for two Possibly Inbred Individuals as a function...

Description Usage Arguments Details Value See Also Examples

View source: R/likPairsPed.R

Description

Likelihood for two Possibly Inbred Individuals as a function of the Condensed 'Jacquard' Coefficients with 'ped' input

Usage

1
likPairsPed(x, ids, Delta, DeltaMatrix)

Arguments

x

'ped' object with markers

ids

A vector oflength two identifying the individuals

Delta

Double vector of length 9 summing to unity

DeltaMatrix

Double 9x9 matrix of two locus identity coefficients

Details

The implementation is based on conditioning on IBD states at two linked loci. Currently, the recombination rate for each pair is assumed to be the same.

Value

The likelihood for the pairs. If there is an odd number of markers, the last marker is omitted for the elements of the list.

See Also

'ribd::condensedIdentity' and 'ribd::twoLocusIdentity'.'

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
x = pedtools::fullSibMating(1)
p = c(0.4, 0.6)
als = 1:length(p)
m1 = pedtools::marker(x, alleles = als, afreq = p, "5" = 1, "6" = 1)
m2 = pedtools::marker(x, alleles = als, afreq = p, "5" = 1:2, "6" = 1)
x = pedtools::setMarkers(x, list(m1, m2))
rho = 0.1
Delta1 = ribd::condensedIdentity(x, c(5, 6))
Delta2 = ribd::twoLocusIdentity(x, c(5, 6), rho)
ids = c(5,6)
l1 = likPairsPed(x, ids, Delta1, Delta2)
l2 = pedprobr::likelihood(x, m1, m2, rho)
abs(l1-l2) < 1e-10

thoree/inbred documentation built on March 28, 2021, 7:42 p.m.