Why Harmonization Comes Before Colocalization
GWAS and eQTL summary statistics describe associations with different outcomes: a GWAS relates genetic variants to a trait, while an eQTL analysis relates variants to gene expression. Before comparing their evidence at a locus, each row must refer to the same physical variant, and each effect estimate must refer to the same effect allele. Otherwise, a comparison can pair different variants or treat opposite directions of effect as if they agreed.
Harmonization is a data-alignment task, not a way to establish that two traits share a causal variant. It does not correct weak association evidence, population differences, or limitations of either analysis. Its narrower purpose is to make the inputs comparable in variant identity, allele orientation, and genomic scope before the colocalization calculation.
What Must Agree
A summary-statistic row commonly includes a variant identifier, chromosome and position, two alleles, an effect allele, an estimated effect (\(\beta\)), a standard error (\(SE\)), and an effect-allele frequency. The exact column names vary. Before merging files, establish what each column means in each file; in particular, verify that the reported frequency is the frequency of the effect allele rather than the other allele.
Variant identity requires attention to the genome build. A position on one build cannot be compared directly with a position on another. Where build conversion is needed, record the conversion and retain only variants that map unambiguously. For indels, equivalent variants can have different representations unless alleles are normalized consistently, for example by trimming redundant bases and left-aligning against the chosen reference. An rsID is useful for checking identity, but it is not sufficient by itself: identifiers may be absent, merged, or attached to records whose coordinates or allele representations need verification.
Alleles also have a strand. A and G on one strand correspond to T and C on the opposite strand. For non-palindromic pairs, strand complementation can be recognized from the pair (for example, A/G corresponds to T/C). A/T and C/G are palindromic: complementing them leaves the unordered pair unchanged. Their labels alone therefore cannot tell whether two files use the same strand orientation.
Choose a target allele for each matched variant, such as the effect allele in the GWAS file. Both reported effects must then describe the change per copy of that target allele. If one file instead reports the effect of the other allele, reverse the sign of its effect estimate. The standard error is unchanged by sign reversal, and the two-sided association p-value is unchanged.
A Sign-Change Justification
The orientation rule follows directly from the additive allele-count model. Let \(G_1\) count copies of \(A_1\) in a diploid individual, and let \(G_0\) count copies of the other allele. At a biallelic site, every individual has two allele copies, so \(G_0=2-G_1\). If the conditional mean outcome is \(\alpha+\beta G_1\), then
The intercept changes, but the coefficient of \(G_0\) is \(-\beta\). The sampling uncertainty of that coefficient has the same standard error as the original coefficient, because multiplying an estimate by \(-1\) also multiplies its standard deviation by \(|-1|=1\). This identity assumes a biallelic site and an additive per-allele model; the allele-orientation bookkeeping is still needed even when the association model uses another outcome scale.
A Reproducible Harmonization Workflow
First define the analysis region and the genomic build to use. Then identify variants, resolve allele orientation where possible, check frequencies, and retain a clear record of exclusions. The following sequence makes those decisions auditable.
Confirm genome build, coordinate convention, allele columns, effect-allele definition, frequency definition, and effect scale for both files.
Use build-consistent coordinates and alleles, with normalized representation where needed. Investigate identifier or coordinate conflicts rather than merging them silently.
Choose a target allele and flip the estimate and effect-allele frequency if a data set reports the other allele. Complement non-palindromic alleles when a strand difference is established.
For palindromic variants, use reliable, population-comparable frequencies only when they clearly distinguish the candidate orientations; otherwise exclude the variant from the harmonized set.
Apply the same region definition to both data sets, merge the variants present in both, and save aligned alleles, flipped estimates, and exclusion reasons.
The shared set is generally an intersection: a variant absent from one input cannot contribute a paired GWAS–eQTL comparison. This does not mean that every absence is an error. Different quality-control filters, coverage, or imputation can produce different variant sets. Report how many rows were matched, excluded, or left unmatched, and verify that the intended gene or expression phenotype is used throughout.
Worked Example: Reversing the eQTL Effect Allele
Suppose both files refer to the same hypothetical biallelic variant after build and coordinate checks. The GWAS reports effect allele A, other allele G, \(\beta=0.24\) log-odds units per A allele, \(SE=0.08\), and A frequency \(0.30\). The eQTL file reports effect allele G, other allele A, \(\beta=0.15\) expression units per G allele, \(SE=0.05\), and G frequency \(0.70\). Align both results to A.
The GWAS is already oriented to A. For the eQTL, A is the other allele, so reverse its estimate and frequency:
The aligned estimates are therefore \(0.24\) log-odds units per A allele for the GWAS and \(-0.15\) expression units per A allele for the eQTL. Their units and outcomes differ, so the numerical magnitudes are not directly comparable. The frequency check is consistent: both files report an A-allele frequency of \(0.30\). This agreement supports the orientation decision, though it does not prove the samples have identical ancestry or quality.
Worked Example: A Palindromic Variant With Unresolved Orientation
Consider a hypothetical A/T variant with matched coordinates. The GWAS lists A as the effect allele with frequency \(0.49\); the eQTL also lists A as the effect allele with frequency \(0.51\). Could the eQTL estimate be aligned to the GWAS by reading the allele labels alone?
No. Because A/T is palindromic, a strand complement swaps A and T without changing the unordered pair. If the files use opposite strands, the eQTL label A could represent the physical allele labelled T in the GWAS. The frequencies do not resolve this: under one orientation the frequencies for the putatively matching allele are \(0.49\) and \(0.51\), while under the reversed orientation the comparison is also close to one half. Neither candidate is clearly supported.
The safe action is to mark the variant as strand-ambiguous and exclude it from the harmonized comparison unless independent, reliable information resolves the orientation. Flipping the eQTL effect merely to make the signs look more similar would be unjustified; the sign is an outcome of allele alignment, not a criterion for choosing it.
Worked Example: Build Conversion and the Shared Region
Suppose a hypothetical GWAS file uses build 37 and contains rsX at chromosome 12, position 55,123,456, with alleles C/T. An eQTL file uses build 38 and lists rsX at chromosome 12, position 55,234,567, also C/T. A documented, unambiguous conversion maps the GWAS coordinate to the build-38 position, and the normalized alleles agree. The region of interest is defined on build 38 as chromosome 12 positions 55,200,000 through 55,300,000, inclusive.
After conversion, both rows refer to the same build-38 position, which lies within the specified region. If the GWAS effect allele is T and the eQTL effect allele is C, the rows match in identity but not in orientation. For a hypothetical GWAS estimate \(-0.12\) with \(SE=0.04\), and an eQTL estimate \(0.30\) with \(SE=0.10\), align both to T by flipping the eQTL result:
Both records belong in the region, and their allele labels now agree. If the coordinate conversion had failed or mapped to multiple locations, the identity would not be established by the shared rsID alone; the row should be investigated or excluded.
Diagnostics, Alternatives, and Limits
A harmonization audit should make problems visible rather than hide them in a merge. Useful checks include counts of exact and converted matches, duplicate variant keys, allele-pair mismatches, frequency disagreements, ambiguous palindromic variants, and variants outside the stated region. After alignment, compare effect-allele frequencies across data sets where comparable populations and definitions make that check meaningful. Large discrepancies can indicate a mistaken allele mapping, build error, frequency-column misunderstanding, or genuine differences between populations. They should prompt investigation, not automatic flipping.
A common alternative is to merge by rsID alone, or to match chromosome and position while ignoring alleles. These approaches are convenient but can pair records with incompatible allele definitions, especially after build differences or variant normalization. Matching only allele labels is also unsafe when strand is unknown. In contrast, dropping every palindromic variant is conservative and often defensible, but may discard usable data when strand or frequency information resolves the orientation reliably. The appropriate choice depends on the quality of the supporting information and should be documented.
Harmonization has important limits. Similar allele frequencies do not guarantee identical ancestry, phenotype definitions, or sample quality. A correct sign alignment does not make a GWAS effect and an expression effect commensurate in units. Nor does a clean match establish that the same causal variant underlies both associations. Those questions concern the association evidence and colocalization model, not the allele-matching operation itself.
Common Mistake
Wrong reasoning: “The eQTL and GWAS effects have opposite signs, so one must be coded incorrectly; I will flip the eQTL sign.” This uses the desired result to decide allele orientation and can manufacture agreement.
Correction: Establish variant identity and allele correspondence independently of the estimated effects. Flip a sign only when the reported effect allele is the opposite allele from the chosen target. If a palindromic variant cannot be oriented from reliable evidence, flag or exclude it rather than choosing the sign that seems more plausible.
Check Your Understanding
Answer each question, then compare with the solutions below.
- A GWAS effect allele has frequency \(0.18\). The eQTL reports the other allele as its effect allele, with frequency \(0.82\). What frequency should the eQTL have after alignment to the GWAS effect allele?
- After matching a non-palindromic variant, the GWAS effect allele is C and the eQTL effect allele is G. The eQTL estimate is \(0.07\), with \(SE=0.02\). Give the aligned estimate and standard error.
- Why is an A/T variant with effect-allele frequencies \(0.50\) and \(0.49\) difficult to orient using frequency comparison?
- Two records have the same rsID but positions on different genome builds. What must be checked before treating them as the same variant in a defined region?
Solutions. (1) The eQTL effect allele is the GWAS other allele, so after alignment its frequency is \(1-0.82=0.18\), matching the GWAS frequency. (2) The effect allele changes from G to C, so the aligned eQTL estimate is \(-0.07\), and its standard error remains \(0.02\). (3) A/T is palindromic, and frequencies close to \(0.50\) look similar under either orientation, so these values do not distinguish the strands reliably. (4) Confirm the build conversion and coordinate mapping, check the alleles and their representation, and then verify that the converted position lies in the same explicitly defined region. The rsID alone does not establish those conditions.