acidbase.fold_change_to_log_ratio¶
- acidbase.fold_change_to_log_ratio(x: float | ndarray, base: int = 2) float | ndarray¶
Convert fold change to log ratio.
- Parameters:
- Returns:
Log-ratio values.
- Return type:
Notes
Matches R’s
foldChangeToLogRatiosemantics: negative fold changes are first transformed to1 / -xbefore taking the logarithm, so the result is negative (down-regulation) as expected.