Simulation of the Forensic DNA Process

Simulate the forensic DNA process: generate random or fixed DNA profiles, create forensic samples including mixtures of diploid and haploid cells, simulate DNA extraction, normalization, degradation, amplification including stutters and inter-locus balance, and capillary electrophoresis. DNA profiles are visualized as electropherograms and saved in tables. The command pcrsim() opens up a graphical user interface which allow the user to create projects, to enter, load, and save parameters required for the simulation. The simulation is transparent and the parameters used in each step of the simulation can be viewed in the result tables.

An R package for simulation of the forensic DNA process

The package was developed based on the simulation functions in forensim, which is an implementation of A graphical simulation model of the entire DNA process, but expanded to include simulation of entire profiles and mixtures. In addition pcrsim is able to simulate inter-locus balance, stutters, and degradation. The graphical user interface give access to function parameters organised into tabs for the respective subprocess. Simulation is performed and the result for each step can be viewed as a table within the GUI or plotted as an electropherogram (EPG). Effort has been made to mimic each step of the real process as closely as possible - consequently, due to performance, it is not well suited for very large simulations. For realistic simulations pcrsim must be calibrated to the quantification method used and for each capillary electrophoresis instrument.


  • Updated calibratePCRsim, calibrateScaling for compatibility with strvalidator 1.8.
  • getParameter: res initalised to NA to take care of unhandled combinations. "Error in str(res) : object 'res' not found"
  • pcrsim: Fixed error when loaded method is not parameters.txt: "Error in if (val_method %in% profile_method_drp[]) { : argument is of length zero"
  • New structure with separate functions to simulate each step in the process.
  • Updated for compatibility with strvalidator version 0.2.0
  • Initial release

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


1.0.2 by Oskar Hansson, 12 days ago

Report a bug at

Browse source code at

Authors: Oskar Hansson

Documentation:   PDF Manual  

GPL-2 license

Imports ggplot2, data.table, gWidgets, mc2d, plyr

Depends on strvalidator

See at CRAN