Learn R Programming

strvalidator (version 1.4.0)

generateEPG: Generate EPG

Description

generateEPG visualises an EPG from DNA profiling data.

Usage

generateEPG(data, kit, title = NULL, peaks = TRUE, type = "profile",
  collapse = TRUE, silent = FALSE, ignore.case = TRUE, at = 0,
  scale = "free", limit.x = TRUE, label.size = 3, label.angle = 0,
  label.vjust = 1, label.hjust = 0.5, expand = 0.1, debug = FALSE)

Arguments

data
data frame containing at least columns 'Sample.Name', 'Allele', and 'Marker'.
kit
string or integer representing the STR typing kit.
title
string providing the title for the EPG.
peaks
logical TRUE to plot peaks for distributions using mean peak height.
type
character plot type "distr" and "profile".
collapse
logical TRUE to add the peak heights of identical alleles peaks within each marker. NB! Removes off-ladder alleles.
silent
logical FALSE to show plot.
ignore.case
logical FALSE for case sensitive marker names.
at
numeric analytical threshold (Height
scale
character "free" free x and y scale, alternatively "free_y" or "free_x".
limit.x
logical TRUE to fix x-axis to size range. To get a common x scale set scale="free_y" and limit.x=TRUE.
label.size
numeric for allele label text size.
label.angle
numeric for allele label print angle.
label.vjust
numeric for vertical justification of allele labels.
label.hjust
numeric for horizontal justification of allele labels.
expand
numeric for plot are expansion (to avoid clipping of labels).
debug
logical for printing debug information to the console.

Value

  • ggplot object.

Details

Generates a electropherogram like plot from 'data' and 'kit'. If 'Size' is not present it is estimated from kit information and allele values. If 'Height' is not present a default of 1000 RFU is used. Off-ladder alleles can be plotted if 'Size' is provided. There are various options to customise the plot scale and labels. It is also possible to plot 'distributions' of peak heights.