What a Genomic Variant Matrix Records
A genomic variant matrix records genetic variation across measured samples. Its rows identify genomic loci, such as a particular position in the genome, and its columns identify samples. A matrix entry describes the genotype or an allele count for one sample at one locus. Reading the entry correctly depends on knowing which locus and alleles are being represented, and what encoding was used.
For clarity, let \(G_{ij}\) denote the entry for locus \(i\) and sample \(j\). The symbol \(G_{ij}\) does not, by itself, tell us whether the entry is a genotype label, an allele count, or an estimated dosage. That meaning comes from the data definition and the column’s coding convention. A matrix without this information is not fully interpretable.
A locus is usually identified using a reference genome assembly, a chromosome or contig, a position, and allele labels. For a biallelic locus, the two alleles are often called the reference allele and the alternate allele. These names identify the alleles relative to a chosen reference sequence; they do not mean that the reference allele is necessarily common, ancestral, or biologically normal.
Genotype Codes and Allele Dosage
For a diploid sample at a biallelic locus, there are two allele copies. If the reference allele is coded 0 and the alternate allele is coded 1, the possible genotypes can be written as \(0/0\), \(0/1\), and \(1/1\). The slash indicates an unphased genotype: the two alleles are known, but their assignment to the two chromosome copies is not specified. A vertical bar, as in \(0|1\), is commonly used when the two alleles are phased.
The same three genotypes are often represented by the number of alternate-allele copies: 0 for \(0/0\), 1 for \(0/1\), and 2 for \(1/1\). Under this convention, the numeric value is an alternate-allele dosage. The genotype strings are categories; the numbers 0, 1, and 2 are counts, even though they correspond one-to-one with the genotype categories at a diploid biallelic locus.
Genotype fields and dosage matrices are not interchangeable without checking their meaning. A string such as \(0/1\) identifies a genotype directly. A value of 1 in a dosage matrix usually means one copy of the specified allele, but the specified allele must be named. If a matrix instead uses the integers 0, 1, and 2 merely as labels for three genotype categories, those values should not be treated as measured allele counts unless the encoding documentation confirms the correspondence.
Worked Example: Reading Genotype Calls and Dosages
Consider a hypothetical diploid, biallelic locus with reference allele A and alternate allele G. The calls for four samples are \(A/A\), \(A/G\), \(G/G\), and \(A/G\). Find the alternate-allele dosage for each sample and the alternate-allele count across all four samples.
Translate each genotype. \(A/A\) contains zero copies of G, \(A/G\) contains one copy of G, and \(G/G\) contains two copies of G. Thus the dosage vector, in the given sample order, is \((0,1,2,1)\).
Add the counts. The total number of G copies is \(0+1+2+1=4\). The four diploid samples contain \(2\times4=8\) allele copies altogether, of which four are G. The total is a count of allele copies, while each matrix entry is the count for one sample at the locus.
Check the encoding. These results rely on the locus being diploid and on G being the allele whose dosage is recorded. A matrix that records A dosage instead would contain \((2,1,0,1)\), not \((0,1,2,1)\).
Matrix Layout and a Worked Read-Through
A matrix entry has meaning only in the context of its row and column labels. For example, a row might identify a variant by chromosome, position, reference allele, and alternate allele; the columns then contain values for individual samples. The row’s allele definition is essential: a dosage value of 1 is not interpretable as “one copy” until we know which allele is being counted.
| Locus (reference > alternate) | Sample A | Sample B | Sample C |
|---|---|---|---|
| chr2:150, A > G | 0 | 1 | 2 |
| chr5:410, C > T | 2 | 0 | 1 |
Assuming each entry is diploid alternate-allele dosage, the first row means that Sample A has zero G copies, Sample B has one G copy, and Sample C has two G copies. In the second row, the values count T copies, not C copies. The same number can therefore refer to different alleles in different rows.
Worked Example: Checking a Locus Row
The hypothetical row for a diploid variant with reference C and alternate T has dosage values \(2,0,1\) for Samples A, B, and C. Translate the values into genotypes and check the row’s total T count.
A dosage of 2 means two T copies, so Sample A is \(T/T\). A dosage of 0 means no T copies, so Sample B is \(C/C\). A dosage of 1 means one T copy, so Sample C is \(C/T\). The row therefore corresponds to genotypes \(T/T\), \(C/C\), and \(C/T\).
The total number of T copies is \(2+0+1=3\). There are three diploid samples, hence six allele copies in total; the remaining \(6-3=3\) copies are C. This is an arithmetic consistency check, not evidence that the allele calls or sample labels are biologically correct.
Dosage Can Be an Estimate
Some data sets contain dosage estimates rather than certain hard genotype calls. For example, an analysis may assign probabilities to the three possible diploid genotypes and report the expected number of alternate-allele copies. If the probabilities are \(p_0\), \(p_1\), and \(p_2\) for genotypes with zero, one, and two alternate copies, respectively, the expected dosage is the probability-weighted average of the possible copy counts.
Here the genotype probabilities must be nonnegative and sum to 1. The expected dosage can be fractional, even though the actual genotype of a diploid individual has an integer number of alternate-allele copies. A fractional dosage is therefore not a claim that a person has a fraction of an allele; it summarizes uncertainty about which discrete genotype is present.
Worked Example: Calculating an Expected Dosage
For a hypothetical sample at a diploid biallelic locus, suppose the probabilities of having zero, one, or two copies of the alternate allele are \(0.20\), \(0.50\), and \(0.30\), respectively. Calculate the expected alternate-allele dosage.
The probabilities sum to \(0.20+0.50+0.30=1.00\), as required. Weight each possible copy count by its probability:
The expected dosage is 1.10 alternate copies. It is a summary of the stated genotype uncertainty, not a hard genotype call. Replacing it with the nearest integer would discard information and is not implied by the calculation.
Assumptions, Diagnostics, and Limits
The familiar 0–2 coding assumes a diploid sample and a biallelic locus, with a declared allele whose copies are being counted. These conditions often hold for autosomal variants in diploid samples, but they should not be presumed for every genomic region or organism. Ploidy can differ for sex chromosomes, organellar genomes, copy-number-altered regions, and some organisms. At a locus with ploidy \(q\), the count of a specified allele may range from 0 to \(q\), rather than always from 0 to 2.
At a multiallelic locus, more than two alleles are possible. A single number in the range 0–2 is insufficient to identify all possible genotypes or all allele counts unless the data definition specifies which allele is being counted and how the others are represented. Genotype strings, allele-specific count fields, or multiple dosage columns may be used instead.
Several checks help reveal coding or data problems before analysis:
- Confirm the reference and alternate allele labels and the genome position used to define each row.
- For hard calls under diploid biallelic alternate-dosage coding, check that nonmissing values are 0, 1, or 2. Values outside this set may indicate a different encoding, a different ploidy, or an error.
- Check whether a value is an integer hard call or a possibly fractional dosage estimate. Do not apply integer-only checks to expected dosages.
- Distinguish missing-value codes from zero. A missing call means the genotype or dosage is unavailable; zero means a measured or assigned count of zero copies of the specified allele.
- Verify that dosage refers to the same allele across rows and data sources. Allele labels and orientation must be aligned before values are compared or combined.
A genotype-category representation preserves the distinction among possible genotypes explicitly. An allele-dosage representation gives a numeric copy count and can retain uncertainty when it is estimated. A hard-call dosage is compact and easy to read, but may discard uncertainty; an expected dosage can retain that uncertainty but does not state one certain genotype. Neither form alone communicates all relevant information about locus quality, allele orientation, or missingness.
A frequent mistake is to read every 0, 1, or 2 as an alternate-allele dosage automatically. That interpretation is justified only when the data documentation says the values count copies of a named allele under an appropriate ploidy model. Another mistake is to treat a missing entry as 0; doing so changes “unknown” into “no copies” and can distort summaries. In genomic data, coding conventions are part of the measurement definition, not a cosmetic detail.
Check Your Understanding
Answer each question, then compare your reasoning with the solutions below.
- At a diploid locus with reference A and alternate G, what genotype corresponds to alternate dosage 1?
- A row has hard-call alternate dosages \(0,2,1\) for three diploid samples. How many alternate copies are represented in total?
- Why is an expected dosage of 0.7 not necessarily an invalid diploid genotype value?
- What additional information is needed to interpret a value of 1 in a variant matrix?
- At a locus with ploidy 1, why may the usual diploid 0–2 coding be inappropriate?
Solutions. (1) The genotype is \(A/G\): one copy of the alternate allele G. (2) The total is \(0+2+1=3\) alternate copies. (3) An expected dosage can be fractional because it is an average over uncertain genotype probabilities; it is not necessarily a hard call. (4) At minimum, identify the locus, the allele being counted, whether the value is a genotype category or dosage, and the applicable ploidy. (5) A sample with ploidy 1 has only one allele copy at that locus, so its allele count is generally 0 or 1; a value of 2 would not represent a possible copy count under that ploidy.