# NOT RUN {
##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 melting curves from 81 to 92 degrees Celcius
##using negative first derivative
melting.curves(RFU_data,
derivative = "minus_1st_derivative",
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 melting curves from 81 to 92 degrees Celcius
##using negative first derivative and draw_peak = TRUE
melting.curves(RFU_data,
derivative = "minus_1st_derivative",
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 melting curves from 81 to 92 degrees Celcius
##using second derivative and draw_peak = TRUE
melting.curves(RFU_data,
derivative = "2nd_derivative",
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,
ylab = "d2(RFU)",
col_samples = "#000000",
col_standards = c(rep(c("#999999", "#E69F00", "#56B4E9", "#009E73",
"#F0E442", "#0072B2", "#D55E00", "#CC79A7"), each = 3))
)
# }
Run the code above in your browser using DataLab