make_dummy {freqpcr} | R Documentation |
Generate dummy DNA dataset ready for allele-frequency estimation.
Description
The function generates a dummy dataset of typical RED-\Delta\Delta
Cq analysis. You can directly feed the output of this function to the first argument of sim_dummy()
.
Usage
make_dummy(
rand.seed,
P,
K,
ntrap,
npertrap,
scaleDNA = (1/K) * 1e-06,
targetScale,
baseChange,
EPCR,
zeroAmount,
sdMeasure,
diploid = FALSE
)
Arguments
rand.seed |
Seed for the R built-in random-number-generator. |
P |
A numeric between 0 and 1 giving the population allele frequency from which the test samples are generated. |
K |
A positive numeric of the gamma shape parameter of the individual DNA yield. |
ntrap , npertrap |
Scalar specifying the number of bulk samples ( |
scaleDNA |
Small positive scalar that specifies the scale parameter of the gamma distribution appriximating the DNA yield from (per-haploid) individual. The yield of |
targetScale |
( |
baseChange |
( |
EPCR |
( |
zeroAmount |
A numeric between 0 and 1, usually near 0, giving the residue rate of restriction enzyme digestion in RED- |
sdMeasure |
( |
diploid |
Is the target organism diploidy? Default is |
Value
Object of the S4 class CqList, storing the dummy experiment data of Cq-based qPCR analysis. Note that a CqList object in no way contains original information on P
, K
, targetScale
, sdMeasure
, and EPCR
.
Examples
P <- 0.25
# Just a test: segregation ratios for six bulk samples, 1000 individuals for each.
rmultinom(n=6, size=1000, prob=c(P, 1-P)) # haploidy
rmultinom(6, size=1000, prob=c(P^2, 2*P*(1-P), (1-P)^2)) # diploidy
# Dummy Cq dataset with six bulk samples, each of which comprises eight haploids.
dmy_cq <- make_dummy( rand.seed=1, P=0.15, K=2, ntrap=6, npertrap=8,
scaleDNA=1e-07, targetScale=1.5, baseChange=0.3, EPCR=0.95,
zeroAmount=1e-3, sdMeasure=0.3, diploid=FALSE )
print(dmy_cq)