Lesson 9 of 13 · 11 min
Genetic Variation: SNPs and Indels
Every person's DNA is a long string of about three billion chemical letters called bases, written with the four symbols A, C, G, and T. When scientists line up one person's genome against the shared reference genome, they find millions of positions where the letters differ. These differences are called genetic variation, and cataloguing them is the starting point of almost every genomics study.
Types Of Variation
A single-nucleotide polymorphism, or SNP, is a change of one DNA base at one position, such as an A being replaced by a T, and the famous sickle-cell variant is a single-base substitution in the HBB gene, written on the reference genome as a T being replaced by an A. An indel is a small insertion or deletion of a few bases, usually shorter than about fifty bases, and cystic fibrosis is most often caused by a three-base deletion in the CFTR gene that removes a single amino acid. Most SNPs are harmless and simply account for the normal differences between people, but a few, like these two, change how a gene works and cause disease.
Structural variants are larger changes, typically fifty bases or more, and they include big deletions, duplications, inversions where a segment is flipped, and translocations where a piece of DNA moves to a new location. A copy-number variant, or CNV, is a kind of structural variant in which a stretch of DNA is present in more or fewer copies than normal. Charcot-Marie-Tooth disease type 1A, a common inherited nerve disorder, is caused by carrying an extra copy of the region containing the PMP22 gene.
Alleles And Genotypes
An allele is one version of the DNA sequence at a particular spot, called a locus, and because humans are diploid we inherit two copies of most of the genome, one from each parent, giving two alleles at every locus. When both alleles are identical you are homozygous at that position, and when they differ you are heterozygous. Variant files record this genotype as two numbers, where 0 means the reference base and 1 means the alternate base, so 0/0 is homozygous reference, 0/1 is heterozygous, and 1/1 is homozygous alternate.
Once a variant has been observed and confirmed, it is deposited in dbSNP, a public database of short genetic variants run by the NCBI. Each known variant is given a stable identifier called an rsID, written as rs followed by a number, such as rs334 for the sickle-cell SNP. These rsIDs let researchers anywhere in the world refer to exactly the same variant, and they appear in the ID column of a variant file.
# print the contents of a small example variant file (VCF) to the screen
cat example.vcf##fileformat=VCFv4.2
##FORMAT=<ID=GT,Number=1,Type=String,Description="Genotype">
#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT patient1
11 5227002 rs334 T A . PASS . GT 0/1
7 117559590 rs113993960 ATCT A . PASS . GT 1/1
Reading the file, each data line is one variant. The first is the sickle-cell SNP on chromosome 11: the reference base T is changed to an A, and patient1's genotype 0/1 means they carry one copy of each base, so they are heterozygous. The second is the cystic-fibrosis deletion on chromosome 7, whose genotype 1/1 means both copies carry the deletion, so patient1 is homozygous alternate. Notice that its REF field is four bases (ATCT) while ALT is one base (A): variant files keep one unchanged base before a deletion as an anchor, so the three bases actually removed are the TCT that follows the anchor.
# bcftools is a toolkit for reading and filtering variant files.
# The -f format string prints one line per variant: its ID, reference base (%REF),
# alternate base (%ALT), and genotype (%GT), separated by tab characters (\t).
# The square brackets around %GT tell bcftools to print the genotype for each sample.
bcftools query -f '%ID\t%REF\t%ALT\t[%GT]\n' example.vcfrs334 T A 0/1
rs113993960 ATCT A 1/1