fold_to_log2fold: Convert normal signed fold change to log2 fold change

fold_to_log2foldR Documentation

Convert normal signed fold change to log2 fold change

Description

Convert normal signed fold change to log2 fold change

Usage

fold_to_log2fold(x, ...)

Arguments

x

numeric vector

Details

This function takes fold change values as input, and returns log2 fold change values.

This function recognizes two forms of input:

  • ratio, which includes values between 0 and 1, but no negative values;

  • fold change, as from log2fold_to_fold() which includes no values between 0 and 1, but may include negative values.

For example, for ratio input:

  • ratio = 4 becomes ⁠log2 fold change = 2⁠.

  • ratio = 0.25 becomes ⁠log2 fold change = -2⁠.

For example, for fold change input:

  • ⁠fold change = 4⁠ becomes ⁠log2 fold change = 2⁠.

  • ⁠fold change = -4⁠ becomes ⁠log2 fold change = -2⁠.

Value

numeric vector representing log2 fold change values.

See Also

Other jam utility functions: blockArrowMargin(), find_colname(), get_se_assaydata(), gradient_rect(), handle_highlightPoints(), log2fold_to_fold(), logAxis(), outer_legend(), points2polygonHull(), update_function_params(), update_list_elements()

Examples

x <- c(-3, -2, -1, 0, 1, 2, 3);
fc <- log2fold_to_fold(x);
fc;

fold_to_log2fold(fc);


jmw86069/jamma documentation built on Oct. 11, 2024, 7:08 a.m.