R/jam-log2fold-to-fold.R
fold_to_log2fold.Rd
Convert normal signed fold change to log2 fold change
fold_to_log2fold(x, ...)
numeric
vector
numeric
vector representing log2 fold change values.
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
.
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()
x <- c(-3, -2, -1, 0, 1, 2, 3);
fc <- log2fold_to_fold(x);
fc;
#> [1] -8 -4 -2 1 2 4 8
fold_to_log2fold(fc);
#> [1] -3 -2 -1 0 1 2 3