Why Genotype Coding Matters
Before relating genetic variation to a trait, the genotype has to be represented in a form that can be stored and analyzed. At a biallelic locus in a diploid organism, there are three possible genotypes. A dosage gives each genotype a number by counting copies of a specified allele; genotype indicators instead record which genotype is present. These are two different ways to describe the same observed genotype.
The distinction matters because the number in a data table is not self-explanatory. A value of 1 could mean one copy of a chosen allele, or it could be an indicator that a particular genotype is present. It does not, by itself, describe a trait value or establish a biological effect. The meaning follows from the coding definition.
Allele-Count Dosage
Let the two alleles at a locus be \(A\) and \(a\), and choose \(A\) as the allele to count. An individual carries two allele copies at this diploid locus. The allele-count dosage is the number of those two copies that are \(A\). The genotype \(aa\) therefore has no copies of \(A\), \(Aa\) has one, and \(AA\) has two.
| Genotype | Copies of \(A\) | Dosage for \(A\) | Copies of \(a\) |
|---|---|---|---|
| \(aa\) | 0 | 0 | 2 |
| \(Aa\) | 1 | 1 | 1 |
| \(AA\) | 2 | 2 | 0 |
The order of the alleles in a heterozygote does not change its dosage: \(Aa\) and \(aA\) both contain one copy of \(A\). Dosage is a count of copies, not a label for which parental chromosome carried an allele. For this single-locus representation, no phase information is needed.
Worked Example: Converting Genotypes to Dosages
Suppose five hypothetical individuals have genotypes \(aa\), \(Aa\), \(AA\), \(Aa\), and \(aa\). Record the dosage for allele \(A\) for each individual.
Apply the definition separately to each genotype. The first individual has \(aa\), so the count of \(A\) copies is 0. The second has \(Aa\), so the count is 1. The third has \(AA\), so the count is 2. The fourth has \(Aa\), giving 1, and the fifth has \(aa\), giving 0.
The resulting sequence records the number of \(A\) copies in each person's genotype. It does not record a measured trait, and the values are not probabilities. If the chosen allele were \(a\) instead, the same genotypes would be coded \(2,1,0,1,2\).
Genotype Indicator Coding
A different representation uses an indicator for each genotype. An indicator equals 1 when the individual has the named genotype and 0 otherwise. For the three possible genotypes, define one indicator for \(aa\), one for \(Aa\), and one for \(AA\). These variables preserve the genotype categories explicitly rather than counting copies of one selected allele.
An indicator value of 1 means membership in the named genotype group, not one copy of an allele. For instance, the value \(I_{AA}=1\) identifies an \(AA\) genotype, which has two copies of \(A\); it is not an allele-count dosage of 1. Each indicator column answers a separate yes-or-no question about genotype membership.
Worked Example: Making Genotype Indicator Columns
For the same five hypothetical genotypes \(aa\), \(Aa\), \(AA\), \(Aa\), and \(aa\), create all three genotype indicators for each individual.
| Individual | Genotype | \(I_{aa}\) | \(I_{Aa}\) | \(I_{AA}\) |
|---|---|---|---|---|
| 1 | \(aa\) | 1 | 0 | 0 |
| 2 | \(Aa\) | 0 | 1 | 0 |
| 3 | \(AA\) | 0 | 0 | 1 |
| 4 | \(Aa\) | 0 | 1 | 0 |
| 5 | \(aa\) | 1 | 0 | 0 |
For individual 4, the genotype is \(Aa\), so \(I_{Aa}=1\) and the two other indicators equal 0. Each row sums to 1: for example, individual 3 has \(0+0+1=1\). That row sum reflects the fact that this individual belongs to exactly one of the three genotype categories.
How the Two Representations Relate
When the three indicators are available, the dosage for \(A\) can be recovered by assigning 0 copies to \(aa\), 1 copy to \(Aa\), and 2 copies to \(AA\), then adding the corresponding indicator contributions. This is an exact identity for every known genotype; it does not require Hardy–Weinberg equilibrium, a random sample, or any assumption about a trait.
To verify the identity, consider each possible genotype. If the genotype is \(aa\), the indicators are \((1,0,0)\), so the expression gives \(0(1)+1(0)+2(0)=0\). If it is \(Aa\), the indicators are \((0,1,0)\), giving \(0(0)+1(1)+2(0)=1\). If it is \(AA\), they are \((0,0,1)\), giving \(0(0)+1(0)+2(1)=2\). These are precisely the three allele-count dosages.
The reverse mapping is also unambiguous for these three integer dosages: dosage 0 identifies \(aa\), dosage 1 identifies \(Aa\), and dosage 2 identifies \(AA\). This works because the setting is a single diploid biallelic locus with a known genotype. A dosage alone need not identify a genotype in other settings, such as when it is a non-integer expected copy count.
Worked Example: Checking the Dosage From Indicators
A hypothetical individual has indicator values \(I_{aa}=0\), \(I_{Aa}=1\), and \(I_{AA}=0\). Find the dosage for allele \(A\), then check it against the genotype.
Substitute the indicator values into the identity:
The indicator pattern identifies genotype \(Aa\). That genotype contains one copy of \(A\), so its directly counted dosage is also 1. The agreement is required by the coding definitions; it is not an empirical relationship estimated from data.
Reading Dosage Across a Sample
For several individuals, each dosage is an individual-level count. Adding the dosages across individuals gives the total number of copies of the counted allele among those individuals, provided each has a known genotype at the locus. The mean dosage is that copy count divided by the number of individuals. This arithmetic summarizes the coded genotypes; it does not assert that individuals with larger dosage have a higher trait value.
Worked Example: Summing Allele-Count Dosages
In a hypothetical sample of six individuals, the genotypes are \(AA\), \(Aa\), \(aa\), \(Aa\), \(Aa\), and \(aa\). Find each \(A\)-dosage, the total number of \(A\) copies, and the mean dosage per individual.
The dosages are \(2,1,0,1,1,0\). Their sum is
Thus the six genotypes contain five copies of \(A\) in total. Dividing by the six individuals gives a mean dosage of \(5/6=0.8333\) copies of \(A\) per individual. The units are allele copies per individual. This mean is an aggregate summary; no individual in this example has dosage 0.8333.
The indicator representation gives the same total. There are three \(Aa\) individuals and one \(AA\) individual, so the number of \(A\) copies is \(1(3)+2(1)=5\). This provides a second check on the sum from the individual dosages.
What the Codes Do Not Say
A genotype code is a representation of observed genetic information. By itself, it does not specify how a phenotype varies by genotype, whether a trait association is causal, or how a statistical model uses the code. In particular, writing the dosages as 0, 1, and 2 does not establish that the trait changes by an equal amount between successive dosage values. That would be an additional model assumption, not a property of the coding definition.
Likewise, the three genotype indicators describe category membership without assigning a biological ordering or numerical distance between categories. Their values are simply 0 and 1 flags. A later analysis may use dosage or indicators to represent genotype in a model, but interpretation then depends on the model and its chosen parameterization.
Common Mistakes and Data Checks
- Leaving the counted allele unspecified. A dosage of 1 is interpretable only after naming the allele being counted. State, for example, “dosage counts copies of \(A\).”
- Confusing an indicator with an allele count. \(I_{AA}=1\) means the person has genotype \(AA\); that genotype has dosage 2 for allele \(A\), not 1.
- Reading dosage as a phenotype or effect. Dosage 2 means two copies of the specified allele. It does not mean twice the trait value or twice an estimated effect.
- Using zero to represent a missing genotype. Dosage 0 is a known \(aa\) genotype when \(A\) is counted. Missing information is not evidence for \(aa\), so it must be recorded as missing rather than silently coded as 0.
- Assuming the number line imposes a biological pattern. The numerical order of 0, 1, and 2 counts allele copies. It does not prove equal trait differences across those genotypes.
A useful quality check for complete data at this locus is that each individual has exactly one of the three genotypes, each indicator row has a sum of 1, and dosage agrees with the number of copies of the named allele. These checks catch many transcription and coding errors before analysis.
Check Your Understanding
Answer each question using the definitions in this tutorial.
- If \(A\) is the counted allele, what are the dosages for \(AA\), \(Aa\), and \(aa\), in that order?
- An individual has \(I_{aa}=0\), \(I_{Aa}=0\), and \(I_{AA}=1\). What genotype and \(A\)-dosage do these values represent?
- Explain why \(I_{Aa}=1\) is not the same statement as “the individual has dosage 1 for \(A\),” even though both happen to have numerical value 1 for genotype \(Aa\).
- For genotypes \(aa,Aa,AA\), calculate the dosage sum and the number of \(A\) copies using genotype counts. Check that the answers agree.
- Why is coding an unobserved genotype as dosage 0 incorrect when dosage counts copies of \(A\)?