brentp / vcfanno

annotate a VCF with other VCFs/BEDs/tabixed files
https://genomebiology.biomedcentral.com/articles/10.1186/s13059-016-0973-5
MIT License
357 stars 55 forks source link

api.go:789: unexpected header line #107

Open BriMeireles opened 5 years ago

BriMeireles commented 5 years ago

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:

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, 
syouligan commented 5 years ago

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

brentp commented 5 years ago

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.

syouligan commented 5 years ago

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

brentp commented 5 years ago

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