lod: Singlepoint LOD score

View source: R/lod.R

lodR Documentation

Singlepoint LOD score

Description

Calculates the singlepoint log of the odds (LOD) scores of a pedigree for the specified markers, assuming a fixed recombination rate between the disease and each marker locus.

Usage

lod(
  x,
  aff,
  model,
  rho = 0,
  liability = NULL,
  markers = NULL,
  maxOnly = NA,
  loopBreakers = NULL,
  peelOrder = NULL,
  verbose = FALSE
)

Arguments

x

A ped object.

aff

A vector naming the affected pedigree members, or a numeric vector of length pedsize(x) with affection statuses for all pedigree members (2 = affected; 1 = unaffected; 0 = unknown). Alternatively, aff can be a list of vectors, named affected, unaffected and unknown. It suffices to give (any) two of these vectors.

model

A disModel object, typically created with diseaseModel().

rho

A number between 0 and 0.5 (inclusive); the hypothesised recombination ratio between the marker and the disease locus.

liability

NULL (default) or a vector of length pedsize(x) indicating the liability class (a row number of model$penetrances) of each individual.

markers

A vector of marker names or indices referring to markers attached to x. By default all markers are included.

maxOnly

a logical indicating whether only the maximum LOD score should be returned. By default this is always done if the number of markers is 1.

loopBreakers

A vector of ID labels indicating loop breakers. (Only relevant for inbred pedigrees.)

peelOrder

For internal use.

verbose

a logical: verbose output or not.

Details

The LOD score of a marker is defined as

% LOD(ρ) = \log L(ρ)/L(0.5)

where the logarithms are base 10, and L(ρ) denotes the likelihood of the observed marker genotypes given a recombination ratio ρ between the marker and the disease locus.

The likelihoods are computed with the pedprobr package.

Value

If the number of markers is 1, or if maxOnly = TRUE, a single number is returned.

Otherwise a linkres object, which is basically a data frame with columns CHROM, MARKER, MB and LOD.

Author(s)

Magnus Dehli Vigeland

See Also

linkres, merlinLod(), diseaseModel(), lodPeaks()

Examples


x = nuclearPed(2) |>
  addMarker(geno = c("1/2", "1/1", "1/2", "1/2"))

aff = c(2,1,2,2)
model = diseaseModel(model = "AD")

lod(x, aff, model)


paramlink2 documentation built on Feb. 16, 2023, 6:05 p.m.