Package: dvir 3.3.0

Magnus Dehli Vigeland

dvir: Disaster Victim Identification

Joint DNA-based disaster victim identification (DVI), as described in Vigeland and Egeland (2021) <doi:10.21203/rs.3.rs-296414/v1>. Identification is performed by optimising the joint likelihood of all victim samples and reference individuals. Individual identification probabilities, conditional on all available information, are derived from the joint solution in the form of posterior pairing probabilities. 'dvir' is part of the 'pedsuite' collection of packages for pedigree analysis.

Authors:Magnus Dehli Vigeland [aut, cre], Thore Egeland [aut]

dvir_3.3.0.tar.gz
dvir_3.3.0.tar.gz(r-4.5-noble)dvir_3.3.0.tar.gz(r-4.4-noble)
dvir_3.3.0.tgz(r-4.4-emscripten)dvir_3.3.0.tgz(r-4.3-emscripten)
dvir.pdf |dvir.html
dvir/json (API)
NEWS

# Install 'dvir' in R:
install.packages('dvir', repos = 'https://cloud.r-project.org')

Bug tracker:https://github.com/magnusdv/dvir/issues2 issues

Datasets:
  • KETPch4 - Data used in the book Kling et al.
  • KETPex481 - Data used in the book Kling et al.
  • KETPex497 - Data used in the book Kling et al.
  • KETPex498 - Data used in the book Kling et al.
  • example1 - DVI dataset: Generational trio
  • example2 - DVI dataset: Two reference families
  • exclusionExample - Dataset: Exclusion example
  • fire - DVI dataset: Family of fire victims
  • grave - DVI dataset: Family grave
  • icmp - DVI dataset: A large reference pedigree
  • planecrash - DVI dataset: Simulated plane crash
  • symmetricSibs - Dataset: Symmetry examples

On CRAN:

Conda:

2.18 score 1 packages 407 downloads 1 mentions 33 exports 19 dependencies

Last updated 7 months agofrom:a45408a90d. Checks:3 OK. Indexed: no.

TargetResultLatest binary
Doc / VignettesOKMar 09 2025
R-4.5-linuxOKMar 09 2025
R-4.4-linuxOKMar 09 2025

Exports:amDrivenDVIBmarginalcheckDVIcompactJointResdirectMatchdviComparedviDatadviJointdviSimdviSolveexcludePairingexclusionMatrixexpand.grid.nodupfamilias2dvirfindExcludedfindNonidentifiablefindUndisputedformatSummarygeneratePairingsgetFamilygetSimpleFamsjointDVImergePMncombpairwiseLRplotDVIplotSolutionplotUndisputedrelabelDVIsequentialDVIsetPairingsubsetDVIswapOrientation

Dependencies:evaluateforrelgluehighrkinship2knitrlatticeMatrixpbapplypedFamiliaspedmutpedprobrpedtoolsquadprogribdslamverbalisrxfunyaml

Citation

Vigeland MD, Egeland T (2021). “Joint DNA-based disaster victim identification.” Scientific reports, 11, 13661. doi:10.1038/s41598-021-93071-5.

Corresponding BibTeX entry:

  @Article{,
    title = {Joint {DNA}-based disaster victim identification},
    author = {Magnus D. Vigeland and Thore Egeland},
    journal = {Scientific reports},
    year = {2021},
    volume = {11},
    pages = {13661},
    doi = {10.1038/s41598-021-93071-5},
  }

Readme and manuals

Disaster Victim Identification in R

The purpose of dvir is to implement state-of-the-art algorithms for DNA-based disaster victim identification (DVI). In particular, dvir performs joint identification of multiple victims.

The methodology and algorithms of dvir are described in Vigeland & Egeland (2021): DNA-based Disaster Victim Identification.

The dvir package is part of the pedsuite, a collection of R packages for pedigree analysis. Much of the machinery behind dvir is imported from other pedsuite packages, especially pedtools for handling pedigree data, and forrel for the calculation of likelihood ratios. A comprehensive presentation of these packages, and much more, can be found in the book Pedigree Analysis in R.

Installation

To get the current official version of dvir, install from CRAN as follows:

install.packages("dvir")

Alternatively, the latest development version may be obtained from GitHub:

# install.packages("remotes")
remotes::install_github("magnusdv/dvir")

Tutorial example

In the following we will use a toy DVI example from the paper (see above) to illustrate how to use dvir.

To get started, we load the dvir package.

library(dvir)
#> Loading required package: pedtools
Introduction

We consider the DVI problem shown below, in which three victim samples (V1, V2, V3) are to be matched against three missing persons (M1, M2, M3) belonging to two different families.

The hatched symbols indicate genotyped individuals. In this simple example we consider only a single marker, with 10 equifrequent alleles denoted 1, 2,…, 10. The available genotypes are shown in the figure.

DNA profiles from victims are generally referred to as post mortem (PM) data, while the ante mortem (AM) data contains profiles from the reference individuals R1 and R2.

Assignments

A possible solution to the DVI problem is called an assignment. In our toy example, there are a priori 14 possible assignments, which can be listed as follows:

#>    V1 V2 V3
#> 1   *  *  *
#> 2   *  * M3
#> 3   * M1  *
#> 4   * M1 M3
#> 5   * M2  *
#> 6   * M2 M3
#> 7  M1  *  *
#> 8  M1  * M3
#> 9  M1 M2  *
#> 10 M1 M2 M3
#> 11 M2  *  *
#> 12 M2  * M3
#> 13 M2 M1  *
#> 14 M2 M1 M3

Each row indicates the missing persons corresponding to V1, V2 and V3 (in that order) with * meaning not identified. For example, the first line contains the null model corresponding to none of the victims being identified, while the last line gives the assignment where (V1, V2, V3) = (M1, M2, M3), For each assignment a we can calculate the likelihood, denoted L(a). The null likelihood is denoted L0.

Goals

We consider the following to be two of the main goals in the analysis of a DVI case with multiple missing persons:

  1. Rank the assignments according to how likely they are. We measure this by calculating the LR comparing each assignment a to the null model: LR = L(a)/L0.
  2. Find the posterior pairing probabilities P(Vi = Mj | data) for all combinations of i and j, and the posterior non-pairing probabilities P(Vi = '*' | data) for all i.
The data

The pedigrees and genotypes for this toy example are available within dvir as a built-in dataset, under the name example2.

example2
#> DVI dataset: 
#>  3 victims (2M/1F): V1, V2, V3
#>  3 missing (2M/1F): M1, M2, M3
#>  2 typed refs: R1, R2
#>  2 ref families: 1, 2
#> Number of markers, PM and AM: 1

Internally, all DVI datasets in dvir have the structure of a list, with elements pm (the victim data), am (the reference data) and missing (a vector naming the missing persons): We can inspect the data by printing each object. For instance, in this case am is a list of two pedigrees:

example2$am
#> [[1]]
#>  id fid mid sex  L1
#>  M1   *   *   1 -/-
#>  R1   *   *   2 2/2
#>  M2  M1  R1   1 -/-
#> 
#> [[2]]
#>   id fid mid sex  L1
#>   R2   *   *   1 3/3
#>  MO2   *   *   2 -/-
#>   M3  R2 MO2   2 -/-

Note that the two pedigrees are printed in so-called ped format, with columns id (ID label), fid (father), mid (mother), sex (1 = male; 2 = female) and L1 (genotypes at locus L1).

The code generating this dataset can be found in the github repository of dvir, more specifically here: https://github.com/magnusdv/dvir/blob/master/data-raw/example2.R.

A great way to inspect a DVI dataset is to plot it with the function plotDVI().

plotDVI(example2)

The plotDVI() function offers many parameters for tweaking the plot; see the help page ?plotDVI() for details.

Joint identification

The jointDVI() function performs joint identification of all three victims, given the data. It returns a data frame ranking all assignments with nonzero likelihood:

jointRes = jointDVI(example2, verbose = FALSE)

# Print the result
jointRes
#>    V1 V2 V3    loglik  LR   posterior
#> 1  M1 M2 M3 -16.11810 250 0.718390805
#> 2  M1 M2  * -17.72753  50 0.143678161
#> 3   * M2 M3 -18.42068  25 0.071839080
#> 4  M1  * M3 -20.03012   5 0.014367816
#> 5   * M1 M3 -20.03012   5 0.014367816
#> 6   * M2  * -20.03012   5 0.014367816
#> 7   *  * M3 -20.03012   5 0.014367816
#> 8  M1  *  * -21.63956   1 0.002873563
#> 9   * M1  * -21.63956   1 0.002873563
#> 10  *  *  * -21.63956   1 0.002873563

The output shows that the most likely joint solution is (V1, V2, V3) = (M1, M2, M3), with an LR of 250 compared to the null model.

The function plotSolution() shows the most likely solution:

plotSolution(example2, jointRes, marker = 1)

By default, the plot displays the assignment in the first row of jointRes. To examine the second most likely, add k = 2 (and so on to go further down the list).

Posterior pairing probabilities

Next, we compute the posterior pairing (and non-pairing) probabilities. This is done by feeding the output from jointDVI() into the function Bmarginal().

Bmarginal(jointRes, example2$missing, prior = NULL)
#>            M1        M2        M3          *
#> V1 0.87931034 0.0000000 0.0000000 0.12068966
#> V2 0.01724138 0.9482759 0.0000000 0.03448276
#> V3 0.00000000 0.0000000 0.8333333 0.16666667

Here we used a default flat prior for simplicity, assigning equal prior probabilities to all assignments.

we see that the posterior pairing probabilities for the most likely solution are

  • P(V1 = M1 | data) = 0.88,
  • P(V2 = M2 | data) = 0.95,
  • P(V3 = M2 | data) = 0.83.

Help Manual

Help pageTopics
AM driven DVIamDrivenDVI
Posterior pairing probabilitiesBmarginal
Direct match LRdirectMatch
Compare DVI approachesdviCompare
DVI datacheckDVI dviData
Finds Generalised Likelihood Ratios (GLRs)dviGLR
Joint DVI searchdviJoint
Simulate genotypes in a DVI datasetdviSim
A complete pipeline for solving a DVI casedviSolve
DVI dataset: Generational trioexample1
DVI dataset: Two reference familiesexample2
Exclude pairingsexcludePairing
Dataset: Exclusion exampleexclusionExample
Combinations without duplicationsexpand.grid.nodup
Convert a Familias file to DVI datafamilias2dvir
Excluded individuals and pairings in a DVI datasetexclusionMatrix findExcluded
Nonidentifiable missing personsfindNonidentifiable
Undisputed identifications in a DVI problemfindUndisputed
DVI dataset: Family of fire victimsfire
Format final summary tableformatSummary
Sex-consistent pairingsgeneratePairings
Get AM component of selected individualsgetFamily
Find the simple families of a DVI datasetgetSimpleFams
DVI dataset: Family gravegrave
DVI dataset: A large reference pedigreeicmp
Joint DVI searchcompactJointRes jointDVI
Data used in the book Kling et al. (2021)KETPch4
Data used in the book Kling et al. (2021)KETPex481
Data used in the book Kling et al. (2021)KETPex497
Data used in the book Kling et al. (2021)KETPex498
Identity and merge matching PM samplesmergePM
The number of assignments for DVI problemncomb
Pairwise LR matrixpairwiseLR
DVI dataset: Simulated plane crashplanecrash
Plot a DVI problemplotDVI
Plot DVI solutionplotSolution
Plot undisputed identificationsplotUndisputed
Automatic labelling of a DVI datasetrelabelDVI
Sequential DVI searchsequentialDVI
Set identifications manuallysetPairing
Extract a subset of a DVI datasetsubsetDVI
Swap orientation of an assignment tableswapOrientation
Dataset: Symmetry examplessymmetricSibs