generate: Generates genotypes for unknown contributors

Description Usage Arguments Details Value Author(s) Examples

View source: R/generate.R

Description

Given a mixture, alleles for unknown contributors and the number of untyped contributors, the genotypes of the unknown contributors are generated. The function is recursive.

Usage

1
generate(R, K, x = 1)

Arguments

R

Integers representing the alleles of the mixtures

K

Integers representing the alleles of the known contributors

x

The number of untyped contributors

Details

Normally x is 4 or less. Computing time may be long for larger values of x.

Value

A matrix. The number of rows is x, one row corresponds to one contributor. The columns are the alleles, the two first for first genotype and so on.

Author(s)

Thore Egeland <Thore.Egeland@nmbu.no>

Examples

1
2
3
4
5
6
#Given evidence R=1/2/3, known contribution K=1/2, the possible genotypes
#for 1,2 and 3 contributors are generated:
set1=generate(R=1:3,K=1:2,x=1)
set2=generate(R=1:3,K=1:2,x=2)
set3=generate(R=1:3,K=1:2,x=3)
stopifnot(all(dim(set3)==c(3,378)))

euroMix documentation built on May 29, 2017, 7:21 p.m.