Description Usage Arguments Details Value See Also Examples
Simulates the Polymerase Chain Reaction (PCR) process.
1 2 3 4 |
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)
|
Loading required package: strvalidator
R session is headless; GTK+ not initialized.
STR-validator 2.0.0 loaded!
PCRsim 1.0.2 loaded!
SIMULATE PROFILE
'Sim' column added.
'Sample.Name' column added.
SIMULATE SAMPLE
'Sample.Haploid' column added.
'Sample.Cells' column added.
'DNA' column added.
SIMULATE EXTRACTION
'Ex.Vol' column added.
'Ex.Prob' column added.
'Ex.DNA' column added.
'Ex.Conc' column added.
'Volume' column added.
'DNA' column updated!
SIMULATE POLYMERASE CHAIN REACTION
'PCR.Pip.Vol' column added
'PCR.Aliq.Prob' column added
'PCR.DNA' column added.
'PCR.Vol' column added.
'kit' is not provided. Using PCR probability on a per sample basis.
'PCR.Prob' column added.
'PCR.Prob.Stutter' column added.
Sum probabilities check passed (<=1).
'PCR.Amplicon' column added.
'PCR.Stutter.1' column added.
'PCR.Stutter.2' column added.
'DNA' column updated!
SIMULATE POLYMERASE CHAIN REACTION
'PCR.Pip.Vol' column added
'PCR.Aliq.Prob' column added
'PCR.DNA' column added.
'PCR.Vol' column added.
'kit' is provided. Using PCR probability on a per locus basis.
Fetch kit parameters from file.
'PCR.Prob' column added.
'PCR.Prob.Stutter' column added.
Use fixed values for stutter probability.
Sum probabilities check passed (<=1).
'PCR.Amplicon' column added.
'PCR.Stutter.1' column added.
'PCR.Stutter.2' column added.
'DNA' column updated!
'Allele' must be character. 'data' converted
Audit trail created for data in function strvalidator::addSize.
Audit trail updated by function strvalidator::addSize.
Added column 'Size'
SIMULATE POLYMERASE CHAIN REACTION
'PCR.Pip.Vol' column added
'PCR.Aliq.Prob' column added
'PCR.DNA' column added.
'PCR.Vol' column added.
'kit' is provided. Using PCR probability on a per locus basis.
Fetch kit parameters from file.
'PCR.Prob' column added.
'PCR.Prob.Stutter' column added.
Use regression to calculate stutter probability.
Sum probabilities check passed (<=1).
'PCR.Amplicon' column added.
'PCR.Stutter.1' column added.
'PCR.Stutter.2' column added.
'DNA' column updated!
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.