sample.profiles: Sample random unrelated profiles

Description Usage Arguments Details Value See Also Examples

Description

Sample random unrelated profiles

Usage

1
sample.profiles(N, freqs, markers = names(freqs), theta = 0)

Arguments

N

number of profiles to sample (integer).

freqs

A list specifying the allelic frequencies. Should contain a vector of allelic frequencies for each locus, named after that locus.

markers

A character vector naming the markers of the resulting sample. Default to all markers of the freqs argument.

theta

numeric value specifying the amount of background relatedness, i.e. the probability that both alleles at a locus are identical by descent.

Details

The function randomly samples DNA profiles according to the supplied allelic frequencies.

When θ=0, the function assumes HW-equilibrium, so the alleles of a person at a locus are independent samples.

When θ>0, the alleles of a person at a locus are ibd with probability θ.

Value

An object of class profiles, which is an integer matrix with N rows and twice the number of loci columns. The integers correspond to the index in the allelic frequency vector, NOT to STRs. Each row is a profile and every two columns contain the two alleles at a locus.

See Also

sample.pairs, sample.relatives

Examples

1
2

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