Parse float QUAL values in exponent syntax #44

Merged
merged 1 commit into from Jun 10, 2012

Conversation

Projects
None yet
3 participants
@martijnvermaat
Collaborator

martijnvermaat commented Jun 8, 2012

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.

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.
@lennax

This comment has been minimized.

Show comment
Hide comment
@lennax

lennax 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?

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

This comment has been minimized.

Show comment
Hide comment
@martijnvermaat

martijnvermaat Jun 8, 2012

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).

Collaborator

martijnvermaat commented Jun 8, 2012

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 pushed a commit that referenced this pull request Jun 10, 2012

James Casbon
Merge pull request #44 from martijnvermaat/github-issue-43
Parse float QUAL values in exponent syntax

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

@jamescasbon

This comment has been minimized.

Show comment
Hide comment
@jamescasbon

jamescasbon Jun 10, 2012

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.

Owner

jamescasbon commented Jun 10, 2012

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.

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

James Casbon
Merge pull request #44 from martijnvermaat/github-issue-43
Parse float QUAL values in exponent syntax
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment