View source: R/get_allele_freqs.R
| get_allele_freqs | R Documentation |
Converts allele frequency data from a data frame to a list format compatible with the pedtools package for pedigree analysis.
get_allele_freqs(region)
region |
A data frame containing allele frequencies. The first column
should be "Allele" with allele designations, and subsequent columns
should be marker names with frequency values. Available built-in
databases: |
The function transforms the data frame format (rows = alleles, columns = markers) into the list format required by pedtools (one element per marker, named by allele). This enables seamless integration with pedigree likelihood calculations.
A named list where each element represents a genetic marker.
Each marker element is a named numeric vector with allele names and
their corresponding frequencies. This format is directly compatible
with pedtools::setMarkers().
Marino M, et al. (2009). "Allele frequencies of 15 STRs in an Argentine population sample." Forensic Science International: Genetics Supplement Series. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1016/j.fsigss.2009.08.178")}
Argentina, Europe, USA for
available frequency databases, sim_lr_genetic for using
these frequencies in simulations.
# Convert Argentina database to pedtools format
freqs <- get_allele_freqs(Argentina)
# Check available markers
names(freqs)
# Use with pedtools
library(pedtools)
library(forrel)
x <- linearPed(2)
x <- setMarkers(x, locusAttributes = freqs[1:5])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.