Haplotype plotting with GPAT - zeeev/vcflib GitHub Wiki

Usage statement for plotHaps:

INFO: help
INFO: description:
 plotHaps provides the formatted output that can be used with 'bin/plotHaplotypes.R'.
Output : haplotype matrix and positions

INFO: plotHaps  --target 0,1,2,3,4,5,6,7  --file my.phased.vcf.gz

INFO: required: t,target     -- argument: a zero base comma separated list of target individuals corrisponding to VCF column s
INFO: required: r,region     -- argument: a tabix compliant genomic range : "seqid:start-end" or "seqid"
INFO: required: f,file       -- argument: proper formatted phased VCF file
INFO: required: y,type       -- argument: genotype likelihood format: PL,GP,GP

INFO: version 1.0.1 ; date: April 2014 ; author: Zev Kronenberg; email : [email protected]

Running provided example:

bin/plotHaps --target  1,20,25,29,30,38,43,46 --file ~/gpat/samples/scaffold612.phased.vcf.gz  --type GP --region scaffold612:550000-650000 > headCrest.haps.txt
 1332  R --vanilla < bin/plotHaplotypes.R --args headCrest.haps.txt

Notice that the VCF file must be compressed and tabix indexed. It is advised to only plot small genomic regions. The size of the PDF grows quickly as the number of SNPs is increased.

Resulting plot:

hapPlot

Each row in the figure represents a single haplotype. Haplotypes are clustered based on similarity. The clustering diagram is plotted below the haplotype image.