smehringer / SViper

Swipe your Structural Variants called on long (ONT/PacBio) reads with short exact (Illumina) reads.
BSD 3-Clause "New" or "Revised" License
32 stars 8 forks source link

Missing VCF header lines #5

Closed eldariont closed 4 years ago

eldariont commented 5 years ago

Hi Svenja,

bcftools is complaining about missing VCF header lines in SViper's VCF output:

[W::vcf_parse] INFO 'SEQ' is not defined in the header, assuming Type=String
[W::vcf_parse] FILTER 'FAIL5' is not defined in the header
[W::vcf_parse] FILTER 'FAIL3' is not defined in the header
[W::vcf_parse] FILTER 'FAIL2' is not defined in the header
[W::vcf_parse] FILTER 'FAIL4' is not defined in the header
[E::bcf_write] Unchecked error (2), exiting

Could you maybe add these?

Cheers David

smehringer commented 5 years ago

Sure I'll have a look at it next week!

smehringer commented 5 years ago

Hey @eldariont,

please check out the current master, build and run SViper again and tell me if it works with the new commit

I include the info SEQ field in case it does not appear in the header. I always include the FAIL filter tags, since I assume nobody else uses them.

This actually caught a tiny bug also! FILTER1 and 4 where ambiguous so now there are also FAIL6 and 7 although they should seldom occur since they refer to an unknown reference name of the variant. (see this commit as a reference)

eldariont commented 5 years ago

Thanks for working on this. There remains one small problem that bcftools still complains about. The spec requires the ID of a meta-information field to not be surrounded by quotation marks.

So it needs to be output_vcf << "##FILTER=<ID=FAIL1,Description=\"No long reads in variant region.\">" << std::endl; instead of output_vcf << "##FILTER=<ID=\"FAIL1\",Description=\"No long reads in variant region.\">" << std::endl;.

smehringer commented 5 years ago

:roll_eyes: :roll_eyes: fine. thanks for the info!

eldariont commented 5 years ago

Yes, it's annoying. I can also create a PR if you prefer.

smehringer commented 5 years ago

sure why not, thanks! :)

smehringer commented 4 years ago

Fixed by #7