Calculation of the melting temperatures (Tm, Tm1D2 and Tm2D2) from the first and the second derivative
Description
diffQ2()
calls instances of diffQ()
to calculate the Tm1D2 and
Tm2D2. The options are similar to diffQ()
. Both diffQ()
and
diffQ2()
return objects of the class list
. To accessing
components of lists is done as described elsewhere either be name or by
number. diffQ2
has no standalone plot function. For sophisticated
analysis and plots its recommended to use diffQ2
as presented in the
examples as part of algorithms.
Usage
1 2 3 4 
Arguments
xy 
is a 
fct 
accepts 
fws 
defines the number (n) of left and right neighbors to use for the calculation of the quadratic polynomial. 
col 
is a graphical parameter used to define the length of the line used in the plot. 
plot 
shows a plot of a single melting curve with (Tm) as vertical
line and the second derivatives (Tm1D2 and Tm2D2). To draw multiple curves
in a single plot set 
verbose 
shows additional information (e.g., first and second approximate derivatives, ranges used for calculation, approximate Tm, Tm1D2, Tm2D2) of the calculation. 
peak 
shows the peak in the plot. 
deriv 
shows the first derivative with the color assigned to

negderiv 
calculates the negative derivative (default). If

derivlimits 
shows the number (n) used to calculate the Tm as points in the plot (see examples). 
derivlimitsline 
shows the number (n) used to calculate the Tm as line in the plot (see examples). 
vertiline 
draws a vertical line at the Tms (see examples). 
rsm 
performs a doubling of the temperature resolution by calculation of the mean temperature and mean fluorescence between successive temperature steps. Note: mcaSmoother has the "n" parameter with a similar but advanced functionality. 
inder 
Interpolates derivatives using the fivepoint stencil. See

warn 
diffQ tries to keep the user as informed as possible about the
quality of the analysis. However, in some scenarios are the warning and
message about analysis not needed or disturbing. 
Value
$TmD1 

$TmD1$Tm 
returns the calculated melting temperature ("Tm") from the first derivative. 
$TmD1$fluoTm 
returns the calculated fluorescence at the calculated melting temperature ("Tm"). 
$TmD1$Tm.approx 
returns the approximate melting temperature ("Tm") from the first derivative. 
$TmD1$fluo.x 
returns the approximate fluorescence at the calculated melting temperature ("Tm"). 
$TmD1$xy 
is a 
$TmD1$limits.xQ 
returns a data range of temperature values used to calculate the melting temperature. 
$TmD1$limits.diffQ 
returns a data range of fluorescence values used to calculate the melting temperature. 
$TmD1$adj.r.squared 
returns the adjusted Rsquared from the quadratic
model fitting function (see also 
$TmD1$NRMSE 
returns the normalized rootmeansquarederror (NRMSE)
from the quadratic model fitting function (see also 
$TmD1$fws 
returns the number of points used for the calculation of the melting temperature of the first derivative. 
$TmD1$devsum 
returns measures to show the difference between the approximate and calculated melting temperature of the first derivative. 
$TmD1$fit 
returns the summary of the results of the quadratic model fitting function of the first derivative. 
$Tm1D2 
returns the "left" melting temperature ("Tm1D2 ") values from the second derivative. 
$Tm1D2$Tm 
returns the "left" calculated melting temperature ("Tm1D2") from the second derivative. 
$Tm1D2$fluoTm 
returns the "left" calculated fluorescence at the calculated melting temperature ("Tm1D2") from the second derivative. 
$Tm1D2$Tm.approx 
returns the "left" approximate melting temperature ("Tm1D2") from the second derivative. 
$Tm1D2$fluo.x 
returns the "left" approximate fluorescence at the calculated melting temperature ("Tm1D2") from the second derivative. 
$Tm1D2$xy 
is a 
$Tm1D2$limits.xQ 
returns a data range of temperature values used to calculate the melting temperature of the "left" melting temperature ("Tm1D2") from the second derivative. 
$Tm1D2$limits.diffQ 
returns a data range of fluorescence values used to calculate the melting temperature of the "left" melting temperature ("Tm1D2") from the second derivative. 
$Tm1D2$adj.r.squared 
returns the adjusted Rsquared from the
quadratic model fitting function (see also 
$Tm1D2$NRMSE 
returns normalized rootmeansquarederror (NRMSE) from
the quadratic model fitting function (see also 
$Tm1D2$fws 
returns the number of points used for the calculation of the melting temperature of the "left" melting temperature ("Tm1D2") from the second derivative. 
$Tm1D2$devsum 
returns measures to show the difference between the approximate and alculated melting temperature of the "left" melting temperature ("Tm1D2") from the second derivative. 
$Tm1D2$fit 
returns the summary of the results of the quadratic model fitting function of the "left" melting temperature ("Tm1D2") from the second derivative. 
$Tm2D2 
returns the "right" melting temperature ("Tm2D2 ") values from the second derivative. 
$Tm2D2$Tm 
returns the "right" calculated melting temperature ("Tm2D2") from the second derivative. 
$Tm2D2$fluoTm 
returns the "right" calculated fluorescence at the calculated melting temperature ("Tm2D2") from the second derivative. 
$Tm2D2$Tm.approx 
returns the "right" approximate melting temperature ("Tm1D2") from the second derivative. 
$Tm2D2$fluo.x 
returns the "left" approximate fluorescence at the calculated melting temperature ("Tm2D2") from the second derivative. 
$Tm2D2$xy 
is a 
$Tm2D2$limits.xQ 
returns a data range of temperature values used to calculate the melting temperature of the "right" melting temperature ("Tm2D2") from the second derivative. 
$Tm2D2$limits.diffQ 
returns a data range of fluorescence values used to calculate the melting temperature of the "right" melting temperature ("Tm"D2") from the second derivative. 
$Tm2D2$adj.r.squared 
returns the adjusted Rsquared from the
quadratic model fitting function (see also 
$Tm2D2$NRMSE 
returns normalized rootmeansquarederror (NRMSE) from
the quadratic model fitting function (see also 
$Tm2D2$fws 
returns the number of points used for the calculation of the melting temperature of the "right" melting temperature ("Tm2D2") from the second derivative. 
$Tm2D2$devsum 
returns measures to show the difference between the approximate and calculated melting temperature of the "right" melting temperature ("Tm2D2") from the second derivative. 
$Tm2D2$fit 
returns the summary of the results of the quadratic model fitting function of the "right" melting temperature ("Tm2D2") from the second derivative. 
$xTm1.2.D2 
returns only the "left" and right calculated melting temperature ("Tm1D2, Tm2D2") from the second derivative. 
$yTm1.2.D2 
returns only the "left" and right calculated fluorescence ("Tm1D2, Tm2D2") from the second derivative. 
$temperature 
returns measures to investigate the temperature resolution of the melting curve. Raw fluorescence measurements at irregular temperature resolutions (intervals) can introduce artifacts and thus lead to wrong melting point estimations. 
$temperature$T.delta 
returns the difference between two successive temperature steps. 
$temperature$mean.T.delta 
returns the mean difference between two temperature steps. 
$temperature$sd.T.delta 
returns the standard deviation of the temperature. 
$temperature$RSD.T.delta 
returns the relative standard deviation (RSD) of the temperature in percent. 
Author(s)
Stefan Roediger
References
A Highly Versatile Microscope Imaging Technology Platform for the Multiplex RealTime Detection of Biomolecules and Autoimmune Antibodies. S. Roediger, P. Schierack, A. Boehm, J. Nitschke, I. Berger, U. Froemmel, C. Schmidt, M. Ruhland, I. Schimke, D. Roggenbuck, W. Lehmann and C. Schroeder. Advances in Biochemical Bioengineering/Biotechnology. 133:33–74, 2013. http://www.ncbi.nlm.nih.gov/pubmed/22437246
Nucleic acid detection based on the use of microbeads: a review. S. Roediger, C. Liebsch, C. Schmidt, W. Lehmann, U. ReschGenger, U. Schedler, P. Schierack. Microchim Acta 2014:1–18. DOI: 10.1007/s0060401412434
Roediger S, Boehm A, Schimke I. Surface Melting Curve Analysis with R. The R Journal 2013;5:37–53.
See Also
diffQ
, mcaSmoother
Examples
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62  # First Example
# Plot the first and the second derivative melting curves of MLC2v
# for a single melting curve. Should give a warning message but the graph
# will show you that the calculation is ok
data(MultiMelt)
tmp < mcaSmoother(MultiMelt[, 1], MultiMelt[, 14])
diffQ2(tmp, fct = min, verbose = FALSE, plot = TRUE)
# Second Example
# Calculate the maximum fluorescence of a melting curve, Tm,
# Tm1D2 and Tm2D2 of HPRT1 for 12 microbead populations and assign the
# values to the matrix HPRT1
data(MultiMelt)
HPRT1 < matrix(NA,12,4,
dimnames = list(colnames(MultiMelt[, 2L:13]),
c("Fluo", "Tm", "Tm1D2", "Tm2D2")))
for (i in 2L:13) {
tmp < mcaSmoother(MultiMelt[, 1],
MultiMelt[, i])
tmpTM < diffQ2(tmp, fct = min, verbose = TRUE)
HPRT1[i1, 1] < max(tmp$y)
HPRT1[i1, 2] < tmpTM$TmD1$Tm
HPRT1[i1, 3] < tmpTM$Tm1D2$Tm
HPRT1[i1, 4] < tmpTM$Tm2D2$Tm
}
HPRT1
# Third Example
# Use diffQ2 to determine the second derivative.
data(MultiMelt)
HPRT1 < matrix(NA,12,4,
dimnames = list(colnames(MultiMelt[, 2L:13]),
c("Fluo", "Tm", "Tm1D2", "Tm2D2")))
for (i in 2L:13) {
tmp < mcaSmoother(MultiMelt[, 1],
MultiMelt[, i])
tmpTM < diffQ2(tmp, fct = min, verbose = TRUE)
HPRT1[i1, 1] < max(tmp[["y.sp"]])
HPRT1[i1, 2] < tmpTM[["TmD1"]][["Tm"]]
HPRT1[i1, 3] < tmpTM[["Tm1D2"]][["Tm"]]
HPRT1[i1, 4] < tmpTM[["Tm2D2"]][["Tm"]]
}
plot(HPRT1[, 1], HPRT1[, 2],
xlab = "refMFI", ylab = "Temperature",
main = "HPRT1", xlim = c(2.1,2.55),
ylim = c(72,82), pch = 19,
col = 1:12, cex = 1.8)
points(HPRT1[, 1], HPRT1[, 3], pch = 15)
points(HPRT1[, 1], HPRT1[, 4], pch = 15)
abline(lm(HPRT1[, 2] ~ HPRT1[, 1]))
abline(lm(HPRT1[, 3] ~ HPRT1[, 1]))
abline(lm(HPRT1[, 4] ~ HPRT1[, 1]))
# Fourth Example
# Use diffQ2 with inder parameter to determine the second derivative.
data(MultiMelt)
tmp < mcaSmoother(MultiMelt[, 1], MultiMelt[, 14])
diffQ2(tmp, fct = min, verbose = FALSE, plot = TRUE, inder = FALSE)
diffQ2(tmp, fct = min, verbose = FALSE, plot = TRUE, inder = TRUE)
par(mfrow = c(1,1))
