data(ped.list)
data(ex.ped.mat)
plot(ped.list[[49]])
# Computation of RV sharing probability for 5 sharing patterns in family 28003
fam28003.pattern.prob = c(RVsharing(ped.list[[49]],carriers=c("36","104","110"))@pshare,
RVsharing(ped.list[[49]],carriers=c("36","104"))@pshare,
RVsharing(ped.list[[49]],carriers=c("104","110"))@pshare,
RVsharing(ped.list[[49]],carriers=c("36"))@pshare,
RVsharing(ped.list[[49]],carriers=c("104"))@pshare)
fam28003.nequiv = c(1,2,1,1,2)
# check that distribution sums to 1
sum(fam28003.pattern.prob*fam28003.nequiv)
fam28003.N = c(3,2,2,1,1)
plot(ped.list[[13]])
# Computation of RV sharing probability for 3 sharing patterns in family 15157
fam15157.pattern.prob = c(RVsharing(ped.list[[13]],carriers=c("402","404","405"))@pshare,
RVsharing(ped.list[[13]],carriers=c("402","404"))@pshare,
RVsharing(ped.list[[13]],carriers=c("402"))@pshare)
fam15157.nequiv = c(1,3,3)
# check that distribution sums to 1
sum(fam15157.pattern.prob*fam15157.nequiv)
fam15157.N = 3:1
# Creating lists
ex.pattern.prob.list = list("15157"=fam15157.pattern.prob,"28003"=fam28003.pattern.prob)
ex.nequiv.list = list("15157"=fam15157.nequiv,"28003"=fam28003.nequiv)
ex.N.list = list("15157"=fam15157.N,"28003"=fam28003.N)
ex.ped.obj = ped.list[c(13,49)]
names(ex.ped.obj) = c("15157","28003")
sites = c(92,119)
minor.allele.vec=c(1,4)
RVgene(ex.ped.mat,ex.ped.obj,sites,pattern.prob.list=ex.pattern.prob.list,
nequiv.list=ex.nequiv.list,N.list=ex.N.list,minor.allele.vec=minor.allele.vec)
Run the code above in your browser using DataLab