stutter_type {simDNAmixtures}R Documentation

Defines a stutter type to be used in the allele specific stutter model.

Description

Defines a stutter type to be used in the allele specific stutter model.

Usage

stutter_type(
  name,
  delta,
  applies_to_all_loci = TRUE,
  stutter_regression,
  stutter_exceptions,
  applies_to_loci,
  repeat_length_by_marker
)

Arguments

name

Character. Name of the stutter, e.g. "BackStutter"

delta

Numeric. When length one, repeat units gained (lost when negative). When length two, the second element is the number of base pairs gained (lost).

applies_to_all_loci

Logical. Defaults to TRUE.

stutter_regression

Function. See read_stutter_regression.

stutter_exceptions

Optionally a list. See read_stutter_exceptions.

applies_to_loci

Optionally a character vector of locus names to which this stutter type applies.

repeat_length_by_marker

Optionally a named integer vector with repeat lengths by marker. Only needed when delta is of length two.

Details

When a pg_model is constructed (see log_normal_model), a stutter model can optionally be applied.

Value

Object of class stutter_type to be passed to allele_specific_stutter_model.

Examples

filename_bs_exceptions <- system.file("extdata",
"GlobalFiler_Stutter_Exceptions_3500.csv",package = "simDNAmixtures")
bs_exceptions <- read_stutter_exceptions(filename_bs_exceptions)

filename_bs_regression <- system.file("extdata",
"GlobalFiler_Stutter_3500.txt",package = "simDNAmixtures")
bs_regression <- read_stutter_regression(filename_bs_regression)

backstutter <- stutter_type(name = "BackStutter", delta = -1,
                            stutter_regression = bs_regression,
                            stutter_exceptions = bs_exceptions)

[Package simDNAmixtures version 1.0.1 Index]