Description Usage Arguments Details Value Author(s) References See Also Examples
View source: R/difference_curves.R
Function draws difference curves for selected standards and samples. The number of standards is specified by number_of_standards. If all standards have the same number of replicates (balanced design), the mean for each standard can be drawn by specifying sample_size_standards; however, replicates should always be drawn individually first. The sample numbers of samples for which difference curves will be drawn can be specified as a vector of integers by specifying sample_number. The function allows to normalize relative fluorescence values (RFUs) (see normalization) within the selected temperature range (temp_range_min, and temp_range_max). Please cite Schiwek et. al (2020) <https://doi.org/10.3390/pathogens9040270> if you use this function in your work.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | difference.curves(RFU_data,
derivative = "minus_1st_derivative",
normalization = FALSE,
standard_diff_curve = 1,
number_of_standards = 1,
sample_size_standards = 1,
sample_number = 1,
temp_range_min = 65,
temp_range_max = 95,
draw_peaks = FALSE,
xlab = "temperature",
ylab = "difference RFU",
col_standards = "black",
col_samples = "forestgreen",
lwd_standards = 1.5,
lwd_samples = 0.75,
lty = 1,
lty_peaks_standards = 1,
lty_peaks_samples = 3,
xlim = c(temp_range_min, temp_range_max),
...)
|
RFU_data |
Data frame containing RFU data. Data must be numeric and arranged columnwise. The first column must contain the temperature steps. Standards must start in the second column. Samples must start following the standards. An example of input data can be found here: <https://github.com/LukasBeule/HRM/blob/main/HRM_example_data.txt> |
derivative |
Character, selection of the derivative of the RFU data. For the negative first derivative, enter "minus_1st_derivative”, for the second derivative, enter "2nd_derivative”. Default is "minus_1st_derivative”. |
normalization |
Logical, RFUs within the selected temperature range (temp_range_min, and temp_range_max) of each sample are scaled (0, 1). Default is FALSE. |
standard_diff_curve |
Integer, standard used for the calculation of difference curves (zero line in the plot). Default is 1. |
number_of_standards |
Integer, total number of standards. Default is 1. |
sample_size_standards |
Integer, if all standards have the same number of replicates (balanced design) and sample_size_standards is > 1, the mean of all standards will be plotted instead of each individual standard. Default is 1. |
sample_number |
Vector of integer(s), specifying sample number(s) of samples that will be analyzed. Default is 1. |
temp_range_min, temp_range_max |
Numeric, minimum (temp_range_min) and maximum (temp_range_min) temperature for analysis. Default temp_range_min is 65 and temp_range_max is 95. |
draw_peaks |
Logical, draws vertical lines from the maximum (and minimum if derivative is "2nd_derivative") of the melting curves to the x-axis. Default is FALSE. |
xlab, ylab, col_standards, col_samples, lwd_standards, lwd_samples, lty, lty_peaks_standards, lty_peaks_samples, xlim, ... |
Graphical parameters. |
difference.curves draws difference curves for selected standards and samples.
difference.curves returns a plot of difference curves.
Lukas Beule, Simon Schiwek, Charlotte Rodemann, Petr Karlovsky
Schiwek, S, Beule, L, Vinas, M, Pfordt, A, von Tiedemann, A, & Karlovsky, P (2020). High-Resolution Melting (HRM) Curve Assay for the Identification of Eight Fusarium Species Causing Ear Rot in Maize. Pathogens, 9(4), 270.
<https://doi.org/10.3390/pathogens9040270>
See also denaturation.curves and melting.curves for further HRM curve analysis.
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 | ##Input data must be numeric and arranged columnwise.
##Input data should not contain any categorial data.
##An example dataset containing input data with 8 standards
##with 3 technical replicates each and 10 samples can be found here:
##<https://github.com/LukasBeule/HRM/blob/main/HRM_example_data.txt>
##load example RFU data:
RFU_data <- read.table("https://raw.githubusercontent.com/LukasBeule/HRM/main/HRM_example_data.txt",
sep="\t", dec=".", header=TRUE)
##generate non-normalized difference curves for the first standard
##from 81 to 92 degrees Celcius using negative first derivative
difference.curves(RFU_data,
derivative = "minus_1st_derivative",
standard_diff_curve = 1,
normalization = FALSE,
number_of_standards = 24,
sample_size_standards = 1,
sample_number = c(1:10),
temp_range_min = 81,
temp_range_max = 92,
col_samples = "#000000",
col_standards = c(rep(c("#999999", "#E69F00", "#56B4E9", "#009E73",
"#F0E442", "#0072B2", "#D55E00", "#CC79A7"), each = 3))
)
##generate normalized difference curves for the first standard
##from 81 to 92 degrees Celcius using negative first derivative
##and draw_peak = TRUE.
difference.curves(RFU_data,
derivative = "minus_1st_derivative",
standard_diff_curve = 1,
normalization = TRUE,
number_of_standards = 24,
sample_size_standards = 1,
sample_number = c(1:10),
temp_range_min = 81,
temp_range_max = 92,
draw_peaks = TRUE,
col_samples = "#000000",
col_standards = c(rep(c("#999999", "#E69F00", "#56B4E9", "#009E73",
"#F0E442", "#0072B2", "#D55E00", "#CC79A7"), each = 3))
)
##generate non-normalized difference curves for the first standard
##from 81 to 92 degrees Celcius using second derivative
##and draw_peak = TRUE.
difference.curves(RFU_data,
derivative = "2nd_derivative",
standard_diff_curve = 1,
normalization = FALSE,
number_of_standards = 24,
sample_size_standards = 1,
sample_number = c(1:10),
temp_range_min = 81,
temp_range_max = 92,
draw_peaks = TRUE,
col_samples = "#000000",
col_standards = c(rep(c("#999999", "#E69F00", "#56B4E9", "#009E73",
"#F0E442", "#0072B2", "#D55E00", "#CC79A7"), each = 3))
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.