calculateHb: Calculate Heterozygote Balance

View source: R/calculateHb.r

calculateHbR Documentation

Calculate Heterozygote Balance

Description

Calculates the heterozygote (intra-locus) peak balance.

Usage

calculateHb(
  data,
  ref,
  hb = 1,
  kit = NULL,
  sex.rm = FALSE,
  qs.rm = FALSE,
  ignore.case = TRUE,
  exact = FALSE,
  word = FALSE,
  debug = FALSE
)

Arguments

data

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

ref

a data frame containing at least 'Sample.Name', 'Marker', 'Allele'.

hb

numerical, definition of heterozygote balance. Default is hb=1. hb=1: HMW/LMW, hb=2: LMW/HMW, hb=3; min(Ph)/max(Ph).

kit

character defining the kit used. If NULL automatic detection is attempted.

sex.rm

logical TRUE removes sex markers defined by 'kit'.

qs.rm

logical TRUE removes quality sensors defined by 'kit'.

ignore.case

logical indicating if sample matching should ignore case.

exact

logical indicating if exact sample matching should be used.

word

logical indicating if word boundaries should be added before sample matching.

debug

logical indicating printing debug information.

Details

Calculates the heterozygote (intra-locus) peak balance for a dataset. Known allele peaks will be extracted using the reference prior to analysis. Calculates the heterozygote balance (Hb), size difference between heterozygous alleles (Delta), and mean peak height (MPH). NB! 'X' and 'Y' will be handled as '1' and '2' respectively.

Value

data.frame with with columns 'Sample.Name', 'Marker', 'Delta', 'Hb', 'MPH'.

Examples

data(ref2)
data(set2)
# Calculate average balances.
calculateHb(data = set2, ref = ref2)

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