save_dc_plots: Drift correction plots

Description Usage Arguments Details See Also

Description

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.

Usage

1
2
3
save_dc_plots(orig, dc, predicted, file, log_transform = TRUE,
  width = 16, height = 8, color = "QC", shape = NULL,
  color_scale = NULL, shape_scale = NULL)

Arguments

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

Details

If shape is set to NULL (the default), the column used for color is also used for shape

See Also

correct_drift, inspect_dc

@examples ## 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)


antonvsdata/amp documentation built on Jan. 8, 2020, 3:15 a.m.