Skip to contents

Defines a (semi-continuous) drop model

Usage

drop_model(dropout_probabilities, drop_in_rate = 0, freqs, model_settings)

Arguments

dropout_probabilities

Numeric vector with values between 0 and 1. Dropout probabilities for each contributor.

drop_in_rate

Numeric vector of length one. Expected number of drop-ins per locus. Default is 0.

freqs

Optionally a list with allele frequencies (needed when drop_in_rate > 0). See read_allele_freqs.

model_settings

List. Possible parameters:

Value

Object of class pg_model.

Details

Define the classes semi-continuous drop-model. The model may then be used to sample DNA profiles using the sample_mixture_from_genotypes function. Alternatively, to sample many models and profiles in one go with parameters according to a specified distribution, the sample_mixtures function can be used.

References

Slooten, K. (2017). Accurate assessment of the weight of evidence for DNA mixtures by integrating the likelihood ratio. Forensic Science International: Genetics, 27, 1-16. doi:10.1016/j.fsigen.2016.11.001

Examples

gf <- gf_configuration()
freqs <- read_allele_freqs(system.file("extdata","FBI_extended_Cauc_022024.csv",
                                       package = "simDNAmixtures"))
settings <- list(locus_names = gf$autosomal_markers, size_regression = gf$size_regression)

model <- drop_model(dropout_probabilities = c(0.1),
                    drop_in_rate = 1e-3,
                    freqs = freqs, model_settings = settings)

g <- sample_contributor_genotypes(contributors = "U1", freqs = freqs,
                                  loci = settings$locus_names)

# genotype
g
#> $U1
#>    Sample Name    Locus Allele1 Allele2
#> 1           U1  D3S1358      17      18
#> 2           U1      vWA      16      18
#> 3           U1  D16S539       9      11
#> 4           U1   CSF1PO      11      12
#> 5           U1     TPOX      11      12
#> 6           U1  D8S1179      10      14
#> 7           U1   D21S11      28      29
#> 8           U1   D18S51      12      14
#> 9           U1   D2S441      11      14
#> 10          U1  D19S433      13      14
#> 11          U1     TH01       9     9.3
#> 12          U1      FGA      23      26
#> 13          U1 D22S1045      15      16
#> 14          U1   D5S818      12      12
#> 15          U1  D13S317      10      13
#> 16          U1   D7S820       8      11
#> 17          U1     SE33      15    20.2
#> 18          U1 D10S1248      14      14
#> 19          U1  D1S1656      14      17
#> 20          U1  D12S391      21      23
#> 21          U1  D2S1338      17      17
#> 

# sample with dropout
sample_mixture_from_genotypes(g, model)
#>    SampleName   Marker Allele   Size Height n1 x1 n x
#> 1     mixture  D3S1358     17 129.56   1000  1  1 1 1
#> 2     mixture  D3S1358     18 133.64   1000  1  1 1 1
#> 3     mixture      vWA     16 176.91   1000  1  1 1 1
#> 4     mixture      vWA     18 184.99   1000  1  1 1 1
#> 5     mixture  D16S539      9 243.61   1000  1  1 1 1
#> 6     mixture  D16S539     11 251.67   1000  1  1 1 1
#> 7     mixture   CSF1PO     11 302.30   1000  1  1 1 1
#> 8     mixture   CSF1PO     12 306.26   1000  1  1 1 1
#> 9     mixture     TPOX     11 361.78   1000  1  1 1 1
#> 10    mixture     TPOX     12 365.81   1000  1  1 1 1
#> 11    mixture  D8S1179     10 134.96   1000  1  1 1 1
#> 12    mixture  D8S1179     14 151.36   1000  1  1 1 1
#> 13    mixture   D21S11     28 199.61   1000  1  1 1 1
#> 14    mixture   D21S11     29 203.65   1000  1  1 1 1
#> 15    mixture   D18S51     12 281.63   1000  1  1 1 1
#> 16    mixture   D18S51     14 289.71   1000  1  1 1 1
#> 17    mixture   D2S441     11  89.42   1000  1  1 1 1
#> 18    mixture   D2S441     14 101.60   1000  1  1 1 1
#> 19    mixture  D19S433     13 145.75   1000  1  1 1 1
#> 20    mixture  D19S433     14 149.74   1000  1  1 1 1
#> 21    mixture     TH01      9 199.38   1000  1  1 1 1
#> 22    mixture     TH01    9.3 200.62   1000  1  1 1 1
#> 23    mixture      FGA     23 264.08   1000  1  1 1 1
#> 24    mixture      FGA     26 276.29   1000  1  1 1 1
#> 25    mixture D22S1045     15 109.46   1000  1  1 1 1
#> 26    mixture D22S1045     16 112.44   1000  1  1 1 1
#> 27    mixture   D5S818     12 158.92   1000  2  1 2 1
#> 28    mixture  D13S317     10 218.93   1000  1  1 1 1
#> 29    mixture  D13S317     13 231.06   1000  1  1 1 1
#> 30    mixture   D7S820      8 270.42   1000  1  1 1 1
#> 31    mixture   D7S820     11 282.34   1000  1  1 1 1
#> 32    mixture     SE33     15 350.57   1000  1  1 1 1
#> 33    mixture     SE33   20.2 371.72   1000  1  1 1 1
#> 34    mixture D10S1248     14 109.53   1000  2  2 2 2
#> 35    mixture  D1S1656     14 180.67   1000  1  1 1 1
#> 36    mixture  D1S1656     17 193.32   1000  1  1 1 1
#> 37    mixture  D12S391     21 243.99   1000  1  1 1 1
#> 38    mixture  D12S391     23 251.93   1000  1  1 1 1
#> 39    mixture  D2S1338     17 304.78   1000  2  1 2 1
#>    HeightAtOrAboveDetectionThreshold
#> 1                               TRUE
#> 2                               TRUE
#> 3                               TRUE
#> 4                               TRUE
#> 5                               TRUE
#> 6                               TRUE
#> 7                               TRUE
#> 8                               TRUE
#> 9                               TRUE
#> 10                              TRUE
#> 11                              TRUE
#> 12                              TRUE
#> 13                              TRUE
#> 14                              TRUE
#> 15                              TRUE
#> 16                              TRUE
#> 17                              TRUE
#> 18                              TRUE
#> 19                              TRUE
#> 20                              TRUE
#> 21                              TRUE
#> 22                              TRUE
#> 23                              TRUE
#> 24                              TRUE
#> 25                              TRUE
#> 26                              TRUE
#> 27                              TRUE
#> 28                              TRUE
#> 29                              TRUE
#> 30                              TRUE
#> 31                              TRUE
#> 32                              TRUE
#> 33                              TRUE
#> 34                              TRUE
#> 35                              TRUE
#> 36                              TRUE
#> 37                              TRUE
#> 38                              TRUE
#> 39                              TRUE