How to Create a VCF File From a Chain File

From GenPlay, Einstein Genome Analyzer

Revision as of 15:47, 10 August 2014 by Julien (talk | contribs) (Getting started)
Jump to: navigation, search

Goal: This tutorial illustrates how to generate a VCF file describing the differences between two reference genomes from a Chain file. In this tutorial we will create a hg19 to hg38 VCF file. This means that the reference genome of the VCF file is hg38.

Prerequisite: You will need to have a Linux or Mac computer.

Scala needs to be installed on you computer. Scala is available to download from http://www.scala-lang.org/download/

Perl also needs to be installed if it's not already available on your system. Perl can be download from http://www.perl.org/get.html

GenPlay needs to be installed on your computer. If you haven't installed GenPlay yet, please visit the Downloads page and follow the instructions to download and install GenPlay.

Getting started

First, let's download the files needed from the UCSC genome browser. All the file are available from the download page of the UCSC genome browser. We will need the following:

1. hg19 to hg38 chain file (this file can be found in the LiftOver section): http://hgdownload.cse.ucsc.edu/goldenPath/hg19/liftOver/hg19ToHg18.over.chain.gz

2. hg19 reference file in 2bit format (from the full dataset section): http://hgdownload.cse.ucsc.edu/goldenPath/hg19/bigZips/hg19.2bit

3. h38 reference file in 2bit format: http://hgdownload.cse.ucsc.edu/goldenPath/hg38/bigZips/hg38.2bit

Note that the chain file needs to be uncompressed.

Generate a VCF with the insertion and the deletion

We first need to generate a VCF file contain