Description Usage Arguments Details Value See Also Examples
Counts IBS alleles between case profile and all database profiles
1 | ibs.db(x, db)
|
x |
case profile |
db |
database of profiles |
A profile consists of two alleles at each locus. When two profiles are compared at a locus, there can be 0, 1 or 2 alleles IBS (identical by state). The function compares a single profile with a database of N profiles and counts the number of IBS alleles.
Data frame with three columns
ibs
: the number of alleles IBS of x
and a db
profile, ranges from 0 to 2*nloci
full.matches
: the number of loci for which 2 alleles are IBS, ranges from 0 to nloci
partial.matches
: the number of loci for which 1 allele is IBS, ranges from 0 to nloci
ibs.pairs
for comparing many profile pairs
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ## monte-carlo simulation of number of IBS alleles for FS, PO and UN w.r.t a single case profile
data(freqsNLsgmplus)
#start with a single case profile
x <- sample.profiles(N=1,freqs=freqsNLsgmplus)
# sample siblings
x.fs <- sample.relatives(x,N=10^3,type="FS")
# sample parent/offspring
x.po <- sample.relatives(x,N=10^3,type="PO")
# sample unrelated profiles
x.unr <- sample.profiles(N=10^3,freqs=freqsNLsgmplus)
# make histograms of the number of ibs alleles
hist(ibs.db(x,x.fs)$ibs,xlim=c(0,20),main="FS",xlab="IBS")
hist(ibs.db(x,x.po)$ibs,xlim=c(0,20),main="PO",xlab="IBS")
hist(ibs.db(x,x.unr)$ibs,xlim=c(0,20),main="UN",xlab="IBS")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.