randomChild: Generate a random child from a given DNA profile and a given set of allele
frequencies
Description
Generates a random child (or parent) from a given DNA profile from a given
set of allele frequencies. At each locus, the child inherits the first
allele of the given profile with one half, or the second allele with
probability one half. The second allele is chosen at random with probability
proportional to the allele frequencies.
Usage
randomChild(profile, Freqs)
Value
A vector with 2*nLoci elements. Each pair of elements represents the
genotpe of the random individual at that locus. The genotype alleles are
always ordered so that allele1 <= allele2.
Arguments
profile
A vector of length 2*nLoci. Each entry in the vector is the
(coded) allele held by the individual. This represents the parent. The
relationship is reflexive so it does not matter if the profile is a parent
or a child.
Freqs
A list containing two lists labelled loci and freqs. The second
list is a list of vectors containing the allele frequencies of each allele
at each locus in the multiplex.
Author
James M. Curran
Details
The alleles are simply integers rather than the STR repeat numbers. This
speeds up computation immensely when calculating any of the LRs or IBS.