simNormalize: Normalization Simulator

Description Usage Arguments Details Value See Also Examples

Description

Simulates the normalization process of a DNA extract.

Usage

1
2
simNormalize(data = NULL, volume = NULL, accuracy = 1,
  target = 0.5/17.5, tolerance = 0.1, multiple = FALSE, debug = FALSE)

Arguments

data

data.frame with simulated data. Preferably output from simExtraction. Required columns are 'Marker', 'Allele', 'Sim', 'Volume', 'Ex.Conc', and 'DNA'.

volume

numeric for the final volume after dilution.If NULL it will be taken from column 'Volume'.

accuracy

numeric for the pipetting accuracy e.g. minimum pipetting volume.

target

numeric for the target concentration.

tolerance

numeric for the tolerance around the target concentration e.g. 0.1 is +-10%.

multiple

logic if TRUE the function will call itself until target is reached. Only the last round of results will be stored in the simulated dataset.

debug

logical flagging for debug mode.

Details

Simulates the normalization process by binomial selection of molecules. The average concentration per sample is used to calculate the dilution factor.

Value

data.frame with simulation results in columns 'Norm.Avg.Conc', 'Norm.Vol', 'Norm.Aliq', 'Norm.Aliq.Prob', 'Norm.DNA', 'Norm.Conc', and 'DNA'.

See Also

simExtraction

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
# 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=10000, sd.cells=200)

# [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)

# Simulate normalization.
res <- simNormalize(data=res, volume=100)

Example output

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 DEGRADATION
'Allele' must be character. 'data' converted
Audit trail created for data in function strvalidator::addSize.
Audit trail updated by function strvalidator::addSize.
'Size' column with estimated allele size added.
'Deg.Par' column added
'Deg.Prob' column added
'Deg.DNA' column added.
'DNA' column updated!
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 NORMALIZATION
'Norm.Vol' added.
'Norm.Avg.Conc' added.
'Norm.Aliq' added.
'Norm.Aliq.Prob' column added
'Norm.DNA' column added.
'Norm.Conc' column added.
'Volume' column updated!
'DNA' column updated!

pcrsim documentation built on May 2, 2019, 2:40 a.m.