This function calculates the quantitative value of the qPCR Ct value. Cycle threshold here is converted into the estimated number of gene target copies (e.g. viral load for a viral pathogen) by fitting a log linear model to the standard curve data and then using that model to find a point estimate for the provided Ct values.

calc_n_copies(ct_values, target_names, standard_curves)

Arguments

ct_values

A numeric vector giving the Ct value for each observation.

target_names

A character vector giving the target names for each element in 'ct_values'.

standard_curves

A data.frame containing results from standard curve dilution experiment. Elements in 'target_names' must map to either 'target_name_unique' or 'target_name_concise'. See package data object standard_curves_dhaka for template.

Value

Vector

Examples

if (FALSE) {

df <- template_es_data

test <- calc_n_copies(ct_values = df$ct_value,
                      target_names = df$target_name,
                      standard_curves = template_standard_curve)

df$n_copies <- test

}