Plot protein intensities per biological replicate and background

plot_comparison(res, names, conditions = res$conditions, textsize = 4,
  ylims = NULL, mapping = "point", var_x = "bckg",
  var_facet_x = "cond", var_facet_y = "name", var_color = "bio",
  var_alpha = "missing", levels_x = c(res$bckg_ctrl, res$bckg_bait),
  labels_x = c(res$bckg_ctrl, res$bckg_bait), color_values = NULL,
  alpha_values = c(`TRUE` = 0.5, `FALSE` = 1), show_bar = FALSE,
  show_error_bar = FALSE, show_signif = TRUE, show_violin = TRUE,
  offset_bar = FALSE, comparisons = list(c(1, 2)), test = "t.test",
  test.args = list(paired = FALSE), map_signif_level = c(`***` = 0.001,
  `**` = 0.01, `*` = 0.05), position = "position_jitter",
  position.args = list(width = 0.3, height = 0))

Arguments

res

an InteRactome

names

name of the protein to display

conditions

set of conditions to display

textsize

size of labels corresponding to significance levels

ylims

plot limits on the y axis

mapping

name of the plot elemnet on which the aestethics color and alpha are mapped. Can be either "point" or "bar".

var_x

x variable

var_facet_x

variable used for faceting plots horizontally

var_facet_y

variable used for faceting plots vertically

var_color

variable used for the color aestethic

var_alpha

variable used for the alpha aestethic

levels_x

defines factor levels for x variable

labels_x

defines the labels for the levels of the x variable

color_values

named vector of colors.

alpha_values

named vector of alpha values.

show_bar

logical, show bars using geom_bar

show_error_bar

logical, show error bars using geom_errorbar

show_signif

logical, show significance of comparison tests using geom_signif

show_violin

logical, show point distribution using geom_violin

offset_bar

logical, use an offset to ensure all values are positive

comparisons

list of comparison pairs (as indices or x variable names)

test

name of the test function to compare intensities between background

test.args

arguments passed to function test()

map_signif_level

named vector with labels and corresponding significance levels

position

name of the function used to position data points

position.args

arguments passed to function position()

Value

a plot