MyNixOS website logo
Description

Simulate Forensic DNA Mixtures.

Mixed DNA profiles can be sampled according to models for probabilistic genotyping. Peak height variability is modelled using a log normal distribution or a gamma distribution. Sample contributors may be related according to a pedigree.

simDNAmixtures

The goal of simDNAmixtures is to provide an easy to use workflow for simulating single source or mixed forensic DNA profiles. These simulations are used in research and validation related to probabilistic genotyping systems and also in studies on relationship testing.

The simDNAmixtures package supports simulation of:

  • Autosomal STR profiles (e.g. GlobalFiler™)

  • Autosomal SNP profiles (e.g. Kintelligence or FORCE)

  • YSTR profiles (e.g. Yfiler™ Plus)

Genotypes of the sample contributors may be provided as inputs. For autosomal profiles (STRs or SNPs) it is also possible to sample genotypes according to allele frequencies and a pedigree.

Installation

To install simDNAmixtures from CRAN:

install.packages("simDNAmixtures")

Alternatively, you can install the development version of simDNAmixtures from GitHub with:

# install.packages("devtools")
devtools::install_github("mkruijver/simDNAmixtures")

Example (GlobalFiler™ mixture of two siblings)

This example demonstrates how a mixed STR profile comprising two siblings can be simulated. More comprehensive examples of how to set up a simulation study can be found in the vignettes.

The first step is to define a pedigree with the two siblings and their parents using the pedtools package.

library(simDNAmixtures)
library(pedtools)

ped_fs <- nuclearPed(children = c("S1", "S2"))
plot(ped_fs)

Further, we load provided data including allele frequencies and data related to the GlobalFiler™ kit such as the locus names, size regression and stutter model.

# load allele frequencies
freqs <- read_allele_freqs(system.file("extdata","FBI_extended_Cauc_022024.csv",
                           package = "simDNAmixtures"))

# load kit data
gf <- gf_configuration()

We are now ready to sample a mixed STR profile. A gamma model is used with $\mu$ sampled uniformly between 50 and 5000 rfu and a coefficient of variation between 5 and 35%.

set.seed(1)

sampling_parameters <- list(min_mu = 50., max_mu = 5e3,
                           min_cv = 0.05, max_cv = 0.35,
                           degradation_shape1 = 0, degradation_shape2 = 0)

mixtures <- sample_mixtures(n = 1, contributors = c("S1", "S2"), 
                            pedigree = ped_fs, freqs = freqs,
                            sampling_parameters = sampling_parameters,
                            model_settings = gf$gamma_settings,
                            sample_model = sample_gamma_model)

The simulation results are stored in the mixtures object. Note that the results_directory argument to the sample_mixtures function may be used to automatically write results to disk. Below we print the simulated mixture data stored as mixtures$samples[[1]]$mixture.

LocusAlleleHeightSize
D3S135814216117.33
D3S1358154159121.40
vWA141512168.84
vWA17180180.95
vWA182554184.99
vWA19695189.02
D16S53991315243.61
D16S539101003247.64
D16S53912138255.70
D16S539131990259.73
CSF1PO10635298.34
CSF1PO111195302.30
CSF1PO121879306.26
TPOX8847349.70
TPOX91185353.72
TPOX11102361.78
TPOX121616365.81
AMELX154998.50
AMELY2616104.50
D8S1179101571134.96
D8S117913995147.26
D8S117914702151.36
D21S1129267203.65
D21S11301952207.69
D21S1130.2254208.50
D21S1131.21910212.54
D18S5112374281.63
D18S51132473285.67
D18S51141789289.71
D2S44198381.31
D2S44110353885.37
D2S4411185189.42
D19S43313145145.75
D19S43313.2971146.55
D19S433142355149.74
TH0182821195.22
TH0192190199.38
FGA2197255.94
FGA221328260.01
FGA231614264.08
FGA2473268.15
D22S104511220197.51
D22S104514126106.47
D22S1045151513109.46
D5S81810324150.82
D5S818111955154.87
D5S81812995158.92
D5S818131777162.97
D13S31711184222.97
D13S317124363227.02
D7S820112551282.34
D7S82012660286.32
SE33171425358.71
SE3318903362.77
SE3319225366.84
SE3329.2269408.32
SE3330.22077412.39
D10S1248131831105.53
D10S124814656109.53
D1S165612873172.23
D1S165613773176.45
D1S165616714189.10
D1S165617.3630194.58
D12S39117132228.10
D12S39118902232.07
D12S39119124236.04
D12S391201475240.01
D12S391221053247.96
D2S133817672304.78
D2S1338191505312.82
D2S133822705324.87
D2S133824894332.91

The genotypes of the two contributors are available as mixtures$samples[[1]]$contributor_genotypes.

Sample NameLocusAllele1Allele2
S1D3S13581515
S1vWA1819
S1D16S539913
S1CSF1PO1112
S1TPOX812
S1AMELXY
S1D8S11791014
S1D21S113031.2
S1D18S511314
S1D2S4411010
S1D19S43313.214
S1TH0189
S1FGA2323
S1D22S10451115
S1D5S8181113
S1D13S3171212
S1D7S8201112
S1SE331730.2
S1D10S12481314
S1D1S16561213
S1D12S3912022
S1D2S13381922
Sample NameLocusAllele1Allele2
S2D3S13581515
S2vWA1418
S2D16S5391013
S2CSF1PO1012
S2TPOX912
S2AMELXY
S2D8S11791013
S2D21S113031.2
S2D18S511314
S2D2S4411011
S2D19S4331414
S2TH0189
S2FGA2223
S2D22S10451115
S2D5S8181112
S2D13S3171212
S2D7S8201111
S2SE331830.2
S2D10S12481313
S2D1S16561617.3
S2D12S3911820
S2D2S13381724
Metadata

Version

1.1.2

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-windows
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows