Learn R Programming

relSim (version 1.0.0)

randomProfile: Generate a random DNA profile from a given set of allele frequencies

Description

Generates a random DNA profile from a given set of allele frequencies.

Usage

randomProfile(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

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.

See Also

randomChild, randomSample, randomSib

Examples

Run this code

data(fbiCaucs)
P1 = randomProfile(fbiCaucs)

Run the code above in your browser using DataLab