Tutorials › Statistical Genetics › Allele Harmonization For Summary-Data MR

Mendelian Randomization Foundations · Tutorial 840 of 989

Allele Harmonization For Summary-Data MR

You will learn to verify variant and allele correspondence, resolve or flag ambiguous strand orientations, and calculate the effect of allele flips on summary-data MR estimates.

Advanced 10 min read

What You'll Learn

  • Define effect and other alleles and express association estimates on a common effect-allele scale
  • Match variants across exposure and outcome results before calculating MR estimates
  • Apply strand complements and identify when strand orientation cannot be resolved
  • Use allele frequencies cautiously to align palindromic variants
  • Calculate how a one-sided allele flip changes a Wald ratio and how paired flips affect IVW
  • Recognize when to exclude a variant rather than force an uncertain alignment

Why Allele Harmonization Matters

A summary-data Mendelian randomization (MR) estimate combines an association between a genetic variant and an exposure with an association between that variant and an outcome. The ratio is meaningful only when the two associations refer to the same genetic variant and the same counted allele. If the exposure result is reported per copy of one allele and the outcome result per copy of the other, one coefficient must change sign before the results can be combined.

This alignment step is called allele harmonization. It does not establish that an instrument is valid or that an MR estimate has a causal interpretation. Its narrower purpose is to make the exposure and outcome association estimates correspond to the same allele. A mistake here can reverse a ratio estimate even when both association results are otherwise correct.

Effect Alleles and Association Coefficients

Definition: For a biallelic variant, the effect allele is the allele whose dosage is counted in an association model; the other allele is the alternative allele. If dosage is the number of copies of the effect allele, the reported association coefficient describes the expected change in the trait per additional copy of that allele, under the fitted model. In this tutorial, \(b_X\) denotes the exposure association coefficient and \(b_Y\) the outcome association coefficient.

For example, if an exposure result reports \(b_X=0.06\) standard deviations per copy of allele A, the coefficient is defined for increasing the A-allele dosage by one. If the same variant’s outcome result is reported per copy of allele G, the coefficients are not yet on the same coding scale. For a biallelic A/G variant, one copy of A replaces one copy of G, so changing from G dosage to A dosage reverses the coefficient’s sign.

$$ b_{\text{per A}}=-b_{\text{per G}}, \qquad SE_{\text{per A}}=SE_{\text{per G}}. $$

The standard error is unchanged because reversing the direction of a coefficient does not change its uncertainty. The same sign reversal applies to a coefficient from a linear association model when the counted allele changes from one allele to the other. The phenotype scale and model must also be understood: harmonization cannot make results comparable if one coefficient is in incompatible units or refers to a different phenotype definition.

What Must Be Matched Before Combining Results

A shared variant identifier alone is not enough. Before aligning alleles, check that the exposure and outcome results identify the same variant. Confirm identifiers and, where available, chromosome and position, reference genome build, and allele pair. This is particularly important for variants with different identifiers across files and for insertions or deletions, whose representation can vary unless normalized consistently.

For each matched variant, record the effect allele, the other allele, the association coefficient, its standard error, and—if available—the effect-allele frequency. Check that the allele pair is consistent between datasets, allowing for a possible strand complement. Then express both coefficients per copy of the same allele. If that cannot be done reliably, do not treat the two estimates as aligned.

Key rule: For each variant, \(b_X\) and \(b_Y\) used in an MR ratio must refer to the same effect allele. If one reported coefficient is for the other allele, reverse its sign before calculating the ratio.

Direct Matches and Strand Complements

DNA strands are complementary: A pairs with T, and C pairs with G. Depending on how results were produced, one dataset may label a variant using one strand and another dataset using the complementary strand. Thus, exposure alleles A/G and outcome alleles T/C can describe the same variant on opposite strands: T complements A, and C complements G.

Complementing allele labels is not itself a coefficient sign change. First translate the labels to a common strand; then determine whether the counted effect allele is the same. If it is, keep the coefficient’s sign. If it is the other allele, reverse the sign. Keeping these as two distinct operations prevents a common harmonization error.

Worked Example: Reversing the Outcome Coefficient

Suppose a hypothetical exposure association for an A/G variant is \(b_X=0.08\) exposure standard deviations per A allele. The outcome result reports \(b_Y=0.12\) outcome units per G allele. Both results refer to the same variant, and the allele pair is verified.

Step 1: Choose a common effect allele. Use A, the exposure effect allele. The outcome coefficient is reported per G, the other allele in this biallelic variant.

Step 2: Recode the outcome coefficient. Changing from G dosage to A dosage reverses its sign, so \(b_Y\) per A is \(-0.12\) outcome units per A allele.

Step 3: Calculate the aligned Wald ratio.

$$ \hat{\theta}_{\text{Wald}}=\frac{b_Y}{b_X} =\frac{-0.12\ \text{outcome units per A allele}} {0.08\ \text{exposure SD per A allele}} =-1.5\ \text{outcome units per exposure SD}. $$

The aligned ratio is \(-1.5\) outcome units per exposure standard deviation. Dividing the unaligned coefficients would give \(0.12/0.08=1.5\), with the opposite sign. That result would combine associations defined per different alleles and would therefore be incorrectly coded.

Palindromic Variants and Orientation Ambiguity

A variant is palindromic when its allele pair is A/T or C/G. The complement of the pair is the same pair with the labels exchanged: complementing A/T gives T/A, and complementing C/G gives G/C. As a result, allele labels alone cannot always reveal whether two datasets use the same strand orientation or opposite strands.

Effect-allele frequencies can sometimes resolve this ambiguity. Compare frequencies only when they are defined for the reported effect alleles, and preferably when the exposure and outcome samples have comparable ancestry. If an outcome effect allele has frequency close to one minus the exposure effect-allele frequency, that can indicate that the outcome is counting the opposite allele. Recode its coefficient and frequency to the other allele, then compare again. Frequency differences between populations can mimic an orientation difference, so frequency is evidence for alignment, not an infallible identifier.

When frequencies are unavailable, not comparable, or too close to one half to distinguish orientations, the strand and effect-allele alignment may be unresolved. A defensible analysis flags or excludes such a variant rather than choosing an orientation arbitrarily. Any frequency thresholds used to make this decision should follow a prespecified harmonization rule; there is no universal cutoff that makes every palindromic variant safe to retain.

Worked Example: Aligning a Palindromic Variant Using Frequencies

Consider a hypothetical A/T variant. The exposure result reports an effect-allele frequency of 0.18 and \(b_X=0.04\) exposure standard deviations per A allele. The outcome file reports the effect allele as T, with frequency 0.82 and \(b_Y=0.10\) outcome units per T allele. Assume the frequency estimates come from comparable populations and are sufficiently reliable for this comparison.

Step 1: Compare the reported frequencies. The outcome T frequency, 0.82, is \(1-0.18\). This is consistent with T being the allele opposite to exposure A. Because A/T is palindromic, the allele labels alone could not settle the orientation, but the frequencies support identifying the outcome’s other allele, A, as the exposure effect allele.

Step 2: Re-express the outcome result per A. The outcome coefficient is reported per T, so changing to A reverses its sign:

$$ b_Y\text{ per A}=-0.10\ \text{outcome units per A allele}. $$

The frequency for A in the outcome data is \(1-0.82=0.18\), which agrees with the exposure A frequency.

Step 3: Calculate the aligned ratio.

$$ \hat{\theta}_{\text{Wald}} =\frac{-0.10}{0.04} =-2.5\ \text{outcome units per exposure SD}. $$

This alignment is supported by the frequency agreement and the stated comparability assumption. If the frequencies had instead been, for example, 0.49 and 0.51, they would be too close to one half to give a clear orientation from frequency alone. Without other reliable information, the correct response would be to flag or omit the variant under the analysis protocol, not to infer an alignment from the labels.

Effect of Coding on Wald and IVW Estimates

For one variant, the summary-data Wald ratio is the outcome association divided by the exposure association, using coefficients coded to the same allele. Reversing both coefficients for a variant leaves its ratio unchanged: the two minus signs cancel. Reversing only one coefficient changes the ratio’s sign. The following identity makes the distinction explicit.

$$ \frac{-b_Y}{-b_X}=\frac{b_Y}{b_X}, \qquad \frac{-b_Y}{b_X}=-\frac{b_Y}{b_X}. $$

With multiple variants, inverse-variance weighted (IVW) estimation combines the aligned associations. In the usual first-order form, with outcome standard errors \(SE_{Yj}\), the estimate is

$$ \hat{\theta}_{\text{IVW}} = \frac{\sum_j b_{Xj}b_{Yj}/SE_{Yj}^{2}} {\sum_j b_{Xj}^{2}/SE_{Yj}^{2}}. $$

Here each pair \(b_{Xj},b_{Yj}\) must be coded to the same effect allele for variant \(j\). If both coefficients for a particular variant are reversed, its product in the numerator and its squared exposure coefficient in the denominator are unchanged. If only one is reversed, that variant’s numerator contribution changes sign while its denominator contribution does not. Thus, an isolated coding mismatch can distort the combined estimate; the problem is not fixed merely by having many variants.

Worked Example: A One-Sided Flip in a Two-Variant IVW Estimate

Suppose two hypothetical variants have already been matched, and both are initially coded consistently. For simplicity, let both outcome standard errors be 0.10 outcome units. The associations are \(b_{X1}=0.10\), \(b_{Y1}=0.20\), \(b_{X2}=0.20\), and \(b_{Y2}=0.10\), with exposure coefficients in exposure standard deviations per allele.

Correctly aligned calculation. Each squared inverse standard error is \(1/0.10^2=100\). Substituting into the IVW formula gives

$$ \hat{\theta}_{\text{IVW}} = \frac{100(0.10)(0.20)+100(0.20)(0.10)} {100(0.10)^2+100(0.20)^2} = \frac{2+2}{1+4} =0.80\ \text{outcome units per exposure SD}. $$

Now suppose only variant 1’s outcome coefficient is mistakenly left coded to the opposite allele. Its outcome coefficient changes from 0.20 to \(-0.20\), while its exposure coefficient and standard error are unchanged. The resulting calculation is

$$ \hat{\theta}_{\text{misaligned}} = \frac{100(0.10)(-0.20)+100(0.20)(0.10)} {100(0.10)^2+100(0.20)^2} = \frac{-2+2}{1+4} =0\ \text{outcome units per exposure SD}. $$

The zero estimate is an artefact of the coding mismatch: the first variant’s numerator contribution was reversed, while the second was not. This example isolates the algebraic effect of harmonization; it does not assess whether the variants or their associations satisfy other MR requirements.

A Practical Harmonization Sequence

A reliable workflow separates variant matching, strand interpretation, and coefficient recoding. The sequence below is intended for summary association results before calculating ratios or an IVW estimate.

1
Verify variant identity.
Match the same genetic variant using identifiers and, where needed, chromosome, position, genome build, and normalized allele representation.
2
Compare allele pairs.
Check whether alleles match directly or as strand complements. If the pairs cannot be reconciled, investigate the records rather than assuming they refer to the same variant.
3
Resolve orientation.
For non-palindromic pairs, use the allele labels and complement mapping. For palindromic pairs, use reliable, comparable frequencies or other trusted orientation information; otherwise flag or exclude the unresolved variant.
4
Recode to a common effect allele.
For each variant, retain coefficients already reported per the selected allele and multiply by \(-1\) when a coefficient is reported per the other allele. Preserve standard errors and update allele-frequency labels consistently.
5
Audit before estimation.
Check that every retained exposure-outcome pair names the same effect allele and that excluded or ambiguous variants are recorded. Then calculate the ratio or multi-variant estimator.

Common Mistakes and Interpretation

  • Assuming a matching variant identifier guarantees matching coding. It does not; inspect the effect and other alleles for both association results.
  • Flipping a coefficient just because strand labels differ. Complement the allele labels first. Reverse the coefficient only if the counted allele is the opposite allele after orientation has been resolved.
  • Treating all palindromic variants as resolvable from their letters. A/T and C/G pairs do not uniquely identify strand orientation. Use suitable frequency information or flag the ambiguity.
  • Using allele frequencies as if they were exact across samples. Differences in ancestry or sampling can alter frequencies. Comparisons are informative only when the frequency definitions and populations are sufficiently comparable.
  • Thinking that the ratio’s sign is arbitrary. Reversing both coefficients for one variant preserves its ratio; reversing only one changes its sign. Consistent allele coding is essential.
  • Equating successful harmonization with a valid causal estimate. Harmonization aligns the reported associations. It does not by itself establish the assumptions needed for causal interpretation.
Key takeaway: Before using summary associations in MR, express the exposure and outcome coefficients for each variant per the same counted allele. For a confidently identified opposite allele, reverse the coefficient’s sign; for unresolved strand or palindromic orientation, do not force a match.

Check Your Understanding

Try these questions using the allele-coding rules in this tutorial.

  1. An exposure coefficient is reported per C allele and an outcome coefficient for the same C/G variant is reported per G allele. What change is needed before forming a Wald ratio?
  2. An exposure result reports A/G, while the outcome result reports T/C. Which allele labels complement one another, and does complementing labels alone require a sign change?
  3. Why can allele labels alone fail to resolve the orientation of an A/T variant?
  4. For a palindromic variant, what frequency pattern could support aligning the two results to the same effect allele, and what assumptions make that comparison useful?
  5. In a multi-variant IVW estimate, what happens to a variant’s numerator contribution if only its outcome coefficient is reversed? What happens if both its exposure and outcome coefficients are reversed?
Clinical Biostats