Learn R Programming

pcrsim (version 0.1.1)

simPCR: PCR simulator

Description

simPCR simulates the PCR process.

Usage

simPCR(ncells, probEx = 1, probAlq = 1, probPCR = 1,
    cyc = 28, tDetect = 5 * 10^7, dip = TRUE, KH = 55,
    sim = 1)

Arguments

ncells
integer for number of cells/dna molecules for the current allele. Can be vector of integers giving the number of cells in each simulation.
probEx
numeric for probability that an allele survives the extraction (extraction efficiency). Can be vector of numeric giving the probability in each simulation.
probAlq
numeric, probability that an allele is aliquoted into the PCR reaction. Can be vector of numeric giving the probability in each simulation.
probPCR
numeric, probability that an allele is amplified during a PCR cycle (PCR efficiency). Can be vector of numeric giving the probability in each simulation.
cyc
integer, number of PCR cycles.
tDetect
integer, detection threshold. Number of molecules needed to trigger a signal.
KH
integer, correlation factor for number of molecules to peak height.
sim
integer, number of simulations.
dip
logical flagging for diploid cells (haploid cells are currently not implemented)

Value

  • list with simulation results.

Details

Based on simPCR2 from the forensim package by Hinda Haned. Simulates PCR for a single allele by a series of binomial distributions.

Examples

Run this code
simPCR(ncells=100, probEx=0.7, probAlq=0.1, probPCR=0.85, sim=100)

Run the code above in your browser using DataLab