Pedigree likelihood

Share:

Description

Calculates various forms of pedigree likelihoods.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
likelihood(x, ...)

## S3 method for class 'linkdat'
likelihood(x, locus1, locus2=NULL, theta=NULL, startdata=NULL, 
           eliminate=0, logbase=NULL, ...)
           
## S3 method for class 'singleton'
likelihood(x, locus1, logbase=NULL, ...)

## S3 method for class 'list'
likelihood(x, locus1, ...)

likelihood_LINKAGE(x, marker, theta=NULL, afreq=NULL, logbase=NULL, TR.MATR=NULL, 
                   initialCalc=NULL, singleNum.geno=NULL)

Arguments

x

a linkdat object, a singleton object, or a list of such objects. In likelihood_LINKAGE, x must be a linkdat object, with x$model different from NULL.

locus1

a marker object compatible with x. If x is a list, then locus1 must be a list of corresponding marker objects.

locus2

either NULL, the character "disease", or a marker object compatible with x. See Details.

theta

the recombination rate between locus1 and locus2 (in likelihood_LINKAGE: between the marker and the disease locus). To make biological sense theta should be between 0 and 0.5.

eliminate

mostly for internal use: a non-negative integer indicating the number of iterations in the internal genotype-compatibility algorithm. Positive values can save time if partialmarker is non-empty and the number of alleles is large.

logbase

a numeric, or NULL. If numeric the log-likelihood is returned, with logbase as basis for the logarithm.

marker

an integer between 0 and x$nMark, indicating which marker to use in the calculation.

afreq

a numeric containing the marker allele frequencies.

startdata

for internal use.

TR.MATR, initialCalc, singleNum.geno

for internal use, speeding up linkage computations with few-allelic markers.

...

further arguments. Not used.

Details

All likelihoods are calculated using the Elston-Stewart algorithm.

If locus2 = NULL, the result is simply the likelihood of the genotypes observed at the marker in locus1.

If locus2 = "disease", the result is the likelihood of the marker genotypes in locus1, given the affection statuses of the pedigree members, the disease model and the recombination rate theta between the marker and disease loci. The main use of this is for computation of LOD scores in parametric linkage analysis.

If locus2 is a marker object, the result is the likelihood of the genotypes at the two markers, given the recombination rate theta between them.

The function likelihood_LINKAGE is a fast version of likelihood.linkdat in the case where locus2 = "disease" and the marker in locus1 has less than 5 alleles.

Value

The likelihood of the data. If the parameter logbase is a positive number, the output is log(likelihood, logbase).

Author(s)

Magnus Dehli Vigeland

See Also

lod

Examples

1
2
3
4
5
6
7
8
x = linkdat(toyped, model=1) #dominant model

lod1 = likelihood_LINKAGE(x, marker=1, theta=0, logbase=10) - 
       likelihood_LINKAGE(x, marker=1, theta=0.5, logbase=10)
lod2 = lod(x, markers=1, theta=0)

# these should be the same:
stopifnot(identical(lod1, as.numeric(lod2)), round(lod1, 2)==0.3)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.