RVgene_allshare(ped.mat,ped.listfams,sites,fams,pshare.vec,
type="alleles",minor.allele.vec,precomputed.prob=list(0),maxdim = 1e9)
type
option: a minor allele count on one column, as returned for example by the genotypeToSnpMatrix
function, with missing values coded NA
(type
="count") or the identity of the two alleles on two consecutive columns, with missing values coded 0 (type
="alleles").pedigree
objects, one object for each pedigree in ped.mat
. ped.mat
. If the argument fams
is provided, the variant sites are tested in each corresponding family in the fams
vector (a variant present in multiple families must then be repeated for every families where it appears).ped.mat
and ped.listfams
carrying the variants listed in the corresponding position in sites
. If missing, the names of the families carrying the minor allele at each position in sites
are extracted from ped.mat
.sites
vector. It is not needed if type
="count". If it is missing and type
="alleles", the minor allele is assumed to take the value 2.ped.mat
and ped.listfams
. The vectors represent probabilities for all the possible values of N.list
for the corresponding family (one probability per value of N.list
).fams
(to avoid running out of memory).sites
in each family where it is present in ped.mat
(or in the families specified in fams
if that argument is specified). It then computes exact rare variant sharing probabilities in each family for each variant by calling RVsharing
. If multiple rare variants are seen in the same family, the smallest sharing probability among all rare variants is retained.
The families where all affected subjects share a rare variant are determined by verifying if the length of the carrier vector equals the number of affected subjects that family. The joint rare variant sharing probability over all families is obtained as the product of the family-specific probabilities. The p-value of the test requiring sharing by all affected subjects is computed by calling get.psubset
.RVsharing,get.psubset
data(ped.list)
data(ex.ped.mat)
plot(ped.list[[49]])
plot(ped.list[[13]])
ex.ped.obj = ped.list[c(13,49)]
names(ex.ped.obj) = c("15157","28003")
# Computation of RV sharing probability by all affected relatives in families 28003 and 15157
pshare.vec = c(RVsharing(ped.list[[13]],)@pshare,RVsharing(ped.list[[49]])@pshare)
names(pshare.vec) = c("15157","28003")
sites = c(92,119)
minor.allele.vec=c(1,4)
RVgene_allshare(ex.ped.mat,ex.ped.obj,sites,pshare.vec=pshare.vec,minor.allele.vec=minor.allele.vec)
Run the code above in your browser using DataLab