R: Probability of sharing a rare variant among relatives
RVsharing
R Documentation
Probability of sharing a rare variant among relatives
Description
Computing probability that a rare variant is shared by a set of subjects
in a pedigree using equation (1) of Bureau et al. and a generalization to a subset of subjects.
Usage
RVsharing(data, dad.id, mom.id, carriers)
Arguments
data
a pedigree object or character/numeric vector of
subject IDs.
dad.id
if data is a vector, character or numeric vector of father IDs. Founders' parents should be coded to NA or 0.
mom.id
if data is a vector, character or numeric vector of mother IDs. Founders' parents should be coded to NA or 0.
carriers
optional character or numeric vector of subjects carrying the rare variant. If null, all final descendants are assumed to carry the rare variant.
Details
The function RVsharing computes the probability that all subjects identified as carriers of a rare variant in the vector carriers (or all final
descendants in the pedigree if carriers = NULL) share that rare variant AND the final descendants not included in carriers do not carry it, given that the rare
variant has been detected in any subject in the union of the carriers and the final descendants of the pedigree. A final descendant is defined as a subject without descendant in the pedigree, it it not necessarily in the youngest generation. Multiple mariages can only involve one of the top
founders. Branching individuals (intermediate ancestors) can have only one spouse. Other restrictions remain on the pedigree structure; the function will exit with an error message if such restriction is violated. All final
descendants must share a common ancestor or couple of ancestors, otherwise an erroneous response may be obtained.
The function recursively processes branching individuals (intermediate ancestors) from the lowest one in the pedigree to one who is a top founder, applying the formulas in Bureau et al. to compute the terms of P[C1 = ... = Ck = 1], and P[C1 = ... = Cn = 0], where n is the number of final descendants and k=<n. If carriers enumerates a subset of pedigree members, the function will then compute the probability these carriers share the rare variant AND the final descendants not included in carriers do not carry it based on the above terms. To obtain the probability that a set of pedigree members carry a rare variant given it was seen in any of the set members (ignoring the carrier status of final descendants not in the set), the pedigree must be trimmed of the other final descendants before calling RVsharing. Important note: the affected element of the pedigree object is ignored by RVsharing.
Value
An object of class RVsharingProb
Author(s)
Alexandre Bureau <alexandre.bureau@msp.ulaval.ca>
References
Bureau, A., Younkin, S., Parker, M.M., Bailey-Wilson, J.E., Marazita, M.L., Murray, J.C., Mangold, E., Albacha-Hejazi, H., Beaty, T.H. and Ruczinski, I. (2014) Inferring rare disease risk variants based on exact probabilities of sharing by multiple affected relatives. Bioinformatics, 30(15): 2189-96, doi:10.1093/bioinformatics/btu198.
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(RVsharing)
Welcome to RVsharing version 1.6.0
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/RVsharing/RVsharing.Rd_%03d_medium.png", width=480, height=480)
> ### Name: RVsharing
> ### Title: Probability of sharing a rare variant among relatives
> ### Aliases: RVsharing RVsharing,pedigree,missing,missing,character-method
> ### RVsharing,pedigree,missing,missing,missing-method
> ### RVsharing,character,character,character,character-method
> ### RVsharing,character,character,character,missing-method
> ### RVsharing,numeric,numeric,numeric,numeric-method
> ### RVsharing,numeric,numeric,numeric,missing-method
>
> ### ** Examples
>
> data(ped.list)
> plot(ped.list[[1]])
> RVsharing(ped.list[[1]])
Probability subjects 101 1701 among 101 1701 share a rare variant: 0.03225806
>
>
>
>
>
> dev.off()
null device
1
>