Why Allele Harmonization Matters
A GWAS effect estimate describes a change per copy of a specified allele. A target genotype dosage, however, may count either allele at the same locus. If those allele definitions do not match, a coefficient can be applied in the wrong direction. A variant may then contribute with the opposite sign to a polygenic risk score, even though its identifier appears to match. Allele harmonization is the process of verifying that each discovery effect estimate refers to the allele counted by the corresponding target dosage, or translating the estimate when the target counts the other allele.
The polygenic risk score estimand defined in the earlier material on polygenic risk scores depends on the intended allele-specific effects being attached to the correct variants. Harmonization is therefore not a cosmetic data-cleaning step. It establishes the meaning of the inputs before score construction.
Throughout, consider biallelic single-nucleotide variants (SNPs) in diploid individuals. Assume the discovery and target data refer to the same genome build and the same biological variant, and that effect estimates use an additive per-allele model. A variant must be matched using reliable identity information, such as chromosome, position, reference and alternate alleles, and genome build. An rsID alone may be insufficient when records are multiallelic, duplicated, or represented differently. Indels and other complex variants may require normalization before their alleles can be compared.
These are substantive prerequisites, not details that allele flipping can repair. If variant identity or genome build is uncertain, the alleles cannot safely be aligned just by comparing their letters.
Allele Swaps and Strand Complements
Write the two alleles of a SNP as an unordered pair when checking identity: for example, A/G and G/A describe the same pair. The order in a file may differ, and the effect allele must be read from its named column rather than inferred from the order. Two transformations must be distinguished:
- Allele swap: the same strand is used, but the allele counted in one data source is the other allele. For a biallelic diploid SNP, the two dosages add to 2.
- Strand complement: the alleles are represented on opposite DNA strands. Complementary base pairs are A/T and C/G. Thus A/G on one strand corresponds to T/C on the other.
A strand complement does not itself mean that the biological effect has changed direction. It changes the nucleotide labels used to describe the same alleles. An allele swap, by contrast, changes which allele a dosage counts and therefore requires a corresponding change in the coefficient representation.
The derivation follows directly from the genotype count: every diploid individual has two copies across the two alleles, so \(D_E+D_O=2\). Substituting \(D_E=2-D_O\) into the additive contribution \(\beta D_E\) gives the displayed expression. Thus, when a score is represented using dosage of the opposite allele, the coefficient sign must reverse. Ignoring the constant is appropriate only in contexts where a constant shift is immaterial; it does not change which allele the coefficient refers to.
Worked Example: Target Dosage Counts the Other Allele
Suppose a hypothetical GWAS reports alleles A/G, identifies G as the effect allele, and gives \(\beta=0.18\) outcome units per G copy. The target genotype file reports dosage \(D_A\), the number of A copies. Assume the variant identity and genome build have been verified.
The GWAS dosage is \(D_G=2-D_A\). Re-expressing the contribution in terms of the target dosage gives $$ 0.18D_G=0.18(2-D_A)=0.36-0.18D_A. $$
For example, if an individual has target dosage \(D_A=1.5\), the corresponding G dosage is \(D_G=0.5\), and the GWAS contribution is \(0.18(0.5)=0.09\) outcome units. The translated expression gives \(0.36-0.18(1.5)=0.09\), the same value.
Therefore, a representation that uses A dosage has coefficient \(-0.18\) outcome units per A copy and, for the exact uncentered contribution, constant \(0.36\) outcome units. The allele swap reverses the coefficient; it does not justify keeping \(+0.18\) on A dosage.
Matching Nonpalindromic SNPs
For a nonpalindromic SNP, the allele pair and its complement are distinct. For example, A/G complements to T/C, not to A/G. If discovery reports A/G and target data report T/C at the verified same locus, the records can be aligned by taking complements. Once the effect allele has been identified in the discovery record, map that allele through the complement and check whether target dosage counts it or the other allele. Only the latter case requires a sign reversal.
Allele order alone is not evidence of a swap. Files may list alleles in different orders, and columns may use different conventions for reference and alternate alleles. Read the effect-allele field, the other-allele field, and the target dosage definition explicitly. Do not infer effect direction from which allele appears first.
Worked Example: Aligning Opposite-Strand Representations
In hypothetical discovery data, a SNP is listed as C/T, with T as the effect allele and \(\beta=-0.07\) outcome units per T copy. The matching target record, at the verified same locus and build, is represented as G/A, and its dosage counts A.
The complement map is C to G and T to A. Therefore, discovery effect allele T corresponds to target allele A. The target dosage counts the effect allele, so no sign reversal is needed: the aligned coefficient remains \(-0.07\) outcome units per A copy.
If the target file instead counted G, then its dosage would count the other allele. The coefficient on G dosage would be \(+0.07\) outcome units per G copy, because the dosage swap reverses the sign. The strand complement determines the allele mapping; the dosage definition determines whether the coefficient sign changes.
Palindromic SNPs and Frequency Evidence
A SNP is palindromic when its allele pair is A/T or C/G. Its complement is the same unordered pair: complementing A/T gives T/A, which is still A/T. Consequently, allele letters alone cannot reveal whether two records use the same strand orientation or opposite orientations. A/T in discovery and A/T in target could indicate direct correspondence or a strand complement combined with an allele swap.
Allele frequencies can help when they are available and comparable. Let \(f_E\) be the discovery frequency of the reported effect allele, and let \(f_T\) be the target frequency of the allele whose dosage is being considered. If the effect allele corresponds to that target allele, the frequencies should be broadly similar. If it corresponds to the other allele, the target frequency for the dosage allele should be broadly similar to \(1-f_E\). Sampling variability, ancestry differences, imputation, and quality control can all create discrepancies, so frequency agreement is evidence rather than proof.
Worked Example: Orienting a Palindromic Variant With Frequencies
Consider hypothetical discovery data for an A/T SNP. The effect allele is A, with frequency \(f_E=0.08\). In a target dataset from a comparable ancestry group, the reported frequency of A is \(0.91\), so the frequency of T is \(1-0.91=0.09\).
If discovery A corresponded to target A, their frequencies would be expected to be similar: \(0.08\) versus \(0.91\). They are not. If discovery A corresponds to target T, the comparison is \(0.08\) versus \(0.09\), which is close. Under the stated comparability assumption, the frequency evidence supports mapping the discovery effect allele A to target T.
If the target dosage counts A, it counts the other allele, so the coefficient must be negated for an A-dosage representation. If the target dosage counts T, it counts the mapped effect allele and the coefficient retains its sign. The frequency comparison resolves a likely orientation; it does not establish identity on its own.
When frequencies are near one half, the two possible orientations are difficult to distinguish. Small frequency differences may be no larger than sampling error or population differences. If the discovery effect-allele frequency is \(0.49\) and the target frequency of the dosage allele is \(0.51\), either orientation can appear plausible: \(0.49\) is close to \(0.51\), and its complement \(0.51\) is also close. If no independent information resolves the orientation, the safe decision is to flag or exclude the variant rather than choose a direction arbitrarily.
Worked Example: A Palindromic Variant That Remains Ambiguous
Suppose a hypothetical C/G SNP has discovery effect allele C at frequency \(0.49\). The target frequency of the allele whose dosage is recorded is \(0.51\). Assume the samples are not identical, although their ancestry is believed to be similar.
Under direct alignment, the expected comparison is \(0.49\) versus \(0.51\), a difference of \(0.02\). Under the alternative orientation, compare \(1-0.49=0.51\) with \(0.51\), a difference of \(0\). These values weakly favor the alternative orientation, but the frequencies are both close to one half, where orientation evidence is intrinsically weak. Sampling variation or ancestry differences could readily affect a difference of this size.
The data provided do not establish which target allele corresponds to discovery C. A defensible harmonization record should mark this SNP as unresolved and omit it from an allele-specific score unless additional reliable orientation information is available. Assigning a sign based on a two-percentage-point discrepancy would overstate what the evidence supports.
Assumptions, Audits, and Failure Modes
The transformations above rely on a verified biallelic variant and diploid dosage, with both data sources referring to the same locus and genome build. Dosages may be fractional when they are imputed expected allele counts, but the complement relation still applies: the expected count of the other allele is \(2-D\) for a diploid biallelic locus. Sex chromosomes, copy-number variation, and non-diploid contexts need appropriate ploidy-specific treatment rather than an automatic diploid formula.
A practical audit should keep a record of the variant key, source allele pair, effect allele, target dosage allele, any complement or swap applied, frequency evidence for palindromic variants, and the final decision. After alignment, check for unresolved or duplicated records, unexpected allele pairs, and implausible frequency discrepancies. A large number of mismatches can indicate a file-convention problem or a more fundamental variant-identity issue. Do not repair such patterns by applying a global sign flip without diagnosing the cause.
The main alternatives are to resolve orientation using reliable external information, to use a target dosage already coded for the effect allele, or to exclude variants whose orientation cannot be established. Frequency-based orientation is useful when the source and target frequency estimates are informative and comparable; it is not a universal substitute for allele identity. For palindromic variants near frequency one half, exclusion is often safer than a forced match.
Common failure modes include treating a strand complement as automatically requiring a sign change, assuming matching rsIDs guarantee matching allele coding, and flipping every coefficient whenever allele order differs. Each confuses one part of the mapping with another. First establish the same variant, then map the effect allele across strand representations, then compare it with the allele counted by target dosage. Change the coefficient sign only when the target dosage counts the other allele.
Check Your Understanding
Answer each question, then compare your reasoning with the solutions below.
- A GWAS reports A/C with effect allele C and coefficient \(0.12\). The target dosage counts A. What coefficient belongs with A dosage, and why?
- Discovery reports A/G with effect allele G. Target reports T/C and counts C at the same verified locus. Is a sign change needed? Explain.
- Why can allele letters alone fail to orient an A/T SNP across datasets?
- Discovery reports a palindromic effect allele at frequency \(0.10\), while target allele frequencies are \(0.12\) and \(0.88\). What frequency comparison is informative, and what assumption should be checked?
- Two palindromic orientations fit the available frequency data similarly well. What is a defensible analysis decision?
Solutions. (1) The coefficient is \(-0.12\) per A copy, because A is the other allele and \(D_C=2-D_A\). (2) No sign change is needed: A complements to T and G complements to C, so discovery G maps to target C, the allele counted. (3) A/T complements to T/A, the same unordered allele pair, so the labels do not distinguish direct from opposite-strand orientation. (4) Compare the discovery effect-allele frequency \(0.10\) with the target frequency of the dosage allele and with its complement: \(0.12\) versus \(0.88\). The closer match is \(0.12\), but the source and target populations and frequency estimates must be sufficiently comparable for this evidence to be useful. (5) Mark the variant unresolved and omit it unless reliable independent orientation information becomes available; do not choose an orientation arbitrarily.