Vcf-Tools : Error "Broken Vcf Header, No Column Names?'"
1
1
Entering edit mode
12.3 years ago

I've indexed a set of vcf with tabix.

$ gunzip -c A.vcf.bgz 
##fileformat=VCFv4.1
(...)
#CHROM    POS    ID    REF    ALT    QUAL    FILTER    INFO    FORMAT    A
chr1    10109    .    A    T    101.0    .    DP=101;VDB=0.0164;AF1=0.5;AC1=1;DP4=27,19,13,23;MQ=25;FQ=104;PV4=0.049,9.6e-06,0.056,0.15    GT:PL:GQ    0/1:131,0,233:99
chr1    10177    .    ACC    ACCC    70.5    .    INDEL;DP=56;VDB=0.0099;AF1=1;AC1=2;DP4=0,0,0,27;MQ=21;FQ=-116    GT:PL:GQ    1/1:111,81,0:99
chr1    10179    .    C    CN    70.5    .    INDEL;DP=59;VDB=0.0140;AF1=1;AC1=2;DP4=0,0,0,27;MQ=21;FQ=-116    GT:PL:GQ    1/1:111,81,0:99
chr1    10230    .    ACCCC    ACCC    9.02    .    INDEL;DP=50;VDB=0.0322;AF1=0.6672;AC1=1;DP4=0,2,0,8;MQ=20;FQ=-31.5;PV4=1,1,0.051,0.42    GT:PL:GQ    0/1:45,
0,3:7

$ tabix A.vcf.bgz chr1:10177-10178
chr1    10177    .    ACC    ACCC    70.5    .    INDEL;DP=56;VDB=0.0099;AF1=1;AC1=2;DP4=0,0,0,27;MQ=21;FQ=-116    GT:PL:GQ    1/1:111,81,0:99

tabix and vcf-tools/bin are in my $PATH

I've set PERL5LIB to /path/to/vcftools0.1.9/lib/perl5/siteperl

when I try to merge my VCFs with VCFtools I get the following error:

$ vcf-merge A.vcf.bgz B.vcf.bgz

Could not parse the fileformat version string [(#######large BINARY string###############)
], assuming VCFv4.1
Broken VCF header, no column names?
 at /usr/local/package/vcftools_0.1.9/lib/perl5/site_perl/Vcf.pm line 177
    Vcf::throw('Vcf4_1=HASH(0x1e04e200)', 'Broken VCF header, no column names?') called at /usr/local/package/vcftools_0.1.9/lib/perl5/site_perl/Vcf.pm line 868
    VcfReader::_read_column_names('Vcf4_1=HASH(0x1e04e200)') called at /usr/local/package/vcftools_0.1.9/lib/perl5/site_perl/Vcf.pm line 610
    VcfReader::parse_header('Vcf4_1=HASH(0x1e04e200)') called at /usr/local/package/vcftools_0.1.9/bin/vcf-merge line 168
    main::init_cols('HASH(0x1e3d73d0)', 'Vcf4_1=HASH(0x1e04dc20)') called at /usr/local/package/vcftools_0.1.9/bin/vcf-merge line 264
    main::merge_vcf_files('HASH(0x1e3d73d0)') called at /usr/local/package/vcftools_0.1.9/bin/vcf-merge line 12

what's wrong with my command ?

Pierre

vcftools vcf perl • 13k views
ADD COMMENT
1
Entering edit mode

I have the same problem as Pierre, just with a different tool. I also used bgzip, tabix and added the perlpath. Just my vcf file has a .gz and not a .bgz, but still I get the same error as Pierre. Any additional suggestions? Thanks Eva

ADD REPLY
0
Entering edit mode

Did you get any error messages while runing tabix? ; check if VCF is sorted or not? I generally follow this: for F in *.vcf ; do vcf-sort $F | bgzip -c > ${F}.gz ; tabix -p vcf ${F}.gz ; done

ADD REPLY
0
Entering edit mode

Hi I have the similar errors. Have you sorted it out ?

Thank in advance

ADD REPLY
2
Entering edit mode

You do realize this is a 2 year old post, right? And you're just pointing to a (not so wholesome) solution that you've written in a blog that is essentially the same as Brad's solution from two years ago. That's not really helpful.

ADD REPLY
4
Entering edit mode
12.3 years ago

It looks like VCFTools handles bgzipped/tabix files by recognizing a '.gz' extension. See line 209 of:

http://vcftools.svn.sourceforge.net/viewvc/vcftools/perl/Vcf.pm?revision=773&view=markup

So the bgz extension confuses it and results in trying to read your bgzipped input as plain text.

ADD COMMENT
0
Entering edit mode

many thanks Brad !

ADD REPLY

Login before adding your answer.

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