Skip to content
walkerhound edited this page Nov 8, 2012 · 2 revisions

Go back to Vcf files

Table of Contents

Download tools and documentation

Download vcftools and documentation from here:

Link to download vcf tools

Documentation for vcf tools

Download Tabix

Install tabix

Download tabix from the link above. Both bgzip and tabix must be in directories that are listed in the PATH environment variable.

The tabix file downloaded will be named something like:

tabix-0.2.6.tar.bz2

Unarchive the file by double clicking on it. Go to the tabix-0.2.6 sub-directory and type

make

This will create the tabix and bgzip executables and other files.

Both bgzip and tabix must be in directories that are listed in the PATH environment variable. So add a line like this:

PATH=$PATH:/Users/clemensl/vcfTools/tabix-0.2.6

to the .bash_profile file in your home directory. After that type

source .bash_profile

Install vcftools

There are two types of tools included with vcftools, binaries and perl scripts.

Binaries

The file downloaded with vcf tools will be named something like:

vcftools_0.1.9.tar.gz

Unarchive by double clicking on the file.

Build the vcftools executables by typing

 make 
in the vcftools folder.

Here are the tools that are created in the bin subdirectory:

fill-an-ac	vcf-annotate	
vcf-concat	vcf-isec	
vcf-query	vcf-stats	
vcf-to-tab	vcftools
fill-aa		vcf-compare	
vcf-convert	vcf-merge	
vcf-sort	vcf-subset	
vcf-validator

Perl scripts

There are perl scripts in the perl subdirectory:

Vcf.pm			fill-an-ac		
tab-to-vcf		vcf-compare		
vcf-convert		vcf-indel-stats		
vcf-phased-join		vcf-sort		
vcf-to-tab              FaSlice.pm		
VcfStats.pm		fill-fs			
test.t			vcf-concat		
vcf-fix-newlines	vcf-isec		
vcf-query		vcf-stats		
vcf-validator           fill-aa			
fill-ref-md5		vcf-annotate		
vcf-consensus		vcf-fix-ploidy		
vcf-merge		vcf-shuffle-cols	
vcf-subset

The Perl scripts require that VCF files are compressed by bgzip and indexed by tabix. Download tabix from the link above. Both bgzip and tabix must be in directories that are listed in the PATH environment variable. For running the Perl scripts, the PERL5LIB environment variable must be set to include the Vcf.pm module

export PERL5LIB=/path/to/your/installation/perl

The perl scripts can be tested by running the script

./perl/test.t

To get test.t to work I had to go to cpan for Test::Most. At the command line type:

cpan Test::Most

test.t runs 63 tests and they all came out okay.

Clone this wiki locally