iqlr_transformation: Calculate IQLR

Description Usage Arguments Value

View source: R/iqlr.R

Description

This function calculates the interquartile logratio transformation. This function first processes the data to handle zeros. It then calculates which features have the variance across samples within the interquartile range after the CLR transformation. It then uses calculate_alr internally after processing the data to handle zeros. Essential zeros (i.e. target IDs with zeros in all samples) are excluded, and round zeros (i.e. target IDs with at least one zero value) are imputed using the mulitplicative method.

Usage

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

Arguments

mat

an D x M matrix of D target IDs and M samples

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 the IQLR features as the denominator, or the DESeq2-style size factors (focused on the median among the IQLR features) as the denominator. The IQLR features are selected using find_iqlr_denoms.

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

Value

(D - n - z) x M matrix of ALR-transformed values, with n equal to the number of denominator values and z are the number of rows with essential zeros.


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