ktym/vcftobeacon

Problems when chromosomes are not declared in the header

Opened this issue · 0 comments

Sometimes, vcf files do not declare the chromosomes in the header. So when running bcftools it throws the following error:

[W::vcf_parse] Contig 'chr1' is not defined in the header. (Quick workaround: index the file with tabix.)
[W::vcf_parse] Contig 'chr11' is not defined in the header. (Quick workaround: index the file with tabix.)

This could be fixed if at the first step (prior to running bcftools) vcf files are bgzipped and tabix indexed:

bgzip XX.vcf
tabix -p vcf XX.vcf 

I am not sure whether this would be better to do for all the vcf files or giving an argument in order to proceed this way (maybe to run it by default but giving the option to skip it?).