Whole genome sequencing
What a VCF file is, and how to read yours
Every whole genome sequencing company gives you a VCF file. It is the smallest of your genome files and the one most tools ask for, but it does not contain your whole genome. It contains only the places where you differ from the reference genome. Understanding that one point explains most of what a VCF can and cannot do.
Where a VCF comes from
Sequencing produces raw reads (FASTQ). Software aligns them to the reference genome (BAM or CRAM). A second program, the variant caller, then walks along the genome and writes down every position where your reads disagree with the reference. That list is the VCF. A typical person has 4 to 5 million such positions out of 3 billion.
What a line looks like
The file starts with header lines beginning with ##, which describe how it was made and which reference genome was used. After them comes one line per variant:
#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT SAMPLE chr1 11796321 rs1801133 G A 812 PASS DP=31 GT:DP 0/1:31
| Column | Meaning |
|---|---|
| CHROM, POS | The chromosome and the position on it, counted on the reference genome named in the header |
| ID | The variant's catalogue name (rsID) if it has one, otherwise a dot |
| REF, ALT | The letter in the reference genome, and the different letter found in your reads |
| QUAL, FILTER | How confident the caller is. PASS means the variant passed its quality checks |
| INFO | Extra details, such as DP, the number of reads at the position |
| FORMAT and the sample column | Your own result. GT is the genotype |
Reading the genotype
- 0/1: one copy of the reference letter and one of the alternative (heterozygous).
- 1/1: two copies of the alternative letter (homozygous).
- 0/0: two copies of the reference letter. A plain VCF rarely lists these.
- ./.: no call; the position could not be read reliably.
A vertical bar in place of the slash, as in 0|1, means the variant is phased: the file records which of your two chromosome copies carries it.
The example line above is MTHFR C677T (rs1801133) with the genotype 0/1: one reference copy and one variant copy.
What a VCF leaves out
If a position is not in your VCF, there are two possible reasons: you match the reference there, or the position was not read well enough to call. A plain VCF does not say which. For a report that needs your genotype at a specific list of positions, that gap matters.
A gVCF closes the gap by also recording the matching stretches and their read depth. The BAM or CRAM file closes it completely, because it holds the reads themselves. This is why NutraHacker asks for the BAM or CRAM and not the VCF.
A VCF from short-read sequencing is also weak on large insertions, deletions and repeated sequences, which variant callers handle less reliably than single-letter changes.
How to open a VCF
- Do not use a spreadsheet. A whole genome VCF has millions of lines; Excel cuts it off at about one million and can silently alter values.
- IGV (free, from the Broad Institute) opens a .vcf.gz file with its .tbi index and lets you jump to any gene or position.
- bcftools (free, command line) can pull out a single position or region in seconds.
- A text editor works only for small VCFs. Unzip the .gz file first.
Check which reference genome the header names before you look up a position. The same variant has different coordinates on GRCh37 and GRCh38.
Getting reports from your genome
For health and nutrition reports, upload your BAM or CRAM file to NutraHacker. The Detoxification and Methylation Report is free. Keep the VCF as well; it is small, and many other tools read it. For the full picture, see what to do with whole genome sequencing data and the other file formats.
Frequently asked questions
What is a VCF file?
VCF stands for Variant Call Format. It is a text file that lists the positions where a genome differs from the reference genome, one variant per line, with the genotype at each.
How do I open a VCF file?
A VCF is plain text, so a text editor can open a small one. Whole genome VCFs are usually compressed as .vcf.gz and too large for an editor or a spreadsheet. Use a genome viewer such as IGV, or a command-line tool such as bcftools.
What does 0/1 mean in a VCF?
It is your genotype. 0 stands for the reference letter and 1 for the alternative letter on that line. 0/1 means you carry one of each, 1/1 means two copies of the alternative, and 0/0 means two copies of the reference.
What is the difference between a VCF and a gVCF?
A VCF lists only the positions where you differ from the reference. A gVCF also records the stretches where you match it and how well they were read, so nothing is left ambiguous. It is much larger.
Can I upload a VCF file to NutraHacker?
No. NutraHacker asks for the whole genome BAM or CRAM file. A VCF cannot show whether a position that is not listed matches the reference or was simply not read.
Is a VCF the same as 23andMe raw data?
No. A 23andMe file reports your genotype at a fixed list of positions, whether or not you differ from the reference. A VCF reports only differences, across the whole genome.