Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved parsing of INFO and FORMAT lines #374

Merged
merged 4 commits into from
Apr 22, 2024

Conversation

jeizenga
Copy link
Contributor

The current parsing code assumes that the required fields (ID, Number, Format, Description) will occur in a set orientation. My reading of the VCF spec is that this ordering is not required, although it's definitely a bit ambiguous:

INFO fields should be described as follows (first four keys are required, source and version are recommended):
##INFO=<ID=ID,Number=number,Type=type,Description="description",Source="source",Version="version">

This parsing issue shows up, in particular, in some of the VCFs from the newer high-coverage VCFs of the 1000GP samples. My updated parsing code allows these keys to occur in any order.

(I'm also pulling in some useful-looking warnings from Adam)

adamnovak and others added 4 commits May 31, 2022 11:24
This fixes a canonicalization check that was looking at span instead of SVLEN.

It also checks against canonicalizing variants whose end positions would fall
outside the contig. Those are incorrect in the VCF and can't safely be
canonicalized.
@jeizenga
Copy link
Contributor Author

I got a warning that this PR failed a CI test from the vgteam fork: https://github.com/vgteam/vcflib/actions/runs/4724980520

However, this test is also currently failing in the master branch, so I strongly suspect that it is unrelated to this PR: https://github.com/vcflib/vcflib/actions/runs/4508941622/jobs/7938130394

adamnovak added a commit to vgteam/vg that referenced this pull request Apr 24, 2023
@pjotrp
Copy link
Contributor

pjotrp commented Aug 5, 2023

I'll take a look at this.

@pjotrp pjotrp merged commit d984611 into vcflib:master Apr 22, 2024
@pjotrp
Copy link
Contributor

pjotrp commented Apr 22, 2024

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants