View source: R/calculate_efficiency.R
calculate_efficiency | R Documentation |
Note efficiency is given in ratio, not per cent; multiply by 100 for that.
calculate_efficiency(cq_df_1, formula = cq ~ log2(dilution) + biol_rep)
cq_df_1 |
data frame with cq (quantification cycle) data, 1 row per well. Must have columns cq, dilution. Assumes data are only for 1 probe/primer set/target_id, i.e. all values in cq_df_1 are fit with the same slope. |
formula |
formula to use for log-log regression fit. Default value assumes multiple biological replicates, cq ~ log2(dilution) + biol_rep. If only a single Biological Replicate, change to cq ~ log2(dilution). |
data frame with 1 single row, and columns: efficiency, efficiency.sd, r.squared.
calculate_efficiency_bytargetid
# create simple dilution dataset
dilution_tibble <- tibble(dilution = rep(c(1, 0.1, 0.001, 0.0001), 2),
cq = c(1, 3, 4, 6,
4, 5, 6, 7),
biol_rep = rep(c(1,2), each = 4),
target_id = "T1")
# calculate primer efficiency
#----- use case 1: include difference across replicates in model
dilution_tibble |>
calculate_efficiency()
#----- use case 2: ignore difference across replicates
dilution_tibble |>
calculate_efficiency(formula = cq ~ log2(dilution))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.