calcGjoint: calcGjoint

View source: R/calcGjoint.R

calcGjointR Documentation

calcGjoint

Description

getGlist Returns a list of joint genotypes with corresponding joing probabilities for unknowns contributors for a given marker.

Usage

calcGjoint(freq, nU = 1, fst = 0, refK = NULL, refR = NULL, ibd = c(1, 0, 0))

Arguments

freq

A vector of allele frequencies for a given population.

nU

Number of unknowns (where the LAST is a related)

fst

Assumed theta/fst-correction

refK

contains a vector of alleles for the known typed reference profiles (a,b,c,d...)

refR

contains a vector of alleles for a related reference profile (a,b)

ibd

the identical by decent coefficients of the relationship denotation

Details

The function returns the list of all possible genotypes, with corresponding probabilities. The allele-names in popFreq needs to be numbers. If a related unknown is provided that will always be the first one

Value

Glist A list with genotypes and genotype probabilities

Author(s)

Oyvind Bleka

Examples

freq = rgamma(8,1,1)
freq = stats::setNames(freq/sum(freq),1:length(freq))
foo1 = calcGjoint(freq,nU=2,fst=0.1,refK=c("2","3","1","1"))
foo2 = calcGjoint(freq,nU=2,fst=0.1,refK=c("2","3","1","1"),
 refR=c("2","3"),ibd=c(1/4,1/2,1/4))

oyvble/euroformix documentation built on May 28, 2024, 7:28 p.m.