FLB {segregatr} | R Documentation |
Full-likelihood Bayes factor
Description
Computes the Bayes factor for co-segregation, as originally described by Thompson et al. (2003).
Usage
FLB(
x,
carriers = NULL,
homozygous = NULL,
noncarriers = NULL,
freq = NULL,
affected = NULL,
unknown = NULL,
proband = NULL,
penetrances = NULL,
liability = NULL,
loopBreakers = NULL,
Xchrom = FALSE,
details = FALSE,
plot = FALSE,
...
)
Arguments
x |
A |
carriers |
A character vector (or coercible to such), containing the ID labels of pedigree members known to carry one copy of the variant in question. |
homozygous |
A character vector (or coercible to such), containing the ID labels of pedigree members known to carry two copies of the variant in question. |
noncarriers |
A character vector (or coercible to such), containing the ID labels of pedigree members known not to carry the variant in question. |
freq |
A single number strictly between 0 and 1: the population frequency of the observed allele. |
affected |
The affected pedigree members. |
unknown |
Pedigree members with unknown affection status. |
proband |
The ID label of the proband. This person must also be in both
|
penetrances |
For autosomal models, a numeric vector of length 3 |
liability |
A vector of length |
loopBreakers |
(Relevant only if |
Xchrom |
A logical, indicating if a model of X-linked inheritance should be applied. |
details |
A logical, indicating if detailed output should be returned (for debugging purposes). |
plot |
A logical. |
... |
Optional plot parameters passed on to |
Value
A positive number, the FLB score. If details = TRUE
, a list
including intermediate results.
References
Thompson D, Easton DF, Goldgar DE. A full-likelihood method for the evaluation of causality of sequence variants from family data. Am J Hum Genet, 2003. doi:10.1086/378100.
Examples
### Autosomal dominant
x = nuclearPed(2)
FLB(x, carriers = 3:4, aff = 3:4, unknown = 1:2,
freq = 0.0001, penetrances = c(0, 1, 1), proband = 3)
### Autosomal recessive with phenocopies and reduced penetrance
y = nuclearPed(4)
FLB(y, carriers = 4:5, homozygous = 3, noncarriers = 6,
aff = 3, unknown = 1:2, freq = 0.0001, proband = 3,
penetrances = c(0.01, 0.01, 0.99), plot = TRUE)
### X-linked recessive
z = nuclearPed(3, sex = c(1, 1, 2)) |>
addChildren(mother = 5, nch = 2, sex = 1:2)
FLB(z, carriers = c(3, 7), nonc = 4, aff = c(3, 7), unknown = 1:2,
freq = 0.0001, penetrances = list(male = c(0, 1), female = c(0, 0, 1)),
proband = 7, Xchrom = TRUE, plot = TRUE)