save_dc_plots | R Documentation |
Plots the data before and after drift correction, with the regression line drawn with the original data. If the drift correction was done on log-transformed data, then plots of both the original and log-transformed data before and after correction are drawn. The plot shows 2 standard deviation spread for both QC samples and regular samples.
save_dc_plots(
orig,
dc,
predicted,
file,
log_transform = TRUE,
width = 16,
height = 8,
color = "QC",
shape = color,
color_scale = getOption("notame.color_scale_dis"),
shape_scale = scale_shape_manual(values = c(15, 16))
)
orig |
a MetaboSet object, before drift correction |
dc |
a MetaboSet object, after drift correction as returned by correct_drift |
predicted |
a matrix of predicted values, as returned by dc_cubic_spline |
file |
path to the PDF file where the plots should be saved |
log_transform |
logical, was the drift correction done on log-transformed data? |
width , height |
width and height of the plots in inches |
color |
character, name of the column used for coloring the points |
shape |
character, name of the column used for shape |
color_scale |
the color scale as returned by a ggplot function |
shape_scale |
the shape scale as returned by a ggplot function |
If shape
is set to NULL
(the default), the column used for color
is also used for shape
correct_drift
, inspect_dc
## Not run:
dc <- dc_cubic_spline(merged_sample)
corrected <- dc$object
inspected <- inspect_dc(
orig = merged_sample, dc = corrected,
check_quality = TRUE
)
save_dc_plots(
orig = merged_sample, dc = corrected, predicted = dc$predicted,
file = "drift_plots.pdf"
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.