createDatamatrix: Create data matrix with possible genotype combinations for...

Description Usage Arguments Value Author(s) See Also Examples

Description

A data matrix of genotypes for known individuals and all possible genotypes for unknown individuals is created. Can be used as input for relMix.

Usage

1
createDatamatrix(locus, knownGenos, idsU)

Arguments

locus

A Familias locus containing information about the alleles

knownGenos

List of known genotypes. Each element is a vector with genotype for one individual. The elements must be named

idsU

Vector of indices for unknown individuals

Value

Returns a data matrix of genotypes where each row corresponds to an individual.

Author(s)

Guro Dorum

See Also

See FamiliasLocus and relMix.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
require(Familias)
#Define alleles and frequencies
alleles <- 1:2
afreq <- c(0.5,0.5)
#Create locus object
locus <- FamiliasLocus(frequencies=afreq,name="M1",allelenames= alleles)
#Known genotypes of alleged father and mother, child's genotype is uknown
gAF <- c(1,1)
gMO <- c(1,1)
datamatrix <- createDatamatrix(locus,knownGenos=list(AF=gAF,MO=gMO),idsU=c("CH"))


Search within the relMix package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.