Tutorials › High-Dimensional Genomic Data Analysis › Allele Dosage Coding

Single-Variant GWAS · Tutorial 214 of 795

Allele Dosage Coding

Understand how allele dosage is calculated from genotype calls or probabilities, and what effect a regression coefficient represents for each additional coded allele.

Intermediate 9 min read

What You'll Learn

  • Map diploid biallelic genotype calls to counts of a chosen allele.
  • Calculate expected allele dosage from genotype probabilities.
  • Distinguish a fractional dosage from a fractional or certain genotype.
  • Explain how dosage sets the scale and direction of a per-allele regression test.
  • Recognize coding, ploidy, and genotype-uncertainty issues that can affect a scan.

From Genotype to Allele Count

In a single-variant association scan, each person needs a numerical value representing their genotype at the variant being tested. For a diploid, biallelic variant, one direct choice is to count how many copies of a designated allele that person carries. This coding turns the three possible genotypes into the values 0, 1, and 2. It is useful because a regression can then assess a change in the trait associated with a one-copy increase in the coded allele.

The count is a coding convention, not a statement that the genotype itself is quantitative in every possible sense. In particular, using one numerical predictor imposes a specific pattern on the genotype effects: the model’s predicted change from zero to one copy is the same as its predicted change from one to two copies. Dosage coding therefore defines the per-allele contrast being tested; it does not, by itself, establish that this pattern describes the biology.

Definition: For a diploid, biallelic variant, the allele count for a chosen allele is the number of copies of that allele in an individual’s two chromosome copies. Its possible values are 0, 1, and 2. The allele dosage is the count when the genotype is treated as known, or the expected count when genotype is uncertain. A dosage is between 0 and 2 and may be fractional.

For example, suppose the two alleles at a variant are A and G, and the allele being counted is G. The genotype AA has dosage 0, AG has dosage 1, and GG has dosage 2. The same procedure works whichever of the two alleles is chosen for counting. Which allele is coded, and how that choice affects the reported effect, are important details to keep explicit.

The definition above assumes that each individual has two copies of the locus. This is appropriate for an ordinary autosomal variant in a diploid sample. It should not be applied automatically to loci with different copy number or ploidy, such as some sex-chromosome settings. It also assumes a biallelic variant: with more than two alleles, one must specify which allele or alleles are being represented before interpreting a single count.

Hard Calls and Expected Dosage

A hard genotype call assigns one genotype to each person. If calls are reliable, the dosage is simply the corresponding count, 0, 1, or 2. In genomic data, however, the observed information may not determine one genotype with certainty. For example, genotype inference or imputation may provide probabilities for each of the three possible genotypes. In that case, dosage summarizes those probabilities as an expected allele count.

Definition: Let \(P_0\), \(P_1\), and \(P_2\) be the probabilities of having 0, 1, or 2 copies of the coded allele, respectively, given the available genotype information. If \(P_0+P_1+P_2=1\), the allele dosage is $$ d = 0P_0 + 1P_1 + 2P_2 = P_1 + 2P_2. $$

The formula is the expectation of the allele count under the genotype probabilities. It weights each possible count by the probability of that count. Thus dosage 1.3 means the expected count is 1.3 copies given the available genotype information; it does not mean that the person has 1.3 physical copies of an allele.

Worked Example: Coding Hard Genotype Calls

Suppose six hypothetical individuals have the following calls at a diploid biallelic variant. The coded allele is G.

IndividualGenotypeG dosage
1AA0
2AG1
3GG2
4AG1
5AA0
6AG1

The dosage vector is \(0,1,2,1,0,1\). Its sum is \(0+1+2+1+0+1=5\) G copies among \(2(6)=12\) total allele copies. The observed G frequency in these six individuals is therefore \(5/12=0.4167\). This calculation describes the sample’s allele count; it is not an association test.

Worked Example: Calculating Dosage From Genotype Probabilities

For three hypothetical individuals, suppose genotype probabilities for 0, 1, and 2 copies of the coded allele are as follows. Each row sums to 1.

Individual\(P_0\)\(P_1\)\(P_2\)Dosage calculation
A0.100.700.20\(0.70+2(0.20)=1.10\)
B0.600.300.10\(0.30+2(0.10)=0.50\)
C0.050.250.70\(0.25+2(0.70)=1.65\)

The dosage sum is \(1.10+0.50+1.65=3.25\), so the average dosage is \(3.25/3=1.083\) copies per individual. Individual A’s dosage of 1.10 is an expectation over uncertain genotypes, not a hard call of 1.10. Individual C has the largest expected count because the probability of two copies is high.

What the Coding Means in a Regression Scan

In a per-variant regression scan, the dosage is the predictor for that variant. For a quantitative trait, the fitted slope associated with dosage describes the modeled change in the trait for a one-unit increase in dosage, measured in trait units per coded-allele copy. The corresponding test evaluates whether that per-copy slope is zero, conditional on whatever other predictors the regression includes. The full regression model and its estimation are treated in detail in the earlier material on per-variant regression scans and subsequent material on linear regression.

With dosages 0, 1, and 2, a single slope represents the same modeled increment for each extra copy. In terms of predicted trait values, the model assigns a difference of one slope unit between dosage 0 and 1, and the same difference between dosage 1 and 2. This is the additive, or per-allele, coding contrast. A regression using this one predictor does not separately estimate three unrestricted genotype means.

Worked Example: Reading a Per-Copy Slope

In a hypothetical quantitative-trait scan, suppose a fitted regression using dosage of a coded allele estimates a slope of \(0.75\) trait units per copy. The intercept and any other covariates are held fixed when describing this slope.

For an individual with dosage 0, the dosage contribution to the fitted value is \(0.75(0)=0\). At dosage 1, it is \(0.75(1)=0.75\) trait units; at dosage 2, it is \(0.75(2)=1.50\) trait units. Thus the model’s fitted difference between dosage 0 and dosage 1 is 0.75 units, and the fitted difference between dosage 1 and dosage 2 is also 0.75 units.

The estimate is an association on the scale of one additional coded-allele copy, not a claim that changing a person’s genotype would cause the trait to change. Its interpretation also depends on which allele was coded. If the trait is measured in millimeters, for example, the slope would be 0.75 millimeters per copy.

Why Allele Choice Changes the Sign

For a diploid biallelic variant, the two allele counts sum to 2 for every individual. If one coding is \(d\), the count for the other allele is \(d^*=2-d\). This is a change in the direction of the numerical scale: individuals with more copies under one coding have fewer under the other. In a regression with an intercept, changing from \(d\) to \(d^*\) reverses the sign of the slope but leaves the fitted values and the two-sided test of a zero slope unchanged.

Justification: If the fitted relationship is \(Y=\beta_0+\beta d\), then \(d=2-d^*\), so $$ Y=\beta_0+\beta(2-d^*)=(\beta_0+2\beta)-\beta d^*. $$ The intercept becomes \(\beta_0+2\beta\), and the slope becomes \(-\beta\). The fitted values do not change. Because the slope’s standard error is unchanged by multiplying the predictor direction by \(-1\), the absolute test statistic and the two-sided p-value for testing a zero slope are unchanged; the signed estimate changes direction.

Worked Example: Reversing the Dosage Coding

Suppose a hypothetical scan uses G dosage \(d\) and estimates a slope of \(0.75\) trait units per G copy, with fitted intercept 10. The alternative allele count is \(d^*=2-d\). Substitution gives

$$ 10+0.75d = 10+0.75(2-d^*) = 11.5-0.75d^*. $$

Under the alternative coding, the intercept is 11.5 and the slope is \(-0.75\) trait units per copy of the other allele. For example, a person with G dosage 0 has \(d^*=2\), and the fitted contribution is \(11.5-0.75(2)=10\), the same fitted value as before. The sign reversal reflects the coding direction, not a change in the underlying fitted association.

Assumptions, Diagnostics, and Alternatives

Dosage coding is straightforward, but its use should be checked against the data and the intended test. At minimum, verify that the genotype representation is for the intended locus and coded allele, that genotype probabilities are valid and sum to 1 when probabilities are used, and that the dosage scale matches the locus’s ploidy. A coding error can produce a numerically valid regression with the wrong interpretation.

When dosage probabilities are used, the regression receives an expected count, not a known genotype. The quality of that expectation matters: poorly calibrated or highly uncertain genotype information can weaken or distort the association signal. Useful checks include inspecting dosage distributions, genotype probability or imputation quality summaries, missingness, and the number of individuals near each dosage range. A dosage distribution with many values near 0 and 2 may differ substantially in information from one concentrated near 1, even if their means are similar.

The one-slope coding also assumes a linear per-copy pattern for the genotype contribution to the fitted trait. If the actual genotype pattern is not approximately equally spaced across counts 0, 1, and 2, a single per-allele slope may not capture it. Alternative approaches use separate indicators for genotype categories or use dominant or recessive contrasts. Those methods ask different questions and may use more parameters; they are not interchangeable with the one-degree-of-freedom per-allele test.

ApproachGenotype representationQuestion represented
Allele dosageOne count from 0 to 2Is there a linear per-copy association?
Genotype indicatorsSeparate indicators for genotype categoriesDo genotype groups differ without requiring equal per-copy increments?
Dominant or recessive codingA binary grouping of genotype categoriesDoes a specified carrier or homozygote grouping differ?

A common mistake is to interpret every dosage of 1 as a certain heterozygous genotype. That is correct for a hard call, but not necessarily for an expected dosage. For example, probabilities \(P_0=0.50\), \(P_1=0\), and \(P_2=0.50\) give dosage \(0(0.50)+1(0)+2(0.50)=1\), even though the genotype is certainly not heterozygous under those probabilities. Dosage summarizes the expected count, not the full genotype uncertainty.

Another mistake is to read a positive slope as an effect of “the variant” without naming the coded allele. The sign is tied to the allele-count direction: reversing the allele count reverses the slope. Report the allele whose copies are counted, the dosage scale, and the trait units per copy so the estimate can be interpreted and compared correctly.

Key takeaway: Allele dosage is a count from 0 to 2 when a diploid genotype is known, and an expected count when genotype is uncertain. Putting that dosage into a one-predictor regression defines a per-copy contrast; the chosen allele sets its direction, and the single-slope coding imposes equal modeled increments across the two dosage steps.

Check Your Understanding

Answer each question, then compare with the solutions below.

  1. For a diploid biallelic variant, what dosages correspond to 0, 1, and 2 copies of the coded allele?
  2. A person has genotype probabilities \(P_0=0.20\), \(P_1=0.50\), and \(P_2=0.30\). Calculate the dosage.
  3. A per-allele regression slope is \(-0.40\) trait units per copy. What does the sign indicate, and what happens to it if the other allele is coded instead?
  4. Why does dosage 1 not always establish that an individual is heterozygous?
  5. What genotype-effect pattern does a regression with one dosage slope impose?

Solutions. (1) The dosages are 0, 1, and 2, respectively. (2) \(d=P_1+2P_2=0.50+2(0.30)=1.10\) copies. (3) The fitted trait value decreases by 0.40 units for each additional copy of the coded allele, conditional on the other regression predictors. Coding the other allele changes the slope to \(+0.40\), with the same fitted values under the corresponding recoding. (4) A dosage is an expected count when probabilities represent uncertainty; different genotype-probability distributions can have the same expected count. (5) It imposes equal modeled increments from 0 to 1 copy and from 1 to 2 copies.

Clinical Biostats