Create qPCR calibration plots.
calib_plot(data, target, lod = NULL, robust = FALSE, ...)
data | A |
---|---|
target | A character string containing a unique identifier for the target calibration curve to be plotted. |
lod | A vector or |
robust | A logical value indicating whether the fitted model should exclude standards with less than 50%
detections. Default = |
... | Placeholder for further arguments that might be needed by future implementations. |
A ggplot2
object
The data
object contains data for at least one qPCR calibration curve
usually presented as Cq (Ct) value and corresponding copy number from from a series of serial dilutions.
The data.frame
must contain the headers Target
, Cq
and SQ
. The Target
column must contain unique identifiers for each calibration curve. The Cq
column contains the
Cq (Ct) values and SQ
contains the copy number data. Additional columns will be ignored.
The target
argument takes a single character string specifying the target calibration curve
to plot.
The lod
argument can be supplied as a vector or as a data.frame
or tibble
. If
supplied as a vector then a single LOD value or optionally an LOD and LOQ value can be included. If both LOD
and LOQ values are specified then LOD much be supplied first in the vector (i.e. c(1.5, 4.1)
).
If supplied as a data.frame
or tibble
the object must contain the headers Targets
,
and lod
and with an optional loq
header specifying the calibration curve target, the lod and loq
values respectively.
Non-detections in data
should be represented as NA
.
if (FALSE) { require(tibble) # lod as tibble lod_data <- tibble(Target = "706", lod = 1.5, loq = 4.3) calib_plot(calib_data, target = "706", lod = lod_data) # lod as vector lod_data <- c(1.5, 4.3) calib_plot(calib_data, target = "706", lod = lod_data) # loq missing and robust = TRUE lod_data <- tibble(Target = "706", lod = 1.5) calib_plot(calib_data, target = "706", lod = lod_data, robust = TRUE) }