Description Usage Arguments Details Value See Also Examples
When two profiles are compared, this function computes the expected number of loci that match fully or partially.
1 | ibs.pairwise.pr(freqs1, freqs2 = freqs1, k = "UN")
|
freqs1 |
List of allelic frequencies. |
freqs2 |
List of allelic frequencies. |
k |
IBD-probabilities, passed on to |
When all profiles in the database are compared pairwise, one can count the number of profiles that match fully/partially for each number of loci. Such a procedure is implemented as ibs.pairwise.db
. The current function computes the probabilities that a single pair matches fully and partially at each possible number of loci. The two profiles can be assumed to originate from population with different allele frequencies (freqs1
and freqs2
), might be related through and might both be inbred.
Matrix with the expected number of full/partial matches on 0,1,2,... loci for a comparison between two profiles.
1 2 3 4 5 6 7 8 9 10 11 12 | data(freqsNLsgmplus)
# sample small db and make all pairwise comparisons
N <- 1e3
db <- sample.profiles(N=N,freqs=freqsNLsgmplus)
O <- ibs.pairwise.db(db)
E <- N*(N-1)/2*ibs.pairwise.pr(freqs1 = freqsNLsgmplus,freqs2 = freqsNLsgmplus)
O # observed
E # expected
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.