Genomics 101

Lesson 12 of 13 · 11 min

Exploring Genomes with UCSC and IGV

A genome is billions of DNA letters, far too many to read as plain text. A genome browser is a graphical tool that draws a chosen region of a genome on screen and stacks layers of data on top of it. The two you will meet most often are the UCSC Genome Browser, which runs in a web page, and IGV, the Integrative Genomics Viewer, which you install on your own computer.

Coordinates And Gene Names

Every position in a genome has an address made of a chromosome plus a start and end number, for example chr17:43,044,295-43,125,483. That range means chromosome 17, from base 43,044,295 to base 43,125,483. You can paste an address like this into a browser's search box, or you can just type a gene name such as BRCA1 and let the browser jump there for you. Always confirm the assembly first, because human coordinates differ between GRCh38 (also called hg38) and the older GRCh37 (hg19).

text
BRCA1
chr17:43,044,295-43,125,483

Reading The Tracks

A track is one horizontal lane of information drawn against the genome coordinates. The gene track is the most important one to learn: thick boxes are exons, the parts of the gene that are kept and used, thin connecting lines are introns, the parts spliced out, and small arrows along the line show the strand, meaning which direction the gene is read. BRCA1 sits on the minus strand, so its arrows point right to left. Other tracks stacked below can show evolutionary conservation, known genetic variants, and regulatory regions, all lined up at the same coordinates so you can compare them at a glance.

Try it yourself: open the UCSC Genome Browser at genome.ucsc.edu, click Genome Browser, and set the assembly to Human GRCh38/hg38. Type BRCA1 into the search box and press Enter. Zoom in on the gene track and count the exon boxes, then scroll through the tracks below to see what conservation and variant data lie over its neighboring genes.

IGV On Your Desktop

UCSC is ideal for public reference data, but when you have your own sequencing results you use IGV. IGV can load a BAM file, which is a Binary Alignment Map holding the individual sequencing reads mapped onto the genome, and a VCF file, which is a Variant Call Format file listing the positions where a sample differs from the reference. A BAM must be sorted by position and indexed before IGV can open it. A VCF is best compressed and indexed too, so the program can jump straight to a region instead of reading the whole file.

bash
samtools sort -o sample.sorted.bam sample.bam
samtools index sample.sorted.bam
bgzip -c variants.vcf > variants.vcf.gz
tabix -p vcf variants.vcf.gz
ls
sample.bam
sample.sorted.bam
sample.sorted.bam.bai
variants.vcf
variants.vcf.gz
variants.vcf.gz.tbi

The new .bai and .tbi files are the indexes IGV needs. In IGV, set the genome to Human (GRCh38/hg38) in the top-left dropdown, then choose File and Load From File to open sample.sorted.bam and variants.vcf.gz. Type BRCA1 into IGV's search box and you will see a pile of reads stacked over the gene, with colored marks where bases disagree with the reference and a variant row underneath showing each call from your VCF in its exact genomic context.