ibs.pairwise.pr: Compute the probabilities that two profiles match a number of...

Description Usage Arguments Details Value See Also Examples

Description

When two profiles are compared, this function computes the expected number of loci that match fully or partially.

Usage

1
ibs.pairwise.pr(freqs1, freqs2 = freqs1, k = "UN")

Arguments

freqs1

List of allelic frequencies.

freqs2

List of allelic frequencies.

k

IBD-probabilities, passed on to ibdprobs. Defaults to "UN", i.e. unrelated.

Details

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.

Value

Matrix with the expected number of full/partial matches on 0,1,2,... loci for a comparison between two profiles.

See Also

as.dbcompare

Examples

 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

DNAprofiles documentation built on Jan. 15, 2017, 9:27 p.m.