gt2aca {KinMixLite}R Documentation

Converts genotype profiles to allele count arrays

Description

Returns list of vectors of allele counts corresponding to genotype profile in gt

Usage

gt2aca(mixture,gt,eps=0)

Arguments

mixture

A compiled DNAmixture object

gt

Genotype profile as a data frame containing variables marker, allele1 and allele2

eps

If non-zero, the function creates the output allele count arrays in a different format, that mitigates subsequent propagation errors in some situations. Instead of a vector of allele counts, each element of the list is a matrix with 3 columns, corresponding to allele counts 0, 1 and 2, with entries 1 or eps.

Value

Returns list of vectors of allele counts. The log probability for the genotype is returned in its attribute 'logGt'.

Author(s)

Peter Green (P.J.Green@bristol.ac.uk)

Examples

data(test2data)
data(NGMDyes)

# set threshold C
C<-0.001

mixD<-DNAmixture(list(epg),k=2,C=list(C),database=db,dyes=list(NGMDyes))
cgtcaca<-gt2aca(mixD,Cgt)

print(Cgt)
print(cgtcaca)

[Package KinMixLite version 2.1.0 Index]