Learn R Programming

DNAtools (version 0.1-8)

pNoA: The exact distribution of the number of alleles in a m-person DNA mixture

Description

Computes the exact distribution of the number of alleles in a m-person DNA mixture typed with STR loci. For a m-person DNA mixture it is possible to observe 1,...,2*m*L alleles, where L is the total number of typed STR loci. The method allows incorporation of the subpopulation correction, the so-called $\theta$-correction, to adjust for shared ancestry. If needed, the locus-specific probabilities can be obtained using the locuswise argument.

Usage

pNoA(probs, m=2, theta = 0, noa.tabs=NULL, locuswise=FALSE)

Arguments

probs
List of vectors with allele probabilities for each locus
m
The number of contributors
theta
The coancestery coefficient
noa.tabs
If noa.tabs has been computed by the noaTabs-function for m, then this will speed up the computations.
locuswise
Logical. If TRUE the locuswise probabilities will be returned. Otherwise, the probability over all loci is returned.

Value

  • Returns a vector of probabilities, or a list of locuswise probability vectors.

Details

Computes the exact distribution of the number of alleles for a m-person DNA mixture.

References

T Tvedebrink (2013). 'On the exact distribution of the number of alleles in DNA mixtures', International Journal of Legal Medicine: (under review).

Examples

Run this code
## Simulate some allele frequencies:
  freqs <-  structure(replicate(10,
              { g = rgamma(n=10,scale=4,shape=3); g/sum(g)},
              simplify=FALSE),.Names=paste("locus",1:10,sep="."))
  ## Compute alpha_3
  noa.tab3 <- noaTabs(m=3)

  ## Compute P(N(m=3)=n), n=1,...,2*L*m, where L=10 here
  pNoA(freqs,m=3,theta=0,noa.tabs=noa.tab3)
  ## Same, but locuswise results
  pNoA(freqs,m=3,theta=0,noa.tabs=noa.tab3,locuswise=TRUE)

Run the code above in your browser using DataLab