Last data update: 2014.03.03

R: Estimation of the probability of sharing of a rare variant by...
GeneDropSim.fnR Documentation

Estimation of the probability of sharing of a rare variant by gene dropping in a pedigree

Description

Estimates the probability that all subjects in a set of pedigree members share a rare variant given that it occured in any of them by performing a Monte Carlo simulation of the transmission of the genotypes of the variant from the founders down the pedigree.

Usage

GeneDropSim.fn(trio.list, id, dt.vec, fd.indices, carriers=dt.vec, n = 1e3,
 k = 10, nf = 1)

Arguments

trio.list

a list of trio objects encoding the pedigree structure.

id

a vector of identifiers of the pedigree members.

dt.vec

a vector of identifiers of the subset of pedigree members for which to estimate the sharing probability. Must be a subset of the id vector.

fd.indices

a vector of the indices of the founders of the pedigree.

carriers

optional character vector of subjects carrying the rare variant among all final descendants. If null, all final descendants are assumed to carry the rare variant.

n

minimal number of gene dropping replicates where the rare variant occurs in at least one member of dt.vec.

k

this number times n gives the maximal number of gene dropping replicates.

nf

number of founders introducing the rare variant into the pedigree.

Details

The transmission of the RV down the pedigree from the nf founders introducing it is simulated according to Mendel's laws. The events that the variant was observed in any of the subjects from dt.vec and in all subjects included in carriers are then recorded. The simulation continues until the number of replicates where the RV was observed in any of the subjects from dt.vec reaches n or the number of replicates reaches k n. The RV sharing probability is then estimated as the number of replicates where the RV was observed in all subjects included in carriers over n (or the number of replicates where the RV was observed in any of the subjects when k n replicates are reached).

Value

Estimate of the probability that all subjects in a subset of pedigree members share a rare variant given that it occured in any of them

Author(s)

Samuel G. Younkin <syounkin@stat.wisc.edu> and 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.

See Also

ped2trio, GeneDropSim.allsubsets.fn, GeneDropSimExcessSharing.fn

Examples

data(ped.list)
plot(ped.list[[54]])
trio.obj = ped2trio(ped.list[[54]])
         
GeneDropSim.fn( trio.list = trio.obj$object, id=ped.list[[54]]$id, dt.vec = c("40","47"),
 fd.indices = trio.obj$fd.indices, n = 5e3)

# Result should be very close to exact value
RVsharing(ped.list[[54]])

Results


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/GeneDropSim.fn.Rd_%03d_medium.png", width=480, height=480)
> ### Name: GeneDropSim.fn
> ### Title: Estimation of the probability of sharing of a rare variant by
> ###   gene dropping in a pedigree
> ### Aliases: GeneDropSim.fn
> 
> ### ** Examples
> 
> data(ped.list)
> plot(ped.list[[54]])
> trio.obj = ped2trio(ped.list[[54]])
>          
> GeneDropSim.fn( trio.list = trio.obj$object, id=ped.list[[54]]$id, dt.vec = c("40","47"),
+  fd.indices = trio.obj$fd.indices, n = 5e3)
[1] 0.0292
> 
> # Result should be very close to exact value
> RVsharing(ped.list[[54]])
Probability subjects 40 47 among 40 47 share a rare variant:  0.03225806 
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>