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 jamses utilities: choose_annotation_colnames(), contrast2comp_dev(), intercalate(), list2im_opt(), log2fold_to_fold(), make_block_arrow_polygon(), mark_stat_hits(), matrix_normalize(), point_handedness(), point_slope_intercept(), shortest_unique_abbreviation(), shrinkDataFrame(), shrink_df(), shrink_matrix(), sort_samples(), strsplitOrdered(), sub_split_vector(), 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/jamses documentation built on Nov. 4, 2024, 9:25 p.m.