Learn R Programming

qpcR (version 1.3-7.1)

getPar: Batch calculation of qPCR fit parameters/efficiencies/threshold cycles with simple output, especially tailored to high-throughput data

Description

This is a cut-down version of pcrbatch, starting with data of class 'modlist', which delivers a simple dataframe output, with either the parameters of the fit or calculated threshold cycles/efficiencies. The column names are deduced from the run names. All calculations have been error-protected through tryCatch, so whenever there is any kind of error (parameter extraction, efficiency estimation etc), NA is returned. This function can be used with high throughput data quite conveniently. All methods as in pcrbatch are available. The results are automatically copied to the clipboard.

Usage

getPar(x, type = c("fit", "curve"), cp = "cpD2", eff = "sigfit", ...)

Arguments

x
an object of class 'pcrfit' or 'modlist'.
type
fit will extract the fit parameters, curve will invoke efficiency and return threshold cycles/efficiencies.
cp
which method for threshold cycle estimation. Any of the methods in efficiency, i.e. "cpD2" (default), "cpD1", "maxE", "expR", "Cy0", "CQ", "maxRatio".
eff
which method for efficiency estimation. Either "sigfit" (default), "sliwin" or "expfit".
...
other parameters to be passed to efficiency, sliwin or expfit.

Value

  • A dataframe, which is automatically copied to the clipboard.

Details

Takes about 4 sec for 100 runs on a Pentium 4 Quad-Core (3 Ghz) when using type = "curve". When using type = "fit", the fitted model parameters are returned. If type = "curve", threshold cycles and efficiencies are calculated by efficiency based on the parameters supplied in ... (default cpD2).

Examples

Run this code
## simple example with
## fit parameters
ml1 <- modlist(rutledge, model = l5)
getPar(ml1, type = "fit")

## simple example with
## plotting of threshold cycles
res1 <- getPar(ml1, type = "curve", cp = "cpD2", eff = "sliwin")
barplot(res1[1, ], las = 2)

## using a mechanistic model such as
## 'mak3' and extracting D0 values
## => initial template fluorescence
ml2 <- modlist(rutledge, 1, 2:41, model = mak3)
res <- getPar(ml2, type = "fit")
barplot(log10(res[1, ]), las = 2)

Run the code above in your browser using DataLab