View source: R/04_simulation.R
make_dummy | R Documentation |
The function generates a dummy dataset of typical RED-ΔΔCq analysis. You can directly feed the output of this function to the first argument of sim_dummy()
.
make_dummy( rand.seed, P, K, ntrap, npertrap, scaleDNA = (1/K) * 1e-06, targetScale, baseChange, EPCR, zeroAmount, sdMeasure, diploid = FALSE )
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 |
(δ_{T}) The relative template DNA amount of the target gene to the houskeeping gene, given as a positive numeric. |
baseChange |
(δ_{B}) The change rate in the template DNA quantities after the restriction enzyme digestion (in the RED-ΔΔCq method), given as a positive numeric. This parameter is not used in |
EPCR |
(η) Amplification efficiency per PCR cycle, given as a positive numeric. When |
zeroAmount |
A numeric between 0 and 1, usually near 0, giving the residue rate of restriction enzyme digestion in RED-ΔΔCq method. |
sdMeasure |
(σ_{c}) Scalar. The measurement error (standard deviation) on each Cq value following Normal(0, σ_{c}^2). If known, given as a positive numeric. |
diploid |
Is the target organism diploidy? Default is |
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
.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.