Introduction
A VCF record can look like a long string of codes, but its structure is regular. The first columns describe a variant, while optional sample columns contain genotype information organized by keys listed in FORMAT. Reading those parts in the correct order prevents a common error: treating a value as if its meaning were fixed by its position in every VCF file.
VCF is a tab-delimited text format. Its header describes the file and names the columns; each data row describes one variant record. The precise definitions in a file's header matter, especially for FORMAT fields and fields whose values are represented by numbers. The examples below are hypothetical and use simplified records for teaching.
Read the Header Before the Records
VCF headers commonly begin with metadata lines that start with ##. These can specify the file format version and define INFO, FILTER, and FORMAT fields. A field declaration can include an ID, a Number, a Type, and a Description. The declaration for a field is the place to check its intended meaning and value structure; the short label alone may not provide every detail.
The final header line starts with #CHROM and names the columns. The first eight columns are fixed: CHROM, POS, ID, REF, ALT, QUAL, FILTER, and INFO. If sample data are included, a FORMAT column follows them, and the remaining columns give sample names. Each sample value in a data row corresponds to the sample name in the same column of the header.
A VCF with sample columns therefore has at least nine columns. The sample columns are not additional variant annotations: each contains values for one sample at that record. In a multi-sample file, keep the header's sample order in view while reading a row.
The Fixed Variant Columns
The fixed columns describe the location and alleles of the record, along with record-level annotations. CHROM identifies the chromosome or contig, and POS gives the position using the file's coordinate convention. ID contains an identifier when available, while a dot means that no value is supplied there. REF gives the reference allele, and ALT lists one or more alternate alleles. If more than one alternate allele is present, they are comma-separated.
QUAL is a record-level quality value; it is not the same field as an individual sample's genotype quality. FILTER records filtering status: it contains PASS if all applied filters passed, filter IDs for filters the record failed, or . if filters have not been applied. INFO contains record-level annotations, typically written as semicolon-separated entries. Some INFO entries are flags, while others have a value after an equals sign; consult their header declarations for definitions.
A dot is not a universal statement about why information is absent. Its meaning depends on the column or field where it appears. In particular, FILTER set to a dot says filters have not been applied; it does not mean the record failed a filter or that a filter result is merely unavailable.
| Column or field | What it describes | Reading note |
|---|---|---|
| CHROM, POS | Record location | Interpret POS using the VCF coordinate convention |
| ID | Variant identifier | A dot indicates no identifier value is supplied |
| REF, ALT | Reference and alternate allele sequence(s) | ALT alleles are comma-separated when there is more than one |
| QUAL | Record-level quality | Distinct from a sample's GQ |
| FILTER | Applied filter status | PASS, failed-filter IDs, or a dot if filters have not been applied |
| INFO | Record-level annotations | Use the header to interpret each annotation |
| FORMAT and sample columns | Keys and corresponding sample values | Match each value to the key in the same position |
Worked Example: Mapping the Fixed Columns and Sample Fields
Consider this hypothetical header and record:
#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT S01 S02
3 245810 rsExample G A 38 PASS DP=39 GT:DP:GQ:AD 0/1:18:42:9,9 1/1:21:55:0,21
The record is on chromosome 3 at position 245810. Its identifier is rsExample; G is REF and A is ALT. QUAL is 38, FILTER is PASS, and INFO contains the entry DP=39. The last three columns are FORMAT and the two sample columns, S01 and S02.
For both samples, FORMAT is GT:DP:GQ:AD, so the first sample value is GT, the second is DP, the third is GQ, and the fourth is AD. For S01, 0/1:18:42:9,9 therefore means GT 0/1, DP 18, GQ 42, and AD 9,9. For S02, the corresponding values are GT 1/1, DP 21, GQ 55, and AD 0,21. The INFO entry DP=39 is record-level; it is not either sample's DP.
The AD values for S01 sum to \(9+9=18\), matching its DP of 18 in this illustrative record. For S02, \(0+21=21\), also matching its DP. Such agreement can occur, but the fields have distinct definitions and their values need not always sum exactly in every caller's output.
GT: Allele Indices and Separators
GT is the genotype field. Its allele numbers refer to the alleles listed for that record: 0 refers to REF, 1 to the first ALT allele, 2 to the second ALT allele, and so on. A diploid biallelic GT of 0/1 therefore represents one REF allele and one ALT allele. A genotype may have a different number of allele entries when the record represents a different ploidy.
A slash separates unphased alleles, as in 0/1. A vertical bar separates phased alleles, as in 0|1. The separator communicates whether allele order is represented as phased; the two forms should not be treated as identical notation. A phased order by itself does not identify a parent of origin.
For a biallelic diploid record, an ALT-allele count can be read directly from GT by counting the number of allele indices equal to 1. For example, in 0/1 the count is \(0+1=1\), and in 1/1 it is \(1+1=2\). This simple count is specific to the biallelic example; with multiple ALT alleles, the index identifies which alternate allele is present.
Worked Example: Decoding a Multiallelic Genotype
Suppose a hypothetical record has REF=C and ALT=G,T. A sample has FORMAT GT:GQ:DP:AD and value 2/1:37:24:3,8,13. Decode its fields.
The allele mapping is 0=C, 1=G, and 2=T, because the two ALT alleles occur in the order G,T. Thus GT 2/1 represents one T allele and one G allele. It is unphased because the alleles are separated by a slash.
The FORMAT order is GT, GQ, DP, AD, so the sample has GQ 37, DP 24, and AD 3,8,13. AD has three entries because there are three alleles in total: REF, first ALT, and second ALT. In this illustrative record, the entries sum to \(3+8+13=24\), matching DP. Reading the genotype as 0/1 would be incorrect: the first allele index is 2, not 0.
DP, GQ, and AD
These FORMAT fields summarize different aspects of sample-level data. DP is the sample's read depth as represented by the caller. It describes read support at the site, not the genotype category itself. GQ is a phred-scaled measure of confidence in the called genotype. A larger GQ indicates stronger genotype-call confidence on that scale, but GQ should not be confused with the record-level QUAL value.
On the phred scale, an error probability \(e\) is represented by \(Q=-10\log_{10}(e)\). Equivalently, \(e=10^{-Q/10}\). For example, a GQ of 30 corresponds to \(10^{-30/10}=10^{-3}=0.001\), or one-thousandth, on that phred interpretation. Caller conventions and caps can affect reported values, so the field definition and caller documentation remain important.
AD gives allele depths, generally one value for REF followed by one value for each ALT allele. The header declaration commonly identifies this structure with Number=R, meaning one value for each allele including REF. In a biallelic record, AD such as 12,7 gives a REF-associated count of 12 and an ALT-associated count of 7. DP and AD are not interchangeable: DP is a depth field, while AD allocates depth by allele according to the caller's definition.
Worked Example: Interpreting Depth and Genotype Quality
A hypothetical biallelic record has REF=A, ALT=C, and sample FORMAT GT:DP:GQ:AD. The sample value is 0/1:32:30:17,15. Interpret the four fields and calculate the phred-scale error probability corresponding to GQ 30.
GT 0/1 indicates one A allele and one C allele, without phased ordering. DP is 32, GQ is 30, and AD is 17,15: 17 reads are counted for REF and 15 for ALT under the caller's AD definition. The AD values sum to \(17+15=32\), which matches DP in this example.
Using the phred relationship, \(e=10^{-Q/10}\). Substitution gives \(e=10^{-30/10}=10^{-3}=0.001\). Thus GQ 30 corresponds to a 0.001 error probability under that phred-scale interpretation, not a 30 percent error probability. This arithmetic explains the scale; it does not replace checking the caller's field definition.
Missing Values and Field Order
The dot character is used to indicate a missing value in many VCF fields. In a diploid GT, ./. indicates that both allele entries are missing; 0/. indicates that one allele is specified and the other is missing. For phased notation, .|1 likewise has one missing allele and one specified allele. These are not complete genotype calls.
Other FORMAT values can be missing independently. For example, a sample can have a known GT but a dot for GQ, or a known DP but missing AD. Read the position of the dot against the FORMAT keys rather than assuming that the whole sample is missing. A sample field written as a single dot can indicate that sample data are missing for that record; always use the delimiters and keys to parse what is actually present.
FORMAT order can change from one record to another. A sample value with the same text in a different position can consequently mean something different. For example, GT:GQ:DP paired with 0/1:45:20 gives GQ 45 and DP 20, while GT:DP:GQ paired with 0/1:45:20 gives DP 45 and GQ 20. The keys, not a remembered customary order, determine the interpretation.
Worked Example: Parsing Partial Missingness and FILTER
Consider this hypothetical record:
5 90120 . T C 22 . . GT:DP:GQ:AD ./.:.:.:. 0/1:14:.:8,6
The fixed columns show chromosome 5, position 90120, no supplied ID, REF T, ALT C, and QUAL 22. FILTER is a dot, so filters have not been applied. INFO is also a dot, indicating no INFO value is supplied here. These two dots occur in different columns and have distinct meanings.
The first sample has ./.:.:.:.. Using FORMAT GT:DP:GQ:AD, its GT is missing on both alleles, and DP, GQ, and AD are also missing. The second sample has 0/1:14:.:8,6: GT is 0/1, DP is 14, GQ is missing, and AD is 8,6. The AD arithmetic is \(8+6=14\), consistent with the reported DP in this example. The second sample is not wholly missing merely because its GQ is a dot.
A Reliable Parsing Sequence
A brief, repeatable sequence helps prevent column shifts and mistaken interpretations. Use the record's own FORMAT keys for every sample, and consult header definitions when field structure or caller-specific wording is uncertain.
Use the #CHROM header line to identify the fixed columns, FORMAT, and the sample names and their order.
Identify REF and the ordered ALT list before interpreting genotype indices.
Read QUAL, FILTER, and INFO in their fixed columns; do not mistake them for FORMAT values.
Split FORMAT and the chosen sample field at their colons, then pair each value with the key in the same position.
Map GT indices to REF and ALT in order, and interpret each dot in its own field rather than as a universal status.
Common Mistakes
- Assuming FORMAT keys always have one fixed order. The wrong approach is to treat the first numeric value after GT as DP in every file. The correction is to match every sample value to the key in that record's FORMAT column.
- Reading a GT index without checking ALT order. The wrong approach is to treat index 1 as any alternate allele. It refers specifically to the first ALT listed; index 2 refers to the second ALT.
- Confusing QUAL and GQ. QUAL is in a fixed, record-level column; GQ is a FORMAT field for a sample. Their values describe different levels of the record.
- Treating every dot as the same status. A dot in FILTER means filters have not been applied. A dot in a sample's GQ means that GQ is missing, and a dot in ID means no ID value is supplied.
- Calling a partly missing genotype complete. A value such as
0/.has one specified allele and one missing allele; it does not provide a fully specified diploid genotype.
Check Your Understanding
Use the record structure and field definitions to answer these questions.
- A record has REF=G, ALT=A,T, and GT=2/0. Which alleles does the genotype represent, and is its order phased?
- If FORMAT is
GT:AD:DP:GQand a sample value is0/1:11,9:20:35, what are its DP and GQ? - What does FILTER set to a dot indicate, and how does that differ from FILTER set to PASS?
- In a biallelic diploid record, what does GT
0/.tell you, and what does it leave unknown? - Why should a reader not interpret an INFO value of DP as automatically being the same quantity as a sample's FORMAT DP?