simCE: CE Simulator

Description Usage Arguments Details Value See Also Examples

View source: R/simCE.r

Description

Simulates the capillary elechtrophoresis (CE) process.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
simCE(
  data,
  vol = 1,
  sd.vol = 0,
  intercept = -7.7662,
  slope = 0.859,
  sigma = 0.5798,
  t.intercept = 10.82719,
  t.slope = 0.9047,
  t.sigma = 0.5951,
  debug = FALSE
)

Arguments

data

data.frame with simulated data. Preferably output from simPCR. Required columns are 'PCR.Vol' and 'PCR.Amplicon'.

vol

numeric for the aliquot PCR product for CE analysis.

sd.vol

numeric for the standard deviation of vol.

intercept

numeric for the intercept of the linear model to scale molecules -> rfu.

slope

numeric for the slope of the linear model to scale molecules -> rfu.

sigma

numeric for the residual standard error of the linear model to scale molecules -> rfu. NB! NOT USED!

t.intercept

numeric for the intercept of the linear model to calculate detection threshold (molecules).

t.slope

numeric for the slope of the linear model to calculate detection threshold (molecules). NB! NOT USED!

t.sigma

numeric for the residual standard error of the linear model to calculate detection threshold (molecules).

debug

logical for printing debug information.

Details

Simulates the forensic capillary electrophoresis analysis of PCR product.

Value

data.frame with simulation results in columns 'CE.xxx'.

See Also

simPCR

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
# 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=5, name="Test")

# Simulate sample
res <- simSample(data=res, cells=58, sd.cells=0)

# Simulate extraction.
res <- simExtraction(data=res, vol.ex=1, sd.vol=0, prob.ex=1, sd.prob=0)

# Simulate PCR.
res <- simPCR(data=res, kit=NULL, pcr.cyc=30, vol.aliq=1, sd.vol.aliq=0, vol.pcr=25, sd.vol.pcr=0)

# Simulate CE.
res <- simCE(data=res, vol=1, sd.vol=0, intercept=-10.48, slope=0.86, sigma=0.58)
print(res)

OskarHansson/pcrsim documentation built on Jan. 22, 2022, 11:55 a.m.