Why Allele Harmonization Matters
A polygenic score combines genotype values with variant weights. As established by the weighted-sum definition, the contribution from variant \(j\) is the genotype value multiplied by its weight. That multiplication is meaningful only when the genotype value counts the allele to which the weight refers. If a GWAS reports an effect for allele A but the target genotype dosage counts allele G, using the reported weight unchanged reverses the direction of that variant’s contribution.
Effect-allele harmonization is the process of making sure that each GWAS effect estimate is paired with a target genotype dosage for the same allele. It includes confirming variant identity, matching alleles despite different strand conventions, and changing the sign of an effect estimate when the target dosage counts the other allele. Some variants, particularly palindromic single-nucleotide variants, may not be alignable from allele labels alone.
For aligned variants, the score contribution is \(\beta_jG_{ij}\), and a score over \(m\) variants can be written as:
Here, \(G_{ij}\) counts copies of the GWAS effect allele and \(\beta_j\) is the corresponding per-allele estimate. If the target data instead provide dosage of the other allele, the dosage and effect estimate must be converted consistently before calculating the score. Harmonization is not a matter of choosing whichever allele label is convenient: it is about preserving the allele-to-effect pairing.
Match the Variant Before Matching Its Alleles
Allele matching only makes sense once both data sources refer to the same variant. Check the chromosome and position using a common genome build, as well as the allele pair. An allele pair such as A/G can occur at many genomic positions, so matching on allele labels alone does not establish variant identity. If the data use different genome builds, positions may need to be converted and checked before allele harmonization.
For a biallelic single-nucleotide variant, the two alleles should be the same unordered pair after allowing for strand complement. The complement mapping is A to T, T to A, C to G, and G to C. For example, A/C on one strand corresponds to T/G on the opposite strand. The order in which alleles are listed does not itself determine which is the effect allele: the explicit EA and OA fields, not an assumed REF/ALT order, establish that.
If the position or allele pair is inconsistent after appropriate checks, do not force a match. The record could represent a different variant, a build mismatch, or a data-quality problem. Excluding an unresolved record is safer than assigning it a plausible-looking but incorrect effect.
Worked Example: Matching an Effect Allele Directly
Suppose a hypothetical GWAS record identifies a variant at the same verified chromosome position as the target data. The GWAS lists EA = G, OA = A, and \(\beta=0.08\) score units per G allele. The target dosage column counts G and has values 0, 1, and 2 for three hypothetical individuals. A second, already aligned variant has \(\beta=-0.03\) per T allele and target dosages 1, 2, and 0.
The first dosage already counts the GWAS effect allele G, so no allele or sign change is needed. The second dosage also counts its GWAS effect allele T. The scores are:
The units are score units under the stated weights. The first variant contributes nothing for individual 1, \(0.08\) for individual 2, and \(0.16\) for individual 3. This calculation assumes the variant identities and allele labels have been verified, the dosage columns count the stated alleles, and both reported weights correspond to those same alleles. If any of those conditions fails, the arithmetic can be correct while the score is wrong.
Opposite Dosage Requires a Sign Reversal
Suppose the GWAS effect is reported per A allele, but the target dosage counts G at an A/G variant. For a diploid biallelic genotype, the number of A copies is two minus the number of G copies. Thus, if \(G_{ij}\) counts the GWAS effect allele and \(G'_{ij}\) counts the other allele, then \(G'_{ij}=2-G_{ij}\). The effect estimate must change sign when it is paired with \(G'_{ij}\).
The reason can be seen by rewriting the contribution:
The term \(2\beta_j\) is constant across individuals at this variant. Therefore, representing the same relative genetic effect with the opposite dosage requires coefficient \(-\beta_j\); using \(+\beta_j\) with the opposite dosage would reverse the direction. For a score defined as an uncentered weighted sum, changing the allele coding this way also changes the score by a constant. That offset does not alter rankings, but the numerical score is not identical unless the constant is accounted for. If scores are centered by allele dosage, the sign reversal gives the same centered contribution exactly.
Worked Example: Reversing a Weight for Opposite Dosage
In a hypothetical study, the GWAS reports EA = A, OA = G, and \(\beta=0.12\) score units per A allele. The target genotype file gives G dosages of 0, 1, and 2 for three individuals. The target column does not count the GWAS effect allele, so first calculate A dosage as \(2-\text{G dosage}\).
The resulting A dosages are 2, 1, and 0. Using the GWAS effect estimate directly gives contributions:
Alternatively, retain the target G dosage and change the weight to \(-0.12\) per G allele. The contributions become:
These two sets of contributions differ by \(0.24=2(0.12)\) for every individual, exactly the constant in the identity above. Their differences between individuals agree: individual 1 has the highest contribution under either coding. Pairing the G dosage with \(+0.12\), however, would instead make the contribution increase with G dosage and would misrepresent the reported A-allele effect.
Strand Complements and Palindromic Variants
For a non-palindromic allele pair, complementary strand labels can often be matched unambiguously. If the GWAS reports A/C with effect allele A, and the target file reports T/G at the same verified position, the pairs are complements: GWAS A corresponds to target T, and GWAS C corresponds to target G. If the target dosage counts T, it counts the same biological allele as the GWAS effect allele A, so the weight keeps its sign.
A palindromic variant has an allele pair that is unchanged as an unordered pair by strand complementation: A/T or C/G. For example, complementing A/T gives T/A, which is the same pair. Consequently, allele labels alone cannot show whether a target A corresponds to the GWAS A or to the allele that would be labelled T on the other strand. The same ambiguity applies to C/G.
Allele frequencies can sometimes help distinguish the orientations. If the GWAS effect-allele frequency and the target frequency for the candidate matching allele are available, compare them under both possible mappings. Frequencies should be similar for the same allele in comparable populations and samples; under the alternative mapping, the corresponding frequency is approximately one minus the reported frequency. This is a diagnostic, not a guarantee. Ancestry differences, sampling variation, imputation quality, and frequency near 0.5 can make the comparison inconclusive. If orientation remains uncertain, exclude the variant or resolve it using reliable strand metadata rather than guessing.
Worked Example: A Complement Match and an Ambiguous Palindrome
Consider two hypothetical records. For the first, the verified GWAS record has alleles A/C, EA = A, and \(\beta=0.05\). The target record at the same position has alleles T/G and a dosage column counting T. Because A complements T and C complements G, target T dosage counts the same allele as GWAS A. The aligned weight remains \(+0.05\). If three target T dosages are 0, 1, and 2, their contributions are \(0\), \(0.05\), and \(0.10\) score units.
The second hypothetical record is palindromic A/T. The GWAS reports EA frequency 0.20, while the target frequency for its allele labelled A is 0.22. Under the direct-label mapping, the frequency difference is \(|0.22-0.20|=0.02\), which is consistent with the same orientation if the populations and frequency estimates are suitably comparable. Under the alternative mapping, the corresponding target frequency is \(1-0.22=0.78\), differing from 0.20 by 0.58. The frequency evidence therefore favors the direct mapping in this hypothetical case.
That evidence is useful only if the frequency definitions refer to the stated alleles and the populations are sufficiently comparable. If the GWAS frequency were 0.49 and the target frequency were 0.51, the direct and alternative comparisons would both be close: \(0.49\) versus \(0.51\), or \(0.49\) versus \(1-0.51=0.49\). Those data would not reliably establish orientation. In that situation, the A/T labels alone cannot resolve the strand, and the record should be excluded or checked against additional reliable information.
A Practical Harmonization Check
A consistent workflow separates variant identification from allele alignment. It also records the decision made for every variant, so that a score can be reproduced and questionable records can be reviewed.
Check chromosome, position, genome build, and allele pair. Do not treat matching allele labels at different positions as a match.
Identify the GWAS EA and OA from their explicit fields. Confirm which allele the target dosage column counts; do not infer it from an undocumented column order.
Match identical allele pairs directly. For non-palindromic SNPs, also check the reverse-complement mapping. Keep the sign when the dosage counts the same biological allele.
If the target dosage counts the other allele, reverse the effect sign (or convert dosage to the effect allele). For palindromic variants, use reliable frequency or strand evidence; exclude unresolved cases.
Record included, flipped, complemented, and excluded variants. Check that dosage ranges and allele frequencies are plausible, and that every retained dosage refers to the allele named by its weight.
Common Mistake and Why Harmonization Matters
Common mistake: “The GWAS and target data list the same two alleles, so the weight can be used as written.” This is wrong because the target dosage may count the other allele, and allele order does not identify the effect allele. At an A/G variant, an effect reported per A cannot be multiplied directly by a dosage counting G without a conversion. Likewise, an A/C GWAS record and a T/G target record may describe the same variant on opposite strands, even though neither allele label appears in both lists.
The correction is to check variant identity, determine the allele each dosage counts, and align it to the GWAS effect allele before calculating any contribution. A sign error may make a variant’s contribution point in the opposite direction. A strand error at a palindromic variant may be impossible to detect from allele letters alone. Both problems can affect scores without producing an obvious arithmetic error, which is why the harmonization record is part of the analysis rather than a clerical afterthought.
Harmonization concerns the correspondence between a weight and a dosage; it does not establish that the GWAS estimate is appropriate for the target population or that the resulting score predicts an outcome well. Those are separate questions. For this step, the essential condition is narrower: every included effect estimate must multiply a dosage of the same allele, after any necessary sign or strand conversion.
Check Your Understanding
Answer each question by referring to both the allele counted by the dosage and the allele named by the GWAS effect.
- A GWAS reports EA = C and \(\beta=0.07\). The target dosage counts G at the same verified C/G variant. What weight should be paired with the target dosage, and why?
- A GWAS reports A/C with effect allele A, while the target file reports T/G and counts G. Is the target dosage aligned to the GWAS effect allele? Explain the strand mapping.
- Why can an A/T variant not always be harmonized from allele letters alone?
- For an A/T variant, the GWAS effect-allele frequency is 0.48 and the target frequency for the candidate allele is 0.52. What are the direct and alternative frequency comparisons, and do they establish orientation?
- When the dosage coding is changed from effect-allele count to other-allele count at a diploid variant, why does the uncentered score contribution change by a constant even after the weight sign is reversed?