read_size_regression {simDNAmixtures} | R Documentation |
Reads a size regression file
Description
Reads a size regression file
Usage
read_size_regression(filename)
Arguments
filename |
Path to file (character). |
Details
Read a regression file from disk and returns a function that provides the fragment length (bp) for a given locus and allele.
DNA profiles consist of the observed peaks (alleles or stutter products) at several loci as well as the peak heights and sizes. The size refers to the fragment length (bp). A linear relationship exists between the size of a peak and the size. When peaks are sampled in the sample_mixture_from_genotypes function, a size is assigned using a size regression. The read_size_regression
function reads such a regression from disk.
Value
A function that takes a locus name and allele as arguments and returns the size.
Examples
filename <- system.file("extdata",
"GlobalFiler_SizeRegression.csv",
package = "simDNAmixtures")
regression <- read_size_regression(filename)
# obtain size for the 12 allele at the vWA locus
regression("vWA", 12)
[Package simDNAmixtures version 1.0.1 Index]