Skip to content
Tech Interview Prep
Technical interview guide

Statistical Genomics

The statistical machinery behind genome-wide association studies: testing millions of variants for association with a trait without drowning in false positives.

Minutes to read
3
Practice MCQs
25
Interview Q&A
25
Edition
v5
Editorial status
Reviewed

Scope: PLINK 2 alpha 7.x; GWAS Catalog and summary-statistics standards; EIGENSTRAT, BOLT-LMM, LD Score, KING, imputation, TOPMed and PRS source publications reviewed 2026-09-04.

Interview Q&A

Treat each question like a live interview question: answer out loud first (structure, assumptions, tradeoffs), then open the model answer to spot gaps and rehearse a tighter follow-up.

Curated: · Written: · Reviewed:

25 questions

Q&A-5

Design and defend an analysis for allele orientation.

Answer

Assumptions. Two sources of summary statistics (discovery plus replication, or GWAS plus an eQTL panel) each with its own reference build, effect allele and beta. The goal is one table where beta is per-copy of a single agreed effect allele on a single build. Everything below assumes biallelic SNPs and indels; structural variants need a separate path.

Core answer. Harmonize in five steps: normalize, lift, match, orient, drop.

  1. Normalize. Split multiallelic records to biallelic (bcftools norm -m -any) and left-align/trim indels against the reference FASTA. VCF 4.2/4.3 defines REF/ALT per record; a multiallelic A>G,T carries two effects that cannot share one beta.

  2. Lift to one build. GRCh37→GRCh38 with CrossMap or Picard LiftoverVcf. Verify by allele-match rate against the target reference; a clean liftover keeps >99% of common variants, and any variant whose REF no longer matches the target FASTA is dropped, not guessed.

  3. Match on chr:pos:REF:ALT, not rsID. rsIDs get reused and merged (dbSNP build 155 retired thousands); the coordinate-plus-allele key is stable.

  4. Orient the effect allele. If EA == REF, keep beta. If EA == ALT, flip the sign of beta (and the effect-allele frequency becomes 1−EAF). If EA matches neither REF nor ALT, drop: that is a build or strand error, not a sign question.

  5. Resolve palindromes. A/T and C/G SNPs are strand-ambiguous: the reverse complement of A/T is A/T, so alleles alone cannot tell forward from reverse strand. Use allele frequency against a reference panel (gnomAD v3, 1000 Genomes): if the reported EAF is within ~0.08 of 0.5 (MAF > 0.42), frequency cannot disambiguate the strand, so drop; otherwise flip to match the panel's frequency.

Defend the choices. Flip when alleles are swapped but unambiguous: it recovers the variant at no cost. Drop palindromic variants with MAF near 0.5 because a wrong sign there is undetectable and silently inverts the replication. Drop non-matching alleles because keeping them means guessing. The cost of dropping is lost power; the cost of a sign flip is a false replication, which is worse.

Worked trace. Discovery on GRCh37, replication on GRCh38, harmonizing to GRCh38 with effect allele = ALT.

variantdisc EA/betarep EA/betaactionharmonized beta (EA=ALT)
rs1234 A>GG / +0.05A / +0.03rep EA=REF → flip+0.05, −0.03
rs5678 A>TA / +0.02A / +0.02palindromic, MAF 0.48 → drop—
rs9012 C>GG / −0.04G / −0.04EA=ALT both → keep−0.04, −0.04

After harmonization the two betas agree in sign for rs1234 and rs9012; rs5678 is dropped.

Failure modes and detection.

  • Sign flip: betas anti-correlate across the set. Detect via sign-concordance rate; <90% on non-palindromic variants means a systematic flip.
  • REF-effect confusion: EA recorded as REF. Detect by checking EA ∈ {REF, ALT} per variant; any EA outside that set is a build/strand error.
  • Multiallelic collapse: two ALT alleles sharing one beta. Detect by counting ALT alleles per record before normalization.
  • Strand ambiguity: palindromic SNPs. Detect by REF/ALT ∈ {A/T, C/G} and MAF > 0.42.
  • Build mismatch: positions shifted by liftover. Detect by REF-match rate against the target FASTA; a sudden drop flags the wrong build.
  • Variant-ID reuse: one rsID mapping to multiple positions. Detect by counting distinct chr:pos per rsID.

Report the sign-concordance rate and the drop count as the analysis's own QC.

Curated: · Written: · Reviewed:

Difficulty: Medium
Q&A-4

Design and defend an analysis for Hardy-Weinberg equilibrium.

Answer

Core answer (first 90 seconds)

HWE is a QC diagnostic, not a law of nature. I'd design the analysis as four decisions and defend each.

  1. Unit of testing. Test within a genetically homogeneous group, never on a pooled multi-ancestry sample. Pooling subpopulations that are each in HWE produces a heterozygote deficit, the Wahlund effect, that is pure artifact. In practice: run PCA or ADMIXTURE, assign ancestry, test per group.

  2. Test statistic. Chi-square goodness-of-fit with 1 df: X² = Σ(O−E)²/E, with E computed from the sample allele frequency. It is only valid when every expected genotype count is ≥5. Below that, use the exact test (Wigginton, Cutler & Abecasis 2005, AJHG), which enumerates all genotype configurations consistent with the observed allele counts and sums their probabilities: this is what PLINK's --hwe runs. The mid-p adjustment reduces the exact test's conservativeness.

  3. Which samples. In a case-control study, filter controls, not cases. A deviation in cases can be the association itself: the disease is correlated with genotype, so cases need not be in HWE. Common thresholds: controls at p < 1e-6 (some use 1e-4); cases left unfiltered or held to a far stricter threshold. In a population or quantitative-trait study, test everyone.

  4. Interpretation. A deviation is a flag to investigate, not an automatic drop.

Worked check

100 samples: AA=70, AB=20, BB=10. Allele counts: A = 2(70)+20 = 160, B = 2(10)+20 = 40, so p=0.8, q=0.2. Expected: AA = 100(0.8²) = 64, AB = 100(2·0.8·0.2) = 32, BB = 100(0.2²) = 4. X² = (70−64)²/64 + (20−32)²/32 + (10−4)²/4 = 0.56 + 4.5 + 9.0 = 14.06, df=1 → p ≈ 1.8e-4. All expected counts are ≥5, so chi-square is valid here. The signal is a heterozygote deficit: 20 observed against 32 expected.

What a deviation means

PatternLikely cause
Heterozygote deficitPopulation structure/admixture (Wahlund), inbreeding (F>0), allele dropout or null alleles
Heterozygote excessGenotyping error, negative assortative mating, recent admixture
Batch-specificArray or batch artifact, not biology

Failure modes and how to catch them

  • Admixture: per-group testing, plus a check that the deviation disappears once groups are separated.
  • Small counts: chi-square p-values are wrong when expected counts fall below 5. Switch to the exact test.
  • Sex chromosomes: test females only on X; males are hemizygous and X-inactivation makes HWE meaningless there. Y and MT are haploid: no HWE test applies.
  • Batch: stratify the test by plate or batch; a deviation confined to one batch is an assay problem.
  • Removing true signal: filtering cases on HWE deletes genuine associations. That asymmetry is exactly why controls and cases are treated differently.

When not to filter: rare variants, where low MAF leaves the exact test with little power and deviations are mostly noise, and any variant whose deviation tracks a known biological mechanism.

Curated: · Written: · Reviewed:

Difficulty: Medium
Q&A-2

Design and defend an analysis for variant QC.

Answer

Assume a case-control GWAS on array data: ~500k variants, 5,000 samples run across 12 plates, and I'm defending the QC plan before unblinding. The core answer is that variant QC is a set of predeclared, per-batch filters, each justified by the artefact it removes and the signal it costs. I'll state the thresholds, defend them, then give the failure modes and the sensitivity check.

Sample-level. Drop samples with call rate < 0.98 (plink --mind 0.02). Below that, missingness is usually DNA quality or a plate problem, not biology. Compute inbreeding coefficient F; drop |F| > 0.15 or >3 SD from the mean: excess heterozygosity suggests contamination, deficit suggests a swap or inbreeding. Sex check against X heterozygosity catches swaps. Relatedness: drop one of each pair with PI_HAT > 0.185 (roughly second-degree), or keep both and use a mixed model.

Variant-level. Call rate ≥ 0.97 per batch (--geno 0.03), not just globally: a variant that fails on one plate but passes overall is a batch artefact, and pooling hides it. Differential missingness between cases and controls: plink --test-missing, p < 1e-5. This is the check that protects validity. If a variant is missing more often in cases, genotype availability itself predicts phenotype, and any association is confounded. HWE p < 1e-6 in controls only. In cases, HWE deviation can be real, a true risk variant deviates from HWE in cases, so filtering cases on HWE throws away exactly what you're looking for. MAF ≥ 0.01: below that, expected heterozygote counts fall under 5, HWE and call-rate estimates are unstable, and power is negligible.

Defend the choices. Why 0.97 and not 0.99? At 0.99 you drop roughly three times as many variants, many real but low-coverage; the power cost outweighs the marginal quality gain. Why per-batch rather than global? Because batch is the unit where technical failure happens. Why controls-only HWE? Because the alternative removes signal.

Trade-offs and alternatives. A MAF floor of 0.01 loses rare-variant signal; if rare variants are the question, use a sequencing-aware pipeline (SAIGE, regenie) with a lower floor and a different HWE strategy. PCA adjustment (top 10 PCs) handles ancestry, but if structure is strong a mixed model (BOLT-LMM, SAIGE) is better because it models relatedness too. For imputed data, INFO > 0.8 and R² > 0.3 replace some genotyping filters.

Failure modes and detection. Batch confounding: check case/control ratio per plate with a chi-square; if plate 7 is 80% cases, plate is confounded with outcome. Ancestry-dependent missingness: if cases are enriched for one ancestry, missingness correlates with outcome. Detect by stratifying missingness by PC cluster. Rare-allele instability: use the HWE exact test (mid-p), not chi-square, when expected counts < 5. Excessive filtering: track variants dropped at each step; dropping >20% at HWE means the threshold is too tight.

Worked arithmetic. 500k variants, 5,000 samples. Call rate 0.97 removes ~15k (3%). Controls-only HWE p < 1e-6 removes ~500 (0.1%). MAF < 0.01 removes ~200k (40%): the big cut, and a power decision, not a quality one. Differential missingness p < 1e-5 removes ~50. Net: ~285k variants for analysis.

Sensitivity. Rerun the association with relaxed thresholds (call rate 0.95, HWE 1e-4) and confirm top hits are stable. A hit that vanishes when QC is relaxed was an artefact; a hit that survives both is defensible.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-1

Design and defend an analysis for sample identity QC.

Answer

Assumptions I'd state in the first 30 seconds. Germline cohort, sequencing or array, with an independent fingerprint reference (prior array or a SNP panel) and consented metadata covering recorded sex and self-reported ancestry. Downstream is a GWAS or a clinical return, where a swapped sample is worse than a dropped one. If there is no independent fingerprint, the design changes: say so before proceeding.

Core answer. Sample identity QC is a staged gate, not one test. Order matters because each stage corrupts the next:

  1. Contamination first: verifyBamID2 FREEMIX. A 2% contaminant inflates heterozygosity and corrupts every genotype call, so clear it before trusting relatedness or sex.
  2. Sex check: PLINK --check-sex on X. F statistic: F > 0.8 male, F < 0.2 female, 0.2–0.8 ambiguous → flag. Compare to recorded sex.
  3. Fingerprint: somalier or NGSCheckMate against the expected genotype. Mismatch = swap or mislabel.
  4. Relatedness/duplicates: KING or somalier kinship: > 0.354 duplicate/MZ twin, 0.177–0.354 first-degree, 0.0884–0.177 second-degree, 0.0442–0.0884 third-degree.
  5. Ancestry: peddy/somalier PCA vs self-report; this also sets the expected het rate so step 1's threshold is ancestry-aware.

Mechanism: why heterozygosity excess means contamination. Mix two genomes at fraction α and a site where the main sample is hom-ref (0/0) and the contaminant is hom-alt (1/1) shows alt fraction α. Once α clears the caller's detection floor (~0.02–0.03), that site is called het. The excess het rate is roughly α × 2p(1−p). At p = 0.3, 2p(1−p) = 0.42, so α = 0.02 gives ~0.8% excess het: invisible per locus, obvious genome-wide. That is why you estimate FREEMIX over thousands of sites, not one. A het deficit is the opposite signal: inbreeding, or a degraded/duplicated aliquot.

Trade-offs and the deciding criterion. Fingerprint source: a prior array is gold-standard but often absent; a SNP panel from the same sequencing run is cheap but cannot catch a swap that happened before the panel was drawn, so if the sample was ever a separate aliquot, you need the independent fingerprint. Threshold strictness: false exclusion (drop a good sample) vs false inclusion (keep a swapped one). For clinical return, exclude on any fingerprint mismatch; for discovery GWAS, flag ambiguous sex rather than drop. Sex check: X-only misses XXY/mosaic cases. Add Y coverage.

Defence of "resolve before exclusion." A fingerprint mismatch is often a metadata error (wrong ID in the manifest), not a sample error. Pull the raw tube and re-genotype; exclude only when re-genotyping confirms the mismatch. Excluding on the first signal throws away good samples and hides the real cause.

Failure modes, each with its detection.

failuresignalcost
mislabel/swapsomalier kinship to expected below thresholdwrong genotype on a person
duplicate enrolmentKING kinship ~0.5 between "unrelated" IDsinflated n, biased effect
contaminationFREEMIX > 0.02 + het excessfalse hets, false associations
differential exclusionexcluded vs retained differ on site/batch/ancestrycohort bias
indiscriminate sex inferenceinferred sex leaves the pipeline without consentgovernance breach

Run the gate, resolve metadata errors by re-genotyping, and only then exclude.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-8

Design and defend an analysis for relatedness.

Answer

Core answer (say this first). Assume a GWAS or polygenic-score analysis on a cohort where some samples are related, and the question is whether to prune them or model them. My default is to compute kinship on everyone, then fit a mixed model with a genetic relationship matrix (GRM) rather than prune: pruning discards samples and, worse, biases the result when relatedness correlates with the phenotype. I defend that choice with the kinship distribution and a power check, and I fall back to pruning only when the related set is small and the model won't converge.

1. Estimate kinship on all samples. KING-robust (king --kinship, or plink2 --make-king) is the default because its estimator is robust to population structure: it uses the smaller of the two allele-sharing counts, so admixture doesn't inflate it the way PLINK's IBD estimate (--genome, PI_HAT) can. Report the whole distribution, not just a count of pairs.

2. Classify with standard cutoffs. KING kinship φ:

KING φrelationshipaction
> 0.354duplicate / MZ twindrop one
0.177–0.354first degreemodel, or drop one
0.0884–0.177second degreemodel, or drop one
0.0442–0.0884third degreeusually keep

Pick the tolerated degree from the analysis: for a GWAS I cut at 0.0884 (second degree); for a PGS validation set I cut tighter.

3. Choose the model. Two credible paths:

  • Mixed model: y = Xβ + g + e, with g ~ N(0, σ²_g A) and A the GRM. The GRM puts the relatedness into the covariance, so the residual is independent and the SNP standard error is honest. Tools: GCTA (REML), BOLT-LMM, SAIGE, fastGWA. Keeps every sample.
  • Prune: remove one of each pair above the cutoff (plink2 --king-cutoff 0.0884). Simple, no convergence risk, but loses samples and can bias if families are phenotype-enriched.

4. Defend with numbers. If pruning drops 900 of 10,000 samples (9%), the mixed model is clearly worth the compute. If it drops 4,000 (40%), check whether the survivors are still representative before accepting that power loss.

Why ignoring it fails. Treating relatives as independent underestimates the residual variance: two sibs share ~50% of segregating variants and often a household, so their errors are correlated. The naive standard error shrinks, the χ² inflates, and type I error rises: false positives that replicate poorly.

Failure modes and how to detect them.

  • Admixture: KING-robust handles it, PLINK PI_HAT does not. Compare the two estimators: a large gap flags structure mistaken for kinship.
  • Duplicates: φ ≈ 0.5 (KING) or PI_HAT ≈ 1.0. Dedupe before anything else.
  • Household confounding: shared environment, not genetics. Check whether kinship tracks a shared address or batch.
  • Leakage: family clusters crossing train/test splits. Split on family ID, not sample ID.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-14

Design and defend an analysis for linkage disequilibrium.

Answer

Clarify and assume. I'll assume a genome-wide significant locus from a European-ancestry GWAS, individual-level genotypes for the study cohort, and a decision about which variant to carry into functional follow-up. If genotypes aren't available I say so up front, because it changes where the LD comes from.

Core answer. Association gives me a region, not a variant. My design is: build a credible set by fine-mapping under ancestry-matched LD, use conditional analysis to check I haven't collapsed two signals into one, rank inside the set with functional evidence, and defend the result by keeping every variant in the 95% credible set instead of naming a lead SNP.

Why LD confounds localization. A genotyped tag and the causal variant are correlated, so the marginal statistic at the tag is a weighted sum over everything it tags. At r² = 0.9 the tag carries about 90% of the causal variant's variance, and its p-value can be lower than the causal variant's own. The lead SNP is the best-tagged variant, not the causal one. In a 500 kb window with 40 variants at r² > 0.8 and a flat prior, the lead has roughly a 1/40 = 2.5% chance of being causal. That number is the whole argument for not stopping at the lead.

The design, in order.

  1. LD reference: 1000 Genomes 30x on GRCh38 (3,202 samples) matched to study ancestry. Above ~10k study samples, use in-sample LD instead: it removes the panel mismatch.
  2. Define the locus: PLINK clumping, --clump-p1 5e-8 --clump-r2 0.1 --clump-kb 500.
  3. Conditional analysis: GCTA-COJO with --cojo-p 5e-8 --cojo-collinear 0.9. A second variant surviving conditioning means allelic heterogeneity, and a single-causal model is now wrong.
  4. Fine-map: SuSiE (handles multiple signals, reports per-variant PIP and 95% credible sets) or FINEMAP (faster, but you must set max causal k). Report the 95% set, not the top PIP.
  5. Rank inside the set: GTEx v8 eQTL colocalization (coloc PP.H4 > 0.8), RegulomeDB, CADD > 20, ATAC peaks in the relevant tissue.

Trade-offs. In-sample LD is accurate but needs genotypes and has privacy cost; a reference panel is free but mismatched. SuSiE is robust to multiple signals but slower; FINEMAP is fast but sensitive to the k you pick. Conditional analysis is quick and greedy and order-dependent; joint fine-mapping is not. I pick in-sample LD plus SuSiE when the cohort allows it, and fall back to panel LD plus FINEMAP otherwise.

Failure modes, with detection.

failuredetectionconsequence
wrong LD panelin-sample r² of lead < 0.5 vs panelcredible set inflated, wrong size
allelic heterogeneitysecond variant conditional p < 5e-8single-causal model gives a false 95% set
imputation errorINFO < 0.3 or DR2 < 0.3spurious lead, fails replication
population-specific taggingtrans-ancestry heterogeneity (MANTRA)tag doesn't transfer, follow-up fails
lead-SNP storytellingPIP of lead < 0.5wrong variant sent to functional work

When it fails. If the 95% credible set still holds more than ~50 variants, LD alone cannot resolve the locus. Then the honest answer is a trans-ancestry meta-analysis to break the LD, or a functional assay, not a named lead SNP.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-15

Design and defend an analysis for genotype imputation.

Answer

The 90-second answer

Assume array genotypes on GRCh38, a target cohort of a few thousand samples, and a downstream GWAS or PRS that wants dosages. My default pipeline: prephase with SHAPEIT5 or Eagle2, impute with Beagle 5.4 or Minimac4 against TOPMed r3, keep dosages, and filter on INFO ≥ 0.8 for common variants (≥ 0.3 for rare-variant burden tests). I do not hard-call for association testing.

Why it works, and what actually drives accuracy

Imputation is a hidden Markov model over the reference panel. In the Li–Stephens formulation each target haplotype is modelled as a mosaic of panel haplotypes: the hidden state is which panel haplotype you are copying from, transitions are recombination, and emissions are the observed alleles at typed markers. Accuracy therefore has exactly two levers: how well the panel represents the target's ancestry (more shared haplotypes means shorter, more confident copying) and marker density (emissions only constrain the state where you have genotypes). Everything else is bookkeeping around those two.

That is why panel size matters most for rare variants. A variant at MAF 0.005 has roughly 2 × 2,504 × 0.005 ≈ 25 minor-allele copies in 1000 Genomes phase 3 (2,504 samples) but ≈ 973 in TOPMed r3 (97,256 samples). With ~25 carriers the panel may hold no haplotype matching the target's local background, the state posterior spreads, and INFO collapses. Same variant, same array, different panel, different answer.

Trade-offs and when not to use each choice

ChoiceUse whenDo not use when
TOPMed r3 (GRCh38)Multi-ancestry cohort, rare variants matterYou are locked to GRCh37 and cannot lift over
HRC r1.1 (GRCh37, 32,470 samples)European cohort on the older buildTarget has substantial African or East Asian ancestry
1000G phase 3 (2,504 samples)Quick sanity check, broad ancestry coverageYou need rare-variant accuracy
Joint phasing (Beagle)Cohort < ~100 samples, phasing error dominatesYou already have a large, well-phased reference

Failure modes, detection, cost

  • Reference mismatch (build or strand). Detect by comparing ALT allele frequency to panel AF and watching the allele-switch rate; a flipped batch inverts every downstream effect estimate.
  • Ambiguous A/T and C/G SNPs. Detect by AF near 0.5 with no panel concordance; drop them rather than guess.
  • Rare-allele overconfidence. Detect with AR2, not INFO; hard calls at MAF < 0.01 have low R² and manufacture false rare-variant associations.
  • Panel underrepresentation. Detect by plotting INFO against ancestry PCs; the gap is systematic, not noise.
  • Cryptic relatedness. Detect with KING kinship before association; it inflates test statistics.
  • Hard-call information loss. Detect by comparing dosage R² to hard-call R²; you lose power for no gain.
  • Privacy leakage. Imputation recovers genotypes at untyped positions, so a shared imputed dataset is closer to sequence data than the array suggests; treat release accordingly.

Defend the design by showing INFO/AR2 distributions stratified by ancestry and MAF, and by stating the panel, build and thresholds explicitly.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-16

Design and defend an analysis for imputation quality.

Answer

Assumptions. Target is a GWAS or meta-analysis of common and low-frequency variants. Reference panel and tool are already fixed: say TOPMed r3 with Minimac4, or 1000G phase 3 with IMPUTE5. I have held-out array genotypes or WGS on a subset of samples to measure against.

The design, in the order I'd defend it.

Separate estimated quality from measured quality. Minimac4's Rsq, IMPUTE5's INFO and Beagle 5.4's DR2 are the same idea: the variance of the imputed dosage divided by the binomial variance 2p(1−p) expected under HWE. INFO = Var(ĝ) / (2p(1−p)). A value of 1 means the dosage varies as much as a real genotype would; 0 means the dosage is flat and carries no information. That is the model grading itself. The measurement is r² between imputed dosage and truth dosage on held-out samples, plus a calibration check: regress truth dosage on imputed dosage and look for slope ≈ 1, intercept ≈ 0.

Stratify by MAF and ancestry, then set cutoffs per bin. INFO is frequency-dependent: at MAF 0.1% the denominator 2p(1−p) is tiny, so INFO is noisy and biased upward. One global INFO ≥ 0.8 drops almost nothing in a well-imputed common-variant set and silently discards most rare variants, and it discards them unevenly across ancestries. So I bin by MAF and by ancestry group, compute empirical r² per bin, and pick the cutoff that holds r² above a target.

MAF binINFO/Rsq cutoffEmpirical r² target
>5%0.8≥0.9
1–5%0.7≥0.8
0.1–1%0.5≥0.6
<0.1%0.3≥0.4

Those cutoffs are conventions, not laws: they move with panel size and ancestry coverage, which is exactly why they're set per bin rather than globally.

Report effective N and MAC after filtering. Filtering on INFO removes variants non-randomly with respect to frequency and ancestry. Report per-variant N and minor allele count post-filter and check the MAC distribution hasn't collapsed in one ancestry.

Failure modes and how I'd catch each.

  • Winner's curse. Selecting variants by INFO in the same data used for association inflates the apparent quality. Detect by comparing INFO in the discovery panel against an independent panel; expect regression toward the mean.
  • Monomorphic target allele. If the reference panel has no variation at the site, imputation returns the panel's monomorphic state and INFO can be 1 or undefined. Detect by flagging sites where target MAF > 0 but panel MAF = 0.
  • Dosage treated as observed genotype. Downstream tools that hard-call dosages as 0/1/2 underestimate variance and inflate χ². Detect by running dosage-based and hard-call association side by side; the hard-call p-values will be too small.
  • Ancestry disparity. Quality is lower for populations underrepresented in the panel. Detect by stratifying empirical r² by ancestry; a gap above ~0.1 in r² at the same MAF is a red flag.

Defence. The reason to prefer empirical r² over INFO where truth exists is that INFO is a proxy that can be wrong in exactly the bins you care about. The reason to keep INFO at all is coverage: you have truth on a subset, not the whole cohort. So the design uses INFO as the operational filter and empirical r² as the audit that the filter is doing what you claim.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-10

Design and defend an analysis for binary-trait association.

Answer

First 90 seconds. Assume a case-control GWAS on unrelated individuals of one ancestry, common variants, additive coding of the alt allele as dosage 0/1/2. The analysis is a per-variant logistic regression:

logit P(case) = β0 + β_g · dosage + Σ β_k · covariate_k

Fit with a Wald test and fall back to Firth penalized likelihood when the Wald test is unreliable. Covariates: age, sex, and the first 10 genotype principal components. Report per variant: effect allele, EAF, MAC, OR with 95% CI, and p-value. Defend the choice by the failure it prevents: Wald standard errors blow up when a genotype cell is empty or nearly so; Firth's penalized likelihood keeps the estimate finite and the CI honest.

Why Wald breaks. With a rare variant a 2×2 table can have a zero cell: say 3 cases carry the alt allele and 0 controls do. The MLE of β is infinite, the Wald SE is enormous, and the p-value is either 1 or spuriously small depending on the fitting path. Even without exact separation, when MAC is small the Wald statistic is anti-conservative because the normal approximation to the likelihood is poor.

Test choice.

testwhen it's rightwhen it fails
WaldMAC ≥ ~20, balanced case:control, no separationsparse cells, separation, imbalanced design
Scorefast screening without fitting the full modelstill asymptotic; same sparsity problem
Firthsmall MAC, separation presentslower; unnecessary at large balanced cohorts
SAIGE saddlepointcase:control more imbalanced than ~1:10, related samplesneeds a null-model fit; overkill for balanced data

Workflow. (1) QC: MAF ≥ 1%, HWE p > 1e-6 in controls, call rate ≥ 98%. (2) Fit the null model with covariates. (3) Per-variant test with Firth fallback. (4) Inspect the QQ plot and genomic control λ; λ > 1.1 suggests residual structure. (5) Replicate.

PLINK 2.0 command:

plink2 --bfile g --pheno pheno.txt --covar covar.txt \
  --covar-name age,sex,PC1-PC10 --glm firth-fallback hide-covar --out assoc

Failure modes and detection.

  • Infinite estimate: check for |β| > 10 or SE > 5; the Firth fallback triggers.
  • Deflated p-values from population structure: QQ-plot inflation, λ.
  • Nonconvergence ignored: PLINK logs NA for the test; count them per run.
  • Dosage mishandling: imputed dosages must enter as continuous values, not rounded to 0/1/2. Rounding loses power and biases toward the null.
  • Covariate separation: a covariate perfectly predicts case status (e.g. sex in a sex-specific disease); drop it or use Firth.
  • OR read as risk: OR = 2 at 10% baseline risk is RR ≈ 1.8, not 2; the gap widens as the outcome gets commoner.

Curated: · Written: · Reviewed:

Difficulty: Medium
Q&A-11

Design and defend an analysis for quantitative traits.

Answer

Core answer (first 90 seconds). Before touching the data I pin down three things: the phenotype's units, whether the trait is roughly normal, and which population the standardization is against. Then I fit one joint model, phenotype on genotype dosage plus covariates, and report beta in declared units per effect allele, with SE, p, and effect-allele frequency. In R that is lm(pheno ~ dosage + age + sex + PC1:PC10); with relatedness I switch to a mixed model (BOLT-LMM, REGENIE, or SAIGE) rather than adding a kinship term by hand. The defence is that beta means one thing only: the expected change in the phenotype, in its stated units, per additional effect allele, holding the covariates fixed.

The central trade-off is how you handle the phenotype.

handlingbeta unitsuse whencost
raworiginal (e.g. mg/dL)trait ~normal, clinical units matteroutliers and heteroskedasticity inflate type I error
residualize, then test residualsoriginalnever as a two-stepbiased SEs, inflated false positives
inverse-normal (rank INT)SD unitsheavy tails, cross-trait comparisoncompresses genuine tail effects, loses clinical meaning

I pick raw when the trait is near-normal and a clinician needs mg/dL; I pick rank INT when the tail is heavy or I need to compare effects across traits. I never residualize first and test the residuals: that two-step biases the standard errors, so covariates go in the joint model.

Sizing the study. For 80% power at genome-wide alpha 5e-8, beta 0.1 SD per allele, MAF 0.2: genotype variance is 2p(1-p) = 0.32, so N ≈ (5.45+0.84)² / (0.01 × 0.32) ≈ 12,400 samples. That number is what I defend when someone asks whether the cohort is big enough.

Failure modes, with detection.

  • Unit mismatch. Glucose in mg/dL in one cohort and mmol/L in another is an 18× error in the meta-analysis beta. Detect by comparing per-cohort phenotype mean and SD before pooling.
  • INT misread clinically. A beta of 0.15 reported as if it were mg/dL. Detect with a mandatory units column in the results table.
  • Heteroskedasticity. Phenotype variance that grows with age or genotype mean. Detect with a residual-vs-fitted plot or Breusch-Pagan; fix with HC3 robust SEs or INT.
  • Outlier leverage. One sample 10 SD out can flip a rare-variant beta. Detect with Cook's distance > 4/N; winsorize or transform.
  • Medication adjustment. Statin users have lowered LDL, attenuating the lipid beta. Detect by comparing treated and untreated strata; adjust with treatment as a covariate or a constant offset.
  • Winner's curse. Discovery beta is overestimated at just-significant loci. Detect by checking that the replication beta shrinks toward the null; report the replication estimate.

What I would say if pushed. Population stratification is handled with PCs, relatedness with a mixed model, and the reported beta is only portable if the units, transform, and standardization population travel with it. If any of those three is missing, the effect size is not comparable and I would not defend it.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-3

Design and defend an analysis for study estimands.

Answer

Core answer (first 90 seconds)

The estimand is downstream of the decision the trial supports, so I fix that first. Case: a 52-week, double-blind, placebo-controlled Phase 3 of a weekly GLP-1 agonist added to metformin in adults with type 2 diabetes, baseline HbA1c 7.5–10.5%, eGFR ≥30 mL/min/1.73 m². The sponsor wants a label claim that assigning the drug lowers HbA1c at week 52. That sentence fixes four of the five ICH E9(R1) attributes; the intercurrent-event strategy is the only genuine choice.

AttributeValue
PopulationAdults ≥18, T2D on stable metformin ≥8 weeks, HbA1c 7.5–10.5%, eGFR ≥30
VariableChange from baseline in HbA1c at week 52, central lab
TreatmentDrug X 1.0 mg SC weekly vs placebo, both on metformin
Intercurrent eventsProtocol-defined rescue therapy; permanent discontinuation of study drug
SummaryDifference in means (drug − placebo), 95% CI

The choice that decides the answer

ICH E9(R1) lets you take a different strategy per intercurrent event. For a claim about assignment, both events get treatment policy: use the week-52 HbA1c whatever happened, which means continuing to collect it after rescue and after discontinuation. That is a data-collection commitment, not a statistical one, if you stop collecting at discontinuation, "treatment policy" quietly becomes an imputation.

Worked trace, three patients per arm, hypothetical numbers:

PatientArmWeek-52 changeEvent
ADrug−1.5none
BDrug−0.6rescued at week 20
CDrug−0.2stopped drug week 12, week-52 value collected off-drug
DPlacebo−0.3none

Treatment policy: drug mean (−1.5 − 0.6 − 0.2)/3 = −0.77; difference vs placebo −0.47.

Hypothetical ("had rescue never occurred"): B's week-52 value without rescue is imputed at −0.2, C's at −1.2 under the same model. Drug mean (−1.5 − 0.2 − 1.2)/3 = −0.97; difference −0.67.

Composite (rescue or discontinuation = failure, baseline carried forward): B and C score 0. Drug mean −0.5; difference −0.20.

Against a pre-specified 0.5% threshold, only the hypothetical passes. Same data, opposite regulatory conclusion. That is why the strategy is fixed in the SAP before unblinding, and why you cannot promote the sensitivity analysis to primary when the primary misses.

Defence

State the estimand per intercurrent event in the SAP, with the imputation model for the hypothetical fully specified (variables, missing-data assumption, and how rescued patients are handled) before unblinding. Pre-specify the sensitivity analyses: hypothetical as sensitivity to treatment policy, and a tipping-point analysis that shifts the imputed values for rescued patients until the CI crosses the threshold. If a shift smaller than the observed rescue effect flips the conclusion, say so in the CSR rather than in a footnote.

Failure modes and detection

  • Variable not standardized: site-read vs central-lab HbA1c. Fit a mixed model with a site random effect; if the between-site variance component exceeds the assay's own repeatability from the lab's validation data, the variable is not one variable.
  • Treatment policy in name only: report the proportion of randomised patients with an observed week-52 value by arm. A gap of more than a few points means the estimand is being delivered by imputation, not by follow-up. Run the treatment-policy estimate alongside a completer-only estimate; a gap wider than the CI flags conditioning on a post-treatment variable.
  • Post hoc strategy change: compare the SAP version date to the unblinding date. Anything changed after unblinding is exploratory, whatever it is called.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-12

Design and defend an analysis for multiple testing.

Answer

Core answer (first 90 seconds)

First I'd pin down the family, because "multiple testing" isn't one problem. Assume a GWAS: 1M common variants, 10k cases / 10k controls, 50 phenotypes, plus a rare-variant burden test over 20k genes. That's three families, and each gets its own error control.

Primary scan, one predeclared phenotype: I control FWER at 0.05 with Bonferroni over the ~1M tests, giving 0.05/1e6 = 5×10⁻⁸. The conventional genome-wide threshold. I defend it as the conservative default: it assumes nothing about which tests are independent, so it holds even if my LD model is wrong.

Secondary layer, 50 phenotypes: I don't multiply 5e-8 by 50 and call it done. I predeclare the phenotype set, then either apply Benjamini-Hochberg FDR at 5% across the phenotype×variant grid, or run a permutation max-T (Westfall-Young) that resamples phenotypes and genotypes together and takes the null distribution of the maximum statistic. That preserves the correlation between phenotypes and between SNPs.

Rare-variant burden: 20k genes, so 0.05/20000 = 2.5×10⁻⁶ per gene.

Everything that passes gets an effect size and CI, not just a p-value.

Why dependence matters

1M SNPs are not 1M independent tests. Neighbouring SNPs are in LD, so the effective number of independent tests is smaller: LD pruning typically leaves a few hundred thousand to a million, depending on ancestry. Bonferroni over the raw count is therefore conservative under positive dependence: it costs power but doesn't inflate false positives. Permutation max-T sidesteps the question: it builds the null distribution of the maximum statistic empirically, so whatever the true correlation structure is, the threshold is exact. The cost is compute, 10k–100k permutations × 1M SNPs, and the exchangeability assumption, which breaks under population structure or relatedness; there you switch to a mixed model with a genetic relationship matrix rather than permuting.

Trade-offs

methodcontrolspowerwhen not to use
BonferroniFWERloweststrongly correlated tests and scarce power
BH-FDRFDR 5%higherwhen a false positive is unacceptable (clinical claim)
permutation max-TFWERexactstructured/related samples; expensive

Failure modes and how I'd catch them

  • Phenotype fishing: 50 phenotypes × 1M SNPs × 5e-8 = 2.5 expected hits by chance alone. Detection: diff the pre-registered phenotype list against the reported one.
  • Ancestry-specific test count: 5e-8 was calibrated on European LD; African-ancestry cohorts have shorter LD blocks and more effective tests, so 5e-8 is anti-conservative there. Detection: recompute effective tests by LD pruning within each ancestry group.
  • Burden multiplicity: thresholding at 5e-8 when the family is 20k genes is wrong by ~20×. Detection: check the threshold denominator matches the number of genes, not variants.
  • Threshold as causality: 5e-8 is a statement about the null, not effect size. Detection: require replication in an independent cohort.
  • Selective reporting: detection via funnel-plot asymmetry and a pre-registration diff.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-13

Design and defend an analysis for genomic inflation.

Answer

Core answer

Assume one ancestry, summary statistics from a linear or logistic GWAS, an LD reference panel matched to that ancestry, and no sample overlap between the GWAS and the reference. Under those assumptions I'd defend the analysis on the LD-score regression intercept, not on λGC.

λGC is median(χ²)/0.4549. It is one number that scales with sample size even when nothing is wrong: at N=200,000 with h²≈0.4, λGC of 1.2–1.3 is expected from polygenicity alone. So λGC is a sanity check, not a decision.

LDSC regresses χ² on LD score: E[χ²] = 1 + N·h²·l_j/M + N·a. Polygenicity raises the slope: signal proportional to LD score. Confounding raises the intercept: inflation spread evenly across SNPs. Intercept = 1 + N·a, so under pure polygenicity the intercept stays at 1 no matter how large λGC gets. That is the whole reason it separates the two.

Worked example (illustrative numbers)

GWASNλGCLDSC intercept (SE)read
A50,0001.081.01 (0.010)polygenic, clean
B200,0001.241.02 (0.006)polygenic, clean: λGC rose, intercept didn't
C200,0001.351.12 (0.007)confounding: N·a=0.12, a=6e-7

For C the intercept is ~17 SE above 1, so it is real. The fix is not genomic control: dividing χ² by 1.35 would crush the true polygenic signal too: it is adding PCs or a mixed model, then re-running LDSC.

Trade-offs

  • Genomic control (divide all χ² by λGC): cheap, no LD reference needed, but it assumes inflation is uniform. Under polygenicity it overcorrects, removing real signal with the artifact. Use it only when you have no LD reference and expect a single strong confounder.
  • LDSC: needs a matched LD reference and a sample size large enough that SE(intercept) is small. Below ~0.02, or the intercept is uninformative. Use it as the primary diagnostic at biobank scale.
  • Mixed models (BOLT-LMM, SAIGE, GCTA): handle relatedness and structure directly, but cost compute and need individual-level data.

Failure modes and detection

  • Overcorrecting true signal: after genomic control the LDSC slope drops and the h² estimate collapses; check that h² didn't fall with the correction.
  • Ignoring artifact as polygenicity: intercept > 1.1 with SE < 0.02. Don't wave it away as "polygenic."
  • LD-reference mismatch: EUR LD scores on an East Asian GWAS bias the intercept; detect by re-running with a matched panel and checking the intercept moves.
  • Sample overlap with the LD reference: biases the intercept downward, toward <1, hiding confounding; detect by checking whether GWAS samples sit in 1000G/HapMap3.
  • Extreme-effect loci (MHC, APOE): inflate λGC and distort the regression; exclude chr6:25–35 Mb and use HapMap3 SNPs.
  • Summary-statistic errors (wrong allele frequency, flipped alleles, wrong N): produce intercept < 1 or absurd slopes; check allele frequencies against the reference.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-6

Design and defend an analysis for population stratification.

Answer

What I'd say first. Assume a GWAS of a quantitative trait, roughly 400k array-genotyped and imputed samples, with self-reported ancestry and genotype data on hand. The analysis has three decisions to defend: how structure is measured, what the model conditions on, and how I show the conditioning worked.

Measure. Compute principal components on LD-pruned common variants: MAF > 0.01, pruning r² > 0.2: after dropping long-range LD regions (MHC, the chr8 and chr17 inversions). Keep 10–20 PCs, then check that PC1–PC10 track geography and recruitment site. If they don't, the PCs aren't capturing the structure that matters and the covariate set is decorative.

Condition. If the cohort contains related or cryptically related individuals, fit a linear mixed model with a genetic relationship matrix (BOLT-LMM, SAIGE, fastGWA) rather than PC covariates alone. PCs absorb broad-scale ancestry; the GRM absorbs broad-scale and fine-scale relatedness, including the within-Europe north–south clines that 10 PCs leave behind.

Show it worked. Report the genomic inflation factor λ_GC = median(χ²)/0.4549, the LDSC intercept, and a QQ plot. Then replicate within strata and, where families exist, run a transmission-based positive control.

PC covariatesLMM with GRM
Broad ancestryYes, 10–20 PCsYes
Cryptic relatedness / fine-scale structureNoYes
Cost at N=400kCheap, O(N) per PCGRM is O(N²) memory; BOLT-LMM runs in hours
Characteristic failureResidual structure inflates λOvercorrection: GRM absorbs real signal in a structured trait, power drops

Worked check (hypothetical figures). Before adjustment, median χ² = 0.55, so λ = 0.55/0.4549 = 1.21: inflated. After 10 PCs, median χ² = 0.47, λ = 1.03. LDSC intercept 1.06 (SE 0.01), attenuation ratio (1.06−1)/(mean χ²−1) = 0.15: residual confounding is small but present, so I'd add PCs or move to the LMM and re-check.

Failure modes and how I'd catch each.

  • Residual fine-scale structure. λ still above 1.1 after 20 PCs, or LDSC intercept above 1.05, means the covariate set is too coarse: add PCs or switch to the GRM model.
  • Environmental confounding. A variant tracking diet, smoking or air pollution that also tracks ancestry produces a real-looking hit. Detect it by checking whether the signal survives a within-stratum analysis or a family-based test; if it vanishes, it was environmental.
  • Overcorrection. Over-aggressive PC adjustment strips genuine signal from a structured trait like height. Detect it with positive-control loci: if known height hits lose significance after adjustment, the model is eating the biology.
  • Race substitution. Using self-reported race as a covariate instead of genetic PCs. Race is a social variable and doesn't capture within-group structure; compare effect estimates with and without it, and expect the race covariate to leave residual inflation.
  • Participation bias. Volunteer cohorts like UK Biobank are healthier than the general population. Compare allele frequencies against a population reference to see the shift.
  • Selective outlier removal. Pre-specify the ancestry-outlier threshold before looking at results. Removing outliers post hoc biases estimates and cuts power, and the removal itself becomes a result you have to defend.

Defence in one line. I condition on genetic ancestry, not on race; I use a mixed model when relatedness is present; and I report λ, the LDSC intercept and a within-stratum replication so the reviewer can see the structure was handled rather than assumed away.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-7

How do modern linear mixed models such as BOLT-LMM correct for both cryptic relatedness and fine-scale population stratification without losing power compared to fixed-effect PC adjustment?

Answer

The 90-second answer

An LMM replaces the fixed PC covariates with a random effect whose covariance is the genetic relationship matrix. That one matrix, pairwise allele sharing across all genotyped markers, encodes both pedigree relatedness and continuous ancestry, so a couple of variance parameters do what 10–20 PCs were doing, and they do it at fine scale. Classical LMMs sometimes lost power to PC adjustment because of the prior: an infinitesimal Gaussian on SNP effects over-shrinks large-effect loci, and the GRM absorbs part of the candidate's signal as background. BOLT-LMM (Loh et al., Nat Genet 2015; biobank-scale update 2018) fixes that with a mixture prior on SNP effects, so real signal stays in the fixed effect. Same correction, better prior, no O(N³) inversion.

Mechanism

The model is y = Xβ + g_cand·α + u + ε, with u ~ N(0, σ²_g·K), ε ~ N(0, σ²_e·I), and K = GGᵀ/M the GRM from M LD-pruned markers. Phenotype covariance is V = σ²_g·K + σ²_e·I. Testing the candidate is generalized least squares: whiten y and g_cand by V⁻¹, then regress. Off-diagonal entries of K are roughly 2Φ_ij for known relatives and decay smoothly with geographic distance for strangers, so cryptic relatedness and fine-scale stratification enter through the same term.

Why PCs lose: a PC is a global linear summary. Fine-scale structure (a village, an isolate, a recent founder event) shows up as a local block in K, not as a top eigenvector. Adding PCs to catch it costs degrees of freedom and, worse, a PC correlated with the candidate absorbs real signal.

Where BOLT-LMM recovers power

Classical LMMs (fastLMM, GEMMA, GCTA) assume β_m ~ N(0, σ²_g/M). For a trait with a few large-effect loci that prior is wrong: the GRM explains the locus as polygenic background, the fixed-effect estimate shrinks, and the test statistic drops. BOLT-LMM puts a two-Gaussian mixture on β_m (a narrow component for the polygenic tail, a wide one for large effects) and fits it by variational Bayes. Large-effect loci are modelled in the wide component, so less of the candidate's signal is absorbed by the random effect.

Two engineering choices make it scale. Conjugate gradient solves V⁻¹x without forming or inverting V, so there is no O(N³) eigendecomposition. And a leave-one-chromosome-out GRM excludes the candidate's own chromosome, removing proximal contamination.

Illustrative trace (hypothetical numbers, not from a specific paper)

N = 100,000, candidate SNP with a true effect explaining 0.2% of phenotypic variance. Infinitesimal LMM: the GRM includes the candidate's region, roughly a quarter of the signal is absorbed as background, and the test statistic falls from χ² = 30 to χ² = 22. A real power loss versus PC adjustment. BOLT-LMM mixture: the wide component keeps that locus in the fixed effect, χ² returns to about 30, and λ_GC stays near 1.0 because the narrow component still absorbs the polygenic background.

Failure modes

  • GRM built from the same sample as the test: proximal contamination inflates false positives; LOCO is the fix.
  • Small N or a sparse GRM: variance components are poorly estimated and the LMM can under-correct.
  • Extreme structure: a cohort spanning continents with tiny per-group N: the GRM may not capture it, and PCs or a stratified analysis still help.
  • The mixture is fit by variational Bayes, so it is an approximation. Check λ_GC and QQ plots, not just the p-value.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-17

Design and defend an analysis for meta-analysis harmonization.

Answer

Core answer

Assume a summary-statistics meta-analysis of GWAS for one trait, cohorts on GRCh38, effect sizes reported as beta with SE. The design has four stages, and the defence is that each stage removes one specific way two cohorts can disagree about the same variant.

  1. Canonical variant key. Normalize to chr:pos:ref:alt on one build (bcftools norm -f GRCh38.fa), liftOver GRCh37 cohorts. Match on rsID only as a cross-check: rsIDs merge and split across dbSNP builds.

  2. Allele alignment. Set the effect allele to the reference alt in every cohort. If a cohort reports the other allele, flip the sign of beta and take the allele-frequency complement. This is the step that stops opposite alleles cancelling.

  3. Scale and phenotype. Convert ORs to log-OR, standardize continuous traits to SD units, record per-variant N and case/control counts.

  4. Model. Inverse-variance fixed effect by default (METAL's default), switch to random effects when heterogeneity is real.

Why strand flips cancel

A palindromic SNP (A/T or C/G) has the same allele pair on both strands, so a cohort reporting the forward strand and one reporting the reverse look identical by allele string but carry opposite effect alleles. Align by string alone and half the cohorts contribute +beta and half -beta for the same biological effect; the pooled estimate shrinks toward zero. With MAF near 0.5 you cannot use frequency to break the tie: both strand assignments have the same expected frequency. Drop palindromic SNPs with MAF in [0.42, 0.58], or resolve against an LD reference panel (1000 Genomes) by checking which allele correlates with a nearby non-palindromic tag.

Worked trace

Cohort A: rs1234, A/T, effect allele A, beta = 0.08, SE = 0.02, EAF = 0.31. Cohort B: rs1234, T/A, effect allele T, beta = 0.06, SE = 0.025, EAF = 0.69. Align B to A: effect allele becomes A, beta flips to -0.06, EAF becomes 0.31. Inverse-variance weights: w_A = 1/0.02² = 2500, w_B = 1/0.025² = 1600. Pooled beta = (2500·0.08 + 1600·(-0.06)) / 4100 = (200 - 96)/4100 = 0.0254. Without the flip: (200 + 96)/4100 = 0.0722. A 2.8× inflation of the effect from one misaligned cohort.

Fixed vs random effects

Fixed effect assumes one true effect; it is the right default when Cochran's Q p > 0.05 and I² < 25%. Random effects (DerSimonian-Laird or REML) adds tau² to each weight and widens the CI; use it when I² > 50% or when cohorts differ by ancestry, imputation panel, or covariate set. The cost: random effects gives more weight to small cohorts, so one noisy study can dominate. Report both; if they disagree on direction, the signal is not robust.

Failure modes

  • Overlapping samples: shared controls inflate Z-scores; check LDSC intercept > 1.1 or use effective N.
  • Build mismatch: silent position shifts; validate against dbSNP.
  • Hidden covariates: different PCs or age/sex adjustment; compare lambda_GC per cohort (expect ~1.0).

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-18

Design and defend an analysis for heterogeneity.

Answer

What I'd say in the first minute

Heterogeneity is the between-study variance in the effect estimate that sampling error alone can't explain. Before I touch a statistic I fix three things: the effect measure (say a log odds ratio), the estimand (a common effect, or the mean of a distribution of effects), and the inclusion rule. If studies estimate different quantities (different contrasts, different follow-up windows) no heterogeneity statistic rescues the pool; I stratify instead.

Then I report four numbers, not one: Cochran's Q with its df and p-value, I², τ² on the effect scale, and a prediction interval.

Mechanism

Q is Σ wᵢ(θ̂ᵢ − θ̂)² with wᵢ = 1/vᵢ. Under homogeneity Q ~ χ²(k−1). I² = max(0, (Q − df)/Q): the share of total variance that is between-study, not an absolute quantity. τ² is the absolute between-study variance; DerSimonian–Laird estimates it as (Q − df)/C with C = Σw − Σw²/Σw. That's why I² can sit at 70% while τ² is trivial: I² is relative to the precision of the studies in front of you.

Fixed versus random is an estimand choice, not a repair. Fixed-effect assumes one true θ and its interval covers θ. Random effects assumes θᵢ ~ N(μ, τ²) and its interval covers μ: the mean of the distribution, not the spread. The prediction interval covers a new study's θ, and that's the one to quote when someone asks what they'll actually see.

Worked arithmetic (hypothetical, k = 8)

Q = 21.4 on 7 df, p = 0.003. I² = (21.4 − 7)/21.4 = 67%. With Σw = 100 and Σw² = 1600, C = 100 − 16 = 84, so τ² = 14.4/84 = 0.171 and τ = 0.41. Pooled θ̂ = 0.30, SE = 0.08. The conventional interval is 0.30 ± 1.96 × 0.08 = (0.14, 0.46). The prediction interval is 0.30 ± t₀.₉₇₅,₆ × √(0.08² + 0.171) = 0.30 ± 2.447 × 0.421 = (−0.73, 1.33). Same data: one interval excludes zero, the other spans it. That gap is the argument for reporting both.

Trade-offs

Random effects widens intervals and shifts weight toward small studies. With DerSimonian–Laird that's worse, because DL underestimates τ² when k is small. REML is the better default, metafor's rma() uses it, and with k < 10 I add the Hartung–Knapp–Sidik–Jonkman adjustment, which uses a t-distribution on k−1 df and can widen the interval several-fold. Don't reach for random effects when studies aren't exchangeable: if the spread comes from different estimands or populations by design, you're averaging incomparable quantities. Stratify, or run meta-regression on a predeclared moderator.

Failure modes

Q has low power with k < 10, so a non-significant Q is not evidence of homogeneity. I² is imprecise at small k. Post hoc subgroups and study-level meta-regression invite ecological fallacy: a study-level moderator need not hold within studies. One outlier cohort can carry τ²; refit without it and report both. Scale mismatch (OR versus RR, different units) makes τ² meaningless. And random effects does not fix bias: it widens the interval around a biased estimate.

R
library(metafor)  # 4.6-0
m <- rma(yi, vi, data = dat, method = "REML", test = "knha")
m$Q; m$QEp; m$I2; m$tau2
predict(m)  # prediction interval

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-20

Design and defend an analysis for LD score regression.

Answer

Core answer (first 90 seconds).

Three stages, each defended by what it protects against. Assumptions I state before anything: the trait is polygenic (thousands of small effects), the GWAS has a stable per-SNP N and good imputation, and I have an LD reference panel matched to the GWAS ancestry. If any of those fails, LDSC is the wrong tool.

  1. Munge. Harmonize to one row per SNP on a shared allele set (HapMap3), drop MAF < 0.01, INFO < 0.9, indels, strand-ambiguous and duplicate SNPs, and cap χ² at 80: those are munge_sumstats.py defaults. The χ² cap is not cosmetic: a few huge-effect loci (HLA in autoimmune traits) otherwise dominate the slope.
  2. LD scores. ℓ_j = Σ_k r²_jk over a 1 cM window (--ld-wind-cm 1) from a panel matched to ancestry. Mismatched panels bias h² because LD score magnitude differs by ancestry.
  3. Regression. Fit E[χ²_j] = 1 + N·h²·ℓ_j/M + N·a. Slope → h²; intercept = 1 + N·a captures confounding (stratification, relatedness) that isn't polygenicity. Report the attenuation ratio (intercept−1)/(mean χ²−1); under 0.2, confounding is a small share.

Mechanism. A SNP tags its neighbours; the more LD it carries, the more causal variants it proxies, so its χ² rises linearly with ℓ_j. That linearity is the whole model: it holds when effects are spread across many loci. The intercept is the χ² you'd expect at ℓ=0, a SNP tagging nothing: any excess above 1 there is confounding, not signal.

Worked check. N = 200,000, M = 1e6, h² = 0.3 → slope = N·h²/M = 0.06. With mean ℓ ≈ 20 in this panel, mean χ² ≈ 1 + 0.06·20 = 2.2. If the fitted intercept is 1.08, ratio = 0.08/1.2 = 0.067: confounding explains ~7% of the inflation, fine to report. If the intercept were 1.5, ratio = 0.42, and I'd stop and fix the GWAS before trusting h².

python munge_sumstats.py --sumstats gwas.txt --N 200000 \
  --maf-min 0.01 --info-min 0.9 --chisq-max 80 \
  --merge-alleles w_hm3.snplist --out trait
python ldsc.py --l2 --bfile 1000G.EUR.QC --ld-wind-cm 1 --out eur
python ldsc.py --h2 trait.sumstats.gz --ref-ld eur --w-ld eur --out trait_h2

(ldsc reference implementation, v1.0.1.)

Failure modes and how I detect them.

failuredetection signalcost
ancestry mismatchh² shifts >20% when swapping panels; intercept inflateswrong h², wrong rg
sample overlap in rggcov intercept > 1rg inflated toward 1
small Nrg SE > 0.2estimate uninterpretable
non-polygenic traitλ_GC ≫ inflation implied by intercepth² inflated
rare / poorly imputed variantsMAF < 0.01 rows survive mungenoisy ℓ, unstable slope

Trade-offs. LDSC works from summary stats and is robust to confounding: that's why it beats GREML/GCTA when you don't have individual genotypes. But GREML handles relatedness and family structure directly, and HESS gives local h² that LDSC can't. Don't use LDSC when N < ~5,000, when the trait is driven by a few loci, or when you need per-region or causal answers. And rg is genetic correlation, not causation: for causal claims use Mendelian randomization.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-22

Design and defend an analysis for polygenic scores.

Answer

What I'd say first. Before designing anything I'd ask what decision the score is meant to change. If it's a research association, discrimination is enough. If it's a screening threshold, I need calibration and net benefit, because a score that ranks well but is miscalibrated will set the wrong cut-point. I'd state the target population, ancestry, age range, outcome definition, and whether the score is used alone or added to an existing model, then pre-specify the minimum clinically important ΔAUC and the threshold range before touching data.

The design has four parts. Freeze the score: variant list, effect alleles, weights, genome build, source GWAS, shrinkage method and its hyperparameters. Anything tuned on the target data is not part of the score. Validate externally in a cohort with no sample overlap with discovery. Report four things: discrimination (AUC with CI), calibration (slope, intercept, observed/expected by decile), incremental value over the baseline model (ΔAUC, NRI), and decision utility (net benefit across the threshold range that matters). Defend with a pre-specified rule: if the score doesn't beat baseline at the decision threshold, it fails regardless of AUC.

Why weights transfer badly. A marginal GWAS effect is β_j = causal effect + LD tag effect. Shrinkage methods assume a heritability and polygenicity prior and shrink toward zero accordingly. If the target population's LD differs from the reference panel, the tag component doesn't replicate and the score attenuates; if the assumed h² is too high, weights are under-shrunk and overfit in the target.

choiceassumeswrong call when
Clumping + thresholding (p<5e-8, r²<0.1, 250 kb)few large effects, LD-pruned tagstrait is highly polygenic: discards most signal
LDpred2 / PRS-CSh² and polygenicity priors, LD reference paneltarget ancestry differs from the LD panel: weights mis-shrunk
Score alonethe score is the whole modela baseline model (age, sex, standard risk factors) already exists

Failure modes and how I'd catch them.

  • Ancestry transfer loss: validate in the target ancestry; expect relative accuracy around 20–60% of European-ancestry accuracy depending on trait (Martin et al., Nat Genet 2019). Detection is the ancestry-stratified AUC, not the pooled one.
  • Allele flip: compare allele frequencies to a reference panel; |ΔAF| > 0.1 on A/T or C/G SNPs flags strand ambiguity. Drop or resolve by frequency.
  • Data leakage: check sample overlap between discovery and target; overlapping samples inflate AUC and are invisible in the score itself.
  • Overfitting: compare in-sample vs out-of-sample R² and sweep the shrinkage grid; a large gap means the prior is wrong.
  • Percentile misuse: a "top 5%" is population-relative. Convert to absolute risk with age-specific incidence and competing risks before anyone acts on it.
  • Deterministic language: report as a risk modifier, never as a diagnosis.
  • No action evidence: the score has no trial evidence that acting on it changes outcomes; decision-curve analysis is the closest substitute.

Sizing the validation. For AUC ≈ 0.65, SE ≈ √(AUC(1−AUC)/n_min) = √(0.2275/n_min). At 2,300 cases and 2,300 controls, SE ≈ 0.010, giving a 95% CI of roughly ±0.02: tight enough to detect a ΔAUC of 0.02 over baseline. Fewer than ~1,000 cases and the CI swallows any effect worth defending.

The defence. The analysis stands or falls on the pre-specified threshold: a score that adds 0.02 AUC but no net benefit at the screening cut-point is a research finding, not a clinical tool.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-23

Design and defend an analysis for cross-population portability.

Answer

Assumptions first. I'll take this as a polygenic score (PGS) for a common disease, built from GWAS summary statistics, deployed in a health system to stratify absolute risk. "Cross-population" means the validation populations differ from the discovery population in genetic ancestry and in environment. If the model class is different (a clinical risk equation, an imaging model) the design changes, so I'd confirm that in the first minute.

The core answer. Portability has two separable failure axes and you must measure them separately: discrimination (does the score rank people correctly, AUC) and calibration (does a predicted 8% risk mean 8%, calibration slope, intercept, observed/expected ratio). A score can keep its AUC and lose its calibration, or vice versa, and the fix differs.

Design:

  • Discovery: multi-ancestry GWAS, not European-only. Use a cross-ancestry method (PRS-CSx, or LDpred2 with a per-ancestry LD reference) rather than a European-derived score applied everywhere.
  • Splits: hold out the entire target population from discovery, tuning and SNP selection. Tune hyperparameters within-ancestry, never on the target set.
  • Metrics per group: AUC, calibration slope, O/E ratio, and decision-curve net benefit at the deployment threshold.
  • Pre-registered decision criteria: deploy only if AUC ≥ 0.65 and calibration slope within 0.9–1.1 in every group; otherwise recalibrate or don't deploy.

Why it works. PGS portability degrades because LD structure and allele frequencies differ, so a tag SNP that proxies a causal variant in one population may not in another; and because effect sizes are environment-dependent. Martin et al. (Nat Genet 2019) found PGS accuracy in non-European populations is substantially lower, for many traits several-fold, than in Europeans. That gap is mostly discrimination loss, which recalibration cannot fix; it needs more diverse discovery data or cross-ancestry methods.

Alternatives and when to pick them.

  • Recalibrate-only (rescale the European score to the target group): cheap, fixes calibration, does nothing for discrimination. Right when the gap is calibration only.
  • Ancestry-specific scores: best discrimination per group, but needs large per-group GWAS and fragments the model.
  • Multi-ancestry meta-analysis or PRS-CSx: usually the best accuracy-per-sample trade-off; pick when target-group GWAS exists but is small.

Failure modes and detection.

  • Miscalibrated absolute risk: O/E ratio drifts after deployment; detect with a prospective calibration plot by group, monitored quarterly.
  • Small validation group: AUC confidence interval too wide to decide; require ≥100 events per group before trusting an AUC.
  • Ancestry as proxy for race or environment: detect by comparing genetic-ancestry principal components against self-reported race; if they disagree, the covariate is doing the wrong job.
  • Health disparity amplification: equal thresholds can widen gaps; detect with decision-curve net benefit computed per group, not overall.

Illustrative numbers (hypothetical, for shape only):

groupn eventsAUCcalib. slopeO/E
European4000.721.021.00
African1200.610.781.35

Here the African-ancestry group fails both criteria: discrimination below 0.65 and calibration slope 0.78. Recalibration would fix the slope but not the AUC, so the decision is more diverse discovery data, not rescaling.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-19

Design and defend an analysis for rare-variant aggregation.

Answer

Assume a case-control exome study: say 5,000 cases, 5,000 controls, unrelated after a GRM cutoff of 0.088, European-ancestry-dominant, and the question is whether rare coding variants in a gene associate with disease. The design I would defend has four locked decisions made before any association test runs.

1. The mask. Gene-based, restricted to variants with MAF < 0.1% in an ancestry-matched reference (gnomAD non-Finnish European, or popmax when the cohort is mixed). Functional classes: high-confidence LoF from LOFTEE, plus missense with REVEL ≥ 0.5. The mask is written down and version-pinned before phenotypes are touched.

2. The test. Default to SKAT-O. It is the min-p over a grid of ρ ∈ [0,1] combining a burden statistic (ρ=1) and a variance-component statistic (ρ=0), so it does not require me to know the direction of effect in advance.

3. Ancestry and relatedness. Adjust for the first 10 genotype PCs; use SAIGE-GENE+ when case-control imbalance is severe, because its saddlepoint approximation holds nominal type-I error where a plain logistic burden test inflates it.

4. Reporting. Per-gene carrier counts, per-variant effect estimates, and the mask definition travel with every result.

Why the test choice matters, mechanically. A burden test collapses carriers into one score, Σ wᵢ gᵢ, which is powerful only when every variant pushes the same way. SKAT instead forms a quadratic form Q = (y − μ̂)′K(y − μ̂) where K is a weighted pairwise-similarity kernel over carriers; it accumulates evidence from many variants each contributing little, and tolerates mixed signs. That is the whole trade-off:

teststatisticwins whenloses when
burdenΣ wᵢ gᵢall variants same directionone protective variant cancels several risk variants
SKATquadratic form over kernel Kheterogeneous, sparse signalall variants same direction: burden is more powerful
SKAT-Omin-p over ρ griddirection unknownsmall power cost versus the correctly matched test

A concrete R call, checked against SKAT 2.0.0:

R
library(SKAT)
obj <- SKAT_Null_Model(phenotype ~ PC1 + PC2 + PC3 + batch, out_type = "D")
SKAT(obj, Z, weights = dbeta(MAF, 1, 25))$p.value

Z is the n × variants genotype matrix for the mask; dbeta(MAF, 1, 25) is the standard beta weighting that upweights rarer variants.

Carrier arithmetic, illustrative: at MAF 0.1% and 10,000 samples, a single variant has ~20 carriers. Underpowered alone. A 30-variant mask yields ~600 carriers, enough for ~80% power at OR 1.5 under a burden model. That is the entire reason aggregation exists.

Failure modes, each with detection:

  • Annotation circularity: mask built from the same data used to select it. Detect by pre-registering the mask and sourcing annotation from an external database (VEP/LOFTEE), not the study's own variant list.
  • Mixed protective and risk effects: burden p-value much weaker than SKAT p-value on the same mask. Detect by comparing the two; report per-variant betas.
  • Sequencing batch: batch confounds genotype. Detect via genotype PCA and per-batch λ_GC; include batch as a covariate.
  • Singleton error: singletons are dominated by sequencing artifacts. Detect via transition/transversion ratio and duplicate concordance; impose a MAF floor or drop singletons.
  • Ancestry frequency difference: a single MAF cutoff misclassifies variants across ancestries. Detect by ancestry-stratified MAF checks; use popmax.
  • Data-driven mask selection: choosing the mask by p-value inflates type-I error. Detect by permutation or by holding out a mask-selection split.

Defended in one line: pre-registered mask, SKAT-O as the direction-agnostic default, ancestry-matched frequencies, relatedness handled by a mixed model, and every failure mode paired with the check that catches it.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-21

Design and defend an analysis for Mendelian randomization.

Answer

I'd start by pinning the estimand: the average causal effect of a lifelong shift in exposure X on outcome Y in a defined population, using genetic variant G as an instrument. Under monotonicity, no defiers, that's a local average treatment effect, and it's the effect of genetically proxied exposure, not a short-term drug intervention. Say that out loud, because it decides whether the answer is relevant to the question asked.

Three IV assumptions carry the design. Relevance: G is associated with X. Independence: G is independent of confounders of X and Y. Exclusion restriction: G affects Y only through X. Horizontal pleiotropy, G affecting Y through a path that bypasses X, breaks exclusion restriction even when the G–X association is strong, so a large effect size is not evidence of validity.

For the design I'd take instruments at genome-wide significance, p < 5e-8, clumped for LD at r² < 0.001 within 10,000 kb, and report the mean F-statistic; F > 10 is the conventional weak-instrument threshold, and with multiple instruments I'd also report conditional F. Harmonize effect alleles between the two GWAS and drop palindromic SNPs with intermediate allele frequency, or the ratio estimates flip sign. Two-sample MR needs non-overlapping samples; if they overlap, the estimate is biased toward the confounded observational association, so I'd use MRlap or split the sample.

The primary estimate is inverse-variance weighted. Then sensitivity: MR-Egger for directional pleiotropy via its intercept, weighted median which is consistent if more than half the weight comes from valid instruments, MR-PRESSO for outliers, and Steiger filtering for direction. No single one is proof: MR-Egger has low power and needs the InSIDE assumption, and the weighted median fails if the majority of instruments are invalid.

Here's the arithmetic on two hypothetical SNPs, exposure in SD units, outcome in log-odds of CHD. SNP1: beta_X = 0.05, SE 0.005; beta_Y = 0.018, SE 0.003. Ratio 0.36, delta-method SE 0.070. SNP2: beta_X = 0.03, SE 0.004; beta_Y = 0.009, SE 0.0025. Ratio 0.30, SE 0.152. IVW weights are 1/SE²: 204 and 44. Weighted mean = (204×0.36 + 44×0.30)/248 = 0.35, SE = 1/√248 = 0.064. So 0.35 per SD (95% CI 0.23–0.48), p ≈ 4e-8. That's the number I'd defend.

methodkey assumptionwhat it detectsfails when
IVWall instruments valid—any directional pleiotropy
MR-EggerInSIDEdirectional pleiotropy (intercept)weak instruments, InSIDE violated
Weighted median>50% of weight from valid instrumentsoutliers, balanced pleiotropymajority of instruments invalid
MR-PRESSO<50% outliersoutlier SNPs, corrected estimatepleiotropy correlated with exposure
Steiger filtering—direction of effectweak instruments, sample overlap

Failure modes and how I'd catch them: weak instrument. Mean F < 10, detected by reporting F and using weak-instrument-robust methods like Anderson–Rubin; cost is bias toward the confounded estimate. Horizontal pleiotropy: MR-Egger intercept p < 0.05 or MR-PRESSO global test p < 0.05; cost is a biased estimate that more samples won't fix. Population stratification: check genomic inflation λ and LD-score regression intercept, or restrict to one ancestry; cost is confounding. Sample overlap: check cohort membership; cost is bias toward the observational estimate. Reverse causality: Steiger filtering and bidirectional MR; cost is the wrong direction. Winner's curse: separate discovery and replication samples; cost is inflated effect size.

When not to use MR: no variant with a credible association to the exposure, an exposure whose genetic instrument is pleiotropic across many traits, an admixed population where stratification can't be controlled, or a question about a short-term intervention when the instrument captures lifelong exposure. In those cases the honest answer is that MR can't identify the effect, not that a sensitivity method will rescue it.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-9

How do you statistically fine-map a GWAS locus and evaluate whether it shares a single causal variant with an eQTL signal?

Answer

Statistical fine-mapping separates causal variants from passenger variants correlated via linkage disequilibrium (LD). Simple lead-SNP overlapping between a GWAS and an eQTL is fundamentally flawed because two distinct causal variants in tight LD ($r^2 > 0.8$) produce mutually correlated summary statistics without sharing a biological mechanism.

1. Fine-Mapping Formulation

We model phenotype vector $\mathbf{y} \in \mathbb{R}^N$ against genotype matrix $\mathbf{X} \in \mathbb{R}^{N \times P}$ within a genomic locus (typically $\pm 500\text{ kb}$ around the peak): $$\mathbf{y} = \mathbf{X}\boldsymbol{\beta} + \boldsymbol{\varepsilon}, \quad \boldsymbol{\varepsilon} \sim \mathcal{N}(0, \sigma^2 \mathbf{I})$$ Instead of assuming a single causal variant per locus, frameworks like SuSiE (Sum of Single Effects) represent $\boldsymbol{\beta} = \sum_{l=1}^L \boldsymbol{\gamma}_l$, where each component vector $\boldsymbol{\gamma}l$ contains at most one non-zero effect ($(\boldsymbol{\gamma}l)j = \gamma{lj} \cdot z{lj}$ with $\sum_j z{lj} \le 1$).

Given summary statistics $\hat{\boldsymbol{\beta}}, \text{SE}(\hat{\boldsymbol{\beta}})$ and an in-sample or population-matched LD correlation matrix $\mathbf{R} = \frac{1}{N} \tilde{\mathbf{X}}^T \tilde{\mathbf{X}}$, we compute the posterior inclusion probability (PIP) for variant $j$: $$\text{PIP}_j = P(\beta_j \neq 0 \mid \hat{\boldsymbol{\beta}}, \mathbf{R})$$ Variants are grouped into $95%$ Credible Sets (CS), defined as the smallest subset of SNPs $\mathcal{S}l$ satisfying $\sum{j \in \mathcal{S}_l} \text{PIP}_j \ge 0.95$.

2. Colocalization Framework

Once fine-mapping identifies credible sets, we evaluate colocalization between Trait 1 (GWAS) and Trait 2 (eQTL). Under the standard Wakefield approximate Bayes factor formulation, we evaluate five mutually exclusive hypotheses across the locus:

HypothesisDescriptionMathematical Formulation
$\mathcal{H}_0$Neither trait has a causal variant in the locus$\boldsymbol{\beta}_1 = \mathbf{0}, \boldsymbol{\beta}_2 = \mathbf{0}$
$\mathcal{H}_1$Trait 1 only has a causal variant$\boldsymbol{\beta}_1 \neq \mathbf{0}, \boldsymbol{\beta}_2 = \mathbf{0}$
$\mathcal{H}_2$Trait 2 only has a causal variant$\boldsymbol{\beta}_1 = \mathbf{0}, \boldsymbol{\beta}_2 \neq \mathbf{0}$
$\mathcal{H}_3$Both traits have distinct causal variants$\boldsymbol{\beta}_1 \neq \mathbf{0}, \boldsymbol{\beta}_2 \neq \mathbf{0}$, $\text{supp}(\boldsymbol{\beta}_1) \cap \text{supp}(\boldsymbol{\beta}_2) = \emptyset$
$\mathcal{H}_4$Both traits share a single causal variant$\boldsymbol{\beta}_1 \neq \mathbf{0}, \boldsymbol{\beta}_2 \neq \mathbf{0}$, $\text{supp}(\boldsymbol{\beta}_1) \cap \text{supp}(\boldsymbol{\beta}_2) = {j}$

The posterior probability of colocalization is: $$\text{PPA}_{\mathcal{H}_4} = \frac{P(\mathcal{H}_4) \text{BF}4}{\sum{i=0}^4 P(\mathcal{H}_i) \text{BF}i}$$ Coloc requires defining priors: typically $p_1 = 10^{-4}$ (prior probability that variant $j$ affects Trait 1), $p_2 = 10^{-4}$, and $p{12} = 10^{-5}$ (prior probability of pleiotropy). When multiple causal signals exist, classical coloc inflates $\mathcal{H}_3$ or masks $\mathcal{H}_4$. To resolve this, run SuSiE fine-mapping independently on both traits to isolate individual single-effect credible sets, then perform colocalization pairwise across component sets (e.g., coloc.susie).

3. Critical Failure Modes

  1. Reference LD Mismatch: Using 1000 Genomes EUR for an admixed or TOPMed-imputed cohort creates an inconsistent $\mathbf{R}$ matrix. If the observed summary test statistics $\mathbf{z}$ fall outside the column space of $\mathbf{R}$ (diagnosed by eigenvalues $< 0$ or $(\mathbf{z}^T \mathbf{R}^{-1} \mathbf{z})/P \gg 1$), fine-mapping algorithms hallucinate artifactual causal variants with falsely elevated PIPs.
  2. Variant Set Discordance: Variants present in the GWAS but missing in the eQTL (due to imputation filtering $R^2 < 0.3$ or low MAF) artificially drive $\mathcal{H}_3$ even when the true variant is shared, as the missing signal defaults to nearby proxies.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-25

How do you perform conditional and joint (stepwise) association analysis to distinguish multiple independent signals at a single locus, including how you select variants to condition on, how LD reference and imputation quality affect the result, and how you decide when to stop adding signals?

Answer

Start by clarifying: individual-level genotypes or summary statistics? For individual-level data I use PLINK 2 --glm with --condition-list. For summary statistics I need an ancestry-matched LD reference. Assume a locus with one genome-wide significant lead variant and we want independent secondary signals.

Forward stepwise conditional analysis: fit the lead variant, then re-test every variant in the locus (e.g., ±500 kb) conditioning on the lead. The top variant after conditioning is a candidate second signal. Add it to the conditioning set and repeat. Stop when no variant reaches the locus-wide threshold: I use p < 1e-5 after conditioning for a ~1 Mb region, or a Bonferroni threshold for the number of variants tested. Then fit a joint model with all selected variants to get joint effect sizes and SEs.

Worked trace (hypothetical):

stepconditioned ontop variantconditional pjoint beta (SE)
1—rs1232e-200.12 (0.010)
2rs123rs4564e-90.08 (0.012)
3rs123, rs456rs7890.03— stop

Joint model r² between rs123 and rs456 is 0.05. If r² between selected variants is high (>0.8), joint estimates inflate SEs and stepwise order matters: that is collinearity, not two signals.

LD reference: for summary-statistic conditional analysis the reference must match the study's ancestry and imputation panel. If the reference has different LD, conditioning on a tag variant may remove too little or too much signal. I check by comparing conditional p-values across two reference panels (e.g., 1000G vs TOPMed); a signal that disappears in one is suspect.

Imputation quality: low INFO (e.g., <0.8) variants have attenuated LD with the lead, so conditioning on them removes little, and they can appear as false secondary signals if their imputation errors correlate with the trait. Filter to INFO > 0.8 and MAF > 0.01, and check that the conditional signal's imputation quality is similar to the lead's.

Stop criteria: no variant passes the conditional threshold; or adding a variant changes the lead's effect by >20% without improving model fit (AIC/BIC); or the number of signals exceeds the number of independent LD blocks in the region. Over-conditioning on a non-causal tag can erase a true signal: I verify by leaving one out and re-testing.

PLINK 2 command for step 1:

plink2 --bfile data --glm --condition-list rs123 --covar covariates.txt --out step1

Then --condition-list rs123,rs456 for step 2.

Failure modes: LD mismatch (detect by reference swap), imputation quality (detect by INFO-stratified analysis), collinearity (VIF > 5), winner's curse (stepwise selection inflates effects; validate in an independent cohort).

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-24

How do you test for gene-by-environment interaction in a GWAS: when to use a 1-df interaction test vs a 2-df joint test, how to choose additive vs multiplicative scale, and how do exposure measurement error, scale-dependence and case-control sampling affect power and interpretation?

Answer

The model and the two tests. For a quantitative trait, fit Y = β0 + βG·G + βE·E + βG×E·(G×E) + covariates. For a binary trait, logit P(Y=1) = β0 + βG·G + βE·E + βG×E·(G×E) + covariates. The 1-df interaction test is H0: βG×E = 0. The 2-df joint test is H0: βG = βG×E = 0.

Which to use. The 2-df joint test is the better default primary screen. When the main effect is null it loses little power to the 1-df test, and when a main effect exists it is substantially more powerful because it captures that effect too. The 1-df test wins only when you are confident the main effect is exactly zero and you want to characterize the interaction; it is the natural follow-up once the joint test is significant. A significant joint test can reflect a main effect alone, so follow up with the 1-df test. PLINK 2's --glm interaction reports both the interaction coefficient and the joint test.

TestNull hypothesisdfPower when
1-df interactionβG×E = 01Main effect absent, interaction present
2-df jointβG = βG×E = 02Both main and interaction present

Scale. Logistic regression tests interaction on the multiplicative OR scale: departure from OR11 = OR10 × OR01. Additive interaction is departure from OR11 = OR10 + OR01 − 1, summarized by RERI = OR11 − OR10 − OR01 + 1. The two are not equivalent. Worked example: OR11 = 3.0, OR10 = 2.0, OR01 = 1.5 gives a multiplicative ratio 3.0 / (2.0 × 1.5) = 1.0, i.e. no multiplicative interaction, but RERI = 3.0 − 2.0 − 1.5 + 1 = 0.5, a positive additive interaction. Reverse it: OR11 = 2.0, OR10 = 1.5, OR01 = 1.5 gives a multiplicative ratio 2.0 / (1.5 × 1.5) = 0.89, a negative multiplicative interaction, but RERI = 2.0 − 1.5 − 1.5 + 1 = 0.0, no additive interaction. For a quantitative trait, linear regression is additive on the mean scale; log-transforming the outcome makes it multiplicative. Pre-specify the scale from the biological or policy question, and report both when they disagree.

Measurement error. Classical non-differential error in E attenuates βG×E toward the null and costs power; with a non-zero main G effect the bias can go either way. Differential error, such as recall bias that differs by genotype, can create spurious interactions. Correct with a validation subsample and regression calibration, or with repeated measures. Genotype error is usually negligible by comparison.

Case-control sampling. Logistic regression gives consistent ORs, so multiplicative interaction is estimable without knowing prevalence. Additive interaction needs baseline risk: RERI computed from ORs is valid only under the rare-disease assumption (OR ≈ RR); for common diseases it is biased. The case-only design estimates interaction with more power but assumes G and E are independent in the population: population stratification or any G–E correlation breaks it.

Power and interpretation. Interaction tests need roughly four times the sample size of a main-effect test for the same effect size, so GWAS-scale GxE usually means meta-analysis. A significant interaction means the genotype–trait association differs by exposure level, on the scale you tested. Check for outliers and for a misspecified main effect of E: a non-linear E main effect can masquerade as interaction. Report the test, the scale, and the exposure measurement properties.

Curated: · Written: · Reviewed:

Difficulty: Hard