get_lr_functions: Get Logratio Function

Description Usage Arguments Value

View source: R/transform.R

Description

This helps you create a function that can be input as a transformation function for 'sleuth_prep'.

Usage

1
2
3
get_lr_functions(type = "alr", denom_name = NULL, lr_method = "both",
  denom_method = "geomean", impute_method = "multiplicative",
  delta = NULL, impute_proportion = 0.65, base = "e")

Arguments

type

either "alr", "clr", or "iqlr" (also accepts "ALR" / "CLR" / "IQLR")

denom_name

a character vector of target IDs that will be the denominator. More than one is acceptable, and you can also input a numeric vector of row numbers instead. Note that this will be ignored if 'clr' or 'iqlr' is used.

lr_method

the choice of how to conduct compositional normalization. "both" provides a compositional normalization function and a compositional transformation functions; "transform" provides a compositional transformation function that also does the normalization

denom_method

the choice of what kind of compositional normalization to do when more than one feature is used. "geomean" takes the geometric of all features within a sample as the size factor, and "DESeq2" takes the median ratio of a feature to its geometric mean across all samples

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

base

the base used for the logarithm. Currently only supports "e" or "2" (can also specify the number 2).

Value

a list with two items:


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