Description Usage Arguments Details Value See Also Examples
View source: R/simDegradation.r
Simulates the degradation of DNA.
1 | simDegradation(data, kit, deg, quant.target, debug = FALSE)
|
data |
data.frame with simulated data. Preferably output from |
kit |
character string for STR DNA amplification kit. |
deg |
numeric for the estimated degradation probability (chance per base pair) |
quant.target |
integer defining the quantification target size in base pair. |
debug |
logical TRUE to indicate debug mode. |
Simulates the DNA degradation process by calculating the
probability that a DNA fragment of the specific size (bp) is complete
i.e. not degraded. Then a binomial selection of non-degraded molecules
takes place with the previously calculated probability.
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 simulated results in columns 'Deg.Par', 'Deg.Prob', and 'Deg.DNA'.
1 2 3 4 5 6 7 8 9 10 11 | # Simulate profile.
# Get allele frequency database.
require(strvalidator)
db <- strvalidator::getDb(getDb()[2])
# Simulate profile.
res <- simProfile(kit= "ESX17", db=db, sim=10, name="Test")
# Simulate sample.
res <- simSample(data=res, cells=5000)
# Simulate degradation.
res <- simDegradation(data=res, kit="ESX17", deg=0.03, quant.target=80)
print(res)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.