Skip to content

Parse float QUAL values in exponent syntax #44

Merged
merged 1 commit into from Jun 10, 2012

3 participants

@martijnvermaat
Collaborator

Fixes GitHub issue #43. Note that any QUAL value that cannot be parsed as
int or float is stored as None.

Also note that explicit string searching for certain characters first might be faster. I don't think a regular expression for recognizing float values would be faster and I do think this patch is a more Pythonic solution.

@martijnvermaat martijnvermaat Parse float QUAL values in exponent syntax
Fixes GitHub issue #43. Note that any QUAL value that cannot be parsed as
int or float is stored as None.
31f51d4
@lennax
lennax commented Jun 8, 2012

I agree that regexp would likely be slower.

To play devil's advocate, how much of a disadvantage would it be to store every QUAL as a float?

@martijnvermaat
Collaborator

I don't know, but for one thing it makes reading and writing no longer the identity function (and that might also not be a problem).

@jamescasbon jamescasbon merged commit debbb56 into jamescasbon:master Jun 10, 2012
@jamescasbon
Owner

Merged, thanks!

Minor quibble: I would like to keep the example vcfs as they are on the VCF spec site, if possible, and provide alternate files for other test cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.