Tutorials › High-Dimensional Genomic Data Analysis › Within-Array Loess Normalization for Two-Color Arrays

Normalization and Batch Effects · Tutorial 74 of 795

Within-Array Loess Normalization for Two-Color Arrays

Learn how loess estimates and removes intensity-dependent dye bias in a two-color array while leaving each spot’s average log intensity unchanged.

Intermediate 10 min read

What You'll Learn

  • Define the MA coordinates used to diagnose within-array intensity-dependent bias.
  • Derive the loess correction from a model for observed log ratios.
  • Interpret the local weighted regression and the role of its span.
  • Calculate adjusted log ratios and reconstruct corrected channel intensities.
  • Explain what signal the correction preserves and what it changes.
  • Recognize conditions and diagnostics that can make loess normalization misleading.

Why Use an MA Plot?

A two-color microarray measures two labeled samples on the same array, often called the red and green channels. Even when the underlying relative expression is not changing with intensity, a dye or measurement effect can make the observed channel ratio vary across the intensity range. A single correction applied to every spot can miss this pattern. Within-array loess normalization estimates a smooth intensity-dependent trend in the log ratios and removes it.

The key diagnostic is an MA plot: each spot is represented by its log ratio \(M\) and average log intensity \(A\). A systematic curve in \(M\) across \(A\) suggests that the ratio depends on signal strength. The method is useful when that dependence is plausibly technical and smooth, and when the bulk of spots provides a reasonable reference for estimating it.

Definition: For spot \(i\), let \(R_i>0\) and \(G_i>0\) be its positive, background-corrected red- and green-channel intensities. Define \(r_i=\log_2(R_i)\), \(g_i=\log_2(G_i)\), the log ratio \(M_i=r_i-g_i\), and the average log intensity \(A_i=(r_i+g_i)/2\). Thus \(M_i=\log_2(R_i/G_i)\), while \(A_i\) is the log base 2 of the geometric mean of the two channel intensities.

A positive \(M_i\) means the red-channel intensity exceeds the green-channel intensity; a negative value means the reverse. The \(A_i\) coordinate describes the spot’s overall signal level, not its relative channel balance. An MA plot displays one \((A_i,M_i)\) point per spot. The ideal reference is not necessarily that every spot has \(M_i=0\), but that the technical component of \(M_i\) has no remaining systematic trend with \(A_i\).

Model and Loess Correction

Write the observed log ratio as the sum of a relative signal, an intensity-dependent technical effect, and residual variation:

$$ M_i=\theta_i+b(A_i)+\varepsilon_i. $$

Here \(\theta_i\) is the underlying log ratio of interest, \(b(A_i)\) is a smooth bias that depends on average intensity, and \(\varepsilon_i\) is residual error. The normalization target is to remove \(b(A_i)\), not to erase genuine differences represented by \(\theta_i\). To estimate the bias from one array, a central assumption is that, across most spots, the underlying ratios are balanced around zero at each intensity level: approximately, \(E(\theta_i\mid A_i)=0\). If this is reasonable, the conditional trend of \(M_i\) against \(A_i\) estimates the technical trend.

Loess (locally estimated scatterplot smoothing) estimates that trend by fitting a low-degree polynomial in a neighborhood of each intensity. For a local linear fit at target intensity \(A_0\), choose neighborhood weights \(w_j(A_0)\) and solve:

$$ (\hat\beta_0,\hat\beta_1) =\arg\min_{\beta_0,\beta_1} \sum_j w_j(A_0)\left[M_j-\beta_0-\beta_1(A_j-A_0)\right]^2. $$

The fitted trend at \(A_0\) is \(\hat f(A_0)=\hat\beta_0\). A common choice assigns larger weights to nearby intensities using a tricube kernel: if \(d_j=|A_j-A_0|/h\), where \(h\) is the neighborhood radius, then \(w_j=(1-d_j^3)^3\) for \(0\le d_j<1\), and \(w_j=0\) otherwise. The span determines how large a fraction of spots contributes to each local fit. A smaller span follows more local variation but can be noisy; a larger span is smoother but may miss a real bend in the trend.

For each spot, evaluate the fitted curve at its intensity and subtract it from its observed log ratio:

$$ M_i^{\mathrm{norm}}=M_i-\hat f(A_i). $$

Some implementations use robust reweighting so that large residuals have less influence on later fitting iterations. This can help when a few spots are outliers, but it does not protect against a broad group of genuinely changed spots that shifts the fitted trend.

Worked Example: Calculating MA Coordinates and Preserving Average Signal

Suppose a hypothetical spot has red intensity \(R_i=2^{10}\) and green intensity \(G_i=2^8\), in arbitrary positive intensity units. Suppose the loess fit at this spot’s average intensity is \(\hat f(A_i)=0.6\) log-ratio units.

First calculate the channel logs: \(r_i=10\) and \(g_i=8\). Therefore \(M_i=10-8=2\), and \(A_i=(10+8)/2=9\). The normalized log ratio is \(M_i^{\mathrm{norm}}=2-0.6=1.4\).

To reconstruct the corrected channel logs while retaining \(A_i\), use \(r_i^{\mathrm{norm}}=A_i+M_i^{\mathrm{norm}}/2=9+1.4/2=9.7\) and \(g_i^{\mathrm{norm}}=A_i-M_i^{\mathrm{norm}}/2=9-1.4/2=8.3\). Their average is \((9.7+8.3)/2=9\), exactly the original average log intensity. The corrected log ratio is \(9.7-8.3=1.4\), as required. The red-to-green ratio has been reduced by a factor of \(2^{0.6}\); the correction has changed relative balance, not average log signal.

Why the Average Log Signal Is Preserved

The loess adjustment is made to \(M_i\), while \(A_i\) is retained. Since \(A_i\) and \(M_i\) are the average and difference of the two channel logs, they can be converted back without approximation. For any adjusted ratio \(M_i^{\mathrm{norm}}\), define the corrected logs as follows:

$$ r_i^{\mathrm{norm}}=A_i+\frac{M_i^{\mathrm{norm}}}{2}, \qquad g_i^{\mathrm{norm}}=A_i-\frac{M_i^{\mathrm{norm}}}{2}. $$

Adding these equations and dividing by two gives \((r_i^{\mathrm{norm}}+g_i^{\mathrm{norm}})/2=A_i\). Subtracting them gives \(r_i^{\mathrm{norm}}-g_i^{\mathrm{norm}}=M_i^{\mathrm{norm}}\). Thus the transformation changes the log ratio exactly as intended while preserving the spot’s average log intensity. Equivalently, the geometric mean of the corrected channel intensities remains the original geometric mean.

This does not mean the two channel intensities, their arithmetic mean, or the total red and green signal over the whole array must remain unchanged. It means that each spot’s mean of the two channel log intensities is unchanged. This is the relevant sense of preserving overall signal when adjusting the ratio coordinate of the MA representation.

Worked Example: A Local Linear Fit at One Intensity

Consider five hypothetical spots with average intensities \(A=6,7,8,9,10\) and log ratios \(M=0.4,0.3,0.2,0.1,0.0\). At target \(A_0=8\), suppose all five spots are included in the local linear fit with positive weights. The observed values lie exactly on \(M=1.0-0.1A\), so the weighted least-squares line has intercept \(0.2\) at \(A_0=8\) and slope \(-0.1\). This is the fitted value \(\hat f(8)=0.2\).

For the spot at \(A=8\), the adjusted value is \(M^{\mathrm{norm}}=0.2-0.2=0\). For the spot at \(A=6\), the fitted trend is \(1.0-0.1(6)=0.4\), so its adjusted log ratio is \(0.4-0.4=0\). The same calculation gives fitted values \(0.3,0.2,0.1,0.0\) at intensities \(7,8,9,10\); all five adjusted log ratios are zero. In this deliberately simple example, the entire observed pattern is a straight intensity trend. Real arrays have residual variation, so normalization generally leaves spot-to-spot differences around the fitted curve.

This calculation also shows why loess is local regression rather than a single global slope: at each target intensity it estimates the trend from a weighted neighborhood. When the trend is nonlinear, the fitted value can adapt to its shape.

Assumptions, Diagnostics, and Failure Modes

The normalization is most defensible when the channel intensities are valid inputs, the technical bias changes smoothly with \(A\), and most spots at a given intensity are not shifted in the same biological direction. These conditions are assumptions, not consequences of the smoothing algorithm. A loess curve will be produced even when the assumptions are false.

  • Check the raw MA plot. A systematic smooth curve is consistent with intensity-dependent bias. A roughly horizontal cloud may not need such a correction. A few extreme points can affect an ordinary fit, so inspect their frequency and whether robust fitting was used.
  • Check the normalized MA plot. The broad smooth trend should be reduced. Residual scatter is expected; normalization does not require every \(M_i^{\mathrm{norm}}\) to equal zero.
  • Look for unstable ends. There may be few spots at very low or high intensities. Local fits near the boundaries can therefore be sensitive to the span, available neighbors, or individual points.
  • Vary the span as a sensitivity check. A highly wiggly fit can remove noise as if it were bias. An overly smooth fit can leave a systematic pattern. If the normalized conclusions change substantially across reasonable spans, the trend is not being estimated robustly.
  • Consider the biological distribution of changes. If many spots truly shift together, the fitted curve may treat that real shift as bias. The correction can then remove part of the biological signal.

The central assumption can be particularly doubtful when the two samples differ globally or when changes are strongly associated with intensity. In those settings, the observed trend combines technical bias with biological structure, and one array alone may not distinguish them. A visually flatter MA plot is not, by itself, proof that the correction was appropriate.

Worked Example: Reading a Small Normalized MA Summary

For four hypothetical spots, suppose the observed log ratios are \(0.5, 0.4, 0.0,\) and \(-0.1\), at average intensities \(6,7,8,\) and \(9\). Suppose the fitted loess values at those intensities are \(0.4,0.3,0.1,\) and \(0.0\). The normalized values are calculated spot by spot:

At \(A=6\), \(0.5-0.4=0.1\). At \(A=7\), \(0.4-0.3=0.1\). At \(A=8\), \(0.0-0.1=-0.1\). At \(A=9\), \(-0.1-0.0=-0.1\). The observed mean log ratio is \((0.5+0.4+0.0-0.1)/4=0.2\); the normalized mean is \((0.1+0.1-0.1-0.1)/4=0\). Here the fitted trend removes a positive average ratio as well as its dependence on intensity. That outcome is not a contradiction: preserving \(A\) preserves average log intensity at each spot, not the overall mean of \(M\).

A diagnostic review would ask whether the estimated curve is supported by many spots across the intensity range and whether the near-zero residual trend is plausible given the experiment. If the positive shift reflected a real global biological difference, centering it away could be undesirable. The arithmetic alone cannot decide whether that shift was technical.

How Loess Differs From Simpler Corrections

A global centering correction subtracts one constant from all log ratios, often a median or mean. It can remove an overall offset, but it cannot correct a curve that bends with intensity. Within-array loess instead estimates a varying correction \(\hat f(A_i)\). It can therefore address smooth intensity dependence, at the cost of needing enough spots across the intensity range and a credible assumption about the underlying ratio distribution.

No correction is also a legitimate comparison when the MA plot has no meaningful trend. Conversely, flattening a plot by applying a flexible curve is not automatically better: if the pattern is biological, loess can erase it. These choices concern the log-ratio structure within one two-color array. They should not be confused with methods that align intensity distributions across different arrays.

Common Mistakes

  • Subtracting the fitted curve from \(A\). The loess trend is fitted to \(M\) as a function of \(A\); the adjustment is \(M_i-\hat f(A_i)\). Keep \(A_i\) unchanged when preserving average log signal.
  • Assuming normalization makes every ratio zero. It removes the estimated trend, not all spot-level variation or genuine relative expression.
  • Treating the trend as certainly technical. It is estimated from the observed ratios. A broad biological shift can be absorbed into the curve if the balancing assumption fails.
  • Ignoring sparse intensity regions. Boundary fits can be unstable because their local neighborhoods contain fewer informative spots.
  • Calling the preserved quantity “total signal.” The preserved quantity is the average of the two log intensities for each spot, equivalently their geometric mean—not necessarily the arithmetic total across channels.
Key takeaway: Within-array loess estimates a smooth intensity-dependent trend in \(M\) from an MA plot and subtracts that trend. When the correction is represented in the two channel logs as \(A_i\pm M_i^{\mathrm{norm}}/2\), it changes the relative ratio while leaving each spot’s average log intensity unchanged. Its validity depends on whether the fitted trend represents technical bias rather than shared biological change.

Check Your Understanding

Answer each question, then compare your reasoning with the solutions.

  1. If \(r_i=11\) and \(g_i=9\), what are \(M_i\) and \(A_i\)?
  2. If a spot has \(M_i=0.8\) and the fitted trend is \(\hat f(A_i)=0.3\), what is its normalized log ratio?
  3. What does the loess span control, and what are the risks of choosing it too small or too large?
  4. Give one assumption that can fail when many genes undergo a true change in the same direction.
  5. State precisely what is preserved when \(M\) is adjusted but \(A\) is retained.

Solutions. (1) \(M_i=11-9=2\), and \(A_i=(11+9)/2=10\), in log base 2 units. (2) \(M_i^{\mathrm{norm}}=0.8-0.3=0.5\). (3) The span controls how large a neighborhood contributes to each local fit. Too small a span can produce a noisy, overly wiggly trend; too large a span can oversmooth and leave intensity dependence uncorrected. (4) The assumption that the underlying log ratios are balanced around zero at each intensity can fail; a shared biological shift may be mistaken for technical bias. (5) The average of the two channel log intensities for that spot, \(A_i=(r_i+g_i)/2\), is preserved. Equivalently, the geometric mean of the corrected red and green intensities remains unchanged; this does not guarantee that their arithmetic total is preserved.

Clinical Biostats