Last data update: 2014.03.03

R: Probability of sharing of rare variants in a subset of...
get.psubsetR Documentation

Probability of sharing of rare variants in a subset of families

Description

Computing probability of sharing of rare variants in a subset of families where rare variants are seen based on precomputed family-specific rare variant sharing probabilities.

Usage

get.psubset(vec,not,pshare.data)

Arguments

vec

a vector of names of all families where a variant is seen.

not

a vector of names of families where not all affected subjects share the rare variant (RV).

pshare.data

a data frame with at least the two following columns:

  • pshare : vector of RV sharing probabilities;

  • ped.tocompute.vec : vector of names of the families whose sharing probability is contained in pshare. The names in the arguments vec and not must be found in ped.tocompute.vec.

Details

All the subsets of families of size equal or inferior to the lenght of not are created, and the joint probability of each such subset not sharing a rare variant and the remaining families sharing a rare variant is obtained as the product of the family-specific rare variant sharing probabilities or its complement. The function then sums the pattern probabilities inferior or equal to the probability of the observed pattern of the not families not sharing a rare variant and the remaining families sharing a rare variant.

Value

P-value of the exact rare variant sharing test requiring sharing by all affected subjects.

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.

See Also

RVsharing,RVgene

Examples

data(ped.list)
# Setting up pshare.data data frame
pshare.data=data.frame(pshare=sapply(ped.list[1:39],function(ped) 
RVsharing(ped)@pshare),ped.tocompute.vec=sapply(ped.list[1:39],function(ped) ped$famid[1]))

vec = c("15008","15053","15157")
get.psubset(vec,not="15008",pshare.data)
get.psubset(vec,not=c("15008","15053"),pshare.data)

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/get.psubset.Rd_%03d_medium.png", width=480, height=480)
> ### Name: get.psubset
> ### Title: Probability of sharing of rare variants in a subset of families
> ### Aliases: get.psubset
> 
> ### ** Examples
> 
> data(ped.list)
> # Setting up pshare.data data frame
> pshare.data=data.frame(pshare=sapply(ped.list[1:39],function(ped) 
+ RVsharing(ped)@pshare),ped.tocompute.vec=sapply(ped.list[1:39],function(ped) ped$famid[1]))
> 
> vec = c("15008","15053","15157")
> get.psubset(vec,not="15008",pshare.data)
[1] 2.130606e-05
> get.psubset(vec,not=c("15008","15053"),pshare.data)
[1] 0.001853627
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>