plot_align_me: All-in-one plot function for blotIt3

View source: R/02_exported_functions.R

plot_align_meR Documentation

All-in-one plot function for blotIt3

Description

Takes the output of align_me and generates graphs. Which data will be plotted can then be specified separately.

Usage

plot_align_me(
  out_list,
  ...,
  plot_points = "aligned",
  plot_line = "aligned",
  spline = FALSE,
  scales = "free",
  align_zeros = TRUE,
  plot_caption = TRUE,
  ncol = NULL,
  my_colors = NULL,
  duplicate_zero_points = FALSE,
  my_order = NULL,
  plot_scale_y = NULL,
  plot_scale_x = NULL,
  dose_response = FALSE,
  x_lab = NULL,
  y_lab = NULL
)

Arguments

out_list

out_list file as produced by align_me, a list of data.frames.

...

Logical expression used for subsetting the data frames, e.g. name == "pERK1" & time < 60.

To reproduce the known function plot1, plot2 and plot3, use:

plot1

plot_points = 'original', plot_line = 'prediction'

plot2

plot_points = 'scaled', plot_line = 'aligned'

plot3

plot_points = 'aligned', plot_line = 'aligned'

plot_points

String to specify which data set should be plotted in form of points with corresponding error bars. It must be one of c("original", "scaled", "prediction", "aligned").

plot_line

Same as above but with a line and error band.

spline

Logical, if set to TRUE, what is specified as plot_line will be plotted as a smooth spline instead of straight lines between points.

scales

String passed as scales argument to facet_wrap.

align_zeros

Logical, if TRUE, the zero ticks are aligned between the facets.

plot_caption

Logical, if TRUE, a caption describing the plotted data is added to the plot.

ncol

Numerical passed as ncol argument to facet_wrap.

my_colors

list of custom color values as taken by the values argument in the scale_color_manual method for ggplot objects.

duplicate_zero_points

Logical, if set to TRUE all zero time points are assumed to belong to the first condition. E.g. when the different conditions consist of treatments added at time zero. Default is FALSE.

my_order

Optional list of target names in the custom order that will be used for faceting.

plot_scale_y

character, defining the scale of the y axis

plot_scale_x

character, defining the scale of the x axis

dose_response

Logical, indicates if the plot should be dose response

x_lab

Optional, value passed to xlab parameter of ggplot for the x-axis. Default is NULL leading to 'Time' or 'Dose', respectively.

y_lab

Optional, value passed to ylab parameter of ggplot for the y-axis. Default is NULL leading to 'Signal'.

Value

ggplot object

Author(s)

Severin Bang and Svenja Kemmer


SeverinBang/blotIt3 documentation built on April 4, 2022, 5 a.m.