Title: | Segregation Analysis for Variant Interpretation |
---|---|
Description: | An implementation of the full-likelihood Bayes factor (FLB) for evaluating segregation evidence in clinical medical genetics. The method was introduced by Thompson et al. (2003) <doi:10.1086/378100>. This implementation supports custom penetrance values and liability classes, and allows visualisations and robustness analysis as presented in Ratajska et al. (2023) <doi:10.1002/mgg3.2107>. See also the online app 'shinyseg', <https://chrcarrizosa.shinyapps.io/shinyseg>, which offers interactive segregation analysis with many additional features (Carrizosa et al. (2024) <doi:10.1093/bioinformatics/btae201>). |
Authors: | Magnus Dehli Vigeland [aut, cre] , Christian Carrizosa [aut] |
Maintainer: | Magnus Dehli Vigeland <[email protected]> |
License: | GPL-3 |
Version: | 0.4.0 |
Built: | 2024-10-26 04:41:05 UTC |
Source: | https://github.com/magnusdv/segregatr |
Computes the Bayes factor for co-segregation, as originally described by Thompson et al. (2003).
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, ... )
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, ... )
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 |
A positive number, the FLB score. If details = TRUE
, a list
including intermediate results.
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.
### 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)
### 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)
Plots a pedigree showing the segregation of a variant.
plotSegregation( x, affected = NULL, unknown = NULL, proband = NULL, carriers = NULL, homozygous = NULL, noncarriers = NULL, cex = 1, margins = 1, pos.geno = "bottom", pos.arrow = "bottomleft", ... )
plotSegregation( x, affected = NULL, unknown = NULL, proband = NULL, carriers = NULL, homozygous = NULL, noncarriers = NULL, cex = 1, margins = 1, pos.geno = "bottom", pos.arrow = "bottomleft", ... )
x |
A |
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
|
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. |
cex , margins
|
Arguments passed on to |
pos.geno |
Position of genotype labels relative to pedigree symbols; either "bottom" (default), "topleft" or "topright". |
pos.arrow |
Position of the proband arrow; either "bottomleft", "bottomright", "topleft" or "topright". |
... |
Optional plot parameters passed on to |
x = nuclearPed(2) plotSegregation(x, proband = 3, carriers = 3:4, noncarriers = 1, aff = 3:4, unknown = 1:2) # Same with various options plotSegregation(x, proband = 3, carriers = 3:4, noncarriers = 1, aff = 3:4, unknown = 1:2, pos.geno = "topright", pos.arrow = "topleft", labs = NULL, title = "Family 1", cex.main = 1.5) # Recessive example y = cousinPed(1, child = TRUE) plotSegregation(y, affected = 9, unknown = 1:6, carrier = 7:8, homozygous = 9, noncarriers = c(4,6), proband = 9) # Different symbol placements plotSegregation(y, affected = 9, unknown = 1:6, carrier = 7:8, homozygous = 9, noncarriers = c(4,6), proband = 9, pos.geno = "topleft", pos.arrow = "bottomright") # Incest case y = nuclearPed() |> addChildren(father = 3, mother = 2, nch = 3) plotSegregation(y, proband = 4, aff = 4:6, unknown = 2, carrier = 4:6, deceased = 1, pos.geno = "topleft", pos.arrow = "bottomright")
x = nuclearPed(2) plotSegregation(x, proband = 3, carriers = 3:4, noncarriers = 1, aff = 3:4, unknown = 1:2) # Same with various options plotSegregation(x, proband = 3, carriers = 3:4, noncarriers = 1, aff = 3:4, unknown = 1:2, pos.geno = "topright", pos.arrow = "topleft", labs = NULL, title = "Family 1", cex.main = 1.5) # Recessive example y = cousinPed(1, child = TRUE) plotSegregation(y, affected = 9, unknown = 1:6, carrier = 7:8, homozygous = 9, noncarriers = c(4,6), proband = 9) # Different symbol placements plotSegregation(y, affected = 9, unknown = 1:6, carrier = 7:8, homozygous = 9, noncarriers = c(4,6), proband = 9, pos.geno = "topleft", pos.arrow = "bottomright") # Incest case y = nuclearPed() |> addChildren(father = 3, mother = 2, nch = 3) plotSegregation(y, proband = 4, aff = 4:6, unknown = 2, carrier = 4:6, deceased = 1, pos.geno = "topleft", pos.arrow = "bottomright")