Learn R Programming

strvalidator (version 0.3.0)

calculateH: Calculate average peak height.

Description

calculateH calculates the average peak height for a sample.

Usage

calculateH(data, debug = FALSE)

Arguments

data
a data frame in 'slim' format with at least columns 'Sample.Name', 'Heterozygous', and 'Height'.
debug
logical indicating printing debug information.

Value

  • data.frame with with columns: 'Sample.Name', 'H', and 'Peaks'.

Details

Calculates the average peak height (H) for each sample. Sample data must contain a column "Heterozygous", where 1 = heterozygous loci, and 0 = homozygous loci as known from the reference sample. Calculates H according to the formula: $H = sum(peak heights)/(n[het] + 2n[hom]$ Where: n[het] = number of observed heterozygous alleles n[hom] = number of observed homozygous alleles

References

Torben Tvedebrink, Poul Svante Eriksen, Helle Smidt Mogensen, Niels Morling, Evaluating the weight of evidence by using quantitative short tandem repeat data in DNA mixtures Journal of the Royal Statistical Society: Series C (Applied Statistics), Volume 59, Issue 5, 2010, Pages 855-874, 10.1111/j.1467-9876.2010.00722.x. http://dx.doi.org/10.1111/j.1467-9876.2010.00722.x