calculateMixture: Calculate Mixture.

View source: R/calculateMixture.r

calculateMixtureR Documentation

Calculate Mixture.

Description

Calculate Mx, drop-in, and

Usage

calculateMixture(
  data,
  ref1,
  ref2,
  ol.rm = TRUE,
  ignore.dropout = TRUE,
  debug = FALSE
)

Arguments

data

list of data frames in 'slim' format with at least columns 'Sample.Name', 'Marker', and 'Allele'.

ref1

data.frame with known genotypes for the major contributor.

ref2

data.frame with known genotypes for the minor contributor.

ol.rm

logical TRUE removes off-ladder alleles (OL), FALSE count OL as drop-in.

ignore.dropout

logical TRUE calculate Mx also if there are missing alleles.

debug

logical indicating printing debug information.

Details

Given a set of mixture results, reference profiles for the major component, and reference profile for the minor component the function calculates the mixture proportion (Mx), the average Mx, the absolute difference D=|Mx-AvgMx| for each marker, the percentage profile for the minor component, number of drop-ins. The observed and expected number of free alleles for the minor component (used to calculate the profile percentage) is also given.

NB! All sample names must be unique within and between each reference dataset. NB! Samples in ref1 and ref2 must be in 'sync'. The first sample in ref1 is combined with the first sample in ref2 to make a mixture sample. For example: ref1 "A" and ref2 "B" match mixture samples "A_B_1", "A_B_2" and so on. NB! If reference datasets have unequal number of unique samples the smaller dataset will limit the calculation.

Mixture proportion is calculated in accordance with:
Locus style (minor:MAJOR) | Mx
AA:AB | (A-B)/(A+B)
AB:AA | (2*B)/(A+B)
AB:AC | B/(B+C)
AA:BB | A/(A+B)
AB:CC | (A+B)/(A+B+C)
AB:CD | (A+B)/(A+B+C+D)
AB:AB | NA - cannot be calculated
AA:AA | NA - cannot be calculated

Value

data.frame with columns 'Sample.Name', 'Marker', 'Style', 'Mx', 'Average', 'Difference', 'Observed', 'Expected', 'Profile', and 'Dropin'.

References

Bright, Jo-Anne, Jnana Turkington, and John Buckleton. "Examination of the Variability in Mixed DNA Profile Parameters for the Identifiler Multiplex." Forensic Science International: Genetics 4, no. 2 (February 2010): 111-14. doi:10.1016/j.fsigen.2009.07.002. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1016/j.fsigen.2009.07.002")}


OskarHansson/strvalidator documentation built on July 22, 2023, 12:04 p.m.