| Title: | Calibration curves for targeted proteomics, lipidomics and metabolomics data |
|---|---|
| Description: | CalibraCurve is a computational tool designed to generate calibration curves for targeted mass spectrometry-based quantitative data. It is applicable to various omics disciplines, including proteomics, lipidomics, and metabolomics. The package also offers functionalities for data and calibration curve visualization and concentration prediction from new datasets based on the established curves. |
| Authors: | Karin Schork [aut, cre] (ORCID: <https://orcid.org/0000-0003-3756-4347>), Robin Grugel [aut], Michael Kohl [aut], Markus Stepath [aut], Martin Eisenacher [aut, fnd] |
| Maintainer: | Karin Schork <[email protected]> |
| License: | BSD 3-clause License + file LICENSE |
| Version: | 1.3.2 |
| Built: | 2026-11-04 20:27:28 UTC |
| Source: | https://github.com/bioc/CalibraCurve |
Main function for calculation of calibration curves
CalibraCurve( D_list, output_path = NULL, substance = "substance", minReplicates = 3, cvThres = 20, calcContinuousPrelimRanges = FALSE, weightingMethod = "1/x^2", centralTendencyMeasure = "mean", perBiasThres = 20, considerPerBiasCV = TRUE, perBiasDistThres = 10, RfThresL = 80, RfThresU = 120, plot_type = "single_plots", RF_colour_threshold = "orange", RF_colour_within = "#00BFC4", RF_colour_outside = "#F8766D", device = "png", CC_plot_width = 15, CC_plot_height = 10, RF_plot_width = 15, RF_plot_height = 10, base_size = 11, RF_legend = TRUE, RF_plot_type = plot_type, plot_dpi = 300, verbose = TRUE, ... )CalibraCurve( D_list, output_path = NULL, substance = "substance", minReplicates = 3, cvThres = 20, calcContinuousPrelimRanges = FALSE, weightingMethod = "1/x^2", centralTendencyMeasure = "mean", perBiasThres = 20, considerPerBiasCV = TRUE, perBiasDistThres = 10, RfThresL = 80, RfThresU = 120, plot_type = "single_plots", RF_colour_threshold = "orange", RF_colour_within = "#00BFC4", RF_colour_outside = "#F8766D", device = "png", CC_plot_width = 15, CC_plot_height = 10, RF_plot_width = 15, RF_plot_height = 10, base_size = 11, RF_legend = TRUE, RF_plot_type = plot_type, plot_dpi = 300, verbose = TRUE, ... )
D_list |
data.frame/list |
output_path |
character(1) |
substance |
character(1) |
minReplicates |
integer(1) |
cvThres |
numeric(1) |
calcContinuousPrelimRanges |
logical(1) |
weightingMethod |
character(1) |
centralTendencyMeasure |
character(1) |
perBiasThres |
numeric(1) |
considerPerBiasCV |
logical(1) |
perBiasDistThres |
numeric(1) |
RfThresL |
numeric(1) |
RfThresU |
numeric(1) |
plot_type |
character(1) |
RF_colour_threshold |
character(1) |
RF_colour_within |
character(1) |
RF_colour_outside |
character(1) |
device |
character(1) |
CC_plot_width |
numeric(1) |
CC_plot_height |
numeric(1) |
RF_plot_width |
numeric(1) |
RF_plot_height |
numeric(1) |
base_size |
numeric(1) |
RF_legend |
logical(1) |
RF_plot_type |
character(1) |
plot_dpi |
numeric(1) |
verbose |
logical(1) |
... |
additional parameters for |
List with the following elements:
RES: List of CalibraCurve results (one item per substance, output
from calc_single_curve).
summary_tab: Data.frame with summary information about the
calibration curves, one row per substance.
plot_CC_list: List of ggplot2 objects of the calibration curves
(one per substance for "single_plots", otherwise only one item).
plot_RF_list: List of ggplot2 objects of the response factor plots
(one item).
### NOTE: as output_path is not specified here, no files will be saved. ### Set output_path to a folder of your choice to save the results. ### single xlsx file: data_path <- system.file("extdata", "MSQC1_xlsx", "GGPFSDSYR_QTRAP_y5.xlsx", package = "CalibraCurve") D <- readDataTable(dataPath = data_path, concCol = 16, measCol = 12, fileType = "xlsx") RES <- CalibraCurve(D_list = D) RES$plot_CC_list RES$plot_RF_list ### multiple xlsx files (in a folder) as multiplot: data_folder <- system.file("extdata", "MSQC1_xlsx", package = "CalibraCurve") D_list <- readMultipleTables(dataFolder = data_folder, fileType = "xlsx", concCol = 16, measCol = 12) RES <- CalibraCurve(D_list = D_list, plot_type = "multiplot") RES$plot_CC_list ### single rds file (SummarizedExperiment) as an all-in-one plot: file <- system.file("extdata", "MSQC1", "msqc1_dil_GGPFSDSYR.rds", package = "CalibraCurve") D_list <- readDataSE(dataPath = file, concColName = "amount_fmol", substColName = "Substance", assayNumber = 1) RES <- CalibraCurve(D_list, plot_type = "all_in_one") RES$plot_CC_list### NOTE: as output_path is not specified here, no files will be saved. ### Set output_path to a folder of your choice to save the results. ### single xlsx file: data_path <- system.file("extdata", "MSQC1_xlsx", "GGPFSDSYR_QTRAP_y5.xlsx", package = "CalibraCurve") D <- readDataTable(dataPath = data_path, concCol = 16, measCol = 12, fileType = "xlsx") RES <- CalibraCurve(D_list = D) RES$plot_CC_list RES$plot_RF_list ### multiple xlsx files (in a folder) as multiplot: data_folder <- system.file("extdata", "MSQC1_xlsx", package = "CalibraCurve") D_list <- readMultipleTables(dataFolder = data_folder, fileType = "xlsx", concCol = 16, measCol = 12) RES <- CalibraCurve(D_list = D_list, plot_type = "multiplot") RES$plot_CC_list ### single rds file (SummarizedExperiment) as an all-in-one plot: file <- system.file("extdata", "MSQC1", "msqc1_dil_GGPFSDSYR.rds", package = "CalibraCurve") D_list <- readDataSE(dataPath = file, concColName = "amount_fmol", substColName = "Substance", assayNumber = 1) RES <- CalibraCurve(D_list, plot_type = "all_in_one") RES$plot_CC_list
Plot the calibration curve
plotCalibraCurve( CC_RES, ylab = "Intensity", xlab = "Concentration", log10_x_axis = TRUE, log_tick_label_style = "auto", show_regression_info = FALSE, show_linear_range = TRUE, show_data_points = TRUE, plot_zeros = FALSE, blank_panel_ratio = 0.1, blank_panel_width_factor = 0.12, plot_type = "multiplot", point_colour = "black", curve_colour = "red", linear_range_colour = "black", multiplot_nrow = NULL, multiplot_ncol = NULL, multiplot_scales = "free", regression_info_size = 3, base_size = 11 )plotCalibraCurve( CC_RES, ylab = "Intensity", xlab = "Concentration", log10_x_axis = TRUE, log_tick_label_style = "auto", show_regression_info = FALSE, show_linear_range = TRUE, show_data_points = TRUE, plot_zeros = FALSE, blank_panel_ratio = 0.1, blank_panel_width_factor = 0.12, plot_type = "multiplot", point_colour = "black", curve_colour = "red", linear_range_colour = "black", multiplot_nrow = NULL, multiplot_ncol = NULL, multiplot_scales = "free", regression_info_size = 3, base_size = 11 )
CC_RES |
list |
ylab |
character(1) |
xlab |
character(1) |
log10_x_axis |
logical(1) |
log_tick_label_style |
character(1) |
show_regression_info |
logical(1) |
show_linear_range |
logical(1) |
show_data_points |
logical(1) |
plot_zeros |
logical(1) |
blank_panel_ratio |
numeric(1) |
blank_panel_width_factor |
numeric(1) |
plot_type |
character(1) |
point_colour |
character(1) |
curve_colour |
character(1) |
linear_range_colour |
character(1) |
multiplot_nrow |
integer(1) |
multiplot_ncol |
integer(1) |
multiplot_scales |
character(1) |
regression_info_size |
numeric(1) |
base_size |
numeric(1) |
Can be used also on pre-calculated curves, if you import the .rds file
using readRDS(). Does not save the plot, this can be done using
ggplot2::ggsave.
List of a ggplot2 object containing the calibration curve plot (CC_plot) and a data.frame containing summary data for annotations (annotation_dat).
file <- system.file("extdata", "MSQC1", "msqc1_dil_GGPFSDSYR.rds", package = "CalibraCurve" ) D_list <- readDataSE(file, concColName = "amount_fmol", substColName = "Substance", assayNumber = 1 ) CC_RES <- calc_single_curve(D_list[[1]], calcContinuousPrelimRanges = FALSE) plotCalibraCurve(list(substance = CC_RES))file <- system.file("extdata", "MSQC1", "msqc1_dil_GGPFSDSYR.rds", package = "CalibraCurve" ) D_list <- readDataSE(file, concColName = "amount_fmol", substColName = "Substance", assayNumber = 1 ) CC_RES <- calc_single_curve(D_list[[1]], calcContinuousPrelimRanges = FALSE) plotCalibraCurve(list(substance = CC_RES))
Plot response factors
plotResponseFactors( RES, RfThresL = 80, RfThresU = 120, ylab = "Response Factor", xlab = "Concentration", log10_x_axis = TRUE, colour_threshold = "orange", colour_within = "#00BFC4", colour_outside = "#F8766D", legend = TRUE, base_size = 11, plot_type = "single_plot", multiplot_nrow = NULL, multiplot_ncol = NULL, multiplot_scales = "free", substance = NULL )plotResponseFactors( RES, RfThresL = 80, RfThresU = 120, ylab = "Response Factor", xlab = "Concentration", log10_x_axis = TRUE, colour_threshold = "orange", colour_within = "#00BFC4", colour_outside = "#F8766D", legend = TRUE, base_size = 11, plot_type = "single_plot", multiplot_nrow = NULL, multiplot_ncol = NULL, multiplot_scales = "free", substance = NULL )
RES |
list |
RfThresL |
numeric(1) |
RfThresU |
numeric(1) |
ylab |
character(1) |
xlab |
character(1) |
log10_x_axis |
logical(1) |
colour_threshold |
character(1) |
colour_within |
character(1) |
colour_outside |
character(1) |
legend |
logical(1) |
base_size |
numeric(1) |
plot_type |
character(1) |
multiplot_nrow |
integer(1) |
multiplot_ncol |
integer(1) |
multiplot_scales |
character(1) |
substance |
character(1) |
A ggplot2 object containing the response factor plot.
file <- system.file("extdata", "MSQC1", "msqc1_dil_GGPFSDSYR.rds", package = "CalibraCurve" ) D_list <- readDataSE(file, concColName = "amount_fmol", substColName = "Substance", assayNumber = 1 ) CC_RES <- calc_single_curve(D_list[[1]], calcContinuousPrelimRanges = FALSE) plotResponseFactors(RES = CC_RES)file <- system.file("extdata", "MSQC1", "msqc1_dil_GGPFSDSYR.rds", package = "CalibraCurve" ) D_list <- readDataSE(file, concColName = "amount_fmol", substColName = "Substance", assayNumber = 1 ) CC_RES <- calc_single_curve(D_list[[1]], calcContinuousPrelimRanges = FALSE) plotResponseFactors(RES = CC_RES)
Predict concentrations from intensity values based on a given calibration curve
predictConcentration(CC_res, newdata, verbose = TRUE)predictConcentration(CC_res, newdata, verbose = TRUE)
CC_res |
list |
newdata |
numeric |
verbose |
logical(1) |
The function will give a warning if any of the predicted concentrations are outside the final linear range. This is important to ensure that the predictions are reliable and within the linear range of the calibration curve.
A data frame with the following columns:
intensity: The input intensity values.
predicted_concentrations: The predicted concentrations based on the
calibration curve.
linear_range: A logical vector indicating whether the predicted
concentrations are within the final linear range.
file <- system.file("extdata", "MSQC1", "msqc1_dil_GGPFSDSYR.rds", package = "CalibraCurve") D <- readDataSE(file, concColName = "amount_fmol", substColName = "Substance") RES <- CalibraCurve(D) newdata <- c(1000000, 10000000, 100000000) # 1e6, 1e7, 1e8 predictConcentration(RES$RES[[4]], newdata = newdata)file <- system.file("extdata", "MSQC1", "msqc1_dil_GGPFSDSYR.rds", package = "CalibraCurve") D <- readDataSE(file, concColName = "amount_fmol", substColName = "Substance") RES <- CalibraCurve(D) newdata <- c(1000000, 10000000, 100000000) # 1e6, 1e7, 1e8 predictConcentration(RES$RES[[4]], newdata = newdata)
Read data stored as an SummarizedExperiment object (directly or stored in an .rds file). Extracts the two relevant columns (concentration and measurement) and orders the data by increasing concentration level.
readDataSE( dataPath = NULL, rawDataSE = NULL, concColName, substColName, assayNumber = 1, rowNumbers = NULL )readDataSE( dataPath = NULL, rawDataSE = NULL, concColName, substColName, assayNumber = 1, rowNumbers = NULL )
dataPath |
character(1) |
rawDataSE |
SummarizedExperiment |
concColName |
character(1) |
substColName |
character(1) |
assayNumber |
integer(1) |
rowNumbers |
integer |
The SummarizedExperiments object may contain quantitative values from targeted proteomics, lipidomics or metabolomics experiments. The colData has to contain a column with the concentration levels (concColName). The rowData has to contain a column with the substance names (e.g. peptide sequence, name of lipid or metabolite etc).
List of data.frame, each with two numeric columns: Concentration and Measurement
file <- system.file("extdata", "MSQC1", "msqc1_dil_GGPFSDSYR.rds", package = "CalibraCurve") D_list <- readDataSE(file, concColName = "amount_fmol", substColName = "Substance", assayNumber = 1) # Alternative: import SummarizedExperiment object directly rawDataSE <- readRDS(file) D_list2 <- readDataSE(rawDataSE = rawDataSE, concColName = "amount_fmol", substColName = "Substance", assayNumber = 1 )file <- system.file("extdata", "MSQC1", "msqc1_dil_GGPFSDSYR.rds", package = "CalibraCurve") D_list <- readDataSE(file, concColName = "amount_fmol", substColName = "Substance", assayNumber = 1) # Alternative: import SummarizedExperiment object directly rawDataSE <- readRDS(file) D_list2 <- readDataSE(rawDataSE = rawDataSE, concColName = "amount_fmol", substColName = "Substance", assayNumber = 1 )
Read data in different table input formats (xlsx, csv or txt). Extracts the two relevant columns (concentration and measurement) and orders the data by increasing concentration.
readDataTable( dataPath, fileType, concCol, measCol, substCol = NULL, sep = ",", dec = ".", header = TRUE, naStrings = c("NA", "NaN", "Filtered", "#NV"), sheet = 1 )readDataTable( dataPath, fileType, concCol, measCol, substCol = NULL, sep = ",", dec = ".", header = TRUE, naStrings = c("NA", "NaN", "Filtered", "#NV"), sheet = 1 )
dataPath |
character(1) |
fileType |
character(1) |
concCol |
integer(1) or character(1) |
measCol |
integer(1) or character(1) |
substCol |
integer(1) or character(1) |
sep |
character(1) |
dec |
character(1) |
header |
logical(1) |
naStrings |
character |
sheet |
integer(1) |
Data.frame with two numeric columns: Concentration and Measurement
### xlsx file: file <- system.file("extdata", "MSQC1_xlsx", "GGPFSDSYR_QTRAP_y5.xlsx", package = "CalibraCurve" ) D <- readDataTable(file, fileType = "xlsx", concCol = 16, measCol = 12)### xlsx file: file <- system.file("extdata", "MSQC1_xlsx", "GGPFSDSYR_QTRAP_y5.xlsx", package = "CalibraCurve" ) D <- readDataTable(file, fileType = "xlsx", concCol = 16, measCol = 12)
Read folder of files in different table input formats (xlsx, csv or txt).
readMultipleTables(dataFolder, fileType, concCol, measCol, ...)readMultipleTables(dataFolder, fileType, concCol, measCol, ...)
dataFolder |
character(1) |
fileType |
character(1) |
concCol |
integer(1) or character(1) |
measCol |
integer(1) or character(1) |
... |
additional parameters to |
List of data.frame, each with two numeric columns: Concentration and Measurement
data_folder <- system.file("extdata", "MSQC1_xlsx", package = "CalibraCurve") D_list <- readMultipleTables( dataFolder = data_folder, fileType = "xlsx", concCol = 16, measCol = 12 )data_folder <- system.file("extdata", "MSQC1_xlsx", package = "CalibraCurve") D_list <- readMultipleTables( dataFolder = data_folder, fileType = "xlsx", concCol = 16, measCol = 12 )