vcfanno icon indicating copy to clipboard operation
vcfanno copied to clipboard

api.go:789: unexpected header line

Open BriMeireles opened this issue 5 years ago • 4 comments

Hello, I tried to run vcfanno with my files (grch37.vcfanno.conf and out-ensemble.vcf.gz) and also tried to run your example (tests/testVA/). Both times, I found the same error:

  • Command that I used: vcfanno grch37.vcfanno.conf out-ensemble.vcf.gz

  • Error:

vcfanno version 0.3.1 [built with go1.11]

see: https://github.com/brentp/vcfanno
=============================================
vcfanno.go:115: found 48 sources from 8 files
api.go:789: unexpected header line:

I checked the vcf files and both have a header and the other tools recognized the format as vcf without any problem. I search online but I don't find any information regarding this error. Can you give me some suggestion to solve this problem?

Thank you, Best regards,

BriMeireles avatar Apr 03 '19 16:04 BriMeireles

Hi @BriMeireles Did you figure out what was going on with this? I am encountering the same error. Thanks!

syouligan avatar May 30 '19 14:05 syouligan

can you narrow it down to 1 file and then paste the header of that vcf in this issue? then I can fix or help.

brentp avatar May 30 '19 14:05 brentp

Hi Brent, Thanks for the epic tool and getting involved. I have found a solution to this problem in that a data file was called a .vcf when in actual fact it was a .tsv (it only has 5 columns, #chr, pos, ref, alt, value). When I ran vcfanno on this file without a header it returned three values for each variant, one for each possible ref/alt combination indicating it wasnt recognising the specific ref/alt combination. When I ran it with a header designating ref/alt yet retaining the .vcf file type it produced the unexpected header error as sited above. When I changed to a .tsv with the header all was resolved so I assume the .vcf dictates vcfanno file processing? Sorry for the hassle and thanks for the help. Cheers

syouligan avatar May 30 '19 17:05 syouligan

yes. that sounds right. it uses the file extension to "sniff" the file type. it mostly works, but has problems like you encountered here.

brentp avatar May 30 '19 18:05 brentp