Tutorials › High-Dimensional Genomic Data Analysis › Harmonizing Exposure And Outcome Alleles

Mendelian Randomization · Tutorial 661 of 795

Harmonizing Exposure And Outcome Alleles

You will learn to match variant alleles across association datasets, decide when strand and frequency information can resolve orientation, and identify sign errors that can invalidate Mendelian-randomization estimates.

Advanced 12 min read

What You'll Learn

  • State which allele each exposure and outcome coefficient represents.
  • Reorient a coefficient when its effect allele is swapped.
  • Map non-palindromic alleles across forward and reverse strands.
  • Use allele frequencies cautiously to assess palindromic variants.
  • Recognize data problems that cannot be fixed by allele harmonization.
  • Explain how a sign mismatch changes downstream Mendelian-randomization results.

Why Allele Harmonization Matters

A genetic association coefficient is not just a number attached to a variant. Its sign describes the direction of association for a particular allele, relative to another allele. Exposure and outcome datasets can report the same variant using different effect alleles, or represent alleles on opposite DNA strands. If those differences are ignored, the coefficients may describe opposite allele contrasts. A later Mendelian-randomization calculation can then have the wrong sign, or combine variant-specific estimates that point in incompatible directions.

Harmonization means identifying the same biological allele contrast in both datasets and expressing the exposure and outcome coefficients using that contrast. It is a data-alignment task, not a way to establish that a variant is a valid instrument. Instrument relevance, independence, and the exclusion restriction remain separate assumptions.

Definition: For a biallelic variant, the effect allele is the allele whose per-copy association coefficient is reported. The other allele is the alternative allele. Harmonized exposure and outcome coefficients refer to the same effect allele and the same other allele. If the outcome effect allele is the exposure other allele, the outcome coefficient must be multiplied by \(-1\) to express it for the exposure effect allele.

Allele Labels and Coefficient Signs

Let \(\beta_X\) denote an exposure association coefficient and \(\beta_Y\) an outcome association coefficient. Each is interpreted per additional copy of its dataset's stated effect allele, relative to the other allele. For example, \(\beta_X=0.04\) means that each additional copy of the exposure effect allele is associated with a 0.04-unit higher mean exposure, under the model used to estimate that coefficient. The units and model scale matter: an outcome coefficient might be measured in log odds per allele rather than in the original outcome units.

For a biallelic variant, swapping the effect and other alleles reverses the sign of the coefficient. If the allele dosage is \(G\), counting copies of the effect allele, then counting copies of the other allele gives \(2-G\). A regression coefficient for \(2-G\) is the negative of the coefficient for \(G\), because the two dosages move in opposite directions.

$$ \beta_{2-G}=-\beta_G $$

This identity assumes a diploid biallelic genotype coded as 0, 1, or 2 copies, with the same participants, outcome, covariates, and association model. It describes a change of allele coding, not a biological change in the variant. Strand complementation is different: it changes the letter labels used to describe alleles, but it does not by itself reverse the coefficient. The key question is whether the biological allele being counted is the same.

For DNA bases, strand complementation pairs A with T and C with G. Thus an A/C variant on one strand corresponds to T/G on the opposite strand. A/C and T/G are different strings but can describe the same two biological alleles. In contrast, if one dataset reports A/C and another reports A/G, a simple complement or swap does not reconcile the records. The variant identity, genome build, or data may be wrong and must be checked.

A Careful Harmonization Workflow

Before changing any signs, verify that the exposure and outcome records refer to the same variant. A shared rsID is useful but not sufficient if records use different genome builds or if a variant is multi-allelic. Check the chromosome and position, build, reference and alternate alleles when available, and whether allele labels have been normalized consistently. For indels, use a consistent representation; left-alignment and reference-allele normalization can matter. A coefficient cannot be safely harmonized if the two records do not describe the same variant.

For a verified biallelic variant, compare the two allele pairs. If they match in the same order, retain both coefficients. If the outcome pair is in reversed order, reverse the sign of its coefficient. If the pairs are strand complements, map each base to its complement before deciding whether the effect allele is the same or swapped. Record the decision, rather than silently editing a coefficient.

1
Verify variant identity.
Check identifiers, position, genome build, and allele representation. Resolve discrepancies before using coefficient signs.
2
Compare allele pairs.
Determine whether the pairs match directly, are swapped, are strand complements, or cannot be reconciled.
3
Align the outcome coefficient.
Express it for the exposure effect allele. Reverse its sign only when that allele corresponds to the outcome other allele.
4
Audit the result.
Retain the original alleles, frequencies, and coefficient; record the alignment action and flag unresolved or excluded variants.

Worked Example: Reversing a Swapped Outcome Allele

Suppose an exposure dataset reports a variant as C/G, with C as the effect allele and \(\beta_X=0.06\) exposure units per C allele. The outcome dataset reports the same verified variant as G/C, with G as the effect allele and \(\beta_Y=0.09\) outcome units per G allele. Assume the allele definitions and association scales are otherwise comparable.

The outcome effect allele G is the exposure other allele. Therefore, the outcome coefficient must be re-expressed per C allele:

$$ \beta_{Y,\text{per C}}=-0.09 $$

The sign change is required because each additional C allele means one fewer G allele at this biallelic locus. For illustration, if a downstream single-variant calculation divides the outcome association by the exposure association, the aligned value is \(-0.09/0.06=-1.5\) outcome units per exposure unit. Keeping the unaligned sign would give \(0.09/0.06=1.5\), the opposite direction. This arithmetic illustrates the consequence of harmonization; it does not establish that the variant satisfies the instrumental-variable assumptions.

Strand Complements and Palindromic Variants

For a non-palindromic pair, the complementary labels can usually be mapped unambiguously. For example, A/C complements to T/G. If the exposure effect allele is A and the outcome record is T/G with T as its effect allele, then T corresponds to A on the other strand. The coefficients refer to the same biological allele contrast and keep the same sign. If the outcome effect allele were G instead, it would correspond to exposure C, and the outcome coefficient would need a sign reversal.

A palindromic pair is A/T or C/G: taking complements leaves the unordered pair unchanged. Consequently, allele letters alone cannot reveal whether the outcome record has the same strand orientation or the opposite one. Allele frequency can sometimes resolve the ambiguity. The effect-allele frequency (EAF) is the proportion of allele copies that are the stated effect allele. If datasets have comparable ancestry and frequency estimates, a non-central frequency may indicate which allele is being counted. Frequencies close to 0.5 provide little orientation information, and population differences or estimation error can also mislead.

Worked Example: Complementing a Non-Palindromic Variant

A hypothetical exposure record reports A/C, with A as its effect allele and \(\beta_X=0.05\) exposure units per A allele. The matching outcome record is reported on the opposite strand as T/G, with T as its effect allele and \(\beta_Y=0.04\) outcome units per T allele. Assume the variant identity is verified and the allele pairs are not multi-allelic.

The complementary mappings are A to T and C to G. Thus, the outcome effect allele T corresponds to the exposure effect allele A. The coefficient already has the desired orientation, so \(\beta_Y\) remains \(0.04\); it is not negated merely because the letters differ. The illustrative quotient is \(0.04/0.05=0.8\) outcome units per exposure unit. Negating the outcome coefficient because the labels are not identical would incorrectly change this to \(-0.8\).

Worked Example: Frequency Evidence for a Palindromic Variant

Suppose the exposure record is A/T, with A as the effect allele, EAF \(0.18\), and \(\beta_X=0.10\) exposure units per A allele. The outcome record is also A/T, but lists T as the effect allele, EAF \(0.81\), and \(\beta_Y=-0.04\) outcome units per T allele. Assume the samples have similar ancestry and that the frequency estimates are sufficiently reliable.

The outcome's T frequency of \(0.81\) implies an A frequency of \(1-0.81=0.19\), close to the exposure A frequency of \(0.18\). This supports the interpretation that the outcome effect allele T is the exposure other allele A/T contrast's opposite allele. The outcome coefficient per A allele is therefore \(-(-0.04)=0.04\) outcome units. The aligned illustrative quotient is \(0.04/0.10=0.4\) outcome units per exposure unit.

If, instead, the outcome EAF were \(0.49\), its complementary frequency would be \(0.51\), which is also close to \(0.49\). That frequency would not distinguish the two orientations. The correct response is to flag the palindromic variant as ambiguous and use a justified exclusion or resolution rule, rather than choose an orientation arbitrarily.

Assumptions, Diagnostics, and Limitations

Sign harmonization assumes that both records describe the same biallelic variant and that each coefficient is per copy of the stated effect allele. It also assumes allele labels and frequencies have been interpreted on the stated genome build and with consistent variant representation. Frequency-based resolution additionally needs suitably comparable populations and enough precision to distinguish an allele from its alternative. If these conditions are doubtful, the orientation may remain uncertain.

Useful diagnostics include counting how many variants match directly, require swaps, require strand mapping, are ambiguous, or fail identity checks. Compare exposure and outcome allele frequencies after proposed alignment; large unexplained differences can indicate an incorrect mapping, population differences, or data errors. Review variants with incompatible alleles, missing allele labels, or unexpected duplicate records individually. A plausible-looking downstream result is not evidence that the alignment is correct.

Harmonization cannot repair sample overlap, population stratification, weak instruments, horizontal pleiotropy, or inconsistent phenotype definitions. Nor can it infer the causal direction from allele labels. It only makes the two association coefficients refer to a common allele contrast. In a multi-variant analysis, one uncorrected sign can make a variant appear to support an opposing effect and can distort a combined estimate or its heterogeneity. A large number of correctly aligned variants does not guarantee that every individual record is valid.

Record relationshipAction on outcome coefficientReason
Same effect allele after direct comparisonKeep signBoth coefficients count the same allele
Outcome effect allele is exposure other alleleReverse signThe allele contrast is reversed
Non-palindromic strand complement; same biological effect alleleKeep signLetter labels differ, but allele identity matches
Palindromic pair with unresolved orientationDo not guessAllele letters do not identify strand orientation
Incompatible pairs or uncertain variant identityDo not harmonize automaticallyThe records may not describe the same variant

Common Mistakes

  • Flipping every outcome coefficient. A sign change is required only when the outcome effect allele is the exposure other allele, not simply because datasets use different allele order.
  • Flipping when strand letters differ. A and T can name the same biological allele on opposite strands. Map complements before deciding whether to change the sign.
  • Treating every palindromic record as resolvable. Near-frequency symmetry, especially near 0.5, can leave orientation indeterminate. Flag or exclude unresolved variants.
  • Assuming matching variant IDs guarantee matching alleles. Build differences, multi-allelic sites, and inconsistent indel representations can undermine a match. Verify the variant record before using its coefficient.
Key takeaway: Harmonize biological allele identity, not just allele letters. Keep the outcome sign when its effect allele corresponds to the exposure effect allele, reverse it when it corresponds to the exposure other allele, and do not guess when orientation is unresolved.

Check Your Understanding

Answer each question, then compare with the solutions below.

  1. The exposure effect allele is G. The outcome effect allele is A, and the verified allele pair is A/G in both datasets. What happens to the outcome coefficient when it is expressed per G allele?
  2. The exposure record is C/T and the outcome record is G/A on the opposite strand. Which outcome allele corresponds to exposure C?
  3. For an A/T variant, the exposure A EAF is \(0.22\) and the outcome T EAF is \(0.78\). What orientation does the frequency comparison support, assuming comparable populations?
  4. Why is an A/T outcome EAF of \(0.50\) insufficient to resolve strand orientation?

Solutions. 1. A is the exposure other allele, so multiply the outcome coefficient by \(-1\). 2. C complements to G, so outcome G corresponds to exposure C; retain the coefficient sign if G is the outcome effect allele. If A is the outcome effect allele, reverse the sign because A complements exposure T. 3. The outcome T frequency implies A frequency \(1-0.78=0.22\), matching exposure A; outcome T corresponds to exposure T, so reverse the outcome coefficient to express it per exposure A. 4. A frequency of \(0.50\) is unchanged by taking its complement, so it gives no evidence favoring either orientation.

Clinical Biostats