Question: Vcf-Tools : Error "Broken Vcf Header, No Column Names?'"
1
gravatar for Pierre Lindenbaum
6.7 years ago by
France/Nantes/Institut du Thorax - INSERM UMR1087
Pierre Lindenbaum119k wrote:

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

vcf perl vcftools • 8.2k views
ADD COMMENTlink modified 4.1 years ago by Anop Singh Ranawat0 • written 6.7 years ago by Pierre Lindenbaum119k
4
gravatar for Brad Chapman
6.7 years ago by
Brad Chapman9.4k
Boston, MA
Brad Chapman9.4k wrote:

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 COMMENTlink written 6.7 years ago by Brad Chapman9.4k

many thanks Brad !

ADD REPLYlink written 6.7 years ago by Pierre Lindenbaum119k
0
gravatar for eva.knig
6.2 years ago by
eva.knig60
eva.knig60 wrote:

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 COMMENTlink written 6.2 years ago by eva.knig60

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 REPLYlink modified 6.2 years ago • written 6.2 years ago by Rm7.8k

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

Thank in advance

ADD REPLYlink written 6.1 years ago by figo200
0
gravatar for Anop Singh Ranawat
4.1 years ago by
India
Anop Singh Ranawat0 wrote:

goto

http://bioinfoconcepts.blogspot.in/2015/04/vcf-tools-error-broken-vcf-header-no.html?view=sidebar

ADD COMMENTlink written 4.1 years ago by Anop Singh Ranawat0
2

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 REPLYlink written 4.1 years ago by RamRS21k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1797 users visited in the last hour