tmm: Normalization by Trimmed m Means

View source: R/normalization.R

tmmR Documentation

Normalization by Trimmed m Means

Description

Method for trimmed m means normalization. It is based on the method described in \insertCiterobinson2010scaling;textualpair. Though, instead of library size as was used in the original method, here we use the loading size which we define as the sum of all features. If no reference sample is specified, it uses the sample with the lowest coefficient of variation as default. All estimates are based on features without missing values.

Usage

tmm(
  data,
  trim_M = 0.3,
  trim_A = 0.05,
  log = TRUE,
  load_info = FALSE,
  target = NULL,
  reference_sample = NULL
)

Arguments

data

data.frame containing the data to normalize

trim_M

percent of fold-change values to trim

trim_A

percent of means to trim

log

Return log2 transformed values?

load_info

Return loading info?

target

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

reference_sample

Specify a reference sample to normalize to, if not provided, the sample with the lowest coefficient of variation will be used

Value

data frame with normalized values if load_info=FALSE, if it is TRUE then it returns a list with two tibbles. One tibble containing the normalized data and one containing the loading info as well as the estimated normalization factors.

Source

https://genomebiology.biomedcentral.com/articles/10.1186/gb-2010-11-3-r25

References

\insertAllCited

Examples

tmm(yeast)

PhilipBerg/PaiR documentation built on March 18, 2022, noon