vcf not indexing
1
9
Entering edit mode
9.6 years ago
alex ▴ 250

Trying to index vcf file but getting the following

tabix -p vcf dbsnp_138.hg19.vcf.gz
Not a BGZF file: dbsnp_138.hg19.vcf.gz
tbx_index_build failed: dbsnp_138.hg19.vcf.gz

Thoughts on how to proceed? Thanks!

tabix • 23k views
ADD COMMENT
37
Entering edit mode
9.6 years ago

Looks to me like the dbsnp file is not bgzipped?

gunzip dbsnp_138.hg19.vcf.gz
bgzip dbsnp_138.hg19.vcf
tabix -p vcf dbsnp_138.hg19.vcf.gz
ADD COMMENT
2
Entering edit mode

@Sean Davis you just saved me a lot of frustration. I found this after a few searches and it worked. THanks

ADD REPLY
0
Entering edit mode

I had the same problem: when I compressed with gunzip <file>.vcf tabix gave the error: tbx_index_build failed:<file>.vcf.gz but it worked with `bgzip <file>.vcf.

ADD REPLY
2
Entering edit mode

Of course it does. bgzip does blockwise (therefore the b in bgzip) compression of the file, which tabix relies on. That enables tabix to quickly retrieve data by only very partially decompressing a (sometimes hugh) file, guided by the index. gzip does not do blockwise compression.

ADD REPLY

Login before adding your answer.

Traffic: 861 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