Learn R Programming

pcrsim (version 0.1.1)

simPCRexplorer: Explore PCR simulator

Description

simPCRexplorer explore simPCR by varying a parameter.

Usage

simPCRexplorer(ncells = 100, probEx = 1, probAlq = 1,
    probPCR = 1, cyc = 28, tDetect = 2 * 10^7, dip = TRUE,
    KH = 55, simulations = 1000)

Arguments

ncells
number of cells.
probEx
probability of extraction.
probAlq
probability of aliquote.
probPCR
probability of PCR (PCR efficiency).
cyc
number of PCR cycles.
tDetect
detection threshold.
KH
scaling factor for number of molecules to peak height.
simulations
number of simulations.
dip
logical flagging for diploid cells (haploid cells are currently not implemented)

Value

  • list with simulation results.

Details

Makes it easy to explore the effect of one parameter on the PCR simulation.

Examples

Run this code
# Simulating 0-1000 cells 1000 times each and plotting means.
sim <- simPCRexplorer(ncells=seq(0,1001, by=10), probEx=0.7, probAlq=0.1, probPCR=0.85)
plot(x=seq(0,1001, by=10), y=lapply(sim, mean), xlab=c("# cells"), ylab=c("Peak height (rfu)"))

Run the code above in your browser using DataLab