Applies the logit transform \(\log_2(\beta / (1 - \beta))\) after
clipping betas away from 0 and 1. M-values are approximately
homoscedastic and are the recommended scale for linear modeling and
PCA of methylation data.
Usage
beta_to_m(beta, clip = 1e-04, drop_nonfinite = TRUE)
Arguments
- beta
Numeric matrix of beta values (probes x samples), in
[0, 1].
- clip
Numeric: betas are clipped to [clip, 1 - clip]
before the transform. Default 1e-4.
- drop_nonfinite
Logical: drop probes (rows) with any
missing/non-finite values after the transform. Default TRUE.
Value
A numeric matrix of M-values, probes x samples.