plot_norm_box: Generates a box-plot for 'log2' transformed raw, tmm-, and...

View source: R/plot_norm_box.R

plot_norm_boxR Documentation

Generates a box-plot for log2 transformed raw, tmm-, and psn- normalized values.

Description

This function can be used to produce a visual aid to for selection normalization method. Currently tmm and psrn are used. Ideally, after the data is normalized all the boxplots should have their median aligned close to the global trend line.

Usage

plot_norm_box(
  data,
  id_col = "id",
  trim_M = 0.3,
  trim_A = 0.05,
  norm_target = NULL,
  plot_target = NULL,
  reference_sample = NULL
)

Arguments

data

data.frame containing the data to normalize

id_col

a character for the name of the column containing the name of the features in data (e.g., peptides, proteins, etc.)

trim_M

percent of fold-change values to trim

trim_A

percent of means to trim

norm_target

target columns to normalize, supports tidyselect-package syntax. By default, all numerical columns will be used in the normalization if not specified.

plot_target

target columns to plot, supports tidyselect-package syntax. By default, all numerical columns are plotted.

reference_sample

Specify a reference sample to normalize to in the tmm method

Value

ggplot with samples on the x-axis and observed values on the y-axis, different colors correspond to the raw or normalized data. Lines corresponds to the global median across all samples.

Examples

plot_norm_box(yeast, "identifier")
# Plot only ng50 samples
plot_norm_box(yeast, "identifier", plot_target = contains("ng50"))

PhilipBerg/pair documentation built on March 18, 2022, 12:01 p.m.