Tutorials › High-Dimensional Genomic Data Analysis › Individual-Level And Summary-Statistic TWAS

Colocalization and Integration With Expression Data · Tutorial 758 of 795

Individual-Level And Summary-Statistic TWAS

Learn how individual-level and summary-statistic TWAS use expression weights and genotype information, and when a reference LD panel is needed to calibrate the test.

Advanced 10 min read

What You'll Learn

  • Identify the phenotype, genotype, expression-weight and association-summary data required for each TWAS route.
  • Derive the weighted score statistic and its LD-dependent variance.
  • Calculate a summary-statistic TWAS test using a reference LD matrix.
  • Explain why individual-level genotypes provide the relevant LD directly.
  • Diagnose variant alignment, ancestry and LD-panel problems that can distort calibration.
  • Distinguish an unavailable or unsuitable LD reference from evidence that a gene has no association.

Two Data Routes to the Same Weighted Association

A transcriptome-wide association study (TWAS) tests whether a gene's genetically predicted expression is associated with a phenotype. The prediction is a weighted combination of genotypes: for a gene with \(m\) variants, write the weights as \(w=(w_1,\ldots,w_m)^\mathsf{T}\), and the genotype vector for an individual as \(G_i=(G_{i1},\ldots,G_{im})^\mathsf{T}\). The predicted expression component is \(G_i^\mathsf{T}w\). The weights are treated as specified for the association test; they are typically estimated using genotype and expression data from a separate expression-training sample.

There are two main ways to test the association. With individual-level data, the analyst has phenotype and genotype measurements for the same individuals and can form the weighted genotype predictor directly. With summary statistics, the analyst has SNP-level phenotype-association estimates rather than the joint genotype and phenotype records. The weighted association can still be calculated, but its variance depends on correlations among the SNP association statistics. Linkage disequilibrium (LD), the correlation among genotypes at different variants, determines those correlations.

Definition: An individual-level TWAS calculates the association between the phenotype and the weighted genotype predictor using genotype and phenotype data measured on the same individuals. A summary-statistic TWAS combines SNP-level GWAS summary statistics with expression-prediction weights and an estimate of the relevant SNP correlation structure, usually from an LD reference panel. The two approaches target a weighted association, but their data inputs and variance calculations differ.

Neither route removes the need for an appropriate expression-prediction model or correct variant harmonization. Alleles and variant identities must correspond between the weights, GWAS statistics and, when used, the LD reference. The test is an association test; by itself it does not establish that altered expression causes the phenotype.

Individual-Level Calculation and Its Assumptions

Suppose the phenotype has been adjusted for specified covariates, and let \(y\) denote the resulting vector of \(n\) observations. Let \(G\) be the corresponding \(n\)-by-\(m\) genotype matrix, with columns coded consistently with the weights. For clarity, assume the genotype columns have been centered and standardized, and denote their sample correlation matrix by \(R=G^\mathsf{T}G/n\). The predicted-expression vector is \(x=Gw\). A linear association test relates \(y\) to \(x\), with the same covariate adjustment applied to the phenotype and genotypes when covariates are included.

Under the null hypothesis of no phenotype association with the weighted predictor, a score statistic uses \(U=w^\mathsf{T}G^\mathsf{T}y\). If the residual variance is \(\sigma^2\), its null variance is \(\sigma^2w^\mathsf{T}G^\mathsf{T}Gw\), conditional on the genotype matrix. The resulting standardized statistic is approximately normal in a sufficiently large sample under the usual linear-model conditions: independent individuals, a correctly specified mean model, finite residual variance, and no unaccounted dependence that invalidates the variance calculation. With covariates, these expressions apply to residualized variables and the corresponding residualized genotype cross-product matrix.

$$ Z_{\mathrm{TWAS}} = \frac{w^\mathsf{T}G^\mathsf{T}y} {\widehat{\sigma}\sqrt{w^\mathsf{T}G^\mathsf{T}Gw}} $$

The crucial feature is the quadratic form in the denominator. It includes every pairwise genotype correlation, not just the individual variant variances. Individual-level data provide those correlations from the study genotypes themselves. The analyst does not need an external LD panel to compute this test's genotype covariance, although quality control, ancestry structure, relatedness and covariate adjustment still matter.

Worked Example: Individual-Level Score From Genotype Cross-Products

Consider a hypothetical study with two standardized genotype columns and \(n=100\) unrelated individuals. After centering and covariate adjustment, suppose \(G^\mathsf{T}G=100R\), where the genotype correlation is \(0.60\). The prediction weights are \(w=(1,0.5)^\mathsf{T}\). For the observed phenotype residuals, suppose the standardized SNP score components are \(G^\mathsf{T}y/(\widehat{\sigma}\sqrt{n})=(2,1)^\mathsf{T}\). These are stipulated summary cross-products from the individual records, not claims about a real study.

The weighted numerator on this standardized scale is \(w^\mathsf{T}(2,1)^\mathsf{T}=1(2)+0.5(1)=2.5\). The variance factor is \(w^\mathsf{T}Rw=1^2+0.5^2+2(1)(0.5)(0.60)=1+0.25+0.60=1.85\). Thus \(Z_{\mathrm{TWAS}}=2.5/\sqrt{1.85}=2.5/1.360=1.838\), approximately. Under the stated large-sample null approximation, the two-sided \(p\)-value is about \(0.066\). This calculation does not provide strong evidence against the null at a conventional 0.05 level; it does not show that the null is true.

Here the study's own genotype cross-products supply the \(0.60\) correlation. If the covariates were not handled consistently between phenotype and genotype, or the observations were dependent but treated as independent, this calculation could be miscalibrated.

Summary Statistics and the Role of Reference LD

A summary-statistic analysis replaces individual cross-products with SNP-level association statistics. Let \(z=(z_1,\ldots,z_m)^\mathsf{T}\) be GWAS \(z\)-statistics for the variants in the gene's prediction model. If the variants are standardized, the sample is the same across variants, the null model and covariate adjustment are compatible, and the GWAS is sufficiently large, then under the null the covariance matrix of \(z\) is approximately the genotype correlation matrix \(R\). Consequently, the variance of \(w^\mathsf{T}z\) is approximately \(w^\mathsf{T}Rw\), giving

$$ Z_{\mathrm{TWAS}} \approx \frac{w^\mathsf{T}z}{\sqrt{w^\mathsf{T}Rw}} $$

The numerator combines the SNP signals according to the expression weights. The denominator corrects for the fact that correlated variants do not contribute independent evidence. In practice, \(R\) is often estimated from a reference panel whose participants are intended to represent the GWAS ancestry and variant set. A reference panel is therefore not merely a convenience: it supplies information needed for the null variance when joint study genotypes are unavailable.

If GWAS results provide effect estimates \(\widehat{\beta}_j\) and standard errors \(SE_j\) rather than \(z\)-statistics, one can form \(z_j=\widehat{\beta}_j/SE_j\), subject to consistent allele orientation and compatible testing conventions. In a more general formulation, the weighted estimate is \(w^\mathsf{T}\widehat{\beta}\) and its variance is \(w^\mathsf{T}\widehat{\Sigma}w\), where \(\widehat{\Sigma}\) is the covariance matrix of the SNP effect estimates. Using a reference LD matrix to approximate this covariance requires assumptions about sample overlap, sample sizes, allele frequencies and scaling; the simple \(R\)-based formula is not universally exact.

Worked Example: Summary-Statistic TWAS With a Reference Panel

Suppose a hypothetical GWAS reports \(z=(2,1)^\mathsf{T}\) for two harmonized variants, and the expression weights are \(w=(1,0.5)^\mathsf{T}\). A suitable hypothetical reference panel estimates their LD correlation as \(0.60\). Assume the SNP tests use a common sample and the standardized, large-sample approximation is reasonable.

The numerator is \(w^\mathsf{T}z=1(2)+0.5(1)=2.5\). The reference-panel variance estimate is \(w^\mathsf{T}Rw=1^2+0.5^2+2(1)(0.5)(0.60)=1.85\). Therefore, \(Z_{\mathrm{TWAS}}\approx2.5/\sqrt{1.85}=1.838\), giving a two-sided normal-approximation \(p\)-value of about \(0.066\). The interpretation is evidence insufficient to reject the no-association null at \(\alpha=0.05\) under these assumptions, not a probability that the null is correct.

The result matches the individual-level calculation when both routes use the same standardized inputs and compatible covariance structure. In applied work, small differences can arise from sample size variation across SNPs, imputation, covariate handling, or the fact that the panel only estimates the GWAS genotype correlation.

Justification of the LD denominator: Under the null approximation, \(\operatorname{Var}(z)\approx R\). For any fixed weight vector \(w\), \(\operatorname{Var}(w^\mathsf{T}z)=w^\mathsf{T}\operatorname{Var}(z)w\approx w^\mathsf{T}Rw\). Standardizing the weighted numerator by the square root of this variance accounts for covariance among the SNP tests. If \(R\) is replaced by the identity matrix when variants are correlated, the variance is generally wrong.

What Each Data Route Requires

ComponentIndividual-level routeSummary-statistic route
Phenotype association inputPhenotype and covariates for the study individualsSNP-level GWAS effects or \(z\)-statistics, with standard errors or other needed scaling information
Genotype informationGenotypes for the same individuals as the phenotype; these provide study-specific LDVariant-level association results plus an LD matrix, often estimated from a reference panel
Expression predictionPrediction weights and matching genotype variants; expression data are needed to train weights if not already availableThe same kind of prediction weights and variant correspondence
Key vulnerabilitySample structure, phenotype-genotype alignment and model or variance misspecificationAllele harmonization, missing variants, incompatible scales, and LD-reference mismatch

The individual-level route is often preferable when the necessary data can be accessed and analyzed under appropriate privacy and governance protections: its LD is measured in the association sample, and covariate handling can be coordinated directly. Summary statistics enable analysis across data that cannot be shared at the individual level, but require enough information to reconstruct the weighted variance. A reference panel cannot fix incompatible SNP definitions or recover the exact study LD if the panel differs materially from the GWAS population.

Diagnostics and Failure Modes

Before interpreting a result, check that the weights and GWAS statistics refer to the same variants, genome build and allele coding. A sign flip in a SNP's allele coding requires the corresponding association statistic and weight convention to be harmonized; otherwise the weighted numerator can change incorrectly. Palindromic variants with ambiguous allele orientation, variants absent from the GWAS or panel, and inconsistent imputation quality can also disrupt the calculation.

For a summary analysis, inspect whether the LD matrix is symmetric, has plausible diagonal entries near one for standardized variants, and is positive semidefinite up to numerical tolerance. Compare reference-panel ancestry with the GWAS ancestry and consider whether the analysis variants are represented similarly. A substantial discrepancy between panel and study ancestry can alter correlations and hence the estimated variance. Very small or negative numerical values of \(w^\mathsf{T}Rw\) are warning signs of an invalid or poorly conditioned matrix, variant mismatch, or numerical instability; they are not valid grounds for reporting an ordinary standardized test without investigation.

Worked Example: Effect of an LD-Panel Mismatch

Take hypothetical weights \(w=(1,-1)^\mathsf{T}\) and observed GWAS statistics \(z=(2,-2)^\mathsf{T}\). Suppose the relevant study LD correlation is \(0.80\), but an unsuitable reference panel estimates \(0.20\). For two standardized variants, \(R\) has ones on the diagonal and the correlation off-diagonal.

The weighted numerator is \(w^\mathsf{T}z=1(2)+(-1)(-2)=4\). With the study correlation, the variance factor is \(w^\mathsf{T}Rw=1+1+2(1)(-1)(0.80)=2-1.60=0.40\), so the statistic would be \(4/\sqrt{0.40}=6.325\). With the mismatched reference correlation, the factor is \(1+1+2(1)(-1)(0.20)=2-0.40=1.60\), giving \(4/\sqrt{1.60}=3.162\).

The numerator is unchanged, but the estimated standard error of the weighted signal is not. These calculations illustrate the consequences of the two covariance assumptions; they do not make the observed \(z\)-vector or either panel real data. A large change in the TWAS statistic under plausible LD choices is a calibration warning and should prompt checking ancestry and variant matching rather than selecting the more favorable result.

Choosing and Interpreting the Route

Individual-level and summary-statistic approaches are alternatives for obtaining the association and its uncertainty, not different definitions of expression weights. Individual data avoid reliance on an external LD estimate for this calculation, but may be unavailable and still require careful modeling of relatedness, population structure and covariates. Summary methods are scalable and useful when only association summaries can be accessed, but their validity depends on a defensible covariance approximation and faithful harmonization.

Neither method can guarantee that the expression weights transfer to the GWAS population or that the predicted-expression association reflects a single causal mechanism. Those questions require additional evaluation. For this comparison, the central practical decision is whether the joint individual data are available and suitable, or whether summary statistics plus a matched LD reference can support a credible variance calculation.

  • Do not omit LD in summary-statistic TWAS. The weighted SNP tests are correlated when their genotypes are correlated.
  • Do not treat a reference panel as interchangeable with the GWAS sample. Ancestry and variant composition affect estimated correlations.
  • Do not infer causality from a significant weighted association. The statistic is an association test with genetically predicted expression.
  • Do not regard a failed or unstable calculation as a null result. Missing variants, nonpositive variance estimates or allele errors require diagnosis first.

Check Your Understanding

Answer each question, then compare your reasoning with the solutions.

  1. What additional information is typically needed to estimate the summary-statistic TWAS variance when only SNP-level GWAS statistics and weights are available?
  2. For \(w=(1,0.5)^\mathsf{T}\) and an LD correlation of \(0.40\), calculate \(w^\mathsf{T}Rw\) for standardized variants.
  3. Why can individual-level genotypes reduce reliance on an external LD panel, and what important assumptions remain?
  4. A reference panel has a substantially different ancestry composition from the GWAS. Name the part of the summary-statistic calculation most directly threatened and explain why.

Solutions. (1) An estimate of the covariance among SNP association statistics is needed, commonly obtained from a matched LD reference panel together with compatible GWAS scaling. (2) \(1^2+0.5^2+2(1)(0.5)(0.40)=1+0.25+0.40=1.65\). (3) The study genotype cross-products directly estimate the association-sample genotype correlations used in the variance. Correct phenotype-genotype pairing, covariate adjustment, adequate handling of population structure and dependence, and a suitable model are still required. (4) The estimate of \(R\), and therefore \(w^\mathsf{T}Rw\), is threatened because genotype correlations can differ across ancestry groups; the resulting standard error and test calibration may be wrong.

Clinical Biostats