Description Usage Arguments Details Value See Also Examples
View source: R/simExtraction.r
Simulates the DNA extraction process.
1 2 3 4 5 6 7 8 9 | simExtraction(
data = NULL,
vol.ex = 100,
sd.vol = 0,
prob.ex = 0.3,
sd.prob = 0,
cell.dna = 0.006,
debug = FALSE
)
|
data |
data.frame with simulated data. Preferably output from
|
vol.ex |
numeric for the final extraction volume (volume after extraction). |
sd.vol |
numeric for the standard deviation of |
prob.ex |
numeric for probability that an allele survives the extraction (extraction efficiency). |
sd.prob |
numeric for the standard deviation of |
cell.dna |
numeric to indicate the DNA content of a diploid cell in nanograms (ng). |
debug |
logical TRUE to indicate debug mode. |
Simulates the DNA extraction process by a series of normal
distributions. The number of molecules is taken from the required column
'DNA' which is floor
ed to avoid NAs in the rbinom
function.
data.frame with simulation results in columns 'Ex.Vol', 'Ex.Prob', Ex.DNA', 'Ex.Conc', and updated 'DNA' and 'Volume' columns (added if needed).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | # 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.
res <- simProfile(data=df, sim=3, name="Test")
# Simulate diploid sample.
res <- simSample(data=res, cells=100, sd.cells=20)
# [OPTIONAL] Simulate degradation.
res <- simDegradation(data=res, kit="ESX17", deg=0.003, quant.target=80)
# Simulate extraction.
res <- simExtraction(data=res, vol.ex=200, sd.vol=10, prob.ex=0.3, sd.prob=0.1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.