Pnm_all {DNAtools}R Documentation

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,\ldots,2\times m \times 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

Pnm_all(m, theta, probs, locuswise = FALSE)
Pnm_locus(m, theta, alleleProbs)

Arguments

m

The number of contributors

theta

The coancestery coefficient

probs

List of vectors with allele probabilities for each locus

locuswise

Logical. If TRUE the locus-wise probabilities will be returned. Otherwise, the probability over all loci is returned.

alleleProbs

Vectors with allele probabilities

Details

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

Value

Returns a vector of probabilities, or a matrix of locuswise probability vectors.

Author(s)

Torben Tvedebrink, James Curran, Mikkel Andersen

References

T. Tvedebrink (2014). 'On the exact distribution of the number of alleles in DNA mixtures', International Journal of Legal Medicine; 128(3):427–37. <https://doi.org/10.1007/s00414-013-0951-3>

Examples


  ## 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 \eqn{\Pr(N(m = 3) = n)}, \eqn{n = 1,\ldots,2 * L *m}, where \eqn{L = 10}
  ## here
  Pnm_all(m = 2, theta = 0, freqs)
  ## Same, but locuswise results
  Pnm_all(m = 2, theta = 0, freqs, locuswise = TRUE)
  

[Package DNAtools version 0.2-4 Index]