clr_transformation: Centered Logratio Transformation

Description Usage Arguments Details Value

View source: R/clr.R

Description

This function applies the centered logratio transformation on a matrix of expression values.

Usage

1
2
3
clr_transformation(mat, base = "e", remove_zeros = FALSE,
  denom_method = "geomean", impute_method = "multiplicative",
  delta = NULL, impute_proportion = 0.65)

Arguments

mat

N x M matrix of estimated abundances

base

what should the base of the logarithm be? currently only supports base "e" and base 2.

remove_zeros

boolean to see if this function should remove essential zeros (features with zeros in all samples). The default is FALSE to be compatible with sleuth, as its default filter removes essential zeros.

denom_method

either 'geomean' or 'DESeq2' to use either the geometric mean of all features as the denominator, or the DESeq2-style size factors as the denominator (equivalent to using standard DESeq2-style normalization, which is used in standard sleuth)

impute_method

which method to use for imputing zeros. 'multiplicative' (default) sets all values smaller than a imputation value 'delta' (determined by delta or impute_proportion) to that imputation value, and reduces all other values by the amount X * (1 - delta*num_zero_values / sum_constraint). 'additive' is similar to most other tools, and just adds the imputation value to all entries ('delta' must be specified)

delta

a number that is the imputed value. If NULL, delta = impute_proportion * (minimum value in sample)

impute_proportion

percentage of minimum value that becomes the imputed value. Only used if delta is NULL

Details

this converts an N x M matrix of N target IDs and M samples (N >> M). If M > N, then the matrix is flipped to do the calculations, but returned with the same as the input. The calculation is as follows: x_1, x_2, ..., x_D => log(x_1 / g(X)), ..., log(x_D / g(X))

Value

N x M matrix of CLR-transformed values with essential zero rows removed.


warrenmcg/sleuth-ALR documentation built on Oct. 27, 2020, 4:30 a.m.