Tutorials › Statistical Genetics › A Worked Clumping-and-Thresholding Calculation

Polygenic Score Construction · Tutorial 704 of 989

A Worked Clumping-and-Thresholding Calculation

Learn how variant selection, allele alignment, and weighted summation combine to produce interpretable polygenic scores.

Intermediate 10 min read

What You'll Learn

  • Apply a stated LD window and \(r^2\) cutoff to choose clumping index variants.
  • Distinguish variants removed by clumping from variants excluded by a p-value threshold.
  • Convert genotype dosages to the effect-allele scale used by GWAS weights.
  • Calculate individual polygenic scores from aligned dosages and summary-statistic weights.
  • Interpret score units and recognize how allele recoding changes a score’s baseline.

From Summary Statistics to Individual Scores

A clumping-and-thresholding score combines two kinds of information. GWAS summary statistics provide estimated effects and p-values for variants; genotype data provide each person’s allele dosages. Clumping uses linkage disequilibrium (LD) to reduce redundancy among nearby variants, and thresholding selects variants according to their p-values. The final score is a weighted sum of the selected, correctly aligned dosages.

A calculation is only reproducible if its choices are explicit. We will state the LD reference, physical window, LD cutoff, and p-value threshold, then keep track of which variants are removed at each stage. The values below are entirely hypothetical.

Definition: For individual \(i\) and variant \(j\), let \(g_{ij}\) be the dosage of the variant’s effect allele, on a scale from 0 to 2 for a diploid genotype. Let \(\hat{\beta}_j\) be the GWAS effect estimate per additional copy of that same effect allele. For a selected variant set \(J\), the polygenic score is \(S_i=\sum_{j\in J}g_{ij}\hat{\beta}_j\). Allele alignment means expressing the genotype dosage and its weight for the same allele.

The genotype dosage may be an expected allele count, so it need not be an integer. For example, a dosage of 1.6 represents an estimated 1.6 copies of the specified allele. If the GWAS weight is expressed in phenotype units per additional effect allele, the resulting score is in those phenotype units. It is the weighted genetic component, not necessarily a complete predicted outcome: an intercept, covariates, or other model terms are not included unless explicitly added.

Hypothetical Variant Data and Clumping Rules

Suppose six variants have the following summary statistics. The effect allele (EA) is the allele for which the reported \(\hat{\beta}\) is defined. Positions are in base pairs. The LD values shown are pairwise \(r^2\) estimates from a hypothetical reference panel; pairs not listed are assumed not to meet the stated clumping criterion.

VariantChromosome and positionEA / other allele\(\hat{\beta}\)p-valueRelevant pairwise \(r^2\)
rsA1:1,000,000A / G0.200.0010.72 with rsB
rsB1:1,040,000C / T0.120.0100.72 with rsA
rsC1:1,300,000G / A-0.080.0300.64 with rsD
rsD1:1,330,000T / C0.150.2000.64 with rsC
rsE2:2,000,000C / G0.100.0040.81 with rsF
rsF2:2,060,000A / C0.060.0200.81 with rsE

For this calculation, use a 250,000-base-pair window and define a pair as being in sufficiently strong LD when \(r^2>0.50\). Sort variants by increasing p-value. In each region, the first variant not already assigned to a more significant index variant becomes an index variant; other variants in its window that exceed the LD cutoff are assigned to it. After clumping, retain index variants with p-values at or below 0.05. These are specified rules for the worked calculation; implementations can differ in details, so the rules must be reported with a score.

Worked Example: Choosing Index Variants and Applying the Threshold

Apply the stated clumping rules to the six variants, then use the p-value threshold \(p\leq0.05\).

Order by p-value. The order is rsA (0.001), rsE (0.004), rsB (0.010), rsF (0.020), rsC (0.030), and rsD (0.200).

Clump rsA and rsB. rsA is first and becomes an index variant. rsB is 40,000 base pairs away, which is within the 250,000-base-pair window, and their \(r^2=0.72\) exceeds 0.50. Therefore rsB is assigned to rsA and is not a separate index variant.

Clump rsE and rsF. rsE is the most significant variant at its listed chromosome 2 region, so it becomes an index variant. rsF is 60,000 base pairs away and has \(r^2=0.81\) with rsE. It is assigned to rsE.

Clump rsC and rsD. Neither rsC nor rsD has been assigned to an earlier index variant. rsC has the smaller p-value, so it becomes an index variant. rsD is 30,000 base pairs away and has \(r^2=0.64\) with rsC; it is assigned to rsC. rsC is 300,000 base pairs from rsA, outside the stated window, so this pair does not trigger clumping under these rules.

The index variants are rsA, rsE, and rsC. Each has \(p\leq0.05\), so all three pass the threshold. The retained set is \(J=\{\text{rsA},\text{rsE},\text{rsC}\}\). rsB, rsF, and rsD are removed because they are clumped with a more significant index variant, not because their p-values fail the threshold. A stricter threshold of 0.01 would retain rsA and rsE but exclude rsC, whose p-value is 0.030.

This separation between clumping and thresholding matters. A variant can have a p-value below the threshold and still be omitted because a more significant nearby index variant represents its LD region. Conversely, an index variant can be removed by a stricter p-value threshold even though it was selected during clumping.

Aligning Effect Alleles and Genotype Dosages

The weight and dosage for each retained variant must refer to the same allele. Suppose a genotype file reports dosage for the allele other than the GWAS effect allele. For a diploid genotype with two alleles at that variant, the effect-allele dosage is two minus the other-allele dosage. This conversion assumes that the two alleles and variant identity have been matched correctly and that the reported dosages use the same variant representation.

Key rule: Multiply \(\hat{\beta}_j\) by dosage of the allele to which \(\hat{\beta}_j\) refers. If a weight is per additional A allele, a dosage of G cannot be multiplied by that weight as though it were an A dosage; convert or otherwise harmonize the alleles first.

Worked Example: Converting a Dosage to the Effect Allele

For rsA, the GWAS effect allele is A and the other allele is G. A target genotype file reports a G dosage of 0.4 for one individual. Find the dosage to pair with the rsA weight.

The two alleles at a diploid genotype sum to two copies, so the A dosage is \(2-0.4=1.6\). The correctly aligned pair is therefore \(g_{\text{rsA}}=1.6\) and \(\hat{\beta}_{\text{rsA}}=0.20\). Its contribution to this individual’s score is

$$ 1.6(0.20)=0.32. $$

The contribution is 0.32 phenotype units on the scale of the GWAS weight. Multiplying the reported G dosage, 0.4, by 0.20 would instead give 0.08 and would use a dosage for the wrong allele. If allele identity or strand orientation is uncertain, the alleles must be resolved before scoring; a numerical dosage conversion cannot repair an incorrect variant match.

Calculating Scores for Several Individuals

For the retained set rsA, rsE, and rsC, the weights are 0.20, 0.10, and -0.08. The negative rsC weight means that, according to the GWAS estimate, each additional copy of the rsC effect allele is associated with a decrease of 0.08 units in the modeled outcome, holding the score’s additive construction fixed. It is not a statement of causation.

Suppose the genotype file provides the following dosages. For rsA and rsE, it reports the other allele’s dosage, so those columns must be complemented to obtain effect-allele dosages. For rsC, the file already reports dosage of the effect allele G.

IndividualrsA: G dosage reportedrsE: G dosage reportedrsC: G effect-allele dosage reported
Iris0.41.21.5
Noah1.60.21.0
Mina0.00.80.2

Worked Example: Computing Three Polygenic Scores

Convert the reported dosages where needed, then calculate \(S_i=\sum_{j\in J}g_{ij}\hat{\beta}_j\) for each individual using the three retained variants.

Iris. At rsA, the effect allele is A, so its dosage is \(2-0.4=1.6\). At rsE, the effect allele is C, so its dosage is \(2-1.2=0.8\). At rsC, the reported G dosage is already aligned. Thus

$$ S_{\text{Iris}}=(1.6)(0.20)+(0.8)(0.10)+(1.5)(-0.08) =0.32+0.08-0.12=0.28. $$

Noah. The aligned dosages are \(2-1.6=0.4\) for rsA, \(2-0.2=1.8\) for rsE, and 1.0 for rsC. Therefore

$$ S_{\text{Noah}}=(0.4)(0.20)+(1.8)(0.10)+(1.0)(-0.08) =0.08+0.18-0.08=0.18. $$

Mina. The aligned dosages are \(2-0.0=2.0\) for rsA, \(2-0.8=1.2\) for rsE, and 0.2 for rsC. Therefore

$$ S_{\text{Mina}}=(2.0)(0.20)+(1.2)(0.10)+(0.2)(-0.08) =0.40+0.12-0.016=0.504. $$

With the same three weights and alignment convention, Mina has the largest calculated score, followed by Iris and then Noah. This ordering describes these computed weighted sums; it is not by itself evidence that the score predicts outcomes well in a new population. That requires an appropriate evaluation separate from the arithmetic of score construction.

Why Allele Coding Changes the Score Baseline

A useful check is to ask what happens if a variant is recoded from one allele to the other. Correct recoding reverses both the effect estimate and the dosage. It does not leave an uncentered raw score numerically unchanged, although it preserves comparisons between individuals at that variant when all have diploid dosages.

Derivation: Let \(g\) be the dosage of the original effect allele and \(\hat{\beta}\) its weight. The other allele has dosage \(2-g\), and its consistently recoded weight is \(-\hat{\beta}\). The recoded contribution is \((2-g)(-\hat{\beta})=g\hat{\beta}-2\hat{\beta}\). Thus recoding shifts every individual’s contribution by the same constant, \(-2\hat{\beta}\), rather than preserving its absolute value.

Because that shift is constant across individuals at the variant, it does not change their score differences contributed by that variant. But mixing an effect-allele weight with a dosage that was not aligned is not this valid recoding: it can reverse or distort individual contributions. Keep the selected alleles and their aligned dosages explicit so the score’s definition and baseline are clear.

Common Mistakes and Practical Checks

  • Confusing clumped variants with threshold failures. rsB, rsF, and rsD pass the stated p-value threshold but are excluded because they are assigned to more significant index variants. Record the reason each variant is omitted.
  • Using a dosage for the wrong allele. A weight for A must be multiplied by A dosage, not G dosage. Confirm whether genotype data report the effect allele or its complement.
  • Ignoring the LD reference and settings. Clumping depends on estimated LD, the reference panel, window, and \(r^2\) cutoff. Changing these choices can change the retained set and therefore the scores.
  • Treating a raw score as a full outcome prediction. The weighted sum contains only the selected genetic contributions under the stated construction. It does not automatically include an intercept, covariates, or a calibration step.
  • Comparing scores built under different conventions as if they shared a baseline. Allele recoding can shift an uncentered score by a constant. Report the score construction and allele convention, not only the numerical values.
Key takeaway: A worked clumping-and-thresholding calculation has three auditable stages: select index variants using declared LD rules, retain those meeting the declared p-value cutoff, and sum weights times dosages that are aligned to the corresponding effect alleles. Errors in any stage change the resulting score.

Check Your Understanding

Answer using the stated rules and distinguish variant selection from score calculation.

  1. If two variants are within the LD window and have \(r^2=0.60\), do they meet a clumping rule defined by \(r^2>0.50\)?
  2. A variant has p-value 0.02 but is assigned to a more significant index variant. Is it retained as a separate index variant under the worked rules? Explain.
  3. A GWAS weight is for allele T, while the genotype file reports dosage of C. What conversion gives the T dosage for a diploid genotype?
  4. For a weight of -0.05 and an aligned dosage of 1.4, calculate the variant’s score contribution and state its units in relation to the weight.
  5. Why can consistently switching an effect allele and its weight shift raw scores without changing the between-person differences contributed by that variant?
Clinical Biostats