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

Already on GitHub? Sign in to your account

Allow flexibility in parsing INFO values specified as integers in the header: also allow float values #79

Merged
merged 1 commit into from Dec 5, 2012

Conversation

Projects
None yet
3 participants

chapmanb commented Dec 3, 2012

Some GATK files have the GC keyval specified as an Integer in the header, but the actual values are floats. To be a bit more flexible this patch retries with float if int fails, allowing any number value to pass cleanly.

seandavi commented Dec 3, 2012

I agree that this patch makes sense. Does it make sense, though, to log a "warning" if this occurs in parsing?

chapmanb commented Dec 3, 2012

We could do, although we're not changing data and worrying about type safety in Python makes me sad. My expected behavior would be to give me back what's in the INFO field independent of what the header says. If we converted to integers or otherwise changed the data I'd think a warning makes sense.

As a reference point, GATK v2 raises an error and you need to use their LENIENT_VCF_PROCESSING flag to get a warning. GATK is super strict across the board, so this fits with their philosophy.

jamescasbon pushed a commit that referenced this pull request Dec 5, 2012

Merge pull request #79 from chapmanb/master
Allow flexibility in parsing INFO values specified as integers in the header: also allow float values

@jamescasbon jamescasbon merged commit 69ecc53 into jamescasbon:master Dec 5, 2012

Owner

jamescasbon commented Dec 5, 2012

This will go in 0.6.2, which will get released as soon as we have a patch for #78 ;)

jamescasbon pushed a commit that referenced this pull request Jan 16, 2013

gotgenes pushed a commit to gotgenes/PyVCF that referenced this pull request May 13, 2014

Merge pull request #79 from chapmanb/master
Allow flexibility in parsing INFO values specified as integers in the header: also allow float values

gotgenes pushed a commit to gotgenes/PyVCF that referenced this pull request May 13, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment