View source: R/amp_melt_curve_functions.R
calculate_drdt_plate | R Documentation |
dR/dT, the derivative of the melt curve (of fluorescence signal R vs temperature T), has a maximum at the melting temperature Tm. A single peak in this suggests a single-length PCR product is present in the well.
calculate_drdt_plate(platemelt, method = "spline", ...)
platemelt |
data frame describing melt curves, including variables well, temperature, fluor_raw (raw fluorescence value). |
method |
to use for smoothing: "spline" default, uses smoothing spline stats::smooth.spline. "diff" base::diff for lagged difference |
... |
other arguments to pass to smoothing method. |
Note that this function does not group by plate, only by well. The function will give strange results if you pass it data from more than one plate. Avoid this by analysing one plate at a time.
platemelt with additional column dRdT.
Other melt_curve_functions:
calculate_dydx()
# create simple curve
# create simple dataset of raw fluorescence with two samples
temp_tibble <- tibble(sample_id = rep(c("S1", "S2"), each = 10),
target_id = "T1",
well_row = "A",
well_col = rep(c(1, 2), each = 10),
well = rep(c("A1", "A2"), each = 10),
temperature = rep(56:65,2),
fluor_raw = c(1:10, 6:15))
# calculate drdt of all melt curves
#----- use case 1 : using splines
temp_tibble |>
calculate_drdt_plate()
# optional arguments are passed to smooth.splines function
temp_tibble |>
calculate_drdt_plate(spar = 0.5)
#----- use case 2 : using difference between adjacent points
temp_tibble |>
calculate_drdt_plate(method = "diff")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.