knownqpcr {freqpcr} | R Documentation |
Estimate auxiliary parameters using samples with known allele ratios.
Description
The function to estimate the auxiliary experimental parameters using DNA solutions, provided the dataset contains samples with multiple allele mixing ratios and the exact mixing ratio are known for each sample. This function is used when all replicates in the dataset comprise the complete observations on the 2 \times 2
combinations of the qPCR conditions in a RED-\Delta\Delta
Cq analysis: (loci for target or housekeeping genes) and (the target gene is undigested or digested with endonuclease). The quartet of the four Cq data, housek0
, target0
(these two are undigested samples amplified with housekeeping and target genes, respectively), housek1
, and target1
(digested samples) should be prepared as four numeric vectors having the same length.
One more variable, trueY
is needed to run the estimation process; it a numeric vector having the same length with the four Cq data. It holds the exact allele-mixing ratio for each quartet (also see the code example). Optionally, you can adjust the relative DNA concentration between the replicates with a parameter vector A
.
Since version 0.3.2, the knownqpcr()
function can also deal with general \Delta\Delta
Cq analyses. In such cases, samples with any mixing ratios are generally marked as ‘digested samples’ i.e., either of housek1
or target1
, depending on the loci to be amplified. The arguments of the corresponding undigested samples, housek0
and target0
, must not be specified by the user. Then, the parameter baseChange
(\delta_{B}
: the change rate of DNA contents before/after the endonuclease digestion) is not included in the estimation result.
Usage
knownqpcr(
housek0,
target0,
housek1,
target1,
trueY,
A = rep(1, length(trueY)),
XInit = c(meanDNA = -10, targetScale = 0, baseChange = 0, sdMeasure = 1, zeroAmount =
-5, EPCR = 0),
method = "BFGS",
pvalue = 0.05,
trace = 0,
report = 10,
verbose = FALSE
)
Arguments
housek0 , target0 , housek1 , target1 |
Measured Cq values. Numeric vectors having the same length as |
trueY |
A numeric vector having the same length as the Cq data. |
A |
Optionally, you can specify relative DNA content between the samples, as a numeric vector having the same length as the Cq data. If present, |
XInit |
Optionally, the named vector specifies the initial parameter values to be optimized. Defined in the natural log scale; e.g. |
method |
A string specifying the optimization algorithm used in |
pvalue |
The two-sided confidence interval is calculated at the last iteration at given significance level. Default is 0.05, which returns the 95% Wald's CI (2.5 to 97.5 percentile) based on the Hessian matrix. |
trace |
Non-negative integer. If positive, |
report |
The frequency of reports if |
verbose |
Send messages to stdout? Default is FALSE. |
Value
A table containing the estimated values for the following parameters:
meanDNA
is the template DNA concentration (of housekeeping gene, per unit volume of sample solution) compared to the threshold line of PCR.targetScale
(\delta_{T}
) is the relative template DNA amount of the target to the houskeeping loci.baseChange
(\delta_{B}
) is the change rate in the DNA amount after endonuclease digestion in RED-\Delta\Delta
Cq method. In general\Delta\Delta
Cq analyses (neitherhousek0
nortarget0
is input), this parameter is not returned. In both cases,baseChange
is not required to runfreqpcr()
.sdMeasure
(\sigma_{c}
) is the measurement error (standard deviation) at each Cq value.zeroAmount
(z
) is the ratio of non-target allele amplified in qPCR (see the argument list offreqpcr()
).EPCR
(\eta
) is the amplification efficiency per PCR cycle.
See Also
Other estimation procedures:
freqpcr()
,
knownqpcr_unpaired()
,
sim_dummy()
Examples
# A dummy Cq dataset: four mixing ratios with four replicates.
# K:2, scaleDNA:1e-11, targetScale:1.5, baseChange:0.3, zeroAmount:1e-3,
# sdMeasure:0.3, and EPCR:0.95. Assuming a RED-DeltaDeltaCq analyses.
trueY <- c(rep(0.1, 4), rep(0.25, 4), rep(0.5, 4), rep(1, 4))
housek0 <- c( 19.39, 19.78, 19.28, 19.58, 18.95, 19.91, 19.66, 19.96,
20.05, 19.86, 19.55, 19.61, 19.86, 19.27, 19.59, 20.21 )
target0 <- c( 19.16, 19.08, 19.28, 19.03, 19.17, 19.67, 18.68, 19.52,
18.92, 18.79, 18.8, 19.28, 19.57, 19.21, 19.05, 19.15 )
housek1 <- c( 21.61, 21.78, 21.25, 21.07, 22.04, 21.45, 20.72, 21.6,
21.51, 21.27, 21.08, 21.7, 21.44, 21.46, 21.5, 21.8 )
target1 <- c( 24.3, 24.22, 24.13, 24.13, 22.74, 23.14, 23.02, 23.14,
21.65, 22.62, 22.28, 21.65, 20.83, 20.82, 20.76, 21.3 )
d.cmp <- data.frame(A=rep(1, 16), trueY, housek0, target0, housek1, target1)
print(d.cmp)
# In RED-DeltaDeltaCq analyses, four observations stem from one sample solution.
# Each argument must be specified with its name (name=source).
knownqpcr( housek0=d.cmp$housek0, target0=d.cmp$target0,
housek1=d.cmp$housek1, target1=d.cmp$target1,
trueY=d.cmp$trueY, A=d.cmp$A, verbose=FALSE )
# In general DeltaDeltaCq analyses, the experimental design will not include
# dedicated control samples. The function then runs without 'housek0' and 'target0'.
knownqpcr( housek1=d.cmp$housek1, target1=d.cmp$target1,
trueY=d.cmp$trueY, A=d.cmp$A, verbose=TRUE )