R/utils.R
cleanFBM.RdThis function inspects an FBM to determine if log-transformation is needed (based on value range) and whether NA values are present. If the maximum value is >= 100, it applies a log2(x + 1) transformation in-place. If any NA values are detected, they are replaced with 0.
cleanFBM(fbm, ncores = 1)A bigmemory::FBM or bigstatsr::FBM object.
Integer; number of cores to use for parallel operations (default 1).
A list with:
The maximum value encountered in the FBM (after log transformation if applied).
Logical indicating whether any NA values were found and filled.
Modifies the FBM in place. Uses bigstatsr::big_apply() to process in
parallel-safe chunks.