Annotating Tabix Indexed Vcf
1
0
Entering edit mode
10.5 years ago
rickyflintoff ▴ 100

I would like to annotate a tabix indexed vcf. Thus, my input is a tabix file and my output should also be a tabix file. How can this be accomplished?

vcf tabix • 4.9k views
ADD COMMENT
1
Entering edit mode
10.5 years ago

unzip your vcf, annotate it, sort, compress with bgzip and re-index with tabix.

gunzip -c yourfile.vcf.gz > tmp1.vcf
annotatetool1  tmp1.vcf > tmp2.vcf
annotatetool2  tmp2.vcf > tmp3.vcf
vcf-sort <  tmp3.vcf |  bgzip -c > annot.vcf.gz
tabix -p vcf annot.vcf.gz

If your tools use stdin and stdout, almost all the command lines below can fit into one pipeline

gunzip -c yourfile.vcf.gz | annotatetool1 | annotatetool2 |  vcf-sort |  bgzip -c >  annot.vcf.gz &&   tabix -p vcf annot.vcf.gz
ADD COMMENT

Login before adding your answer.

Traffic: 2011 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6