Description Usage Arguments Details Value See Also Examples
Simulates the Polymerase Chain Reaction (PCR) process.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
data |
data.frame with simulated data. Preferably output from |
kit |
string representing the typing kit used, or data.frame with kit characteristics.
Provides locus specific PCR efficiency and stutter probabilities.
If NULL |
method |
string representing the method of the specified kit. |
pcr.cyc |
numeric for the number of PCR cycles. |
pcr.prob |
numeric for the PCR efficiency (probability amplifying a DNA molecule).
Only used if |
sd.pcr.prob |
numeric for the standard deviation of |
stutter |
logical to simulate stutters. |
stutter.prob |
numeric for the probability generating a stutter.
Only used if |
sd.stutter.prob |
numeric for the standard deviation of |
stutter.reg |
logical to use regression for stutter probability. |
vol.aliq |
numeric for the aliquot extract forwarded to PCR. |
sd.vol.aliq |
numeric for the standard deviation of |
vol.pcr |
numeric for the total PCR reaction volume. |
sd.vol.pcr |
numeric for the standard deviation of |
debug |
logical to print debug information. |
Simulates the PCR process by a series of binomial distributions,
or multinomial distributions if stutter=TRUE
. The PCR probability/
efficiency can be specified globally or per locus. Probability of stutter
formation can be specified globally, per locus, or per locus and allele size.
data.frame with simulation results in columns 'PCR.Pip.Vol', 'PCR.Aliq.Prob', 'PCR.DNA', 'PCR.Vol', 'PCR.Prob', 'PCR.Prob.Stutter', 'PCR.Amplicon', 'PCR.Stutter.1', 'PCR.Stutter.2', and updated 'DNA' column (added if needed).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | # Create a data frame with a DNA profile.
markers = rep(c("D3S1358","TH01","FGA"), each=2)
alleles = c(15,18,6,10,25,25)
df <- data.frame(Marker=markers, Allele=alleles)
# Simulate profile.
smpl <- simProfile(data=df, sim=10)
# Simulate sample.
smpl <- simSample(data=smpl, cells=1000, sd.cells=200)
# Simulate extraction.
smpl <- simExtraction(data=smpl, vol.ex=200, sd.vol=10, prob.ex=0.6, sd.prob=0.1)
# Simulate PCR with 95% PCR efficiency and 0.2% stutter probability for all loci.
res <- simPCR(data=smpl, pcr.prob=0.95, pcr.cyc=30, vol.aliq=10,
sd.vol.aliq=0.1, vol.pcr=25, sd.vol.pcr=1)
# Simulate PCR with locus specific PCR efficiency and stutter probability.
res <- simPCR(data=smpl, kit="ESX17", pcr.cyc=30, vol.aliq=10,
sd.vol.aliq=0.1, vol.pcr=25, sd.vol.pcr=1)
# Simulate PCR with locus specific PCR efficiency and stutter probability.
res <- simPCR(data=smpl, kit="ESX17", pcr.cyc=30, vol.aliq=10,
sd.vol.aliq=0.1, vol.pcr=25, sd.vol.pcr=1, stutter.reg=TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.