An introduction to
Variant Call Format

Contents

Introduction

Variant Call Format (VCF) is a text file format for storing marker and genotype data. This short tutorial describes how Variant Call Format encodes data for single nucleotide variants.

Every VCF file has three parts in the following order:

  1. Meta-information lines (lines beginning with "##").
  2. One header line (line beginning with "#CHROM").
  3. Data lines contain marker and genotype data (one variant per line). A data line is called a VCF record.

Each VCF record has the same number of tab-separated fields as the header line. The symbol "." is used to denote missing data.

[ top | example ]

Example VCF file

##fileformat=VCFv4.1 ##FORMAT=<ID=GT,Number=1,Type=Integer,Description="Genotype"> ##FORMAT=<ID=GP,Number=G,Type=Float,Description="Genotype Probabilities"> ##FORMAT=<ID=PL,Number=G,Type=Float,Description="Phred-scaled Genotype Likelihoods"> #CHROM POS ID REF ALT QUAL FILTER INFO FORMAT SAMP001 SAMP002 20 1291018 rs11449 G A . PASS . GT 0/0 0/1 20 2300608 rs84825 C T . PASS . GT:GP 0/1:. 0/1:0.03,0.997,0 20 2301308 rs84823 T G . PASS . GT:PL ./.:. 1/1:10,5,0

[ top ]

Meta-information lines

Each meta-information line must have the format ##KEY=VALUE and cannot contain white-space. The first meta-information line must specify the VCF version number (version 4.1 in the example). Additional meta-information lines are optional, but are often included to describe terms used in the FILTER, INFO, and FORMAT fields. In the example, the additional meta-information lines say that that GT means genotype, GP means the probability of each possible genotype call, and GL means the likelihood of each possible genotype call.

[ top | example ]

Marker information

The first nine columns of the header line and data lines describe the variants:

CHROM the chromosome.
POS the genome coordinate of the first base in the variant. Within a chromosome, VCF records are sorted in order of increasing position.
ID a semicolon-separated list of marker identifiers.
REF the reference allele expressed as a sequence of one or more A/C/G/T nucleotides (e.g. "A" or "AAC")
ALT the alternate allele expressed as a sequence of one or more A/C/G/T nucleotides (e.g. "A" or "AAC"). If there is more than one alternate alleles, the field should be a comma-separated list of alternate alleles.
QUAL probability that the ALT allele is incorrectly specified, expressed on the the phred scale (-10log10(probability)).
FILTER Either "PASS" or a semicolon-separated list of failed quality control filters.
INFO additional information (no white space, tabs, or semi-colons permitted).
FORMAT colon-separated list of data subfields reported for each sample. The format fields in the Example are explained below.

[ top | example ]

Sample data

After the nine fixed columns, the remaining columns contain the sample identifier and the colon-separated data subfields for each individual. The data subfields in a record must match that record's format subfields.

The most common format subfield is GT (genotype) data. If the GT subfield is present, it must be the first subfield. In the sample data, genotype alleles are numeric: the REF allele is 0, the first ALT allele is 1, and so on. The allele separator is '/' for unphased genotypes and '|' for phased genotypes. In the example, all genotypes are unphased, and the genotypes for SAMP001 are homozygote reference, heterozygote, and missing in the first, second, and third records.

The second record contains a GP(genotype probability) format subfield, and the third record contains PL (phred-scaled genotype likelihood) format subfield. GP and GL data subfields are three comma-separated values corresponding to the REF/REF, REF/ALT, and ALT/ALT genotypes in that order. To convert a phred-scaled likelihood P to a raw likelihood L, use the formula L = 10(-P/10).

In the second record of the Example, the GP data subfield is missing for SAMP001 and the GP subfield for SAMP002 has probabilities of 0.03, 0.97, and 0 for the REF/REF, REF/ALT, and ALT/ALT genotypes.

In the third record of the Example, the GL data subfield is missing for SAMP001. The GL subfield for SAMP002 has phred-scaled likelihoods of 10, 5, and 0 and raw likelihoods of 0.1, 0.316, and 1 for the REF/REF, REF/ALT, and ALT/ALT genotypes. It is not necessary for the genotype likelihoods to sum to 1.0.

[ top | example ]

Resources

Here are some tools for manipulating VCF files:

If you need to encode more complicated genotype data or if you want to learn more about Variant Call Format, see the VCF 4.1 specification.

[ top | example ]

Prepared by Steven Smith and Brian Browning
Last updated: 30 June 2013.