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      15      15
#> 2           U1      vWA      15      16
#> 3           U1  D16S539       9       9
#> 4           U1   CSF1PO      10      12
#> 5           U1     TPOX       8       9
#> 6           U1  D8S1179      11      14
#> 7           U1   D21S11      29    31.2
#> 8           U1   D18S51      13      15
#> 9           U1   D2S441      11      14
#> 10          U1  D19S433      12    15.2
#> 11          U1     TH01       6     9.3
#> 12          U1      FGA      23      24
#> 13          U1 D22S1045      11      15
#> 14          U1   D5S818      11      11
#> 15          U1  D13S317       8      12
#> 16          U1   D7S820       8       8
#> 17          U1     SE33    23.2    30.2
#> 18          U1 D10S1248      12      14
#> 19          U1  D1S1656      15    15.3
#> 20          U1  D12S391      19      22
#> 21          U1  D2S1338      20      23
#> 

# sample with dropout
sample_mixture_from_genotypes(g, model)
#>    SampleName   Marker Allele   Size Height n1 x1 n x
#> 1     mixture  D3S1358     15 121.40   1000  2  2 2 2
#> 2     mixture      vWA     15 172.87   1000  1  1 1 1
#> 3     mixture      vWA     16 176.91   1000  1  1 1 1
#> 4     mixture  D16S539      9 243.61   1000  2  2 2 2
#> 5     mixture   CSF1PO     10 298.34   1000  1  1 1 1
#> 6     mixture   CSF1PO     12 306.26   1000  1  1 1 1
#> 7     mixture     TPOX      8 349.70   1000  1  1 1 1
#> 8     mixture     TPOX      9 353.72   1000  1  1 1 1
#> 9     mixture  D8S1179     11 139.06   1000  1  1 1 1
#> 10    mixture  D8S1179     14 151.36   1000  1  1 1 1
#> 11    mixture   D21S11     29 203.65   1000  1  1 1 1
#> 12    mixture   D21S11   31.2 212.54   1000  1  1 1 1
#> 13    mixture   D18S51     13 285.67   1000  1  1 1 1
#> 14    mixture   D18S51     15 293.75   1000  1  1 1 1
#> 15    mixture   D2S441     11  89.42      0  1  0 1 0
#> 16    mixture   D2S441     14 101.60   1000  1  1 1 1
#> 17    mixture  D19S433     12 141.77   1000  1  1 1 1
#> 18    mixture  D19S433   15.2 154.52   1000  1  1 1 1
#> 19    mixture     TH01      6 186.89   1000  1  1 1 1
#> 20    mixture     TH01    9.3 200.62   1000  1  1 1 1
#> 21    mixture      FGA     23 264.08      0  1  0 1 0
#> 22    mixture      FGA     24 268.15   1000  1  1 1 1
#> 23    mixture D22S1045     11  97.51   1000  1  1 1 1
#> 24    mixture D22S1045     15 109.46   1000  1  1 1 1
#> 25    mixture   D5S818     11 154.87   1000  2  2 2 2
#> 26    mixture  D13S317      8 210.84      0  1  0 1 0
#> 27    mixture  D13S317     12 227.02   1000  1  1 1 1
#> 28    mixture   D7S820      8 270.42   1000  2  1 2 1
#> 29    mixture     SE33   23.2 383.92   1000  1  1 1 1
#> 30    mixture     SE33   30.2 412.39   1000  1  1 1 1
#> 31    mixture D10S1248     12 101.53   1000  1  1 1 1
#> 32    mixture D10S1248     14 109.53   1000  1  1 1 1
#> 33    mixture  D1S1656     15 184.88   1000  1  1 1 1
#> 34    mixture  D1S1656   15.3 186.15   1000  1  1 1 1
#> 35    mixture  D12S391     19 236.04   1000  1  1 1 1
#> 36    mixture  D12S391     22 247.96   1000  1  1 1 1
#> 37    mixture  D2S1338     20 316.84   1000  1  1 1 1
#> 38    mixture  D2S1338     23 328.89      0  1  0 1 0
#>    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                             FALSE
#> 16                              TRUE
#> 17                              TRUE
#> 18                              TRUE
#> 19                              TRUE
#> 20                              TRUE
#> 21                             FALSE
#> 22                              TRUE
#> 23                              TRUE
#> 24                              TRUE
#> 25                              TRUE
#> 26                             FALSE
#> 27                              TRUE
#> 28                              TRUE
#> 29                              TRUE
#> 30                              TRUE
#> 31                              TRUE
#> 32                              TRUE
#> 33                              TRUE
#> 34                              TRUE
#> 35                              TRUE
#> 36                              TRUE
#> 37                              TRUE
#> 38                             FALSE