calculateLb: Calculate Inter-locus Balance

View source: R/calculateLb.r

calculateLbR Documentation

Calculate Inter-locus Balance

Description

Calculates the inter-locus balance.

Usage

calculateLb(
  data,
  ref = NULL,
  option = "prop",
  by.dye = FALSE,
  ol.rm = TRUE,
  sex.rm = FALSE,
  qs.rm = FALSE,
  na = NULL,
  kit = NULL,
  ignore.case = TRUE,
  word = FALSE,
  exact = FALSE,
  debug = FALSE
)

Arguments

data

data.frame containing at least 'Sample.Name', 'Marker', and 'Height'.

ref

data.frame containing at least 'Sample.Name', 'Marker', 'Allele'. If provided alleles matching 'ref' will be extracted from 'data' (see filterProfile).

option

character: 'prop' for proportional Lb, 'norm' for normalized LB, 'cent' for centred Lb, and 'peak' for the min and max peak height ratio.

by.dye

logical. Default is FALSE for global Lb, if TRUE Lb is calculated within each dye channel.

ol.rm

logical. Default is TRUE indicating that off-ladder 'OL' alleles will be removed.

sex.rm

logical. Default is FALSE indicating that all markers will be considered. If TRUE sex markers will be removed.

qs.rm

logical. Default is TRUE indicating that all quality sensors will be removed.

na

numeric. Numeric to replace NA values e.g. locus dropout can be given a peak height equal to the limit of detection threshold, or zero. Default is NULL indicating that NA will be treated as missing values.

kit

character providing the kit name. Attempt to auto detect if NULL.

ignore.case

logical indicating if sample matching should ignore case. Only used if 'ref' is provided and 'data' is filtered.

word

logical indicating if word boundaries should be added before sample matching. Only used if 'ref' is provided and 'data' is filtered.

exact

logical indicating if exact sample matching should be used. Only used if 'ref' is provided and 'data' is filtered.

debug

logical indicating printing debug information.

Details

The inter-locus balance (Lb), or profile balance, can be calculated as a proportion of the whole, normalized, or as centred quantities (as in the reference but using the mean total marker peak height instead of H). Lb can be calculated globally across the complete profile or within each dye channel. All markers must be present in each sample. Data can be unfiltered or filtered since the sum of peak heights by marker is used. A reference dataset is required to filter the dataset, which also adds any missing markers. A kit should be provided for filtering of known profile, sex markers, or quality sensors. If not automatic detection will be attempted. If missing, dye will be added according to kit. Off-ladder alleles and quality sensors are by default removed from the dataset. Sex markers are optionally removed. Some columns in the result may vary: TPH: Total (marker) Peak Height. TPPH: Total Profile Peak Height. MTPH: Maximum (sample) Total Peak Height. MPH: Mean (marker) Peak Height.

Value

data.frame with at least columns 'Sample.Name', 'Marker', 'TPH', 'Peaks', and 'Lb'. See description for additional columns.

References

Torben Tvedebrink et.al., Performance of two 17 locus forensic identification STR kits-Applied Biosystems's AmpFlSTR NGMSElect and Promega's PowerPlex ESI17 kits, Forensic Science International: Genetics, Volume 6, Issue 5, September 2012, Pages 523-531, ISSN 1872-4973, 10.1016/j.fsigen.2011.12.006. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1016/j.fsigen.2011.12.006")}

Examples

# Load data.
data(set2)

# Calculate inter-locus balance.
res <- calculateLb(data = set2)
print(res)

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