preprocess.dye_bias

preprocess.dye_bias(sig, *, method='nonlinear')

Equalise the two colour channels. Off by default – see the warning.

The green and red dyes do not incorporate or fluoresce equally, so a type II probe – whose methylated bead is green and unmethylated bead is red – carries a tilt that has nothing to do with methylation. Type I probes are the usual reference, because each reads both of its beads in a single channel.

.. warning::

This step is not validated and is not run by :func:idat_to_betas unless asked for. Measured on the corpus’s EPIC v1 IDATs against the published betas for the same physical samples, it moves the median beta by +0.10 to +0.12 – far more than a dye correction should. The cause is visible in the data: on that chip the red channel runs about twice as hot as the green (median out-of-band 1,171 against 415), and mapping red onto green therefore halves every type II unmethylated signal, which raises every type II beta.

That is a real limitation of the assumption, not an arithmetic slip. Matching the two channels’ distributions presumes type I green probes and type I red probes measure the same underlying quantity; on this array they do not – their median betas are 0.05 and 0.14. A correct correction needs the normalisation control probes, whose addresses are not in the core-columns manifest FALCONAge fetches.

Left in, opt-in and documented, because the arithmetic is right for the assumption it makes and somebody with control-probe addresses can supply a better reference. Turned on by default it would silently make results worse, which is the failure this package exists to avoid.

"nonlinear" matches quantiles; "linear" scales by the median ratio.