Why Genotype Coding Matters
An individual-level SNP heritability estimate concerns genetic variation tagged by a specified set of variants. But that set does not enter a model as an abstract list: each genotype is represented numerically, centered and often scaled. Those choices determine what one unit of a genotype predictor means and the variance scale attached to the genetic component. They must therefore be understood before interpreting a variance ratio or comparing results.
For a biallelic variant, the basic coding counts copies of a chosen effect allele. A person can carry zero, one, or two copies. An imputed genotype is commonly represented by an expected allele count, called a dosage. Standardizing either a count or a dosage makes its scale easier to compare across variants, but the standardization rule and the variants included remain part of the definition of the analysis.
Allele Counts and Their Variance
A count of two is not “twice the genetic effect” in every possible model; it is simply two copies of the chosen allele. In an additive model, the expected phenotype changes by the same amount for each additional copy, conditional on the other predictors. If \(\beta_j\) is a per-allele effect, the contribution of variant \(j\) to an individual's genetic value is \(\beta_j(g_{ij}-2p_j)\). Centering changes the intercept, not the per-allele effect.
The variance formula follows from the two allele copies. Under Hardy–Weinberg equilibrium, each copy is a Bernoulli indicator with probability \(p_j\), and the two indicators are independent. The allele count is their sum. Thus its mean is \(2p_j\), and its variance is the sum of their variances:
Here \(A_{ij1}\) and \(A_{ij2}\) indicate whether each allele copy is the effect allele. The same formula does not automatically apply to every population: departures from Hardy–Weinberg equilibrium can change the genotype variance. In practice, \(2p_j(1-p_j)\) is a conventional population scaling quantity, while the observed variance of genotype counts in a particular sample can differ.
Worked Example: Variance and Contribution on the Allele-Count Scale
Suppose a hypothetical sample has 400 individuals at a variant with effect-allele frequency \(p=0.25\). The genotype counts are 225 with zero copies, 150 with one copy, and 25 with two copies. These counts match the Hardy–Weinberg proportions \(0.5625,\ 0.375,\ 0.0625\).
The mean allele count is \((0)(225/400)+(1)(150/400)+(2)(25/400)=0.5=2p\). The variance under Hardy–Weinberg equilibrium is \(2p(1-p)=2(0.25)(0.75)=0.375\) allele-count-squared units. Directly, the sample's population-divisor variance is \(0.375\) as well.
If the per-allele effect is \(\beta=0.40\) phenotype units per allele, the variance of this one-variant genetic contribution is \(\beta^2\operatorname{Var}(g)=0.40^2(0.375)=0.0600\) phenotype-units-squared. This is a variance contribution under the stated genotype distribution and single-variant additive model, not a heritability estimate by itself.
Standardizing Genotypes Changes the Effect's Units
The standardized genotype \(x_{ij}\) has variance one under the Hardy–Weinberg scaling above. A regression coefficient for \(x_{ij}\) is therefore expressed per one standard deviation of genotype, not per additional allele. If the centered allele-count effect is \(\beta_j\), then the coefficient on the standardized genotype is \(\gamma_j=\beta_j\sqrt{2p_j(1-p_j)}\). The fitted genetic contribution is unchanged because \(\gamma_j x_{ij}=\beta_j(g_{ij}-2p_j)\).
This is a change of units, not a change in the underlying additive predictor. However, effect-size assumptions stated on one scale do not translate unchanged to another. For example, assigning effects with a common variance to standardized genotypes is different from assigning effects with a common variance to raw allele counts when allele frequencies vary.
Worked Example: Converting a Per-Allele Effect
At a hypothetical variant, let \(p=0.20\), so the Hardy–Weinberg genotype variance is \(2(0.20)(0.80)=0.32\), and the genotype standard deviation is \(\sqrt{0.32}=0.5657\). Suppose the per-allele coefficient is \(0.30\) outcome units per allele.
The coefficient for the standardized genotype is \(\gamma=0.30\sqrt{0.32}=0.1697\) outcome units per genotype standard deviation. For a person with one allele copy, the centered count is \(1-0.40=0.60\), so the raw-count contribution is \(0.30(0.60)=0.180\) outcome units. The standardized genotype is \(0.60/0.5657=1.061\), giving \(0.1697(1.061)=0.180\) outcome units, apart from rounding.
Both codings give the same predictor value when the coefficient is converted consistently. The variance contribution is also the same: \(0.30^2(0.32)=0.0288\) outcome-units-squared, or \(0.1697^2(1)=0.0288\) using the standardized scale.
From a SNP Set to a Genetic Variance Scale
Let \(S\) denote the set of variants included in an analysis, with \(M\) variants. For centered allele counts, an additive genetic value can be written \(u_i=\sum_{j\in S}\beta_j(g_{ij}-2p_j)\). Its variance depends on the frequencies, effects, and correlations among the genotypes in the target population. In particular, the general variance includes covariance terms:
The second sum matters when variants are correlated through linkage disequilibrium. Consequently, adding single-variant variance contributions as though all genotypes were independent is not generally correct. A genetic similarity matrix based on standardized genotypes records the sample's pattern of sharing across the included variants. One common definition is:
where \(X\) is the \(n\times M\) matrix of standardized genotypes, and \(K_{ik}\) is the standardized genetic similarity between individuals \(i\) and \(k\) under this convention. Dividing by \(M\) averages across included variants. Other weighting or normalization rules are possible; they define a different matrix scale and must be reported. This expression describes the genetic similarity representation, not an estimation procedure.
The variant set is substantive. A set may be defined by genotyping or imputation availability, quality filters, allele-frequency thresholds, genomic regions, or other prespecified criteria. Its members determine which genotype variation can contribute to the genetic value represented by the model. Thus SNP heritability is tied to the variant set and population under consideration; it is not automatically the fraction of trait variance attributable to every genetic influence.
Worked Example: How Variant Inclusion Changes the Set and Scale
Consider a hypothetical analysis with three candidate variants. After prespecified quality control, variants 1 and 2 are retained and variant 3 is excluded because its genotype data fail the chosen quality criterion. The analyzed set is \(S=\{1,2\}\), so \(M=2\). Suppose their standardized genotypes for two individuals are \((1,0)\) and \((0,1)\), respectively.
Under the stated mean-product definition, their genetic similarity is \(K_{12}=(1\cdot0+0\cdot1)/2=0\). If variant 3 were included with standardized values 1 for both individuals, the three-variant similarity would instead be \(K_{12}=(1\cdot0+0\cdot1+1\cdot1)/3=1/3\). This arithmetic illustrates that membership in the set and the denominator both affect the matrix.
The example does not imply that retaining a variant always increases similarity: its contribution depends on both individuals' genotype values. Nor does it establish that one set is preferable. It shows why an estimate must be interpreted relative to the variants and normalization actually used.
Imputed Dosages and Uncertainty
When genotypes are imputed, an individual may not have a known hard-call count. Given the imputation information, the dosage is the conditional expected allele count \(d_{ij}=E(g_{ij}\mid\text{imputation data})\), between zero and two. It is a predictor that can retain uncertainty information better than replacing every uncertain genotype with a single most likely call. Dosage is not itself a fractional biological allele count; it is an expected count.
The dosage mean can be used to estimate allele frequency, for example \(\hat p_j=\sum_i d_{ij}/(2n)\) when all \(n\) individuals have dosage data. But dosage variance and the variance of the underlying genotype are not generally identical. The law of total variance gives \(\operatorname{Var}(g)=\operatorname{Var}(E[g\mid\text{data}])+E[\operatorname{Var}(g\mid\text{data})]\). The second term is uncertainty remaining after imputation. Consequently, the observed variation among dosages can be smaller than the variation among the unobserved genotypes they represent.
A dosage-based analysis should state how dosages are centered and scaled. One common choice centers at \(2p_j\) and divides by \(\sqrt{2p_j(1-p_j)}\), using the allele-frequency scaling convention. Another uses the empirical variance of the analyzed dosages. These are not interchangeable when imputation uncertainty is material. Consistent allele coding, frequency estimates, normalization, and variant inclusion are essential when constructing a genetic similarity matrix.
Worked Example: Dosage Variation and Posterior Uncertainty
For four hypothetical individuals at one variant, suppose the imputation probabilities for allele counts \(0,1,2\) are respectively: individual A, \((0.8,0.2,0)\); B, \((0.2,0.8,0)\); C, \((0,0.6,0.4)\); and D, \((0.1,0.4,0.5)\). Their dosages are \(0.2,\ 0.8,\ 1.4,\ 1.4\), obtained by summing count times probability for each individual.
The dosage mean is \((0.2+0.8+1.4+1.4)/4=0.95\). Using divisor four, the dosage variance is \(\{(0.2-0.95)^2+(0.8-0.95)^2+2(1.4-0.95)^2\}/4=0.2475\).
The conditional genotype variances for A through D are \(0.16,\ 0.16,\ 0.24,\) and \(0.44\). For instance, for D, \(E(g^2\mid\text{data})=0.4+4(0.5)=2.4\), and \(2.4-1.4^2=0.44\). Their mean is \(0.25\). Thus the average latent genotype variance, using the same population-divisor convention, is \(0.2475+0.25=0.4975\). The dosage variation alone omits the \(0.25\) component of expected posterior uncertainty; it should not be mistaken for the full underlying genotype variance.
Common Mistakes and Practical Interpretation
- Assuming every coefficient is per allele. A coefficient attached to a standardized genotype is per genotype standard deviation. Convert scales before comparing coefficients.
- Treating dosage as a certain hard call. A dosage is a conditional mean. Its variation across people need not equal the variance of the underlying genotypes.
- Ignoring the SNP set. A variance ratio based on one set of variants is not automatically the same estimand as a ratio based on another set. Report the set-defining filters and the analysis population.
- Summing variant variances while ignoring correlation. Correlated genotypes contribute covariance terms to the variance of the aggregate genetic value.
- Assuming a normalization is merely cosmetic. Changing the scaling of genotypes or the denominator of a similarity matrix changes the numerical scale of the represented genetic component. Interpretation requires the scaling convention.
For an additive SNP-set variance ratio, the numerator concerns variation in the genetic value represented by the chosen variants, and the denominator is the relevant total phenotypic variance on the specified analysis scale. Neither coding a genotype nor standardizing it changes the biological trait. The choices do, however, determine which variation is represented and the units used to express effects and genetic variance.
Check Your Understanding
Use the definitions and scale distinctions above to answer the following questions.
- Under Hardy–Weinberg equilibrium, what is the variance of an allele count when the effect-allele frequency is \(0.10\)?
- A coefficient is reported per one standard deviation of genotype. What additional information is needed to convert it to a per-allele coefficient?
- Why can the variance among imputed dosages be lower than the variance of the underlying genotypes?
- In the standardized similarity matrix, what do the included set \(S\) and denominator \(M\) specify?
- Why can the genetic variance of a sum of variant effects not generally be calculated by summing only the individual variance contributions?