R/calib_predict.R
calib_predict.Rd
Predicts copy number (CN) from Ct (Cq) values from one or more standard curves using inverse prediction.
calib_predict(calib_df, ct_df, ...)
calib_df | A |
---|---|
ct_df | A |
... | Placeholder for further arguments that might be needed by future implementations. |
A tibble
object containing original data in ct_df
with back transformed
copy number predictions (CN.back
) and associated standard errors (CN.back.se
).
The calib_df
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 ct_df
data.frame object usually contains qPCR Cq (Ct) values from sample data. The data.frame must
contain the headers calib.curve
and Ct.value
. The calib.curve
column must contain
at least one unique calibration curve identifier corresponding to those in calib_df
. Any identifiers
found in ct_df
but not in calib_df
will be ignored and a warning
displayed. The
Ct.value
column should contain the Cq (Ct) values from environmental samples. Any additional columns
in the data.frame will remain unchanged and be included in the returned object.
Non-detections in either the calib_df
or ct_df
data.frames
should be represented as NA
.
Copy number is predicted from Cq (Ct) values by fitting a linear model (lm
) to data from each
calibration curve and then using the inverse.predict
function from the chemCal-package
package.
Copy number values in calib_df
should not be log transformed prior to using this function.
Massart, L.M, Vandenginste, B.G.M., Buydens, L.M.C., De Jong, S., Lewi, P.J., Smeyers-Verbeke, J. (1997) Handbook of Chemometrics and Qualimetrics: Part A, p. 200.
if (FALSE) { my_pred <- calib_predict(calib_df = calib_data, ct_df = field_data) }