kinshipLR: Likelihood ratios for kinship testing

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/kinshipLR.R

Description

This function computes likelihood ratios (LRs) for a list of pedigrees. One of the pedigrees (the last one, by default) is designated as 'reference', to be used in the denominator in all LR calculations. To ensure that all pedigrees use the same data set, one of the pedigrees may be chosen as 'source', from which data is transferred to all the other pedigrees.

Usage

1
2
3
4
5
6
7
8
kinshipLR(
  ...,
  ref = NULL,
  source = NULL,
  markers = NULL,
  linkageMap = NULL,
  verbose = FALSE
)

Arguments

...

Pedigree alternatives. Each argument should be either a single ped object or a list of such. The pedigrees may be named; otherwise they are assigned names "H1", "H2", ... automatically.

It is also possible to pass a single list containing all the pedigrees.

ref

An index or name indicating which of the input pedigrees should be used as "reference pedigree", i.e., used in the denominator of each LR. If NULL (the default), the last pedigree is used as reference.

source

An index or name designating one of the input pedigrees as source for marker data. If given, marker data is transferred from this to all the other pedigrees (replacing any existing markers). The default action (source = NULL) is as follows: If all pedigree have attached markers, no transfers are done. If exactly one of the pedigrees have attached markers, these are transferred to the others. all other cases give an error.

markers

A vector of marker names or indices indicating which markers should be included. If NULL (the default) all markers are used.

linkageMap

Either NULL (default), or a data frame with three columns: chromosome; marker name; centiMorgan position. If given, it signifies to the program that the markers are linked and invokes MERLIN for computing the likelihoods.

verbose

A logical.

Details

By default, all markers are assumed to be unlinked. To accommodate linkage, a genetic map should be supplied with the argument linkageMap. This requires the software MERLIN to be installed.

Value

A LRresult object, which is essentially a list with entries

Author(s)

Magnus Dehli Vigeland and Thore Egeland

See Also

LRpower(), pedprobr::likelihoodMerlin()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# Simulate 5 markers for a pair of full sibs
ids = c("A", "B")
sibs = nuclearPed(children = ids)
sibs = simpleSim(sibs, N = 5, alleles = 1:4, ids = ids, seed = 123)

# Create two alternative hypotheses
halfsibs = relabel(halfSibPed(), old = 4:5, new = ids)
unrel = list(singleton("A"), singleton("B"))

# Compute LRs. By default, the last ped is used as reference
kinshipLR(sibs, halfsibs, unrel)

# Input pedigrees can be named, reflected in the output
kinshipLR(S = sibs, H = halfsibs, U = unrel)

# Select non-default reference (by index or name)
kinshipLR(S = sibs, H = halfsibs, U = unrel, ref = "H")

# Alternative syntax: List input
peds = list(S = sibs, H = halfsibs, U = unrel)
kinshipLR(peds, ref = "H", source = "S", verbose = TRUE)

# Detailed results
res = kinshipLR(peds)
res$LRperMarker
res$likelihoodsPerMarker

forrel documentation built on March 14, 2021, 1:06 a.m.