RVsharing(data, dad.id, mom.id, carriers)
pedigree
object or character/numeric vector of
subject IDs.NULL
, all final descendants are assumed to carry the rare variant.RVsharingProb
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
.pedigree, RVsharingProb, GeneDropSim.fn, GeneDropSimExcessSharing.fn
data(ped.list)
plot(ped.list[[1]])
RVsharing(ped.list[[1]])
Run the code above in your browser using DataLab